diff --git a/.gitignore b/.gitignore index dc50bd0a8b..971d8fd0d3 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,11 @@ custom_assets/jak1/merc_replacements/* custom_assets/jak2/merc_replacements/* custom_assets/jak3/merc_replacements/* +# merc replacements +custom_assets/jak1/merc_replacements/* +custom_assets/jak2/merc_replacements/* +custom_assets/jak3/merc_replacements/* + # generated cmake files svnrev.h common/versions/revision.h diff --git a/.vs/launch.vs.json b/.vs/launch.vs.json index be17fb24ee..a7a463646c 100644 --- a/.vs/launch.vs.json +++ b/.vs/launch.vs.json @@ -145,7 +145,6 @@ "name": "Game - Jak 1 - Runtime (boot)", "args": [ "-v", - "--portable", "--game", "jak1", "--", diff --git a/common/dma/dma.cpp b/common/dma/dma.cpp index a6b747ef0f..3eebab72ea 100644 --- a/common/dma/dma.cpp +++ b/common/dma/dma.cpp @@ -4,7 +4,7 @@ #include "fmt/core.h" -std::string DmaTag::print() { +std::string DmaTag::print() const { std::string result; const char* mode_names[8] = {"refe", "cnt", "next", "ref", "refs", "call", "ret", "end"}; result += fmt::format("TAG: 0x{:08x} {:4s} qwc 0x{:04x}", addr, mode_names[(int)kind], qwc); @@ -15,7 +15,7 @@ std::string DmaTag::print() { return result; } -std::string VifCode::print() { +std::string VifCode::print() const { std::string result; switch (kind) { diff --git a/common/dma/dma.h b/common/dma/dma.h index d5a4f53f4b..a7d5ec445c 100644 --- a/common/dma/dma.h +++ b/common/dma/dma.h @@ -52,7 +52,7 @@ struct DmaTag { bool operator!=(const DmaTag& other) const { return !((*this) == other); } - std::string print(); + std::string print() const; }; inline void emulate_dma(const void* source_base, void* dest_base, u32 tadr, u32 dadr) { @@ -148,7 +148,7 @@ struct VifCode { u16 num; u16 immediate; - std::string print(); + std::string print() const; }; struct VifCodeStcycl { diff --git a/common/formatter/rules/rule_config.cpp b/common/formatter/rules/rule_config.cpp index bab83cf2bf..829e539d88 100644 --- a/common/formatter/rules/rule_config.cpp +++ b/common/formatter/rules/rule_config.cpp @@ -240,6 +240,7 @@ static FormFormattingConfig new_top_level_inline_form(bool elide_new_line) { const std::unordered_map opengoal_form_config = { {"case", new_pair_rule(true)}, + {"case-str", new_pair_rule(true)}, {"cond", new_pair_rule(false)}, {"#cond", new_pair_rule(false)}, {"in-package", new_top_level_inline_form(true)}, diff --git a/common/repl/repl_wrapper.h b/common/repl/repl_wrapper.h index 6ba81ad87a..b5d3b3880f 100644 --- a/common/repl/repl_wrapper.h +++ b/common/repl/repl_wrapper.h @@ -29,8 +29,11 @@ class Wrapper { Wrapper(const std::string& _username, const Config& config, const StartupFile& startup, - bool nrepl_alive) - : username(_username), repl_config(config), startup_file(startup), nrepl_alive(nrepl_alive) {} + bool _nrepl_alive) + : username(_username), + repl_config(config), + startup_file(startup), + nrepl_alive(_nrepl_alive) {} replxx::Replxx& get_repl() { return repl; } void init_settings(); void reload_startup_file(); diff --git a/common/texture/texture_slots.cpp b/common/texture/texture_slots.cpp index b4838370dd..e2b15f2ef0 100644 --- a/common/texture/texture_slots.cpp +++ b/common/texture/texture_slots.cpp @@ -49,6 +49,13 @@ std::vector jak3_slots = { "jakc-face", "jakc-finger", "jakc-hair", + "jakchires-arm", + "jakchires-eye", + "jakchires-eyebrow", + "jakchires-eyelid", + "jakchires-facelft", + "jakchires-facert", + "jakchires-hair", // default-water "bomb-gradient", "blue-beam-dest", diff --git a/common/util/fnv.h b/common/util/fnv.h new file mode 100644 index 0000000000..7ec0320db0 --- /dev/null +++ b/common/util/fnv.h @@ -0,0 +1,19 @@ +#pragma once + +#include + +#include "common/common_types.h" + +inline u64 fnv64(const void* data, u64 len) { + u64 ret = 0xcbf29ce484222325; + const auto* ptr = (const u8*)data; + for (u64 i = 0; i < len; i++) { + ret = 1099511628211 * (((u64)*ptr) ^ ret); + ptr++; + } + return ret; +} + +inline u64 fnv64(const std::string& str) { + return fnv64(str.data(), str.length()); +} \ No newline at end of file diff --git a/common/util/json_util.h b/common/util/json_util.h index 183cccdffe..ef8a9e7137 100644 --- a/common/util/json_util.h +++ b/common/util/json_util.h @@ -27,11 +27,11 @@ Range parse_json_optional_integer_range(const nlohmann::json& json); } template -void json_get_optional(const nlohmann::json& json, +void json_get_optional(const nlohmann::json& j, const std::string& key, std::optional& optionalValue) { - if (json.contains(key) && !json[key].is_null()) { - optionalValue = json[key].get(); + if (j.contains(key) && !j[key].is_null()) { + optionalValue = j[key].get(); } } diff --git a/decompiler/ObjectFile/LinkedObjectFile.h b/decompiler/ObjectFile/LinkedObjectFile.h index 94336888ad..dedefc077f 100644 --- a/decompiler/ObjectFile/LinkedObjectFile.h +++ b/decompiler/ObjectFile/LinkedObjectFile.h @@ -25,7 +25,7 @@ namespace decompiler { */ class LinkedObjectFile { public: - LinkedObjectFile(GameVersion version) : version(version){}; + LinkedObjectFile(GameVersion _version) : version(_version) {} void set_segment_count(int n_segs); void push_back_word_to_segment(uint32_t word, int segment); int get_label_id_for(int seg, int offset); diff --git a/decompiler/analysis/final_output.cpp b/decompiler/analysis/final_output.cpp index 325f223b76..4be6c69daf 100644 --- a/decompiler/analysis/final_output.cpp +++ b/decompiler/analysis/final_output.cpp @@ -54,12 +54,8 @@ void append_body_to_function_definition(goos::Object* top_form, body_elements.insert(body_elements.end(), inline_body.begin(), inline_body.end()); // If the first element in the body is a docstring, add it first if (body_elements.size() > 0 && body_elements.at(0).is_string()) { - if (version > GameVersion::Jak2) { - initial_top_level_forms.push_back( - goos::StringObject::make_new(fix_docstring_indent(inline_body.at(0).as_string()->data))); - } else { - initial_top_level_forms.push_back(inline_body.at(0)); - } + initial_top_level_forms.push_back( + goos::StringObject::make_new(fix_docstring_indent(inline_body.at(0).as_string()->data))); body_elements.erase(body_elements.begin()); } diff --git a/decompiler/config/jak1/all-types.gc b/decompiler/config/jak1/all-types.gc index 8aa53eedb0..32afabe93b 100644 --- a/decompiler/config/jak1/all-types.gc +++ b/decompiler/config/jak1/all-types.gc @@ -21104,7 +21104,7 @@ :size-assert #x94 :flag-assert #xf00300094 (:methods - (dumb-15 (_type_) none)) + (spawn-particles! (_type_) none)) (:states hud-normal hud-coming-in diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 44fc205c1a..b6c1626c5d 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -2515,6 +2515,7 @@ (iop-mem 48) (cancel-dgo 49) (set-stereo-mode 50) ;; sound-rpc-set-stereo-mode + (set-mirror 201) ) (defenum sound-group @@ -2829,6 +2830,17 @@ :flag-assert #x900000004 ) +; added +(defenum sound-mirror-mode + :type uint8 + (normal) + (mirrored) + ) + +; added for mirror mode +(deftype sound-rpc-set-mirror-mode (sound-rpc-cmd) + ((mirror sound-mirror-mode))) + (deftype sound-rpc-union (structure) ((data uint32 20 :offset-assert 0) (load-bank sound-rpc-load-bank :offset 0) @@ -2852,6 +2864,7 @@ (shutdown sound-rpc-shutdown :offset 0) (list-sounds sound-rpc-list-sounds :offset 0) (unload-music sound-rpc-unload-music :offset 0) + (mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0)) ) :method-count-assert 9 :size-assert #x50 diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index d3ffe23ed2..3c168afed3 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -15147,8 +15147,8 @@ :size-assert #x4 :flag-assert #xb00000004 (:methods - (init! (_type_) int) ;; 9 - (cloth-base-method-10 (_type_ cloth-params handle) int) ;; 10 + (update! (_type_) int) ;; 9 + (setup-from-params! (_type_ cloth-params handle) int) ;; 10 ) ) @@ -25908,8 +25908,33 @@ :flag-assert #xe00000010 ) +;; doesn't exist, but referenced by type ref in the entity table. +(deftype sail-boat-a (process-drawable-reserved) + () + ) + +(deftype cty-window-a (process-drawable-reserved) + () + ) + +(deftype city-window-a (process-drawable-reserved) + () + ) + +(deftype cty-guard-turret (process-drawable-reserved) + () + ) + +(deftype cty-fruit-stand (process-drawable-reserved) + () + ) + +(deftype torn (process-drawable-reserved) + () + ) + (deftype entity-info (basic) - ((ptype type :offset-assert 4) ;; guessed by decompiler + ((ptype object :offset-assert 4) ;; guessed by decompiler (pool symbol :offset-assert 8) ;; guessed by decompiler (heap-size int32 :offset-assert 12) ) @@ -33950,7 +33975,7 @@ ) (deftype particle-array (inline-array-class) - ((data verlet-particle :dynamic :inline :offset-assert 16) + ((data verlet-particle :dynamic :inline :offset-assert 16 :score 1) ) :method-count-assert 14 :size-assert #x10 @@ -34017,12 +34042,12 @@ :size-assert #x40 :flag-assert #x1000000040 (:methods - (calculate-wind! + (accumulate-external-forces! "If this cloth system has the wind flag, calculate the wind force." (_type_) none) ;; 11 - (verlet-particle-system-method-12 (_type_ float) none) ;; 12 - (verlet-particle-system-method-13 (_type_) none) ;; 13 - (verlet-particle-system-method-14 (_type_) none) ;; 14 + (compute-verlet-step (_type_ float) none) ;; 12 + (run-one-iteration "Run one iteration of the system." (_type_) none) ;; 13 + (reset! "Reset to stationary/default state." (_type_) none) ;; 14 (debug-draw (_type_) none) ;; 15 ) ) @@ -34082,9 +34107,9 @@ "Set up this cloth system with the given [[cloth-params]]." (_type_ cloth-params) none) ;; 16 (debug-draw-spheres (_type_) none) ;; 17 - (cloth-system-method-18 (_type_) int) ;; 18 - (cloth-system-method-19 (_type_) none) ;; 19 - (cloth-system-method-20 (_type_) none) ;; 20 + (post-physics-update (_type_) int) ;; 18 + (enforce-constraints-1 (_type_) none) ;; 19 + (enforce-constraints-2 (_type_) none) ;; 20 (cloth-system-method-21 (_type_) none) ;; 21 (cloth-system-method-22 (_type_) none) ;; 22 (cloth-system-method-23 (_type_) none) ;; 23 @@ -34098,9 +34123,9 @@ (cloth-system-method-31 (_type_ current-position-info) none) ;; 31 (cloth-system-method-32 (_type_ vector int int current-position-info) none) ;; 32 (cloth-system-method-33 (_type_ vu-lights) none) ;; 33 - (cloth-system-method-34 (_type_) none) ;; 34 - (cloth-system-method-35 (_type_) none) ;; 35 - (cloth-system-method-36 (_type_) none) ;; 36 + (hide! (_type_) none) ;; 34 + (reset-locations (_type_) none) ;; 35 + (pre-physics-update "Callback to update prior to running verlet integration. Can handle movement of the entire system in the world, for example" (_type_) none) ;; 36 (cloth-system-cmd-handler (_type_ pair) none) ;; 37 ) ) @@ -34122,8 +34147,8 @@ ;; cloth ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-extern get-neighboring-faces (function vector int int int int int)) -(define-extern *normal-array* (pointer vector)) +(define-extern get-neighboring-faces (function vector4w int int int int int)) +(define-extern *normal-array* (inline-array vector)) (define-extern light-vertex (function current-position-info vector rgba)) (define-extern *once* symbol) (define-extern *cloth-fade-alpha* gs-alpha) @@ -34196,7 +34221,17 @@ ;; curves ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defenum loop-behavior + :type uint64 + :bitfield #f + (wrap) + (clamp) + (b2) + (use-default) + ) + (deftype float-pair (structure) + "Two floats. Specifies one point on a piecewise linear curve." ((first float :offset-assert 0) (second float :offset-assert 4) (x float :offset 0) @@ -34208,6 +34243,7 @@ ) (deftype float-pair-array (inline-array-class) + "Array of points used to make a piecewise linear curve." ((data float-pair :dynamic :inline :offset-assert 16) ) :method-count-assert 14 @@ -34216,39 +34252,50 @@ ) (deftype curve2d (basic) + "Interface for evaluating a 2d curve. + The input is a float (x-position) and the output is a float (y-position). + The curve is over (0, 1). Values outside of the range are either clamped + or wrapped depending on the loop-behavior flag." () :method-count-assert 10 :size-assert #x4 :flag-assert #xa00000004 (:methods - (curve2d-method-9 (_type_ float int) float) ;; 9 + (evaluate "Compute value of curve at the given position." (_type_ float loop-behavior) float) ;; 9 ) ) (deftype curve-color (basic) + "Interface for evaluating a color curve. The input is a float, representing + progress through the curve, and the result is a floating point rgba color." () :method-count-assert 10 :size-assert #x4 :flag-assert #xa00000004 (:methods - (curve-color-method-9 (_type_ float rgbaf int) rgbaf) ;; 9 + (evaluate "Compute value of curve at the given position." (_type_ float rgbaf loop-behavior) rgbaf) ;; 9 ) ) (deftype curve2d-piecewise (curve2d) + "Implementation of 2d-curve for a piecewise linear curve. + Not particularly efficient - each evaluation needs to check each point." ((pts float-pair-array :offset-assert 4) - (default-loop-behavior uint64 :offset-assert 8) + (default-loop-behavior loop-behavior :offset-assert 8) ) :method-count-assert 12 :size-assert #x10 :flag-assert #xc00000010 (:methods - (curve2d-piecewise-method-10 (_type_ int symbol int) none) ;; 10 + (allocate! "Allocate memory for points." (_type_ int symbol symbol) none) ;; 10 (curve2d-piecewise-method-11 (_type_) none) ;; 11 ) ) (deftype curve2d-fast (curve2d) + "Implementation of 2d piecewise linear curve which tries to be faster. + While it is faster, it places the huge restriction that you can only have 4 points. + Note that the xs should be negative here." ((xs vector :inline :offset-assert 16) (ys vector :inline :offset-assert 32) (one-over-x-deltas vector :inline :offset-assert 48) @@ -34259,6 +34306,9 @@ ) (deftype curve-color-fast (curve-color) + "Implementation of color curve which tries to be faster. + While it is faster, it again has the restriction that you only + get 4 piecewise sections." ((xs vector :inline :offset-assert 16) (ys vector 4 :inline :offset-assert 32) (one-over-x-deltas vector :inline :offset-assert 96) @@ -34269,6 +34319,8 @@ ) (deftype color-pair (structure) + "Single section of a piecewise linear color curve. + Unlike the fast version, this stores x values exactly like you'd expect." ((first float :offset-assert 0) (second rgbaf :inline :offset-assert 16) (x float :offset 0) @@ -34280,6 +34332,7 @@ ) (deftype color-pair-array (inline-array-class) + "Array of points for piecewise linear color curve." ((data color-pair :dynamic :inline :offset-assert 16) ) :method-count-assert 14 @@ -34288,21 +34341,22 @@ ) (deftype curve-color-piecewise (curve-color) + "Implementation of curve-color." ((pts color-pair-array :offset-assert 4) - (default-loop-behavior uint64 :offset-assert 8) + (default-loop-behavior loop-behavior :offset-assert 8) ) :method-count-assert 11 :size-assert #x10 :flag-assert #xb00000010 (:methods - (curve-color-piecewise-method-10 (_type_ int symbol uint) none) ;; 10 + (allocate! "Allocate memory for points." (_type_ int symbol symbol) none) ;; 10 ) ) -(define-extern rgbaf-lerp! (function rgbaf rgbaf rgbaf float rgbaf)) -(define-extern evaluate-curve-fast (function curve2d-fast rgbaf rgbaf float)) -(define-extern evaluate-color-curve-fast (function curve-color-fast rgbaf rgbaf rgbaf)) -(define-extern rgba<-rgbaf (function rgba rgbaf int)) +(define-extern rgbaf-lerp! "Lerp all four components of rgba." (function rgbaf rgbaf rgbaf float rgbaf)) +(define-extern evaluate-curve-fast "Evaluate a curve2d-fast at the given value." (function curve2d-fast float float)) +(define-extern evaluate-color-curve-fast "Evaluate a color-curve-fast at the given value." (function curve-color-fast float rgbaf rgbaf)) +(define-extern rgba<-rgbaf "Convert rgbaf to rgba. Seems like the input rgba's value is not used in any way." (function rgba rgbaf rgba)) (define-extern *curve-unity* curve2d-fast) (define-extern *curve-linear-up* curve2d-fast) (define-extern *curve-linear-down* curve2d-fast) @@ -34679,6 +34733,14 @@ :flag-assert #xe00000010 ) +(defenum lie-mode + :type uint64 + (appearance0) + (appearance1) + (appearance2) + (use-two-strips 3) + ) + (deftype light-trail-composition (structure) ((color-mode uint64 :offset-assert 0) (color-curve curve-color-piecewise :offset-assert 8) @@ -34696,8 +34758,8 @@ (uv-mode uint64 :offset-assert 72) (uv-repeat-dist float :offset-assert 80) (max-age time-frame :offset-assert 88) - (tex-id uint32 :offset-assert 96) - (lie-mode uint64 :offset-assert 104) + (tex-id texture-id :offset-assert 96) + (lie-mode lie-mode :offset-assert 104) (lie-vector vector :inline :offset-assert 112) (zbuffer? symbol :offset-assert 128) (use-tape-mode? symbol :offset-assert 132) @@ -34711,7 +34773,7 @@ (deftype light-trail-breadcrumb (structure) ((pos vector :inline :offset-assert 0) - (birth-time uint32 :offset 12 :decomp-as time-frame) + (birth-time uint32 :offset 12 :decomp-as time-frame :score 1) ) :method-count-assert 9 :size-assert #x10 @@ -34726,15 +34788,22 @@ :flag-assert #xe00000010 ) +(defenum light-trail-decision + :type uint64 + (added 0) + (not-added 1) + (reset 2) + ) + (deftype light-trail (basic) - ((crumb-array (array light-trail-breadcrumb) :offset-assert 4) + ((crumb-array (array uint8) :offset-assert 4) (crumb-size uint8 :offset-assert 8) (crumb-count int16 :offset-assert 10) (max-crumb-count int16 :offset-assert 12) (appearance light-trail-composition :offset-assert 16) (start-marker uint64 :offset-assert 24) (end-marker uint64 :offset-assert 32) - (decision uint64 :offset-assert 40) + (decision light-trail-decision :offset-assert 40) (total-distance-traveled float :offset-assert 48) (strip prim-strip :offset-assert 52) (strip2 prim-strip :offset-assert 56) @@ -34744,19 +34813,19 @@ :size-assert #x80 :flag-assert #x1600000080 (:methods - (light-trail-method-9 (_type_ light-trail-composition int) none) ;; 9 - (light-trail-method-10 (_type_) none) ;; 10 - (light-trail-method-11 (_type_ vector time-frame) int) ;; 11 - (light-trail-method-12 (_type_) none) ;; 12 - (light-trail-method-13 (_type_) int) ;; 13 - (light-trail-method-14 (_type_) none) ;; 14 + (setup! "Initialize, including allocation of crumbs and strips on the process heap." (_type_ light-trail-composition int) none) ;; 9 + (reset! "Clear all tracked crumbs." (_type_) none) ;; 10 + (add-crumb! "Try adding a crumb, kicking out the oldest if there's not enough room. This may reject if it's too close to the previous." (_type_ vector time-frame) int) ;; 11 + (build-prim-strip! "Build the mesh for this light trail." (_type_) none) ;; 12 + (common-trans! "Call this on each frame to handle max-age." (_type_) int) ;; 13 + (expire-old-points! "Internal function to kill off points that are too old." (_type_) none) ;; 14 (light-trail-method-15 (_type_) none) ;; 15 - (add-vert! (_type_ prim-strip vector float float float) none) ;; 16 - (light-trail-method-17 (_type_ vector float float vector float) symbol) ;; 17 - (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) ;; 18 - (light-trail-method-19 (_type_ float int) none) ;; 19 + (add-vert-to-prim-strip! "Add a single vertex to the prim." (_type_ prim-strip vector rgba float float) none) ;; 16 + (add-tri-pair-to-prim! "Add two vertices to the prim strip to add two triangles" (_type_ vector rgba float vector float) symbol) ;; 17 + (calc-vertex-pos! (_type_ light-trail-breadcrumb int vector vector) none) ;; 18 + (crumb-age-out-callback "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." (_type_ float int) none) ;; 19 (reset-crumbs! (_type_) none) ;; 20 - (light-trail-method-21 (_type_ vector) none) ;; 21 + (replace-last-crumb! "Similar to add-crumb, but will modify the last crumb instead of advancing." (_type_ vector) none) ;; 21 ) ) @@ -34774,7 +34843,7 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) ;; 22 + (add-crumb-with-offset "Given two points, add the first and offset to a crumb." (_type_ vector vector) light-trail-breadcrumb) ;; 22 (weapon-trail-method-23 (_type_ vector vector) none) ;; 23 ) ) @@ -34793,8 +34862,8 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) ;; 22 - (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) ;; 23 + (add-crumb-with-offset (_type_ vector vector) none) ;; 22 + (tread-trail-method-23 (_type_ vector vector) none) ;; 23 ) ) @@ -34834,11 +34903,11 @@ die ;; 15 ) (:methods - (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) ;; 16 - (light-trail-tracker-method-17 (_type_ process-focusable) symbol) ;; 17 - (light-trail-tracker-method-18 (_type_ process-focusable) symbol) ;; 18 - (light-trail-tracker-method-19 (_type_) symbol) ;; 19 - (light-trail-tracker-method-20 (_type_ vector) none) ;; 20 + (get-tracked-object-pos (_type_ process-focusable vector) vector) ;; 16 + (should-track? (_type_ process-focusable) symbol) ;; 17 + (should-end? (_type_ process-focusable) symbol) ;; 18 + (should-draw? (_type_) symbol) ;; 19 + (add-crumb! (_type_ vector) none) ;; 20 ) ) @@ -57861,7 +57930,7 @@ (deftype tire-trail-crumb (light-trail-breadcrumb) ((offset vector :inline :offset-assert 16) - (uu float :offset 28) + (uu float :offset 28 :score 1) ) :method-count-assert 9 :size-assert #x20 @@ -57874,13 +57943,13 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (tire-trail-method-22 (_type_) none) ;; 22 - (tire-trail-method-23 (_type_) none) ;; 23 + (add-crumb-with-offset-and-uu (_type_ vector vector float) none) ;; 22 + (tire-trail-method-23 (_type_ vector vector float) none) ;; 23 ) ) (deftype tire-trail-tracker (light-trail-tracker) - () + ((trail tire-trail :override)) :method-count-assert 21 :size-assert #xac :flag-assert #x15003000ac diff --git a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc index c6ad452490..a3d99d12e5 100644 --- a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc @@ -138,7 +138,7 @@ [7, "(function none)"], [3, "(function symbol :behavior process)"] ], - "scene": [[4, "(function none :behavior scene-player)"]], + "scene": [[4, "(function symbol :behavior scene-player)"]], "pov-camera": [ [ 7, diff --git a/decompiler/config/jak3/ntsc_v1/inputs.jsonc b/decompiler/config/jak3/ntsc_v1/inputs.jsonc index 8af43b2f28..b83f112576 100644 --- a/decompiler/config/jak3/ntsc_v1/inputs.jsonc +++ b/decompiler/config/jak3/ntsc_v1/inputs.jsonc @@ -361,6 +361,29 @@ "jakc-finger-dark", "jakc-hair-dark", + // darkjak-highres + "jakchires-arm", + "jakchires-arm-norm", + "jakchires-arm-dark", + "jakchires-eye", + "jakchires-eye-norm", + "jakchires-eye-dark", + "jakchires-eyebrow", + "jakchires-eyebrow-norm", + "jakchires-eyebrow-dark", + "jakchires-eyelid", + "jakchires-eyelid-norm", + "jakchires-eyelid-dark", + "jakchires-facelft", + "jakchires-facelft-norm", + "jakchires-facelft-dark", + "jakchires-facert", + "jakchires-facert-norm", + "jakchires-facert-dark", + "jakchires-hair", + "jakchires-hair-norm", + "jakchires-hair-dark", + // Skull Gem "skull-gem-dest", "skull-gem-alpha-00", diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index a82a18d848..61bf2d69af 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -1850,6 +1850,8 @@ ["_stack_", 148, "float"], ["_stack_", 152, "float"], ["_stack_", 156, "float"], + [25, "a1", "light-trail-breadcrumb"], + [178, "s4", "light-trail-breadcrumb"], [556, "a0", "vector"] ], "compute-trail-scaled-t": [[17, "v1", "float"]], @@ -2683,8 +2685,13 @@ [[21, 25], "a0", "prim-strip"] ], "(event tracking light-trail-tracker)": [[55, "v1", "float"]], - "(method 21 light-trail)": [[50, "v1", "light-trail-breadcrumb"]], - "(method 14 light-trail)": [[47, "a0", "uint"]], + "(method 21 light-trail)": [[[18, 64], "gp", "light-trail-breadcrumb"]], + "(method 14 light-trail)": [ + [47, "a0", "uint"], + [[10, 32], "a1", "light-trail-breadcrumb"], + [[34, 60], "s3", "light-trail-breadcrumb"], + [[34, 73], "s2", "light-trail-breadcrumb"] + ], "debug-menu-item-var-update-display-str": [ [48, "v1", "int"], [63, "v1", "int"], @@ -2735,16 +2742,12 @@ [27, "gp", "process-drawable"], [30, "gp", "process-drawable"] ], - "(method 23 weapon-trail)": [ - [62, "v1", "light-trail-breadcrumb"], - [65, "v1", "light-trail-breadcrumb"] - ], + "(method 23 weapon-trail)": [[[0, 100], "gp", "weapon-trail-crumb"]], "(method 22 weapon-trail)": [[32, "v0", "light-trail-breadcrumb"]], "(method 22 tread-trail)": [[19, "v0", "light-trail-breadcrumb"]], - "(method 23 tread-trail)": [ - [51, "v1", "light-trail-breadcrumb"], - [67, "v0", "light-trail-breadcrumb"] - ], + "(method 23 tread-trail)": [[[0, 100], "s5", "tread-trail-crumb"]], + "(method 23 tire-trail)": [[[0, 74], "s5", "tire-trail-crumb"]], + "(method 22 tire-trail)": [[[18, 24], "v1", "tire-trail-crumb"]], "(trans idle fma-sphere)": [[39, "a2", "process-drawable"]], "part-water-splash-callback": [[3, "v1", "float"]], "(method 15 water-control)": [[48, "v1", "float"]], @@ -6428,11 +6431,11 @@ ], "cshape-reaction-scorp-shot": [[15, "v1", "v-scorp-shot"]], "(method 78 wvehicle)": [ - [262, "s1", "process-focusable"], - [271, "s1", "process-focusable"], - [287, "s1", "process-focusable"], - [309, "s1", "process-focusable"], - [322, "s1", "process-focusable"], + [262, "s1", "tire-trail-tracker"], + [271, "s1", "tire-trail-tracker"], + [287, "s1", "tire-trail-tracker"], + [309, "s1", "tire-trail-tracker"], + [322, "s1", "tire-trail-tracker"], [358, "v1", "collide-shape-prim-group"] ], "(method 97 wvehicle)": [ @@ -6551,7 +6554,10 @@ [15, "v1", "process-drawable"], [22, "v1", "process-drawable"] ], - "(method 19 tire-trail)": [], + "(method 19 tire-trail)": [ + [[5, 28], "s5", "tire-trail-crumb"], + [[5, 28], "s4", "tire-trail-crumb"] + ], "vehicle-spawn": [[93, "gp", "vehicle"]], "vehicle-spawn-hack": [[41, "gp", "vehicle"]], "(method 11 w-parking-spot)": [[42, "v0", "vector"]], diff --git a/decompiler/types2/ForwardProp.cpp b/decompiler/types2/ForwardProp.cpp index 4fddcfde47..f2c324eb34 100644 --- a/decompiler/types2/ForwardProp.cpp +++ b/decompiler/types2/ForwardProp.cpp @@ -2576,7 +2576,6 @@ void CallOp::propagate_types2(types2::Instruction& instr, if (can_use_call_parent) { out_types[Register(Reg::GPR, Reg::V0)]->type = TP_Type::make_from_ts(call_parent_result_type); - lg::print("used special {}\n", call_parent_result_type.print()); use_normal_last_arg = false; } } diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index 63e301592c..74e07e4c14 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -201,6 +201,7 @@ set(RUNTIME_SOURCE mips2c/jak3_functions/sky.cpp mips2c/jak3_functions/texture.cpp mips2c/jak3_functions/particle_curves.cpp + mips2c/jak3_functions/cloth.cpp mips2c/jak3_functions/collide_cache.cpp mips2c/jak3_functions/collide_hash.cpp mips2c/jak3_functions/collide_edge_grab.cpp @@ -254,6 +255,29 @@ set(RUNTIME_SOURCE overlord/jak2/streamlfo.cpp overlord/jak2/streamlist.cpp overlord/jak2/vag.cpp + overlord/jak3/overlord.cpp + overlord/jak3/pagemanager.cpp + overlord/jak3/iso_cd.cpp + overlord/jak3/dma.cpp + overlord/jak3/iso.cpp + overlord/jak3/iso_queue.cpp + overlord/jak3/srpc.cpp + overlord/jak3/vag.cpp + overlord/jak3/ssound.cpp + overlord/jak3/iso_api.cpp + overlord/jak3/spustreams.cpp + overlord/jak3/list.cpp + overlord/jak3/vblank_handler.cpp + overlord/jak3/dvd_driver.cpp + overlord/jak3/basefile.cpp + overlord/jak3/basefilesystem.cpp + overlord/jak3/ramdisk.cpp + overlord/jak3/isocommon.cpp + overlord/jak3/init.cpp + overlord/jak3/stream.cpp + overlord/jak3/sbank.cpp + overlord/jak3/soundcommon.cpp + overlord/jak3/streamlist.cpp runtime.cpp sce/deci2.cpp sce/iop.cpp diff --git a/game/assets/jak1/subtitle/subtitle_lines_fi-FI.json b/game/assets/jak1/subtitle/subtitle_lines_fi-FI.json index dc16286f86..a0441d0724 100644 --- a/game/assets/jak1/subtitle/subtitle_lines_fi-FI.json +++ b/game/assets/jak1/subtitle/subtitle_lines_fi-FI.json @@ -2,69 +2,68 @@ "cutscenes": { "assistant-firecanyon-resolution": [ "LOISTAVAA! SAITTE KERÄTTYÄ 20 VOIMAKENNOA LÄMPÖSUOJALLENI!", - "OLKAA VAROVAISIA, SUOJA TURVAA ZOOMERIA LÄMMÖLTÄ VAIN", - "ALLE 500 ASTEEN, ELI YRITTÄKÄÄ PITÄÄ SE VIILEÄNÄ.", + "OLKAA SITTEN VAROVAISIA,", + "SUOJA TURVAA ZOOMERIA LÄMMÖLTÄ VAIN ALLE 500 ASTEEN,", + "ELI YRITTÄKÄÄ PITÄÄ SE VIILEÄNÄ.", "LAAVAN YLLÄ LENTÄMINEN TODELLAKIN LÄMMITTÄÄ NOPEASTI.", "JOS YLITÄTTE 500 ASTETTA, NIIN SE ON SIINÄ.", - "SE ON SIINÄ?! KUIN PALAVAN SULAN METALLIN SIINÄ?!", - "TULIKANJONISSA TULEE HYVIN KUUMA, JOTEN PITÄKÄÄ SILMÄLLÄ HYPPYREITÄ", - "JOIDEN AVULLA PYSYTTE LOITOLLA TULISESTA MAASTA.", - "LÄHETIN MYÖS REITILLE USEITA SINISIÄ VIILENNYSPALLOJA, JOTKA LASKEVAT", - "SUOJAN LÄMPÖTILAA NOPEASTI.", - "AI NIIN! KUN PÄÄSETTE LÄPI, ETTEHÄN UNOHDA AKTIVOIDA", - "TELEPORTTIA SINISEN TIETÄJÄN LABRASSA.", + "SE ON SIINÄ?! SIIS PALAVAN SULAN METALLIN SIINÄ?!", + "TULIKANJONISSA TULEE HYVIN KUUMA,", + "JOTEN HYÖDYNTÄKÄÄ HYPPYREITÄ PYSYÄKSENNE LOITOLLA TULISESTA MAASTA.", + "LÄHETIN MYÖS REITILLE USEITA SINISIÄ VIILENNYSPALLOJA,", + "JOTKA LASKEVAT SUOJAN LÄMPÖTILAA NOPEASTI.", + "AI NIIN! KUN PÄÄSETTE LÄPI, AKTIVOIKAA TELEPORTTI SINISEN TIETÄJÄN LABRASSA.", "SITTEN VOIMME TELEPORTATA LUOKSENNE.", "ONNEA MATKAAN!" ], "assistant-introduction-blue-eco-switch": [ - "HEI TYTSY. MITÄS SANOT JOS MENTÄISIIN KAKSIN AJELEMAAN TÄLLÄ ZOOMERILLA?", + "HEI, MURU. MITÄS SANOT JOS MENTÄISIIN KAKSIN AJELEMAAN TÄLLÄ ZOOMERILLA?", "SÄÄNTÖ NUMERO YKSI: EN SEURUSTELE ELÄINTEN KANSSA.", - "VOI ET TIEDÄKÄÄN MISTÄ JÄÄT PAITSI, HEH HEH.", - "KUULES, JOS TARVITSET JOTAIN PUUHAA, ISÄNI ON AINA PUHUNUT", + "VOI, ET TIEDÄKÄÄN MISTÄ JÄÄT PAITSI, HEH HEH.", + "KUULES, JOS TARVITSETTE JOTAIN PUUHAA, ISÄNI ON AINA PUHUNUT", "MUINAISESTA EDELTÄJIEN KANAVISTOSTA PIILOSSA MAAN SYVYYKSISSÄ.", "JOTKIN NÄISTÄ KANAVISTA JOHTAVAT PURKUAUKKOIHIN, JOISTA ECOA VIRTAA VAPAASTI,", - "JA JOTKIN AUKOISTA OVAT TUKITTU JOTTA ECO PYSYY ERISTETTYNÄ.", + "JA JOTKIN AUKOISTA OVAT TUKITTU, JOTTA ECO PYSYY ERISTETTYNÄ.", "ON VARMASTI JOKIN KEINO SAADA TUKITUT AUKOT TOIMINTAAN.", "OSA JÄLJITTÄMÄSTÄNI KANAVISTOSTA JOHTI KIELLETTYYN TEMPPELIIN.", "EHKÄ SIELTÄ VOISI LÖYTYÄ JONKINLAINEN KATKAISIN." ], "assistant-introduction-race-bike": [ - "HEI BEIBI, MITÄS DUUNAAT?", - "OLE VAROVAINEN SEN KANSSA! OLEN YRITTÄNYT SELVITTÄÄ, MITEN SAISIN KULJETETTUA ZOOMERIN", - "TRANS-ALUSTOILLA, JOITA EDELTÄJÄT OVAT JÄTTÄNEET YMPÄRI MAAILMAN.", - "JOS SATUT TÖRMÄÄMÄÄN TÄLLAISEEN ALUSTAAN, VOIN LUKKIUTUA KOMMUNIKAATTORISI SIJAINTIIN", - "JA LÄHETTÄÄ ZOOMERIN LUOKSENNE!", - "SILMÄILKÄÄ TRANS-ALUSTOJEN VARALTA, KUN OLETTE USVASAARELLA JA MISSÄ TAHANSA MUUALLAKAAN!" + "HEI, BEIBI, MITÄS DUUNAAT?", + "OLE VAROVAINEN SEN KANSSA!", + "OLEN YRITTÄNYT SELVITTÄÄ, MITEN SAISIN KULJETETTUA ZOOMERIN TRANS-ALUSTOILLA,", + "JOITA EDELTÄJÄT OVAT JÄTTÄNEET YMPÄRI MAAILMAN.", + "JOS SATUTTE TÖRMÄÄMÄÄN TÄLLAISEEN ALUSTAAN,", + "VOIN LUKKIUTUA KOMMUNIKAATTORINNE SIJAINTIIN JA LÄHETTÄÄ ZOOMERIN LUOKSENNE!", + "SILMÄILKÄÄ TRANS-ALUSTOJEN VARALTA, KUN OLETTE USVASAARELLA", + "JA MISSÄ TAHANSA MUUALLAKAAN!" ], "assistant-lavatube-end-resolution": [ - "HEI! MIHIN MEIDÄN VAJAA VIHREÄ VANHUS JÄI?", + "HEI! MIHIN VAJAA, VIHREÄ VANHUKSEMME JÄI?", "TÄMÄ ON KAUHEAA! ISÄNI ON KATEISSA!", "LUULEN, ETTÄ GOL JA MAIA OVAT SIEPANNEET HÄNETKIN!", - "RAUHOITU KULTASENI. MULLA ON KAIKKI HALLUSSA.", + "RAUHOITU, KULTASENI. MINULLA ON KAIKKI HALLUSSA.", "KAIKKI HALLUSSA?!", "VAANIJAJOUKOT JATKAVAT KASVUAAN LÄPI MAAN,", "TIETÄJÄT OVAT KAIKKI SIEPATTU,", - "GOL JA MAIA OVAT KERÄNNEET TARPEEKSI ECOA", - "VIIMEISTELLÄKSEEN JULMAN SUUNNITELMANSA,", - "JA PYSÄYTTÄÄKSEEN HEIDÄT, TEIDÄN TÄYTYY", - "TAISTELLA HEIDÄN LINNOITUKSENSA LÄPI!", - "ÖÖH.. NIIN. SIINÄHÄN SE KAIKKI, ÖÖ... SUUNNILLEEN OLIKIN.", - "TEIDÄN TÄYTYY PELASTAA ISÄNI ENNEN KUIN ON LIIAN MYÖHÄISTÄ!", + "GOL JA MAIA OVAT KERÄNNEET TARPEEKSI ECOA VIIMEISTELLÄKSEEN JULMAN SUUNNITELMANSA,", + "JA PYSÄYTTÄÄKSENNE HEIDÄT, TEIDÄN ON TAISTELTAVA HEIDÄN LINNOITUKSENSA LÄPI!", + "ÖÖH.. NIIN. SIINÄHÄN SE KAIKKI SUUNNILLEEN OLIKIN.", + "TEIDÄN TÄYTYY PELASTAA ISÄNI, ENNEN KUIN ON LIIAN MYÖHÄISTÄ!", "JA JAK...", "OLE VAROVAINEN.", "JOO. ME OLEMME!" ], "assistant-lavatube-start-resolution": [ - "HA HA! NONIIN!", + "HA HA! NO NIIN!", "NÄIDEN LISÄ-VOIMAKENNOJEN AVULLA MINUN PITÄISI PYSTYÄ JOHTAMAAN LÄMPÖSUOJAAN", "TARPEEKSI VOIMAA TÄMÄN LAAVAN KESTÄMISEEN.", "MUTTA SUOJALLA ON VIELÄKIN RAJA.", "SE KESTÄÄ NYT 800 ASTEEN LÄMPÖTILAAN SAAKKA, MUTTA EI YHTÄÄN ENEMPÄÄ.", "JOTEN SILMÄILKÄÄ MITTARIA.", - "EN HALUA EDES KUVITELLA MITÄ MOISET LÄMPÖTILAT SAATTAVAT TEHDÄ ZOOMERILLENNE", - "JOS KILPI PETTÄÄ.", + "EN HALUA EDES KUVITELLA MITEN ZOOMERIN KÄVISI TUOSSA LÄMMÖSSÄ, JOS SUOJA PETTÄÄ.", "NIIN, LÄMPÖ...", - "TÄH? ZOOMERILLE? HEI! ENTÄS ME?!", + "TÄH? ZOOMERIN? HEI, ENTÄS ME?!", "EMMEKÖ VOISI ETSIÄ TURVALLISEMPAA REITTIÄ GOLIN LINNOITUKSEEN?", "NO HEI, LÄHETIN LISÄÄ VIILENNYSPALLOJA TUNNELIIN", "JA NIIDEN AVULLA LÄMPÖTILANNE EI PÄÄSE LIIAN KORKEALLE.", @@ -73,18 +72,18 @@ ], "assistant-reminder-1-blue-eco-switch": [ "OLEN VARMA, ETTÄ JOS KURKKAATTE EDELTÄJIEN KIELLETYN TEMPPELIN SISÄÄN,", - "LÖYDÄTTE JONKIN TAVAN KÄYNNISTÄÄ SEN SULJETUN SINISEN ECO-AUKON VARTIJARANNALLA." + "LÖYDÄTTE JONKIN TAVAN KÄYNNISTÄÄ SEN SULJETUN SINISEN ECO-AUKON VAHTIRANNALLA." ], "assistant-reminder-1-generic": [ "HEIPPA! JATKAKAA VOIMAKENNOJEN KERÄILYÄ,", - "NIIDEN AVULLA ME VOIMME JATKAA MATKAAMME POHJOISEEN." + "NIIDEN AVULLA VOIMME JATKAA MATKAAMME POHJOISEEN." ], "assistant-reminder-1-race-bike": [ "OLEN VIIMEIN SAANUT SELVILLE MITEN TRANS-ALUSTOJA KÄYTETÄÄN.", - "MENKÄÄ USVASAARELLE, NIIN MINÄ LÄHETÄN TÄMÄN ZOOMERIN LUOKSENNE." + "MENKÄÄ USVASAARELLE, NIIN LÄHETÄN TÄMÄN ZOOMERIN LUOKSENNE." ], "assistant-village2-introduction": [ - "VOUH!", + "HUIH!", "EN VARMAAN IKINÄ TULE TOTTUMAAN TUOHON TELEPORTIN KUMMAAN KIHELMÖINTIIN.", "HEI!", "NÄYTTÄÄ SILTÄ KUIN SININEN TIETÄJÄ OLISI PITÄNYT PIPPALOT.", @@ -93,37 +92,37 @@ "EI, EI! SIIS KIVIKYLÄÄ POMMITETAAN LIEKEHTIVILLÄ LOHKAREILLA!", "AH! JA ILMEISESTI SININEN TIETÄJÄ ON TYÖSTÄNYT LEIJUTINKONETTA NIIDEN SIIRTÄMISEEN.", "OLETTAEN SEN OLEVAN TOIMINNALLINEN, TARVITSEMME LISÄÄ KENNOJA SEN VIRTALÄHTEEKSI.", - "LUULEN, ETTÄ TEIDÄN KAHDEN TULEE KERÄTÄ MUUTAMA LISÄÄ.", + "LUULEN, ETTÄ TEIDÄN TULEE KERÄTÄ MUUTAMA LISÄÄ.", "MEIDÄN KANNATTAISI SELATA HÄNEN MUISTIKIRJOJAAN.", - "JAK, KÄY TIEDUSTELEMASSA KYLÄLÄISIÄ, JA TUO MEILLE SITTEN UUTISET.", + "JAK, KÄY TIEDUSTELEMASSA KYLÄLÄISIÄ JA TUO MEILLE SITTEN UUTISET.", "JA VIE TUO KARVAPALLO MUKANASI!" ], "assistant-village2-introduction-flutflut": [ "TAAS TÄÄLLÄ, POJAT?", "\"POIKA\"?", - "MURUSENI, MÄ OLEN TÄYSIKASVUINEN...", + "MURUSENI, MINÄ OLEN TÄYSIKASVUINEN...", "ÖÖH...", "JOKIN... JOKIN KARVAINEN.", "HEI, ARVATKAA MITÄ? KYLÄMME LINTUBONGARIN SUOSTUMUKSELLA,", "OLEN PUKEUTTANUT FLUT-FLUT-POIKASEN SATULALLA.", - "ILMEISESTI LIEJUSUOLLA SIJAITSEE YKSI EDELTÄJIEN TRANS-ALUSTOISTA.", - "JOS TE LÖYDÄTTE SEN, MINÄ LÄHETÄN FLUT-FLUTIN SINNE TÄYSIN VARUSTEIN.", + "LIEJUSUOLLA TAITAA SIJAITA YKSI EDELTÄJIEN TRANS-ALUSTOISTA.", + "JOS LÖYDÄTTE SEN, MINÄ LÄHETÄN FLUT-FLUTIN SINNE TÄYSIN VARUSTEIN.", "HÄNEN KYVYSTÄÄN HYPÄTÄ PITKÄLLE VOI OLLA APUA TERVAN YLITTÄMISESSÄ." ], "assistant-village2-introduction-robbers": [ "HEI, TE KAKSI!", "MINÄPÄ TIEDÄN MISTÄ VOITTE LÖYTÄÄ UUDEN VOIMAKENNON!", "MUISTIINPANOJENSA MUKAAN,", - "PARI PÄIVÄÄ SITTEN LENTOVAANIJAT VARASTIVAT SINISELTÄ TIETÄJÄLTÄ YHDEN", + "LENTOVAANIJAT VARASTIVAT SINISELTÄ TIETÄJÄLTÄ YHDEN PARI PÄIVÄÄ SITTEN ", "JA LENSIVÄT SUORAAN EDELTÄJÄLAAKSOON.", - "VOISITTE HYPÄTÄ ZOOMERINNE KYYTIIN JA TÖRMÄILLÄ NIIHIN", - "KUNNES LÖYDÄTTE SEN JOLLA HÄNEN VOIMAKENNONSA ON.", - "LÖYDÄTTE ZOOMERIN TRANS-ALUSTALLAAN LÄHELLÄ EDELTÄJÄLAAKSON SISÄÄNKÄYNTIÄ." + "VOISITTE TÖRMÄILLÄ NIIHIN ZOOMERILLANNE,", + "KUNNES LÖYDÄTTE SEN, JOLLA HÄNEN VOIMAKENNONSA ON.", + "ZOOMERI LÖYTYY TRANS-ALUSTALLAAN LÄHELLÄ EDELTÄJÄLAAKSON SISÄÄNKÄYNTIÄ." ], "assistant-village2-introduction-room": [ - "ILMEISESTI EDELTÄJIEN RAKENNELMA VÄHÄN MATKAN PÄÄSSÄ RANNIKOSTA", + "ILMEISESTI TUO EDELTÄJIEN RAKENNELMA VÄHÄN MATKAN PÄÄSSÄ RANNIKOSTA", "JOHTAA KADONNEESEEN MERENALAISEEN KAUPUNKIIN.", - "SININEN TIETÄJÄ ON NÄHTÄVÄSTI YRITTÄNYT SELVITTÄÄ", + "SININEN TIETÄJÄ ON YRITTÄNYT SELVITTÄÄ,", "MITEN YKSI SEN KAMMIOISTA VOIDAAN TUODA MEREN PINNALLE.", "HÄN EI KUITENKAAN KOSKAAN ONNISTUNUT.", "KÄYKÄÄ TUTKIMASSA SITÄ!", @@ -134,29 +133,29 @@ "KUNHAN VAIN JAKIN HYVÄKSI AJATTELIN!", "SINÄHÄN, ÖH, HEH...", "TIEDÄT MILLAINEN JÄNISHOUSU HÄN VOI OLLA.", - "JOS UITTE KORALLIRIUTTOJEN YLI, MINÄ USKON ETTÄ VAANIJAHAIT EIVÄT TULE OLEMAAN HARMIKSENNE.", + "JOS UITTE KORALLIRIUTTOJEN YLI, EN USKO, ETTÄ VAANIJAHAIT KÄYVÄT KIMPPUUNNE.", "NE EIVÄT PIDÄ MATALISTA VESISTÄ." ], "assistant-village2-reminder-1-flutflut": [ - "OLEN VARMA ETTÄ FLUT-FLUTISTA OLISI HYÖTYÄ TEILLE SUOLLA.", - "ETSIKÄÄ TRANS-ALUSTA NIIN LÄHETÄN HÄNET LUOKSENNE." + "OLEN VARMA, ETTÄ FLUT-FLUTISTA OLISI HYÖTYÄ TEILLE SUOLLA.", + "ETSIKÄÄ TRANS-ALUSTA, NIIN LÄHETÄN HÄNET LUOKSENNE." ], "assistant-village2-reminder-1-robbers": [ - "LÄHETÄN ZOOMERIN LUOKSESI EDELTÄJÄLAAKSON ÄÄRELLE,", - "NIIN VOITTE OTTAA KIINNI NE LENTOVAANIJAT JOISTA ME KESKUSTELIMME." + "LÄHETÄN ZOOMERIN LUOKSENNE EDELTÄJÄLAAKSON ÄÄRELLE,", + "NIIN VOITTE NAPATA NE LENTOVAANIJAT, JOISTA KESKUSTELIMME." ], "assistant-village2-reminder-1-room": [ "KÄVITTEKÖ JO KADONNEEN EDELTÄJÄKAUPUNGIN LUONA?", - "TEIDÄN TODELLA KANNATTAISI NOSTAA PINNALLE SE KAMMIO, JOTA SININEN TIETÄJÄ YRITTI." + "TEIDÄN KANNATTAISI NOSTAA PINNALLE SE SINISEN TIETÄJÄN HAVITTELEMA KAMMIO." ], "assistant-village2-resolution": [ "HIENOA, SAITTE KONEESEEN TARVITTAVAT KENNOT!", "NIIDEN PITÄSI ANTAA TARPEEKSI ENERGIAA TUON LOHKAREEN NOSTAMISEEN.", "NIIN SITÄ PITÄÄ!", - "OLETTEHAN VAROVAISIA KUN KOHTAATTE VAANIJAHIRVIÖN HUIPULLA.", + "OLETTEHAN VAROVAISIA KOHDATESSANNE VAANIJAHIRVIÖN HUIPULLA.", "ODOTAS! ÖH...", - "MÄ JÄÄN TÄNNE JA SUOJELEN KEIRAA!", - "JAK, LUULEN ETTÄ OLET VALMIS HOITELEMAAN HIRVIÖN ILMAN MINUA.", + "MINÄ JÄÄN TÄNNE JA SUOJELEN KEIRAA!", + "JAK, LUULEN, ETTÄ OLET VALMIS HOITELEMAAN HIRVIÖN ILMAN MINUA.", "NO OLETPAS SINÄ SANKARILLINEN." ], "assistant-village3-reminder": [ @@ -164,26 +163,25 @@ "NIIDEN AVULLA ME VOIMME JATKAA MATKAAMME POHJOISEEN." ], "billy-accept": [ - "HYVÄ! NE ROTAT PALAA HETKENÄ MINÄ HYVÄNSÄ.", - "AMMU JOKA IKINEN ROTTA, JA ESTÄ NIITÄ", - "NAUTTIMASTA AINUTTAKAAN NOISTA HERKUISTA." + "HYVÄ! NE ROTAT PALAAVAT HETKENÄ MINÄ HYVÄNSÄ.", + "AMMU JOKA IKINEN ROTTA JA ESTÄ NIITÄ NAUTTIMASTA AINUTTAKAAN NOISTA HERKUISTA." ], "billy-introduction": [ "MOIKKA KAMUT! NAUTISKELEMASSA MUN KAUNISTA SUOTA?", "MÄ OMISTAN NÄMÄ SEUDUT.", "KAIKEN MIKÄ EI UPPOA MUTAAN, SIIS! HA HA HA...", - "HAJUSTA PÄÄTELLEN LÖISIN VETOA, ETTÄ", - "KYLPYAMMEESI UPPOSI MUTAAN KAUAN SITTEN.", + "HAJUSTA PÄÄTELLEN LÖISIN VETOA,", + "ETTÄ KYLPYAMMEESI UPPOSI MUTAAN KAUAN SITTEN.", "MIKÄ IHMEEN KYLPYAMME?", "IHAN SAMA, MULLA ON NYT ISOMPIA PULMIA...", "KELJUT VAANIJATUHOLAISET PYÖRIVÄT JA HYÖRIVÄT", - "JA NAPPAAVAT KAIKEN MIHIN LIKAISILLA PIKKU KÄPÄLILLÄÄN TARTTUVAT.", + "JA NAPPAAVAT KAIKEN, MIHIN LIKAISILLA PIKKU KÄPÄLILLÄÄN TARTTUVAT.", "JA PELOTTELIVAT TIEHENSÄ SIKAHEPO-LEMMIKKINI, FARTHYN.", "SE ON OLLUT KARKUTEILLÄ JO IÄT JA AJAT.", - "MÄ OON HOUKUTELLUT SITÄ SEN LEMPIPURTAVALLA,", + "MÄ OLEN HOUKUTELLUT SITÄ SEN LEMPIPURTAVALLA,", "MUTTA MOKOMAT SUOROTAT EIVÄT LAKKAA RYÖSTÄMÄSTÄ NIITÄ!", "JOS KYKENET PITÄMÄÄN NE ÄRSYTTÄVÄT OTUKSET LOITOLLA TARPEEKSI KAUAN,", - "MÄ OON VARMA ETTÄ FARTHY HAISTAISI ATERIANSA JA TULISI TAKAISIN!", + "MÄ OLEN VARMA, ETTÄ FARTHY HAISTAISI ATERIANSA JA TULISI TAKAISIN!", "AUTATTEKO MEIKÄLÄISTÄ?" ], "billy-reject": [ @@ -203,8 +201,8 @@ "MAMA!", "MAMA!", "OI EI! EI, EI, EI, EI!", - "VOI... EIKÖS OLEKIN SÖPÖÄ? SE LUULEE ETTÄ OLET SEN EMO.", - "MÄ EN OLE SUN ÄITIS! NÄETKÖ HÖYHENIÄ PÄÄLLÄNI?", + "VOI... EIKÖS OLEKIN SÖPÖÄ? SE LUULEE, ETTÄ OLET SEN EMO.", + "ÄH, EN OLE SINUN ÄITISI! NÄETKÖ HÖYHENIÄ PÄÄLLÄNI?", "RAKKAUTTA ENSI SILMÄYKSELLÄ! AH...", "NO, NUORUKAISET, MINÄ VIEN TÄMÄN PIKKU TIPUSEN TAKAISIN KYLÄÄN", "JA PIDÄN TIETÄJÄN KANSSA HÄNESTÄ HUOLTA." @@ -212,36 +210,30 @@ "bird-lady-introduction": [ "HERTTINEN, ONPAS IKÄVÄN SAIRAS PIKKU LINTU.", "HAH! ET NÄYTÄ KOVIN TERVEELTÄ ITSEKÄÄN, ROUVA!", - "VOI ANTEEKSI. LUULIN SINUN OLEVAN TÄPLIKÄS", - "ORANSSIRINTAINEN LEHTOPÖLLÖ.", - "SATUINPA EILEN NÄKEMÄÄN KUN ERÄÄT", - "KAMALAN ILKEÄT OTUKSET KAAPPASIVAT", - "FLUT-FLUT-EMON RANNAN LÄHETTYVILLÄ.", - "JA NYT ORPO PIKKUINEN MUNA-PARKA", - "ON YKSIKSEEN PESÄSSÄ KALLION PÄÄLLÄ,", + "VOI ANTEEKSI. LUULIN SINUN OLEVAN TÄPLIKÄS ORANSSIRINTAINEN LEHTOPÖLLÖ.", + "SATUINPA EILEN NÄKEMÄÄN, KUN ERÄÄT KAMALAN ILKEÄT OTUKSET", + "KAAPPASIVAT FLUT-FLUT-EMON RANNAN LÄHETTYVILLÄ.", + "JA NYT ORPO PIKKU MUNA-PARKA ON YKSIKSEEN PESÄSSÄ KALLION PÄÄLLÄ,", "ENKÄ MINÄ PÄÄSE SEN LUOKSE.", "JOS SUINKAAN PYSTYTTE KIIPEÄMÄÄN SINNE JA TYÖNTÄMÄÄN SEN ALAS,", "ASETTELEMANI HEINÄ TEKEE PUDOTUKSESTA TURVALLISEN.", "AUTTAKAA VANHAA ROUVAA JA ANNAN PALKKIOKSI VOIMAKENNON." ], "bird-lady-reminder-1": [ - "AI, HEI TAAS. JOKO TE POJAT LÖYSITTE SEN SINISEN MUNAN KALLION PÄÄLLÄ?", + "AI, HEI TAAS. JOKO TE LÖYSITTE SEN SINISEN MUNAN KALLION PÄÄLLÄ?", "TYÖNTÄKÄÄ SE REUNAN YLI, NIIN SAATTE VOIMAKENNON!" ], "bird-lady-reminder-2": [ "VIELÄKÖ TE POJAT OLETTE TÄÄLLÄ NOUKKIMASSA? HA HA HA.", - "PELKÄÄN ETTÄ SE SININEN PIKKU MUNA-RAUKKA KALLIOLLA", - "ON JO HURJAN HYYTYNEENÄ.", - "MENKÄÄ PELASTAMAAN SE TYÖNTÄMÄLLÄ SE KALLION REUNAN YLI,", + "PELKÄÄN, ETTÄ SE SININEN PIKKU MUNA-RAUKKA ON JO HURJAN HYYTYNEENÄ.", + "PELASTAKAA SE TYÖNTÄMÄLLÄ SE KALLION REUNAN YLI,", "NIIN MINÄ ANNAN TEILLE VOIMAKENNON." ], "bluesage-resolution": [ "HIENOA TYÖTÄ, VEIKOT! VANHA SAMOS OLI OIKEASSA TEISTÄ!", "VOIHAN EDELTÄJÄMETALLIN LÄJÄ SENTÄÄN!", - "TUO PETOLLINEN MEKAANINEN LUOMUS", - "TÄYTYY ESTÄÄ AIHEUTTAMASTA TÄYTTÄ TUHOA!", - "KOETAN AKTIVOIDA VOIMAKENTÄN OVEN", - "LUOMALLA ENERGIAJOHTEEN", + "TUO PETOLLINEN MEKAANINEN LUOMUS TÄYTYY ESTÄÄ AIHEUTTAMASTA TÄYTTÄ TUHOA!", + "KOETAN AKTIVOIDA VOIMAKENTÄN OVEN LUOMALLA ENERGIAJOHTEEN", "ITSENI JA ALLA OLEVAN VALTAVAN PORTAALIN VÄLILLE.", "ÖÖ... JUU. TEEPPÄ SE. ME TAAS... MENEMME ETSIMÄÄN LISÄAPUA.", "SEKOPÄÄ!" @@ -263,10 +255,10 @@ ], "death-0187": [ "NO, SIIS...", - "PAREMPI SÄ, KUIN MÄ." + "PAREMMIN SINÄ, KUIN MINÄ." ], "death-0191": [ - "NÄYTTÄÄ SILTÄ ETTÄ SATTUI.", + "NÄYTTÄÄ SILTÄ, ETTÄ SATTUI.", "KUTSUNKO APUA?" ], "death-0193": [ @@ -275,8 +267,8 @@ "ÄLÄ ENÄÄ IKINÄ TEE MITÄÄN TUOLLAISTA!" ], "death-0195": [ - "MÄ OLIN IHAN SUN TAKANA, JAK!", - "...IHAN TOSI. MÄ OLIN." + "OLIN IHAN TAKANASI, JAK!", + "...IHAN TOSI. MINÄ OLIN." ], "death-0197": [ "HEIMLICH! ÖÖH... PAARIT!", @@ -284,19 +276,19 @@ ], "death-0199": [ "SANON JOTAIN TODELLA KOSKETTAVAA HAUTAJAISISSASI, KUTEN...", - "...\"KUINKA MÄ NYT VOIN MUUTTUA TAKAISIN?!\"" + "...\"KUINKA MINÄ NYT VOIN MUUTTUA TAKAISIN?!\"" ], "death-0202": [ "KAUNIITA UNIA, JAK!" ], "evilbro-misty-end": [ "NOISTA KAHDESTA VOI SEURATA ONGELMIA.", - "ÄLÄ MUREHDI RAKAS VELISENI, MINÄ LÄHETÄN VAANIJAJOUKKONI HEIDÄN PERÄÄNSÄ.", - "PIDÄ HUOLI SIITÄ, ETTEIVÄT HE PÄÄSE LIIAN LÄHELLE ASKAREITAMME POHJOISESSA.", - "ENPÄ USKO, ETTÄ HE PÄÄSEVÄT NIIN PITKÄLLE...", - "MUTTA JOS HE PÄÄSEVÄTKIN, HEITÄ ODOTTAA YLLÄTYS KIVIKYLÄSSÄ.", - "SIIS... AIOT PÄÄSTÄÄ... KLAWWIN ULOS HÄKISTÄÄN?", - "LUULEN, ETTÄ SE ON RISKIN ARVOISTA.", + "ÄLÄ MUREHDI, VELISENI. LÄHETÄN VAANIJAJOUKKONI HOITELEMAAN HEIDÄT.", + "PIDÄ HUOLI, ETTEIVÄT HE PÄÄSE LIIAN LÄHELLE ASKAREITAMME POHJOISESSA.", + "EN USKO, ETTÄ HE PÄÄSEVÄT NIIN PITKÄLLE...", + "MUTTA JOS PÄÄSEVÄTKIN, HEITÄ ODOTTAA YLLÄTYS KIVIKYLÄSSÄ.", + "SIIS... AIOT PÄÄSTÄÄ... KLAWW'N ULOS HÄKISTÄÄN?", + "SE SAATTAA OLLA RISKIN ARVOISTA.", "NIINPÄ..." ], "explorer-introduction": [ @@ -304,10 +296,10 @@ "SAAVUIT PAIKALLE JUURI EPÄSOPIVIMMALLA HETKELLÄ.", "MINUN OLI TARKOITUS LÄHTEÄ MATKOILLENI EILEN,", "MUTTA VAIKUTTAA SILTÄ, ETTÄ EDELTÄJÄHELMI-VARANI OVAT EHTYNEET.", - "OLISIN VANNONUT ETTÄ MINULLA OLI NIITÄ 90 KAPPALETTA,", - "MUTTA USKON ETTÄ YSTÄVÄSI, TIEDÄTHÄN,", + "OLISIN VANNONUT, ETTÄ MINULLA OLI NIITÄ 90 KAPPALETTA,", + "MUTTA USKON, ETTÄ YSTÄVÄSI, TIEDÄTHÄN,", "SE PIENI, ÄRSYTTÄVÄ JA VAIVAISEN RUMA,", - "SAATTOI SALAA NÄPISTÄÄ NE MINULTA, VARMASTI JONKIN SORTIN HAUSKANPITONA.", + "ON SALAA NÄPISTÄNYT NE MINULTA, VARMASTI JONKIN SORTIN HAUSKANPITONA.", "NIIN TAI NÄIN, OLISITKO KILTTI JA LAINAISIT VANHALLE ENOLLESI", "90 EDELTÄJÄHELMEÄ, JOTTA MATKANI VOI ALKAA?", "MINULLA OLISI ANTAA VOIMAKENNO VAIHTOKAUPPANA." @@ -318,22 +310,21 @@ "MINULLA EI OLE MAHDOLLISUUTTA LÄHTEÄ YHTIKÄS MIHINKÄÄN, POIKASENI." ], "explorer-reminder-2": [ - "KUULEHAN NYT, SOPIMUS OLI: 90 EDELTÄJÄHELMEÄ VOIMAKENNOSTA.", + "KUULEHAN NYT, SOPIMUS OLI 90 EDELTÄJÄHELMEÄ VOIMAKENNOSTA.", "SUORASTAAN TASAVÄKINEN VAIHTOKAUPPA." ], "explorer-resolution": [ - "NÄHTÄVÄSTI TE OLETTE PALANNEET TEKEMÄÄN KAUPAT. HIENOA, ERITTÄIN HIENOA!", - "TUOTA, ONHAN TEILLÄ NE, ÖH, EDELTÄJÄHELMET JOISTA SOVIMME?", + "NÄHTÄVÄSTI OLETTE PALANNEET TEKEMÄÄN KAUPAT. HIENOA, ERITTÄIN HIENOA!", + "TUOTA, ONHAN TEILLÄ NE EDELTÄJÄHELMET, JOISTA SOVIMME?", "TOIVON TEIDÄN PANEVAN TÄMÄN VAIVALLA ANSAITUN VOIMAKENNON HYVÄÄN KÄYTTÖÖN.", "HYVÄSTI, NÄKEMIIN, HEIPÄ HEI!" ], "farmer-introduction": [ "PITÄÄ LYPSÄÄ NAUKIT, PITÄÄ LYPSÄÄ NAUKIT...", "AI, SINÄHÄN SE VAIN... VANHOJA LUITANI TÄSSÄ VAIN LEPUUTAN.", - "OLEN YRITTÄNYT SAADA HANKALIA NAUKKEJANI", - "TAKAISIN AITAUKSEENSA KOKO PÄIVÄN!", - "JOTKUT KUMMALLISET OLENNOT YRITTIVÄT VARASTAA NIITÄ AIEMMIN TÄNÄÄN.", - "AUTTAISITKO VANHAA UKKOA JA PAIMENTAISIT NE TAKAISIN AITAUKSEENSA?" + "OLEN YRITTÄNYT SAADA HANKALIA NAUKKEJANI TAKAISIN AITAUKSEEN KOKO PÄIVÄN!", + "JOTKIN KUMMAT OLENNOT YRITTIVÄT VARASTAA NIITÄ AIEMMIN TÄNÄÄN.", + "AUTTAISITKO VANHAA UKKOA JA PAIMENTAISIT NE TAKAISIN AITAUKSEEN?" ], "farmer-reminder-1": [ "HEI! NAUKKINI OVAT YHÄ VAPAANA!", @@ -353,9 +344,9 @@ ], "fisher-accept": [ "JOESSA ON KAHTA HYVÄÄ KALALAJIA HAAVIN TÄYTTEEKSI.", - "YHDEN KILON KALASIA, SEKÄ VIIDEN KILON KALASIA.", - "HEH. JOS 20 KILOA HYVÄÄ KALAA LIVAHTAA SUN OHI,", - "NIIN SITTEN MÄ OTAN HAAVINI HETI TAKAISIN!", + "YHDEN KILON KALASIA SEKÄ VIIDEN KILON KALASIA.", + "JOS 20 KILOA HYVÄÄ KALAA LIVAHTAA OHITSESI,", + "NIIN SITTEN OTAN HAAVINI HETI TAKAISIN!", "JOESSA LYMYILEE MYÖS MYRKYLLISIÄ ANKERIAITA.", "JOS NAPPAAT EDES YHDEN NÄISTÄ PIRULAISISTA,", "KOKO KALASATSI MYRKYTTYY!" @@ -363,42 +354,39 @@ "fisher-introduction": [ "MITÄS TÄSTÄ KORISTA LÖYTYY?", "EI MITÄÄN MAINITSEMISEN ARVOISTA.", - "NE RIIVATUT MERTA PÄIVYSTÄVÄT HIRVIÖT", - "OTTIVAT KUNNON SUULLISEN MUN KALASTUSVEHKEISTÄNI.", - "JA NYT NE HOTKII MUN SAALISTA SUIHINSA!", + "NE RIIVATUT MERTA PÄIVYSTÄVÄT HIRVIÖT OTTIVAT KUNNON SUULLISEN KALASTUSVEHKEISTÄNI.", + "JA NYT NE HOTKIVAT SAALISTANI SUIHINSA!", "VAIKKA KUINKA OLEN YRITTÄNYT, EN TAHDO SAADA KALAN KALAA TÄSSÄ JOESSA.", - "HUH HUH! EHKÄ... VIKA ON SUN HENGITYKSESSÄ.", + "HUH! EHKÄ VIKA ON... HENGITYKSESSÄSI.", "USKOTKO MUKA PYSTYVÄSI PAREMPAAN?", - "YRITÄS ITSE KAUHOA KALOJA JOESTA PIKKURUISELLA HAAVILLA!", - "SAATTE MULTA VOIMAKENNON,", - "JOS NAPPAATTE SUOMUSELKIÄ 200:N KILON EDESTÄ!", - "JA ANNAN MYÖS LUVAN SULLE JA PIKKU KATKARAVULLE TÄSSÄ", - "KÄYTTÄÄ MUN PIKAVENETTÄNI USVASAARELLE.", + "YRITÄS ITSE KAUHOA FISUJA JOESTA PIKKURUISELLA HAAVILLA!", + "SAATTE MINULTA VOIMAKENNON,", + "JOS NAPPAATTE SUOMUSELKIÄ 200 KILON EDESTÄ!", + "SAAT MYÖS KATKARAPUSI KANSSA LUVAN KÄYTTÄÄ PIKAVENETTÄNI USVASAARELLE.", "OTATTEKOS HAASTEEN VASTAAN?" ], "fisher-reject": [ - "NOH, JOS TE HALUUTTE VOIMAKENNONI JOSKUS TOISTE,", - "TIEDÄTTE MISTÄ MUT LÖYTÄÄ." + "NOH, JOS HALUATTE VOIMAKENNONI JOSKUS TOISTE,", + "TIEDÄTTE MISTÄ MINUT LÖYTÄÄ." ], "fisher-reminder-1": [ "HALUATTE PÄIHITTÄÄ JOEN, NIINKÖ?" ], "fisher-resolution": [ - "SÄ TEIT SEN! NAPPASIT KOKONAISET 200 KILOA KALAA!", + "TE TEITTE SEN! NAPPASITTE KOKONAISET 200 KILOA KALAA!", "EI HASSUMPI PARILTA PIKKU MAAKRAVULTA!", "TÄSSÄ LUPAAMANI VOIMAKENNO.", - "JA SAATTE NYT KÄYTTÄÄ VENETTÄNI KYLÄN TELAKASSA", - "KOSKA IKINÄ TAHDOTTE." + "JA SAATTE NYT KÄYTTÄÄ VENETTÄNI KYLÄN TELAKASSA KOSKA IKINÄ TAHDOTTE." ], "fishermans-boat-ride-to-village1-alt": [ "NOISTA KAHDESTA VOI SEURATA ONGELMIA.", - "ÄLÄ HUOLI, VELISENI. MINÄ LÄHETÄN VAANIJAJOUKKONI HOITELEMAAN HEIDÄT.", - "PIDÄ HUOLI SIITÄ, ETTEIVÄT HE PÄÄSE LIIAN LÄHELLE ASKAREITAMME POHJOISESSA.", - "ENPÄ USKO, ETTÄ HE PÄÄSEVÄT NIIN PITKÄLLE.", - "MUTTA JOS HE PÄÄSEVÄTKIN, HEITÄ ODOTTAA YLLÄTYS KIVIKYLÄSSÄ.", - "SIIS... AIOT PÄÄSTÄÄ... KLAWWIN ULOS HÄKISTÄÄN?", - "LUULEN, ETTÄ SE ON RISKIN ARVOISTA.", - "NIINPÄ." + "ÄLÄ MUREHDI, VELISENI. LÄHETÄN VAANIJAJOUKKONI HOITELEMAAN HEIDÄT.", + "PIDÄ HUOLI, ETTEIVÄT HE PÄÄSE LIIAN LÄHELLE ASKAREITAMME POHJOISESSA.", + "EN USKO, ETTÄ HE PÄÄSEVÄT NIIN PITKÄLLE.", + "MUTTA JOS PÄÄSEVÄTKIN, HEITÄ ODOTTAA YLLÄTYS KIVIKYLÄSSÄ.", + "SIIS... AIOT PÄÄSTÄÄ... KLAWW'N ULOS HÄKISTÄÄN?", + "SE SAATTAA OLLA RISKIN ARVOISTA.", + "NIINPÄ..." ], "gambler-introduction-1": [ "VOI, EI. EI TAAS UUTTA \"SANKARIA\".", @@ -428,67 +416,66 @@ "gambler-resolution-money": [ "HEH HEH HEH! VOI, JEE!", "NÄMÄ HELMET AUTTAVAT MINUA VOITTAMAAN TIENI POIS TÄSTÄ TYNNYRISTÄ!", - "TÄSSÄ SE VOIMAKENNO JONKA LUPASIN!" + "TÄSSÄ SE VOIMAKENNO, JONKA LUPASIN!" ], "gambler-resolution-race": [ - "HEH, HIENOT LIIKKET, JUNNU! TIESIN ETTÄ SE ENNÄTYS VIELÄ VOITETAAN.", - "TÄSSÄ VOIMAKENNOSI. NYT VOIN MENNÄ KERÄÄMÄÄN ISON POTTINI!" + "HIENOT LIIKKET, JUNNU! TIESIN, ETTÄ SE ENNÄTYS VIELÄ VOITETAAN.", + "TÄSSÄ ON VOIMAKENNOSI. NYT VOIN MENNÄ KERÄÄMÄÄN ISON POTTINI!" ], "geologist-introduction": [ "TEHÄN VAIKUTATTE VARSIN KYVYKKÄÄLTÄ KAKSIKOLTA.", - "MINULLA ON TUTKIMUSTYÖ MENEILLÄÄN,", - "EHKÄ TE VOISITTE AUTTAA MINUA.", + "MINULLA ON TUTKIMUSTYÖ MENEILLÄÄN, JA EHKÄ TE VOISITTE AUTTAA MINUA.", "HEI, MEILLÄ SE SUURI TEHTÄVÄ TÄSSÄ ON.", - "ME TAHDOTAAN SINUN APUASI.", - "NOH, EHKÄPÄ ME VOIMME AUTTAA TOISIAMME.", + "ME TAHDOMME SINUN APUASI.", + "NO, KENTIES VOIMME AUTTAA TOISIAMME.", "OLEN TUTKINUT PAIKALLISTEN SALAMAMYYRIEN KAIVUUTAPOJA", "KYLÄÄMME VIERUSTAVASSA EDELTÄJÄLAAKSOSSA JO VUOSIA.", - "MUTTA NYT NE HIRVEÄT VAANIJAT OVAT SÄIKYTELLEET POLOISET MYYRÄT MAAN PINNALLE!", - "JA KOSKA NE OVAT SOKEITA KUIN LEPAKOT, NE EIVÄT ENÄÄ LÖYDÄ TIETÄÄN TAKAISIN KUOPPAANSA.", - "JOS PYSTYT PAIMENTAMAAN NE TAKAISIN KAIVAMIINSA TUNNELEIHIN,", - "SAATAT HYVINKIN PELASTAA NIIDEN HENGET.", + "MUTTA NYT NE HIRVEÄT VAANIJAT OVAT SÄIKYTELLEET MYYRÄT MAAN PINNALLE!", + "JA KOSKA NE OVAT SOKEITA KUIN LEPAKOT, NE EIVÄT LÖYDÄ TAKAISIN KUOPPAANSA.", + "JOS PYSTYTTE PAIMENTAMAAN NE TAKAISIN KOLOON,", + "SAATATTE HYVINKIN PELASTAA NIIDEN HENGET.", "MINULLA ON VOIMAKENNO, JOKA KERTOO TEIDÄN PYSTYVÄN SIIHEN.", - "JOO, SALAMAMYYRIÄ... ME NIIN VÄLITETÄÄN.", + "JOO, SALAMAMYYRIÄ... ME NIIN VÄLITÄMME.", "EHKÄPÄ KAHDESTA VOIMAKENNOSTA!", - "HYVÄ YRITYS. MUTTA OLEN VALMIS ANTAMAAN TOISEN VOIMAKENNONI TEILLE,", - "JOS LÖYDÄTTE MINULLE 90 EDELTÄJÄHELMEÄ TUTKIMUSVARUSTEIDENI KUSTANTAMISEEN.", + "HYVÄ YRITYS. MUTTA OLEN VALMIS ANTAMAAN TOISEN VOIMAKENNON,", + "JOS LÖYDÄTTE MINULLE 90 EDELTÄJÄHELMEÄ TUTKIMUSVARUSTEISIINI.", "KUULOSTAAKO REILULTA?" ], "geologist-reminder-moles": [ "JOKO PAIMENSITTE SALAMAMYYRÄT TAKAISIN MAAN ALLE?", - "PITÄKÄÄ KIIRETTÄ - SUORA AURINGONVALO EI OLE HYVÄKSI NIILLE!" + "PITÄKÄÄ KIIRETTÄ, SUORA AURINGONVALO EI OLE HYVÄKSI NIILLE!" ], "geologist-reminder-money": [ - "MINÄ TARVITSEN NE HELMET JOS TAHDON JATKAA TUTKIMUSTANI!" + "MINÄ TARVITSEN NE HELMET, JOS TAHDON JATKAA TUTKIMUSTANI!" ], "geologist-resolution-moles": [ - "KIITOS KUN PELASTITTE NE MYYRÄT, TEITTE TOSI UROTEON.", + "KIITOS, KUN PELASTITTE NE MYYRÄT. TEITTE TOSI UROTEON.", "TÄSSÄ VOIMAKENNONI TEIDÄN OMAAN KÄYTTÖÖNNE.", "NYT VOIN VIIMEIN PALATA TUTKIMUKSENI PARIIN!" ], "geologist-resolution-money": [ "AI, TEILLÄ ON NE HELMET!", - "TÄSSÄ VOIMAKENNO JOSTA SOVIMME." + "TÄSSÄ SE VOIMAKENNO, JOSTA SOVIMME." ], "green-sagecage-daxter-sacrifice": [ "VALOECOA! SE VOISI MUUTTAA MINUT TAKAISIN!", "TAI SITTEN... SE VOISI PYSÄYTTÄÄ TUON ROBOTIN.", "PYSYÄKÖ PÖRRÖISENÄ, PELASTAAKO MAAILMA... VALINTOJA...", "NO, HYVÄ ON SITTEN, PELASTETAAN MAAILMA.", - "MUTTA TOIMI NOPEASTI ENNEN KUIN MUUTAN MIELENI!" + "MUTTA TOIMI NOPEASTI, ENNEN KUIN MUUTAN MIELENI!" ], "green-sagecage-introduction": [ - "OLI JO AIKAKIN ETTÄ TE KAKSI PÄÄTITTE SAAPUA!", + "OLI JO AIKAKIN, ETTÄ PÄÄTITTE SAAPUA!", "MUKAVA NÄHDÄ SINUAKIN!", - "SINÄKÖ MOPPAAT HEIDÄN LATTIAT NYKYÄÄN?", + "SINÄKÖ MOPPAAT HEIDÄN LATTIOITA NYKYÄÄN?", "EI OLE AIKAA VIISASTELULLE, DAXTER. GOL JA MAIA SIEPPASIVAT MEIDÄT", - "EHDYTTÄÄKSEEN ENERGIAMME HEIDÄN KAUHISTUTTAVAN MASIINANSA TEHOKSI.", - "NÄYTTÄÄ SILTÄ ETTÄ HE OVAT YHDISTELLEET EDELTÄJÄROBOTIN TOIMINNALLISIA OSIA", - "MAAILMALTA LÖYDETTYJEN ARTEFAKTIEN KANSSA.", + "EHDYTTÄÄKSEEN ENERGIAMME HEIDÄN HIRVEÄN LAITTEENSA TEHOKSI.", + "NÄYTTÄISI, ETTÄ HE OVAT YHDISTELLEET EDELTÄJÄROBOTIN TOIMINNALLISIA OSIA", + "MAAILMALTA LÖYDETTYJEN JÄÄNTEIDEN KANSSA.", "SEN JÄLKEEN HE LISÄSIVÄT MUUTAMIA PAHANSUOPIA OSASIA OMASTA TAKAA,", - "LUODEN SEN AINOAN LAITTEEN JOKA KYKENEE AVAAMAAN PIMEÄN ECON SIILOT.", - "JOS PYSTYTTE VAPAUTTAMAAN MEIDÄT NELJÄ, VOIMME KÄYTTÄÄ MEIDÄN VOIMIAMME YHDESSÄ", - "JA RIKKOA ROBOTIN YMPÄRILLÄ OLEVAN VOIMAKENTÄN", + "LUODEN LAITTEEN, JOKA KYKENEE AVAAMAAN PIMEÄN ECON SIILOT.", + "JOS PYSTYTTE VAPAUTTAMAAN MEIDÄT NELJÄ, VOIMME KÄYTTÄÄ VOIMIAMME YHDESSÄ", + "JA RIKKOA ROBOTTIA YMPÄRÖIVÄN VOIMAKENTÄN,", "ENNEN KUIN HE KÄYTTÄVÄT SITÄ MAAILMAN TUHOAMISEEN." ], "green-sagecage-outro-beat-boss-a": [ @@ -496,7 +483,7 @@ "EIIII!" ], "green-sagecage-outro-beat-boss-b": [ - "NÄYTTÄÄ SILTÄ ETTÄ SAATOIN OLLA TURHAN TYLY TEILLE, POJAT!", + "NÄYTTÄÄ SILTÄ, ETTÄ SAATOIN OLLA TURHAN TYLY TEILLE, POJAT!", "TEISSÄHÄN ONKIN SANKARIN AINESTA!", "MUTTA DAXTER, NYT EMME VOI MUUTTAA SINUA TAKAISIN!", "ÄLÄ MINUSTA HUOLI, MURU.", @@ -511,7 +498,7 @@ "EH, TODENNÄKÖISESTI...", "ÄH, HÄLLÄ VÄLIÄ! ANTAA TULLA, ME PÄIHITÄMME NE KYLLÄ! EIKÖS, JAK?", "SANOIN, EIKÖS, JAK?", - "WOU! HIDASTA VÄHÄN, KÖRILÄS!" + "JOU! HIDASTA VÄHÄN, KÖRILÄS!" ], "green-sagecage-outro-beat-boss-enough-cells": [ "PYHÄ NAUKKI! MIKÄ IHMETYS TUO ON?", @@ -547,32 +534,31 @@ ], "green-sagecage-resolution": [ "MAINOTA, POJAT! OLETTE TOSIAAN SANKAREITA NYT.", - "MINÄ YHDISTÄN VIHREÄN ECO-VOIMANI MUIDEN TIETÄJIEN KANSSA", + "MINÄ YHDISTÄN VIHREÄN ECO-VOIMANI MUIDEN TIETÄJIEN KANSSA,", "JA YHDESSÄ ME SAAMME ROBOTTIA YMPÄRÖIVÄN SUOJAKENTÄN AUKI.", - "JOO, JOO, SE KUULOSTAA HYVÄLTÄ ALULTA.", - "JA SITTEN KUN TE AVAATTE SUOJAKENTÄN,", - "MITÄ TE AIOTTE TEHDÄ TUOLLE ROBOTILLE?", + "JOO, SE KUULOSTAA HYVÄLTÄ ALULTA.", + "JA SITTEN KUN AVAATTE SUOJAKENTÄN, MITÄ TE AIOTTE TEHDÄ TUOLLE ROBOTILLE?", "EMME MITÄÄN, DAXTER. MEIDÄN TÄYTYY PITÄÄ SUOJAKENTTÄ AUKINAISENA.", - "SE ON TEIDÄN TEHTÄVÄNNE KEKSIÄ, KUINKA ROBOTTI VOIDAAN TUHOTA.", - "MAHTAVAA. SAAN AUTTAA SITÄ TYYPPIÄ JOKA MUUTTI MINUT KARVAPALLOKSI,", - "TUHOAMAAN AINOAN HENKILÖN JOKA VOI PALAUTTAA MINUT TAKAISIN!", + "SE ON TEIDÄN TEHTÄVÄNNE KEKSIÄ, MITEN ROBOTTI VOIDAAN TUHOTA.", + "MAHTAVAA. SAAN AUTTAA SITÄ TYYPPIÄ, JOKA MUUTTI MINUT KARVAPALLOKSI,", + "TUHOAMAAN SEN AINOAN HENKILÖN, JOKA VOI MUUTTAA MINUT TAKAISIN!", "PELASTAKAA MAAILMA ENSIN!", "SITTEN KATSOTAAN, JOS SAAMME SUOSTUTELTUA GOLIN AUTTAMAAN DAXTERIA." ], "mayor-introduction": [ - "EIH... ÄLKÄÄ VAIN KERTOKO ETTÄ TEILLÄKIN ON ONGELMIA!", + "EIH... ÄLKÄÄ VAIN KERTOKO, ETTÄ TEILLÄKIN ON ONGELMIA!", "ENSIN KUULIN HIRVIÖHAVAINNOISTA KYLÄN LÄHETTYVILLÄ, JA NYT VIELÄ TÄMÄKIN.", "NÄETTEHÄN NUO RATAKSET TUOLLA YLHÄÄLLÄ, EIKÖS? JA NÄETTE KUINKA NE EIVÄT LIIKU?", "SE TARKOITTAA SITÄ, ETTÄ KYLÄMME ON VIRTAA VAILLA!", - "VIIDAKON TEMMPPELISTÄ TULEVA ECO-SÄDE ON KATKAISTU!", - "JA, POJAT, KUKAAN EI USKALLA KÄYDÄ VILKAISEMASSA MITÄ SILLE ON TAPAHTUNUT.", + "VIIDAKON TEMPPELISTÄ TULEVA ECO-SÄDE ON KATKAISTU!", + "JA KUKAAN EI USKALLA KÄYDÄ VILKAISEMASSA MITÄ SILLE ON TAPAHTUNUT.", "KAI OLET MAKSANUT LASKUSI?", - "KYLLÄ-HM? AH-HA-HA, OLETPAS VITSIKÄS.", - "KUUNNELKAHAN. JOS TE KAKSI KORJAATTE ECO-SÄTEEN, SAATTE MINULTA VOIMAKENNON.", - "AI NIIN, JA-JA VIELÄ TOINEN JUTTU, ÖH...", - "JOS MAHDOLLISESTI OLETTE KIINNOSTUNEITA OTTAMAAN OSAA UUDELLEENVALINTAKAMPANJAANI,", - "S-SAATAN LUOVUTTAA VIELÄ TOISENKIN VOIMAKENNON!", - "MINIMILAHJOITUS ON SIIS, ÖH, HYVIN VAATIMATTOMAT...", + "KYLLÄ-HM? AH HA HA, OLETPAS VITSIKÄS.", + "KUUNNELKAAHAN, JOS TE KORJAATTE ECO-SÄTEEN, SAATTE MINULTA VOIMAKENNON.", + "AI NIIN, JA VIELÄ TOINEN JUTTU, ÖH...", + "JOS SATTUMALTA OLETTE KIINNOSTUNEITA OTTAMAAN OSAA UUDELLEENVALINTAKAMPANJAANI,", + "SAATAN LUOVUTTAA VIELÄ TOISENKIN VOIMAKENNON!", + "VÄHIMMÄISLAHJOITUS ON SIIS, ÖH, HYVIN VAATIMATTOMAT...", "90 EDELTÄJÄHELMEÄ." ], "mayor-reminder-beams": [ @@ -580,59 +566,60 @@ "YHY-HY-HY... KYLÄNNE TARVITSEE TEITÄ, POJAT!" ], "mayor-reminder-donation": [ - "AAH, TULITTE TEKEMÄÄN LAHJOITUKSEN KAMPPANJALLENI, OH HO HO HO.", - "90:LLÄ EDELTÄJÄHELMELLÄ SAATTE VOIMAKENNONNE, KIITOS VAIN." + "AH, TULITTEKO TEKEMÄÄN LAHJOITUKSEN KAMPANJALLENI? OH HO HO!", + "90 EDELTÄJÄHELMEÄ, NIIN SAATTE VOIMAKENNONNE, KIITOS VAIN." ], "mayor-resolution-beams": [ "OH HOH HOH, ONPAS IHANA NÄKY! KIITÄN TEITÄ!", "...JA KOKO KYLÄ KIITTÄÄ MINUA -", - "ÖÖMH... OLETTE PALAUTTANEET VIRRAN KYLÄÄMME JA TAANNEET UUDELLEENVALINTANI, POJAT!", - "JA TÄSTÄ HYVÄSTÄ, POIKASENI, OLETTE ANSAINNEET VOIMAKENNON." + "ÖÖMH... OLETTE PALAUTTANEET VIRRAN KYLÄÄMME JA TAANNEET UUDELLEENVALINTANI!", + "JA SIITÄ HYVÄSTÄ, POIKASENI, OLETTE ANSAINNEET VOIMAKENNON." ], "mayor-resolution-donation": [ - "VAI, ETTÄ, ÖH... TAHDOT TEHDÄ LAHJOITUKSEN? MAHTAVAA... JA K-K-KOOKKAAN SELLAISEN, TOIVON.", + "VAI, ETTÄ TAHDOTTE TEHDÄ LAHJOITUKSEN? MAHTAVAA...", + "JA KOOKKAAN SELLAISEN, TOIVON.", "JIIH! EH HE HE, TÄMÄHÄN ONKIN KOOKAS LAHJOITUS!", - "MINÄ, S-S-SIIS V-VAIN TOIVON, ETTÄ TÄMÄ VOIMAKENNO RIITTÄVÄSTI EDUSTAA KIITOLLISUUTTANI." + "MINÄ SIIS VAIN TOIVON, ETTÄ TÄMÄ VOIMAKENNO RIITTÄVÄSTI EDUSTAA KIITOLLISUUTTANI." ], "minershort-introduction-gnawers": [ "MIKSETTE VAIKKA KÄYTTÄISI AIKAANNE HYÖDYKSI?", "VAANIJAT OVAT TEHNEET KAIVUUTA PIMEISSÄ LUOLISSA TUOLLAPÄIN.", - "ILMEISESTI NE ETSIVÄT EDELTÄJIEN JÄÄNTEITÄ.", + "TAITAVAT ETSIÄ JOITAIN EDELTÄJIEN JÄÄNTEITÄ.", "MINUN PUOLESTANI NE VOIVAT PITÄÄ KAIKKI LÖYDÖKSENSÄ.", "MEIDÄN PUOLESTAMME!", "RUOKIHAN LINTUSI, WILLARD.", "MINÄ VÄLITÄN VAIN JALOKIVISTÄ!", - "MUTTA EN VOI HAALIA LUOLISTON RIKKAUKSIA", - "SILLÄ KUN NE LOPETTAVAT TOIMINTANSA, NE ROMAUTTAVAT KOKO PAIKAN MAAN TASALLE!", + "MUTTA EN VOI HAALIA LUOLASTON RIKKAUKSIA,", + "KOSKA KUN NE LOPETTAVAT, NE AIKOVAT ROMAUTTAA KOKO PAIKAN!", "JOS HOITELETTE TUKIPILAREITA JAUHAVAT VAANIJAT,", "SAATATTE PELASTAA LUOLAN.", "MENKÄÄHÄN SIITÄ!" ], "minershort-introduction-orbs": [ - "HEI GORDY, ÖÖH, MUSTA TUNTUU ETTÄ ME SAATIIN VIERAITA.", - "IHAN TOSI, WILLARD? PÄIVIÄ MUUKALAISET, ÖHM, LÄPIKULKUMATKALLA?", - "ÖH, ME MYÖS. NO, TÄYTYY MENNÄ, EIPÄ TÄÄLLÄ MITÄÄN NÄHTÄVÄÄ OLE.", - "ÖÖH, MÄ LUULIN ETTÄ TÄÄ OLI MITTAAMATTOMAN ARVOKAS JALOKIVI JOKA-", + "HEI, GORDY, ÖÖH, MUSTA TUNTUU, ETTÄ ME SAIMME VIERAITA.", + "IHAN TOSI, WILLARD? PÄIVIÄ MUUKALAISET, LÄPIKULKUMATKALLA?", + "ÖH, ME MYÖS. NO, TÄYTYY MENNÄ, EIPÄ TÄÄLLÄ NÄHTÄVÄÄ OLE.", + "ÖÖH, MÄ LUULIN, ETTÄ TÄMÄ ON MITTAAMATTOMAN ARVOKAS JALOKIVI, JOKA-", "WILLARD!", "OIKEASTAAN, ME ETSIMME VOIMAKENNOJA. EMME JALOKIVIÄ.", - "MEILLÄ ON NIITÄ NELJÄ. ÖH, HALUATTEKO NE?", - "MITÄ LINTUAIVO YRITTÄÄ SANOA, ON ETTÄ", - "MEILLÄ SAATTAA OLLA PARI VOIMAKENNOA LOJUMASSA,", + "MEILLÄ ON NIITÄ NELJÄ. HALUATTEKO NE?", + "MITÄ LINTUAIVO YRITTÄÄ SANOA ON,", + "ETTÄ MEILLÄ SAATTAA OLLA PARI VOIMAKENNOA LOJUMASSA", "JA SAATAMME ANTAA NE VASTINEEKSI...", - "90:STÄ HELMESTÄ KAPPALEELTA.", - "MISSÄS MÄ OLEN KUULLUT TÄMÄN ENNEN?", - "HEI, MITEN TE NEROT AIOTTE SAADA TUON ISON MURIKAN TÄÄLTÄ ULOS YLIPÄÄNSÄ?", + "90 HELMEÄ KAPPALEELTA.", + "MISSÄS OLEN KUULLUT TUON ENNEN?", + "MITEN TE NEROT AIOTTE SAADA TUON JÄRKÄLEEN ULOS TÄÄLTÄ YLIPÄÄNSÄ?", "NO, ÄLYNIEKKA, MEILLÄ ON KAKSITOISTA VUOTTA KAIVUUTA AIKAA SELVITTÄÄ SE.", "ÖÖH... GORDY, EIKÖ SE VEISI VÄHEMMÄN AIKAA, JOS SÄ KAIVAISIT MYÖS?" ], "minershort-introduction-switch": [ "PSST, TYYPIT. ÖÖH...", - "LINTUNEN JA MÄ OLTIIN TUTKIMASSA LUOLAA JOSTA TE VARMASTI TYKKÄISITTE.", + "LINTUNEN JA MÄ OLIMME TUTKIMASSA LUOLAA, JOSTA TE VARMASTI TYKKÄISITTE.", "SE OLI TÄYNNÄ NÄTTIÄ ORANSSIA METALLIA,", "JA TOSI HYVIN PIILOSSA MUUTAMAN PUUN TAKANA LUMIVUORILLA!", - "KERROIN GORDYLLE SIITÄ, MUTTA SE VAAN HUUSI MULLE ETTÄ EN OLE KAIVAMASSA!", + "KERROIN GORDYLLE SIITÄ, MUTTA HÄN VAIN HUUSI MULLE, KUN EN OLLUT KAIVAMASSA!", "MIKSI ET OLE KAIVAMASSA?!", - "ANTEEKS!" + "ANTEEKSI!" ], "minershort-reminder-1-gnawers": [ "VOISITTEKO TE PIAN HOIDELLA NE VAANIJAT,", @@ -647,7 +634,7 @@ ], "minershort-reminder-1-switch": [ "LÖYSITTEKÖ JO SEN LUOLAN PUIDEN TAKANA LUMIVUORILLA?", - "MÄ MEEN SINNE KOHTA PIILOON GORDYLTA, KOSKA SE HUUTAA MULLE TAAS!", + "MÄ MENEN SINNE KOHTA PIILOON GORDYLTA, KOSKA HÄN HUUTAA MULLE TAAS!", "WILLARD!!" ], "minershort-reminder-2-orbs": [ @@ -659,11 +646,11 @@ "TÄSSÄ ON VOIMAKENNO HELMISTÄNNE." ], "minershort-resolution-2-orbs": [ - "OOH! ÖM, MUN VUORO TÄLLÄ KERTAA! ÖÖ...", + "OH! MUN VUORO TÄLLÄ KERTAA!", "TÄSSÄ ON...", "ÖÖHH... TÄSSÄ ON...!", "VOIMAKENNO!", - "NIIN, NIIN... MITÄ TOI SANOI.", + "NIIN, NIIN... MITÄ HÄN SANOI.", "SE OLI SIINÄ. TYHJÄSITTE TASKUMME.", "EI! ENÄÄ! VOIMA! KENNOJA!" ], @@ -678,13 +665,13 @@ "oracle-intro-2": [ "VARUILKAA PIMEÄÄ VALOA,", "SE KUN ON KÄÄNTÄNYT TOISEN TEISTÄ KOHTALON.", - "TUO MINULLE 120 EDELTÄJÄHELMEÄ", + "TUOKAA MINULLE 120 EDELTÄJÄHELMEÄ", "KUMMASTAKIN VOIMAKENNOSTA, JOTA VARJELEN." ], "oracle-intro-3": [ "TAVOITELKAA PUHDASTA VALOA, SEN LOIMUN SISÄLLÄ KUN VASTAUKSET LEPÄÄ.", - "VOIT ANSAITA VOIMAKENNONI,", - "JOS TUOT 120 EDELTÄJÄHELMEÄ KUMMASTAKIN." + "VOITTE ANSAITA VOIMAKENNONI,", + "JOS TUOTTE 120 EDELTÄJÄHELMEÄ KUMMASTAKIN." ], "oracle-left-eye-1": [ "OLET OSOITTANUT ITSESI ARVOISEKSI. TÄSSÄ ON VOIMAKENNO." @@ -721,22 +708,22 @@ "TIEDÄTTEKÖ KUINKA KAUAN OLEN LOJUNUT TÄÄLLÄ?", "MIKÄ TEILLÄ NIIN KAUAN KESTI? JA, ÖH, HEH HEH HEH...", "MITKÄS OVAT NIMENNE?", - "MÄ OLEN DAXTER! TUOSSA ON JAK. HÄN ON MINUN MATKASSANI.", + "MINÄ OLEN DAXTER! TUOSSA ON JAK. HÄN ON MINUN MATKASSANI.", "HIENOA TYÖTÄ, DAXTER. OLET TODELLINEN SANKARI.", "SINUN TÄYTYY ESTÄÄ GOLIA KÄYNNISTÄMÄSTÄ TUOTA ROBOTTIA.", "MINÄ KÄYTÄN ECO-VOIMAANI AUTTAAKSENI SUOJAKENTÄN AVAAMISESSA." ], "sage-bluehut-introduction-crop-dusting": [ - "NOOH, TILANNE TÄÄLLÄ HAISKAHTAA PAHEMMALTA KUIN VAANIJAN KAINALOHIKI!", + "NOH, TILANNE TÄÄLLÄ HAISKAHTAA PAHEMMALTA KUIN VAANIJAN KAINALOHIKI!", "ENNEN SINISEN TIETÄJÄN KATOAMISTA,", "HÄN KIRJOITTI YLÖS TIETOA KAIKENLAISESTA TOHINASTA LÄHIALUEILLA.", - "MINUN ERITYINEN KIINNOSTUKSENI NOUSI PIMEÄÄN ECOON", - "SAIRASTUNEISTA VIATTOMISTA KASVEISTA EDELTÄJÄLAAKSOSSA.", + "MINUN ERITYINEN KIINNOSTUKSENI NOUSI", + "PIMEÄÄN ECOON SAIRASTUNEISIIN VIATTOMIIN KASVEIHIN EDELTÄJÄLAAKSOSSA.", "KEIRA TULEE LÄHETTÄMÄÄN ZOOMERIN LÄHIMMÄLLE TRANS-ALUSTALLE.", - "LENNÄ ZOOMERILLASI VIHREÄN ECO-AUKON YLLE,", + "LENNÄ ZOOMERILLASI VIHREÄN ECO-AUKON YLLE", "JA KANNA VIHREÄÄ ECOA TURMELTUJEN KASVIEN LUOKSE.", "SEN PITÄISI PARANTAA NE.", - "ÄLÄ OHITA YHTÄKÄÄN KASVIA, MUUTOIN SAIRAAT YKSILÖT HITAASTI UUDELLEENMYRKYTTÄVÄT TERVEET.", + "ÄLÄ OHITA AINUTTAKAAN KASVIA, MUUTOIN SAIRAAT MYRKYTTÄVÄT TERVEET UUDELLEEN.", "JA DAXTER...", "ALA SIIVOAMAAN!", "ETKÄ SITTEN UNOHDA NURKKIA!" @@ -747,25 +734,25 @@ "VAANIJAT OVAT VALLANNEET SUON LAHDEN TOISELLA PUOLEN.", "NÄYTTÄÄ SILTÄ, ETTÄ NE AIKOVAT KÄYTTÄÄ ILMALAIVAA", "NOSTAAKSEEN MUDAN UUMENISTA JONKIN TÄRKEÄN EDELTÄJIEN JÄÄNTEEN.", - "TEIDÄN ON MATKATTAVA SINNE, JA IRROITETTAVA HEIDÄN KIINNITYSNARUNSA.", - "KEN TIETÄÄ, MITÄ HE TAHTOVAT JÄÄNTEELLÄ TEHDÄ,", + "TEIDÄN ON MATKATTAVA SINNE JA IRROTETTAVA HEIDÄN KIINNITYSNARUNSA.", + "KEN TIETÄÄ MITÄ HE TAHTOVAT JÄÄNTEELLÄ TEHDÄ,", "MUTTA KUTEN TÄMÄN ORANSSIN OTUKSEN HÖNKÄ, SE EI LUPAA MITÄÄN HYVÄÄ." ], "sage-bluehut-reminder-1-crop-dusting": [ - "SILMÄNI TAITAA TEHDÄ TEPPOSET!", + "SILMÄNI TAITAVAT TEHDÄ TEPPOSET!", "SILLÄ OLEN VARMA, ETTÄ TE KAKSI OLETTE JUURI NYT SYVÄLLÄ EDELTÄJÄLAAKSOSSA,", "PELASTAMASSA PIMEÄÄN ECOON SAIRASTUNEITA KASVEJA." ], "sage-bluehut-reminder-1-prec-arm": [ - "MITÄS TE KAKSI TÄÄLLÄ NYT JO TEETTE?", + "MITÄ TE KAKSI TÄÄLLÄ NYT JO TEETTE?", "VOIN TÄÄLTÄKIN VIELÄ NÄHDÄ,", - "KUINKA VAANIJOIDEN ILMALAIVA ON VIELÄKIN LEIJAILEMASSA SUON YLÄPUOLELLA.", + "KUINKA VAANIJOIDEN ILMALAIVA ON YHÄ LEIJAILEMASSA SUON YLÄPUOLELLA.", "ETTE SELVÄSTIKÄÄN OLE VIELÄ SUORITTANEET TEHTÄVÄÄNNE.", "NYT LIIKKEELLE!" ], "sage-intro-sequence-a": [ - "OLEN VIETTÄNYT ELÄMÄNI ETSIEN VASTAUKSIA KYSYMYKSIIN JOIHIN ISÄNI,", - "JA ISÄNI ISÄT EIVÄT ONNISTUNEET LÖYTÄMÄÄN.", + "OLEN VIETTÄNYT ELÄMÄNI ETSIEN VASTAUKSIA,", + "JOITA ISÄNI JA ISIENI ISÄT EIVÄT ONNISTUNEET LÖYTÄMÄÄN.", "KEITÄ OLIVAT NUO KAUKAISET EDELTÄJÄT?", "MIKSI HE LOIVAT NUO LUKEMATTOMAT MONOLIITIT, JOITA PLANEETTAAMME KANTAA?", "MITEN HE ONNISTUIVAT KÄYTTÄMÄÄN ECOA, MAAILMAMME ELINVOIMAA?", @@ -773,129 +760,134 @@ "OLEN KYSYNYT KASVEILTA, MUTTA NE EIVÄT MUISTA.", "KASVIT KYSYIVÄT KIVILTÄ, MUTTA KIVILLÄ EI OLE MUISTIKUVAA.", "EDES KIVILLÄKÄÄN EI OLE MUISTIKUVAA...", - "JOKA IKINEN LUU KEHOSSANI KERTOO MINULLE, ETTÄ VASTAUKSET", - "LÖYTYVÄT ERÄÄN NUOREN POJAN HARTEILTA,", - "JOKA ON TIETÄMÄTÖN KOHTALOSTAAN, EI VÄLITÄ TOTUUDEN ETSINNÄSTÄ", + "JOKA IKINEN LUU KEHOSSANI KERTOO MINULLE,", + "ETTÄ VASTAUKSET LÖYTYVÄT ERÄÄN NUOREN POJAN HARTEILTA.", + "TIETÄMÄTTÖMÄNÄ KOHTALOSTAAN, EI VÄLITÄ TOTUUDEN ETSINNÄSTÄ,", "JA HYLKII OPASTUSTANI!", - "JA MIKSI HÄN YLIPÄÄNSÄ HALUAISI KUUNNELLA VANHAA TIETÄJÄ SAMOSIA?", + "JA MIKSI HÄN KUUNTELISI VANHAA TIETÄJÄ SAMOSIA YLIPÄÄNSÄ?", "OLENHAN VAIN VIHREÄN ECON MESTARI JA YKSI PLANEETAN VIISAIMMISTA MIEHISTÄ!", - "NÄYTTÄÄPI SILTÄ, ETTÄ TIE VASTAUKSIIN EI ALA HUOLELLISILLA TUTKIMUKSILLA", - "TAI JÄRKEVÄLLÄ AJATTELULLA.", + "NÄYTTÄÄPI SILTÄ, ETTÄ TIE VASTAUKSIIN EI ALA HUOLELLISIN TUTKIMUKSIN,", + "SAATI JÄRKEVÄLLÄ AJATTELULLA.", "EI SUINKAAN! KUTEN MONET KOHTALON MYSTEERIT,", "SE ALKAA PIENELLÄ, MUTTA KOHTALOKKAALLA VASTOINTEOLLA.", - "HEI! TUOTA... JAK? SE VANHA VIHREÄ UKKO KIELSI MEITÄ TULEMASTA TÄNNE!" + "HEI! TUOTA... JAK?", + "SE VANHA VIHERYS KIELSI MEITÄ TULEMASTA TÄNNE!" ], "sage-intro-sequence-d1": [ "MITÄ VIHERTÄVÄÄ IHMETTÄ TE KAKSI NYT TAHDOTTE?", - "ME- ME- ME OTIIN- NE OLI- MÄ OON- MÄ OLIN-", + "ME- ME OLIMME- NE OLI- MINÄ- MINÄ OLIN-", "ÄLÄ EDES SANO! SEN SIJAAN, ETTÄ OLISITTE KUUNNELLEET VIISAUKSIANI,", - "TE KAKSI MENITTE PELLEILEMÄÄN", - "AINOAAN PAIKKAAN MINNE KIELSIN TEITÄ MENEMÄSTÄ: USVASAARELLE!", + "TE KAKSI MENITTE PELLEILEMÄÄN AINOAAN PAIKKAAN, MINNE KIELSIN TEITÄ MENEMÄSTÄ:", + "USVASAARELLE!", "AIVAN NIIN! JA SITTEN-", "JA SITTEN, DAXTER, SINÄ VIHDOIN JA VIIMEIN KÄVIT KYLVYSSÄ,", "MUTTA AMMEESI OLI TÄYNNÄ PIMEÄÄ ECOA.", - "KUULES, VANHA UKKELI, AIOTKO SÄ SOITTAA SUUTASI", - "VAI AIOTKO SÄ AUTTAA MUT POIS TÄSTÄ LIEMESTÄ?", - "MINÄPÄS JATKAN SUUNI SOITTOA! SILLÄ MINUN MIELESTÄNI", - "MUUTOKSESI ON PARANNUS.", + "KUULES, UKKELI. AIOTKO SOITTAA SUUTASI", + "VAI AUTTAA MINUT POIS TÄSTÄ LIEMESTÄ?", + "MINÄPÄS JATKAN SUUNI SOITTOA!", + "SILLÄ MIELESTÄNI MUUTOKSESI ON PARANNUS.", "JA MUUTENKIN, EN VOISI AUTTAA VAIKKA TAHTOISINKIN.", "MITÄH!?", - "VAIN YKSI HENKILÖ ON TUTKINUT PIMEÄÄ ECOA TARPEEKSI PITKÄÄN", - "JOTTA HÄNELLÄ OLISI EDES MAHDOLLISUUS PALAUTTAA SINUT AIEMPAAN MUOTOOSI:", + "VAIN YKSI HENKILÖ ON TUTKINUT PIMEÄÄ ECOA TARPEEKSI PITKÄÄN,", + "ETTÄ HÄNELLÄ OLISI MAHDOLLISUUS PALAUTTAA SINUT AIEMPAAN MUOTOOSI:", "TIETÄJÄ GOL ACHERON.", "MUTTA HÄN ASUU KAUKANA POHJOISESSA. HYVIN, HYVIN KAUKANA.", - "KUKAAN EI OLE KESKUSTELLUT HÄNEN KANSSAAN HERRAN AIKOIHIN.", + "KUKAAN EI OLE KESKUSTELLUT HÄNEN KANSSAAN VUOSIIN.", "TELEPORTTAISIN TEIDÄT SINNE HETKESSÄ, MUTTA EN PYSTY SIIHENKÄÄN.", - "KUKAAN KOLMESTA MUUSTA TIETÄJÄSTÄ JOTKA YLLÄPITÄVÄT TELEPORTTEJAAN", - "EIVÄT OLE PITÄNEET OMIAAN PÄÄLLÄ JO PITKÄÄN AIKAAN." + "KUKAAN KOLMESTA MUUSTA TIETÄJÄSTÄ, JOTKA YLLÄPITÄVÄT TELEPORTTEJAAN,", + "EIVÄT OLE PITÄNEET OMIAAN PÄÄLLÄ HERRAN AIKOIHIN." ], "sage-intro-sequence-d2": [ - "JUURI NYT AINOA REITTI POHJOISEEN ON TULIKANJONIN LÄPI JALAN", - "MUTTA SEN TULIKUUMA MAAPERÄ KYKENEE SULATTAMAAN JOPA EDELTÄJIEN METALLIA.", - "SEN LÄPI EI VOI NOIN VAIN KÄVELLÄ.", - "MUTTA SEN YLI VOISI LENTÄÄ,", - "JOS SINULLA OLISI LÄMPÖSUOJALLA VARUSTETTU ZOOMERI.", - "MINÄPÄS SATUNKIN VÄRKKÄÄMÄÄN MOISTA JUURI TÄLLÄ HETKELLÄ.", - "TARVITSISIN VAIN 20 VOIMAKENNOA ANTAMAAN SILLE TARPEEKSI TEHOA", - "KESTÄMÄÄN KANJONIN KUUMUUTTA. EIKÖS NIIN, ISUKKI?", - "SAATTAISIHAN SE TOIMIA, KEIRA. MUTTA MISTÄ VOISIVAT POIKA", - "JA POJAN PUOLIKAS!", + "JUURI NYT AINOA REITTI POHJOISEEN ON TULIKANJONIN LÄPI JALAN,", + "MUTTA SEN TULIKUUMA MAAPERÄ SULATTAA JOPA EDELTÄJIEN METALLIA.", + "SEN LÄPI EI VOI NIIN VAIN KÄVELLÄ.", + "MUTTA SEN YLI VOISI LENTÄÄ LÄMPÖSUOJALLA VARUSTETULLA ZOOMERILLA.", + "MINÄPÄ SATUNKIN VÄRKKÄÄMÄÄN MOISTA JUURI TÄLLÄ HETKELLÄ.", + "TARVITSISIN VAIN 20 VOIMAKENNOA SEN VIRTALÄHTEEKSI", + "KESTÄMÄÄN KANJONIN KUUMUUTTA.", + "EIKÖS NIIN, ISUKKI?", + "SAATTAISIHAN SE TOIMIA, KEIRA.", + "MUTTA MISTÄ VOISIVAT KLOPPI JA KLOPIN PUOLIKAS", "SAADA KAKSIKYMMENTÄ VOIMAKENNOA?", - "KYLÄLÄISILTÄ, TIETTY! LÄHES KAIKILLA ON VOIMAKENNO TAI KAKSI", - "JOSSAKIN TALLESSA.", + "KYLÄLÄISILTÄ, TIETTY! LÄHES KAIKILLA ON VOIMAKENNO TAI KAKSI JOSSAKIN TALLESSA.", "JA VAIKKA HE EIVÄT SILKKAA HYVYYTTÄÄN ANTAISI NIITÄ POIS,", - "MUUTAMA EDELTÄJÄHELMI TAI AVUNANTO PITÄISI OLLA SOPIVA HINTA AINAKIN YHDESTÄ.", - "JA OLEN VARMA ETTÄ NIITÄ LÖYTYY LUONNOSTA LISÄÄKIN, ODOTTELEMASSA ETTÄ JOKU", - "ROHKEA SEIKKAILIJA LÖYTÄÄ NE.", + "MUUTAMA EDELTÄJÄHELMI PITÄISI OLLA SOPIVA HINTA AINAKIN YHDESTÄ.", + "JA NIITÄ VARMASTI LÖYTYY LISÄÄKIN LUONNOSTA ODOTTELEMASSA,", + "ETTÄ JOKU ROHKEA SEIKKAILIJA LÖYTÄÄ NE.", "NO AINAKIN SE ROHKEA SEIKKAILIJA LÖYTYY OMASTA TAKAA.", "ROHKEA SEIKKAILIJA?", - "TE KAKSI ETTE EDES LÖYTÄISI TIETÄ ULOS KYLÄSTÄ ILMAN HARJOITTELUA!", - "ENNEN KUIN TEETTE YHTÄÄN MITÄÄN, TEIDÄN ON PAREMPI KULKEA TELEPORTIN LÄPI JA", - "HARJOITELLA SEIKKAILUA GEYSIRSAARELLA.", - "ÖH, EMMEHÄN TULE TÖRMÄÄMÄÄN SIIHEN TUMMAAN ECO-MÖNJÄÄN SIELLÄ, EIHÄN?", - "KOSKA VIHAISIN PUDOTA SINNE UUDESTAAN JA MUUTTUA SINUKSI!", + "TE KAKSI ETTE EDES LÖYTÄISI ULOS KYLÄSTÄ ILMAN HARJOITTELUA!", + "ENNEN KUIN TEETTE YHTIKÄS MITÄÄN, TEIDÄN ON PARASTA KULKEA TELEPORTIN LÄPI", + "JA HARJOITELLA SEIKKAILUA GEYSIRSAARELLA.", + "EMMEHÄN TULE TÖRMÄÄMÄÄN SIIHEN TUMMAAN ECO-MÖNJÄÄN SIELLÄ?", + "EN MIELISI PUDOTA SINNE TAAS JA MUUTTUA SINUKSI!", "NYT SISÄÄN SIITÄ! TAI MUUTAN TEIDÄT KUMMATKIN SANIAISIKSI!" ], "sage-intro-sequence-e": [ "HYVIN TREENATTU POJAT, MUTTA TUO EI OLLUT MITÄÄN TULEVIIN HAASTEISIIN VERRATTUNA.", "HAH, NE OVAT HELPPO NAKKI. ME PÄRJÄÄMME KYLLÄ, VAI MITÄ JAK?", - "TYKKÄISIMME KOVIN JÄÄDÄ JUTUSTELEMAAN, VIHERYS, MUTTA...", + "OLISI KIVA JÄÄDÄ JUTUSTELEMAAN, VIHERYS, MUTTA...", "MEIDÄN SEIKKAILUMME KUTSUVAT.", "HYVÄ ON, \"SEIKKAILKAA\" TIEHENNE SITTEN.", - "JA KUN OLETTE \"SEIKKAILEMASSA\", MIKSETTE OLISI VAIKKA HYÖDYKSIKIN?", + "JA KUN OLETTE \"SEIKKAILEMASSA\", MIKSETTE OLISI VAIKKA HYÖDYKSI?", "VIHREÄN ECON KERÄIMENI OVAT JÄLLEEN TUKOSSA.", - "TEHÄN VOISITTE SUUNNATA RANNAN PÄÄTYOSAAN JA HOITAA NE ALTA POIS.", + "SUUNNATKAA RANNAN PÄÄTYOSAAN JA HOITAKAA NE ALTA POIS.", "SEURATKAA LAMPPUJA, NE JOHTAVAT SUORAAN SINNE.", "JA NYT, MOLEMMAT...", "PAINUKAA ULOS TÄÄLTÄ!" ], "sage-introduction-misty-cannon": [ "AAH, MAAILMAA MATKAAVAT SANKARINI OVAT PALANNEET.", - "HYVÄ, TAHDOINKIN KERTOA TEILLE ERÄÄSTÄ HYVIN VAKAVASTA ASIASTA.", + "HYVÄ, TAHDOINKIN KERTOA TEILLE ERÄÄSTÄ VAKAVASTA ASIASTA.", "USVASAARELLA VAIKUTTAA OLEVAN TAVALLISTA ENEMMÄN VAANIJOITA LIIKKEELLÄ.", - "TÄHYSTYSTORNISTANI NÄEN NIIDEN POMMITTAVAN YHTÄ EDELTÄJIEN ECO-SIILOISTA.", - "JOS NE SAAVAT SEN AUKI JA VAPAUTTAVAT SIELLÄ LILLUVAN PIMEÄN ECON, ME KAIKKI VOIMME PÄÄTYÄ", - "HAAHUILEMAAN YMPÄRIINSÄ YHTÄ HÖLMÖN NÄKÖISINÄ KUIN TÄMÄ KIUSANKAPPALE TÄSSÄ.", + "NÄEN NIIDEN POMMITTAVAN YHTÄ EDELTÄJIEN ECO-SIILOISTA TÄHYSTYSTORNISTANI.", + "JOS NE SAAVAT SEN AUKI JA VAPAUTTAVAT SIELLÄ LILLUVAN PIMEÄN ECON,", + "VOIMME KAIKKI PÄÄTYÄ HAAHUILEMAAN YMPÄRIINSÄ YHTÄ HÖLMÖN NÄKÖISINÄ", + "KUIN TÄMÄ KIUSANKAPPALE TÄSSÄ.", "JAK, SINUN ON AIKA TODISTAA TAITOSI.", - "ETSI KALASTAJA JA PYYDÄ HÄNTÄ LAINAAMAAN VENETTÄÄN JOTTA PÄÄSET USVASAARELLE,", - "KIIPEÄ EDELTÄJÄSIILON HUIPULLE JA PYSÄYTÄ NIIDEN KANUUNA.", + "ETSI KALASTAJA JA PYYDÄ HÄNTÄ LAINAAMAAN VENETTÄÄN USVASAARELLE,", + "KIIPEÄ EDELTÄJÄSIILON HUIPULLE JA PYSÄYTÄ VAANIJOIDEN KANUUNA.", "JA... ENTÄS MINÄ SITTEN?", - "SINÄ? MIKSET VAIKKA MOPPAISI LATTIALANKKUJANI? NE NÄYTTÄVÄT HIIPUNEEN KIILLOSTAAN." + "SINÄ? MIKSET VAIKKA MOPPAISI LATTIALANKKUJANI?", + "NE NÄYTTÄVÄT HIIPUNEEN KIILLOSTAAN." ], "sage-reminder-1-ecorocks": [ - "NO ONPAS SIINÄ KYLLÄ KAKSI \"ROHKEAA SEIKKAILIJAA\".", - "TÄÄLLÄ TAAS, JA AVAAMATTA TUKKIUTUNEITA ECO-KERÄIMIÄNI!", + "NO SIINÄPÄS VASTA KAKSI \"ROHKEAA SEIKKAILIJAA\".", + "TÄÄLLÄ TAAS JA AVAAMATTA TUKKIUTUNEITA ECO-KERÄIMIÄNI!", "NE SIJAITSEVAT RANNAN PÄÄTYPUOLELLA, POJAT.", "JA NYT...", "LIIKETTÄ NIVELIIN!" ], "sage-reminder-1-generic": [ "MITÄ TE KAKSI TÄÄLLÄ TEETTE? TEILLÄ ON VOIMAKENNOJA KERÄTTÄVÄNÄ!", - "JÄTTÄKÄÄ MINUT RAUHAAN... KUNNES TEILLÄ ON NE!" + "JÄTTÄKÄÄ MINUT RAUHAAN...", + "KUNNES TEILLÄ ON NE!" ], "sage-reminder-1-misty-cannon": [ "TUO POMMITUS VAIN PAHENEE!", - "ETSI KALASTAJAMME VIIDAKOSTA, PYYDÄ LUPAA KÄYTTÄÄ HÄNEN VENETTÄÄN", - "JA MENKÄÄ USVASAARELLE PYSÄYTTÄMÄÄN SE KANUUNA.", - "JA SINUN, DAXTER, TÄYTYY ALKAA SIIVOMAAN. TÄMÄ PAIKKAHAN ON TÄYSI LÄÄVÄ!" + "ETSI KALASTAJA VIIDAKOSTA, PYYDÄ LUPAA KÄYTTÄÄ HÄNEN VENETTÄÄN,", + "JA MENE USVASAARELLE PYSÄYTTÄMÄÄN SE KANUUNA.", + "JA SINUN, DAXTER, TÄYTYY ALKAA SIIVOMAAN.", + "TÄMÄ PAIKKAHAN ON TÄYSI LÄÄVÄ!" ], "sage-reminder-2-generic": [ "TE KAKSI ETTE VAIKUTA YMMÄRTÄVÄN TILANTEEN VAKAVUUTTA.", - "KYSEESSÄ ON MUUTAKIN KUIN PELKKÄ PÖRRÖISEKSI MUUTTUNUT POIKA. KYSE SAATTAA OLLA ELÄMÄSTÄ JA KUOLEMASTA.", - "ANTAKAA MENNÄ, JA TOTEUTTAKAA KOHTALONNE." + "KYSEESSÄ ON MUUTAKIN KUIN PELKKÄ PÖRRÖISEKSI MUUTTUNUT POIKA.", + "TÄSSÄ ON KYSE ELÄMÄSTÄ JA KUOLEMASTA.", + "ANTAKAA MENNÄ JA TOTEUTTAKAA KOHTALONNE." ], "sage-village3-introduction": [ - "AUH! PELKÄÄN AINA ETTÄ MENETÄN KEHONOSIA NÄISSÄ LAITTEISSA.", + "AUH! PELKÄÄN AINA MENETTÄVÄNI KEHONOSIA NÄISSÄ LAITTEISSA.", "PYHÄ NAUKKI! PUNAISEN TIETÄJÄN MÖKKI ON SOTKUISEMPI KUIN SINISEN!", "TODELLAKIN NÄYTTÄÄ SILTÄ KUIN TÄÄLLÄ OLTAISIIN KAMPPAILTU.", "HA HA HA HA HA!", - "EN KYLLÄ KUTSUISI SITÄ \"KAMPPAILUKSI\".", + "TUSKIN KUTSUISIN SITÄ \"KAMPPAILUKSI\".", "ENTÄ SINÄ, SISKOSENI?", "EN TOSIAANKAAN. PUNAINEN TIETÄJÄ LUOVUTTI NIIN VAIVATTOMASTI.", "HAUSKANPITO JÄI NIIN VÄHIIN.", "GOL? OLETKO SE SINÄ?", "OLET TAINNUT VIHDOIN MENETTÄÄ JÄRKESI?", - "JA MAIA! MINÄHÄN SANOIN ETTÄ PIMEÄ ECO MUUTTAISI TEITÄ MOLEMPIA!", + "JA MAIA! MINÄHÄN SANOIN, ETTÄ PIMEÄ ECO MUUTTAISI TEITÄ MOLEMPIA!", "HMH, KUKAAN EI IKINÄ KUUNTELE VANHAA SAMOSIA...", "MITÄ OLETTE TEHNEET SINISELLE JA PUNAISELLE TIETÄJÄLLE?", "ÄLÄ HUOLI VÄRIKKÄISTÄ YSTÄVISTÄSI, VANHA PÖLHÖ.", @@ -904,30 +896,28 @@ "OLIT VÄÄRÄSSÄ, SAMOS. PIMEÄ ECO ON HALLITTAVISSA!", "OLEMME OPPINEET SEN SALAT, JA NYT VOIMME MUOKATA MAAILMAA MIELEMME MUKAAN.", "ET VOI HALLITA PIMEÄÄ ECOA ITSESSÄÄN! EDES EDELTÄJÄT EIVÄT-", - "TOISTAISEKSI, MEIDÄN ON TÄYTYNYT SELVITÄ NIILLÄ PIENILLÄ PIMEÄN ECON RIPPEILLÄ", + "TOISTAISEKSI, OLEMME PÄRJÄNNEET NIILLÄ PIENILLÄ PIMEÄN ECON RIPPEILLÄ,", "JOITA LÖYSIMME LÄHELTÄ MAAN PINTAA.", - "MUTTA PIAN PÄÄSEMME KÄSIKSI VALTAVIIN VARASTOIHIN", - "PIMEÄÄ ECOA, PIILOTETTUNA MAAN SYÖVEREISSÄ.", + "MUTTA PIAN PÄÄSEMME KÄSIKSI VALTAVIIN VARASTOIHIN PIMEÄÄ ECOA,", + "PIILOTETTUNA MAAN SYÖVEREISSÄ.", "EI, NE SIILOT!", "VOI KYLLÄ, NE SIILOT!", - "NE TULEVAT AVAUTUMAAN, JA KAIKKI MAAILMAN PIMEÄ ECO ON MEIDÄN!", + "AVAAMME NE VIELÄ, JA SITTEN KAIKKI MAAILMAN PIMEÄ ECO ON MEIDÄN!", "MUTTA SE ON MAHDOTONTA! VAIN EDELTÄJÄROBOTTI-", "VOI, ÄLÄ OLE NIIN JÄRKKYNYT, SAMOS.", "MEILLÄ ON SUURIA SUUNNITELMIA SINULLE.", "AH HA HA HA HA HA HA! AHH...", "HETKINEN!", "TUO OLI GOL?", - "SE SAMA GOL JONKA ON TARKOITUS MUUTTAA MINUT TAKAISIN?", - "GOL ON SE JOKA YRITTÄÄ NITISTÄÄ MEIDÄT?!", + "SE SAMA GOL, JONKA ON TARKOITUS MUUTTAA MINUT TAKAISIN?", + "GOL ON SE, JOKA YRITTÄÄ NITISTÄÄ MEIDÄT?!", "OLEN TUHOON TUOMITTU.", "ME SAATAMME KAIKKI OLLA TUOMITTUJA.", - "JOS HE AVAAVAT SIILOT, PIMEÄ ECO", - "TUHOAA KAIKEN MITÄ SE KOSKETTAA!", - "MEIDÄN VAIN TÄYTYY PÄÄSTÄ HEIDÄN LINNOITUKSEENSA JA PYSÄYTTÄÄ HEIDÄT.", - "NOPEIN REITTI SINNE ON LAAVATUNNELIN LÄPI", - "JOKA ON KRAATERIN POHJALLA.", + "JOS HE AVAAVAT SIILOT, PIMEÄ ECO TUHOAA KAIKEN MITÄ SE KOSKETTAA!", + "MEIDÄN TÄYTYY PÄÄSTÄ HEIDÄN LINNOITUKSEENSA JA PYSÄYTTÄÄ HEIDÄT.", + "NOPEIN REITTI SINNE ON LAAVATUNNELIN LÄPI KRAATERIN POHJALLA.", "MUUTAMA VOIMAKENNO LISÄÄ, NIIN ZOOMERIN LÄMPÖSUOJAN", - "PITÄISI SAATTAA TEIDÄT TURVALLISESTI HALKI LAAVAN.", + "PITÄISI SAATTAA TEIDÄT TURVALLISESTI LAAVAN HALKI.", "NO NIIN, POIKASENI. TIEDÄT MITÄ TEHDÄ.", "VIE KIRPPUKASA JA KÄY KERÄÄMÄSSÄ LISÄÄ VOIMAKENNOJA." ], @@ -935,49 +925,50 @@ "PYHÄT ECOPALLOT!", "HÄMÄHÄKKILUOLISSA VAIKUTTAA OLEVAN HÄLYTTÄVÄN PALJON VAANIJATOIMINTAA!", "HIENOA. KUULOSTAA TOSI PIRTEÄLTÄ PAIKALTA.", - "ANNAS KUN MÄ ARVAAN. HÄMÄHÄKKILUOLISSA ON HÄMÄHÄKKEJÄ, EIKÖ VAIN?", + "ANNAS KUN ARVAAN. HÄMÄHÄKKILUOLISSA ON HÄMÄHÄKKEJÄ, EIKÖ VAIN?", "NO TOTTA KAI HÄMÄHÄKKILUOLISSA ON HÄMÄHÄKKEJÄ!", "MUTTA SE ON PIENIN ONGELMISTANNE!", - "VAANIJAT HAVITTELEVAT KESKITETTYJÄ PIMEÄN ECON KRISTALLEJA.", - "TEIDÄN TÄYTYY TUHOTA NE KRISTALLIT ENNEN KUIN NE HIRVIÖT", - "SAAVAT LIKAISET NÄPPINSÄ NIIHIN!", + "VAANIJAT HAVITTELEVAT KESKITETYN PIMEÄN ECON KRISTALLEJA.", + "TEIDÄN TÄYTYY TUHOTA KRISTALLIT,", + "ENNEN KUIN NE HIRVIÖT SAAVAT LIKAISET NÄPPINSÄ NIIHIN!", "ANTAKAA MENNÄ!" ], "sage-village3-introduction-rams": [ - "ONNEKSI OLETTE TÄÄLLÄ. HAVAITSIMME YLHÄÄLLÄ VUORILLA VAANIJOIDEN LIIKETTÄ.", - "NÄYTTÄÄ SILTÄ ETTÄ NE OVAT LÖYTÄNEET, JA YRITTÄVÄT NYT SIIRTÄÄ", + "ONNEKSI OLETTE TÄÄLLÄ. YLHÄÄLLÄ VUORILLA ON VAANIJATOIMINTAA.", + "ILMEISESTI NE OVAT LÖYTÄNEET, JA YRITTÄVÄT NYT SIIRTÄÄ", "ERÄITÄ PIMEÄN ECON SÄILÖJÄ JÄÄTYNEINÄ VUOREN JÄÄTIKÖISSÄ.", "KUN OLETTE NUUSKIMASSA VOIMAKENNOJA SIELLÄ YLHÄÄLLÄ,", - "PYSÄYTTÄKÄÄ NE VAANIJAT, JA PIDÄMME HITUSEN LISÄÄ PIMEÄÄ ECOA POISSA GOLIN KYNSISTÄ." + "PYSÄYTTÄKÄÄ NE VAANIJAT, NIIN PIDÄMME HITUSEN PIMEÄÄ ECOA POISSA GOLIN KYNSISTÄ." ], "sage-village3-reminder-1-dark-eco": [ "TEIDÄN TÄYTYY TUHOTA NE PIMEÄT ECO-KRISTALLIT HÄMÄHÄKKILUOLISSA!" ], "sage-village3-reminder-1-rams": [ - "ME EMME VOI ANTAA VAANJOIDEN PÄÄSTÄ KÄSIKSI NIIHIN PIMEÄN ECON SÄILIÖIHIN.", + "EMME VOI ANTAA VAANJOIDEN PÄÄSTÄ KÄSIKSI NIIHIN PIMEÄN ECON SÄILIÖIHIN.", "MENKÄÄ YLÖS LUMISILLE HUIPUILLE JA PYSÄYTTÄKÄÄ NE!" ], "sculptor-introduction": [ "HEI... PIKKU KARVAKAMUNI!", - "ÄH... LUULIN HETKEKSI ETTÄ SINÄ OLISIT OLLUT MUUSANI.", + "ÄH... LUULIN HETKEKSI, ETTÄ SINÄ OLIT MUUSANI.", "SINUN MIKÄ?", - "ETTEKÖ TE OLE KOSKAAN ENNEN NÄHNEET MUUSAA?", - "SE ON PIENI HOHTAVA ORAVANNÄKÖINEN OTUS, SINUN KOKOASI, SISUKAS KUIN MIKÄ JA PYÖRÄLLÄ PÄÄSTÄÄN.", - "AHAA, NYT MÄ YMMÄRRÄN! NIIN KUIN APURI.", + "ETKÖ OLE KOSKAAN ENNEN NÄHNYT MUUSAA?", + "SE ON PIENI HOHTAVA ORAVANNÄKÖINEN OTUS, SINUN KOKOASI,", + "SISUKAS KUIN MIKÄ, JA PYÖRÄLLÄ PÄÄSTÄÄN.", + "AHAA, NYT YMMÄRRÄN! NIIN KUIN APURI.", "ITSE ASIASSA, ILMAN MUUSAANI VEISTÄMISESTÄ EI TULE YHTIKÄS MITÄÄN.", "MUTTA KUN HÄN ON KANSSANI... NÄEN KAUNEUTTA KAIKESSA.", - "JUURI NYT, EN KYKENISI EDES TALTTAAMAAN TIETÄNI ULOS LAATIKOSTA.", + "JUURI NYT EN KYKENISI EDES TALTTAAMAAN TIETÄNI ULOS LAATIKOSTA.", "LUULEN, ETTÄ HÄN KARKASI USVASAARELLE ASTI.", - "VOIN VAIN TOIVOA ETTÄ HÄN ON KUNNOSSA.", - "SAATTE VOIMAKENNON PALKKIOKSI JOS LÖYDÄTTE HÄNET!", - "HETKI PIENI! ME EI TODELLAKAAN OLLA MENOSSA TAKAISIN USVASAARELLE!", - "VAI OLLAANKO?" + "VOIN VAIN TOIVOA, ETTÄ HÄN ON KUNNOSSA.", + "SAATTE VOIMAKENNON PALKKIOKSI, JOS LÖYDÄTTE HÄNET!", + "HETKI PIENI! ME EMME TODELLAKAAN MENE TAKAISIN USVASAARELLE!", + "VAI MENEMMEKÖ?" ], "sculptor-reminder-1": [ "AI, MOIKKA TYYPIT! JOKO TE LÖYSITTE MUUSANI?" ], "sculptor-resolution": [ - "VOI, MUN MUUSANI! TE PELASTITTE HÄNET! TE KAKSI OLETTE IHAN PARHAITA!", + "VOI, MINUN MUUSANI! TE PELASTITTE HÄNET! TE KAKSI OLETTE IHAN PARHAITA!", "TÄSSÄ ON VOIMAKENNONI. EN TARVITSE SITÄ ENÄÄ, NYT KUN INSPIRAATIONI ON PALANNUT!" ], "sidekick-human-intro-sequence-b": [ @@ -987,22 +978,22 @@ "HYÖKKÄÄMME SINNE OIKEAN HETKEN KOITOSSA." ], "sidekick-human-intro-sequence-c": [ - "MITÄ ME EDES TULTIIN TÄNNE TEKEMÄÄN, JAK? TÄMÄ PAIKKA SAA IHONI KANANLIHALLE!", + "MITÄ ME EDES TEEMME TÄÄLLÄ, JAK? PAIKKA SAA IHONI KANANLIHALLE!", "TÄH?", - "ÄH, TYHMÄT EDELTÄJIEN ROMUT!", - "ÄÄK! MITÄS TÄMÄ MUSTA MÖNJÄ ON? EI KOVIN YSTÄVÄLLISELTÄ NÄYTÄ.", - "SE TIETÄJÄHÄN AINA HÖPÖTTÄÄ NIISTÄ EDELTÄJISTÄ JOTKA RAKENSIVAT TÄMÄN PAIKAN.", + "ÄH, TYHMÄT EDELTÄJÄROMUT!", + "HUI! MITÄS TÄMÄ TUMMA MÖNJÄ ON? SE EI KOVIN YSTÄVÄLLISELTÄ NÄYTÄ.", + "SE TIETÄJÄHÄN AINA HÖPÖTTÄÄ NIISTÄ EDELTÄJISTÄ, JOTKA RAKENSIVAT KAIKEN.", "\"OI MINNE HE KATOSIVAT? OI MIKSI HE RAKENSIVAT KAIKKI NÄMÄ ROMUT?\"", - "TYKKÄÄNHÄN MINÄ EDELTÄJÄHELMISTÄ JA VOIMAKENNOISTA YHTÄ PALJON KUIN KAIKKI MUUTKIN", - "MUTTA JOS MULTA KYSYTÄÄN, NE OLIVAT VARMASTI TÄYS TOLLOJA.", - "VAUTSI! MITEN SÄ NOIN TEIT?", - "JAK, ME TAIDETAAN OLLA PULASSA!", + "TYKKÄÄNHÄN MINÄ EDELTÄJÄHELMISTÄ JA VOIMAKENNOISTA NIIN KUIN KAIKKI MUUTKIN,", + "MUTTA JOS MINULTA KYSYTÄÄN, HE OLIVAT VARMASTI TÄYS TOLLOJA.", + "VAUTSI! MITEN SINÄ TUON TEIT?", + "JAK, ME TAIDAMME OLLA PULASSA!", "HITSI, TUO KIVISTI.", - "MINÄHÄN SANOIN ETTEI MEIDÄN OLISI PITÄNYT TULLA TÄNNE, JA KUUNTELITKO SINÄ?", + "SANOINHAN, ETTEI MEIDÄN OLISI PITÄNYT TULLA TÄNNE, JA KUUNTELITKO SINÄ?", "NO MITÄ NYT?", - "ÄÄÄÄÄÄÄÄÄHHHHHHHH!", - "OKEI! OKEI. MÄ OON KUNNOSSA, MÄ OON KUNNOSSA...", - "ÄÄÄÄÄÄÄÄHHHHHHHH!!" + "AAAAAAAAAHHHHHHHH!", + "OKEI! OKEI. OLEN KUNNOSSA, OLEN KUNNOSSA...", + "AAAAAAAAHHHHHHHH!!" ], "warrior-introduction": [ "AHH... VOI SÄRKEVÄÄ PÄÄTÄNI.", @@ -1010,7 +1001,7 @@ "KYLLÄ SE SIITÄ, HURJAPÄÄ!", "NIINHÄN MINÄ OLIN HURJA JOSKUS.", "EHKÄ JOPA HURJIN KAIKISTA.", - "MINÄ SUOJELIN TÄTÄ KYLÄÄ OMIN KÄSIN NIILTÄ HIRVEILTÄ OLENNOILTA LÄHES VUODEN AJAN!", + "MINÄ SUOJELIN TÄTÄ KYLÄÄ OMIN KÄTÖSIN NIILTÄ OLENNOILTA LÄHES VUODEN AJAN!", "SITTEN TUO HIRVITTÄVÄ RUMILUS SAAPUI JA ALOITTI POMMITUKSEN.", "JA NIIN, URHOOLLISENA, HAARNISKA KIILTÄVÄNÄ AURINGON VALOSSA...", "KIIPESIN KUKKULAN JA HAASTOIN HÄNET...!", @@ -1018,20 +1009,20 @@ "OLETKO KOKEILLUT ISKEÄ HÄNTÄ MELODRAAMALLASI?", "SILLÄ MINUA SE KUOLETTAA!", "VIIMEISEN UPEAN EPÄONNISTUMISENI JÄLKEEN,", - "HÄN KATKAISI KULKUREITIN PESÄPAIKALLEEN 30:N TONNIN LOHKAREELLA,", + "HÄN KATKAISI KULKUREITIN ORRELLEEN 30 TONNIN LOHKAREELLA,", "MIKÄ ESTÄÄ KETÄÄN HAASTAMASTA HÄNTÄ ENÄÄ.", - "JOTEN, TIETÄJÄMME, SINISEN ECON MESTARI JA MEKAANINEN NERO, KEHITTI LAITTEEN", - "JOKA KYKENEE NOSTAMAAN LOHKAREEN POIS TIELTÄ...!", - "MUTTA, VALITETTAVASTI HÄN KATOSI ENNEN KUIN ME SAIMME SEN TOIMIMAAN.", + "JOTEN, TIETÄJÄMME, SINISEN ECON MESTARI JA MEKAANINEN NERO,", + "KEHITTI LAITTEEN, JOKA KYKENEE NOSTAMAAN LOHKAREEN POIS TIELTÄ...!", + "MUTTA VALITETTAVASTI HÄN KATOSI, ENNEN KUIN SAIMME SEN TOIMINTAAN.", "JA HÄN VEI KAIKKI VOIMAKENNONSA MUKANAAN.", - "SENTÄÄN MINÄ SAIN TARPEEKSI LAUTTOJA SIIRRETTYÄ POIS REITILTÄMME, ETTEI", - "TUO HIRVIÖ PÄÄSE ALAS TÄNNE MINUN HARMIKSENI.", - "JOO, HYVIN... HYVIN TEHTY, KÖRILÄS. MUTTA, ÖÖM...", - "TARVITSEMME SINUN SIIRTÄÄ NE... TAKAISIN JA SELLAISTA.", + "SENTÄÄN MINÄ SAIN TARPEEKSI LAUTTOJA SIIRRETTYÄ POIS REITILTÄMME,", + "ETTEI TUO HIRVIÖ PÄÄSE ALAS TÄNNE MINUN HARMIKSENI.", + "JOO, HYVIN TEHTY, KÖRILÄS. MUTTA TARVITSEMME SINUN...", + "SIIRTÄÄ NE TAKAISIN JA SELLAISTA.", "HAH, NIIN! JA SINETÖIDÄ TUOMIONI?", "HUOH...", "OKEI. SELVÄ.", - "TUO MINULLE 90 EDELTÄJÄHELMEÄ, NIIN VAPAUTAN LAUTAT.", + "TUO MINULLE 90 EDELTÄJÄHELMEÄ, NIIN SIIRRÄN LAUTAT.", "MUTTA EN TODELLAKAAN AIO TAISTELLA TUOTA KORSTOA UUDESTAAN!" ], "warrior-reminder-1": [ @@ -1047,11 +1038,11 @@ "MUTTA ÄLKÄÄ ENÄÄ PYYTÄKÖ MINUA SEKAANTUMAAN TUON OLENNON KANSSA!" ], "yellowsage-resolution": [ - "KUKA OLISIKAAN USKONUT ETTÄ ELÄN NÄKEMÄÄN PÄIVÄN,", + "KUKA OLISIKAAN USKONUT, ETTÄ ELÄN NÄKEMÄÄN PÄIVÄN,", "JOLLOIN MINUT TULI PELASTETTUA KLOPPI JA HÄNEN PIISAMINSA.", "AHH... TAIDANPAS ANTAA GOLILLE JA MAIALLE", "PIKKUISEN TAKAISINMAKSUN TÄSTÄ NÖYRYYTYKSESTÄ!", - "JA SITTEN KATSOTAAN JOS KOKKAAMME HIEMAN PIISAMIKEITTOA...", + "JA SITTEN KATSOTAAN, JOS KOKKAAMME HIEMAN PIISAMIKEITTOA...", "KLUP..." ] }, @@ -1063,7 +1054,7 @@ "TÄYTYY SAADA TÄMÄ LÄMPÖSUOJA TOIMIMAAN..." ], "ASSTLP03": [ - "ME TARVITSEMME VOIMAKENNOJA LÄMPÖSUOJAANI VARTEN..." + "TARVITSEMME VOIMAKENNOJA LÄMPÖSUOJAANI VARTEN..." ], "ASSTLP04": [ "MISSÄS SE RUUVIAVAIN ON?" @@ -1072,14 +1063,13 @@ "TULIKANJONI ON NIIN HIRVEÄN KUUMA..." ], "ASSTLP23": [ - "KUINKAHAN HÄN SAI LEIJUTTIMEN TOIMIMAAN?" + "MITEN HÄN SAI LEIJUTTIMEN TOIMIMAAN?" ], "ASSTLP24": [ - "SAAMMEKOHAN EDES VOIMAKENNOILLA", - "TARPEEKSI TEHOA LAITTEESEEN?" + "SAAMMEKOHAN EDES VOIMAKENNOILLA TARPEEKSI TEHOA LAITTEESEEN?" ], "ASSTLP30": [ - "HM, KATSOTAANPA..." + "HMM, KATSOTAANPA..." ], "ASSTLP31": [ "HM." @@ -1091,17 +1081,16 @@ "AH-HAA!" ], "ASSTLP34": [ - "HÖH... MITÄ GOL JA MAIA OIKEIN SUUNNITTELEVAT?" + "HMH... MITÄ GOL JA MAIA OIKEIN SUUNNITTELEVAT?" ], "ASSTLP35": [ "HMM... MEIDÄN TÄYTYY PÄÄSTÄ EDELTÄJÄKAUPUNKIIN." ], "ASSTLP36": [ - "AHA. LÄMPÖSUOJA TULEE TARVITSEMAAN YHÄ ENEMMÄN TEHOA", - "LAAVAN KESTÄMISEEN." + "AHA. LÄMPÖSUOJA TULEE TARVITSEMAAN YHÄ ENEMMÄN TEHOA LAAVAN KESTÄMISEEN." ], "ASSTLP37": [ - "ÄH... MEIDÄN ON PAKKO PELASTAA MUUT TIETÄJÄT..." + "ÄH... MEIDÄN TÄYTYY PELASTAA MUUT TIETÄJÄT..." ], "BIL-AM01": [ "MÄ VAAN RAKASTAN TÄTÄ MUTAA." @@ -1125,10 +1114,10 @@ "TÄMÄ PAHUKSEN LÄMPÖ SAA MUT PISTELEMÄÄN." ], "BIL-AM08": [ - "HITTO... TÄÄ LÄMPÖ TEKEE MULLE IHOTTUMAA." + "HITTO... TÄMÄ LÄMPÖ TEKEE MULLE IHOTTUMAA." ], "BIL-AM1A": [ - "MM-MM! MÄÄ VAAN RAKASTAN MUTAA!" + "MM-MM! MÄ VAAN RAKASTAN MUTAA!" ], "BIL-AM2A": [ "MOKOMAT SUOROTAT!" @@ -1200,13 +1189,13 @@ "ROTTA SAI NAMUPALAN!" ], "BIR-AM01": [ - "OLETKO VIELÄ PÄÄSSYT MUNAN LÄHETTYVILLE?" + "OLETTEKO VIELÄ PÄÄSSEET MUNAN LÄHETTYVILLE?" ], "BIR-AM02": [ - "JUURI NOIN, VIELÄ VÄHÄN PITEMMÄLLE!" + "JUURI NOIN, VIELÄ VÄHÄN PIDEMMÄLLE!" ], "BIR-AM03": [ - "OIH, HYVÄ, TYÖNNÄ SITÄ VIELÄ. VOI, HERKÄSTI NYT!" + "HYVÄ, TYÖNNÄ SITÄ VIELÄ. VOI, HERKÄSTI NYT!" ], "BIR-AM04": [ "OI VOI, TUO EI OLLUT KOVIN HELLÄÄ!" @@ -1224,7 +1213,7 @@ "TÄNNE, TIPU TIPUNEN." ], "BIR-AM09": [ - "OLKAA VAROVAISIA, SIELLÄ YLHÄÄLLÄ EI NÄYTÄ KOVIN TURVALLISELTA!" + "OLKAA VAROVAISIA, SIELLÄ EI NÄYTÄ KOVIN TURVALLISELTA!" ], "BIR-AM10": [ "VAROVASTI, HILJAA HYVÄ TULEE!" @@ -1236,7 +1225,7 @@ "TAIDAT OLLA TODELLINEN ELÄINTEN YSTÄVÄ!" ], "BIR-AM13": [ - "NÄKYYKÖ SIELLÄ YLHÄÄLLÄ YHTÄÄN MUITA LINTUJA?" + "NÄKYYKÖ SIELLÄ YLHÄÄLLÄ MUITA LINTUJA?" ], "BIR-LO01": [ "(SUUKKO) (VIHELLYS)" @@ -1263,11 +1252,11 @@ "TÄMÄ ON KATASTROFI. KATASTROFI, SANON!" ], "CHI-AM02": [ - "HE HALUAVAT MINUN KÄYVÄN VIIDAKOSSA - MINUN! HO HO HOH...", + "HE HALUAVAT MINUN KÄYVÄN VIIDAKOSSA, MINUN! HO HO HOH...", "ENNEMMIN PAINISIN PILLASTUNEEN FLUT-FLUTIN KANSSA." ], "CHI-AM03": [ - "E-ENSIN KALASTAJAN VENE ON...", + "ENSIN KALASTAJAN VENE...", "SIIHEN HYÖKKÄSI HIRVIÖ...", "JA NYT VIELÄ TÄMÄ...", "MIKÄ VOISI ENÄÄ MENNÄ PIELEEN?" @@ -1280,10 +1269,10 @@ "ONGELMIA... ONGELMIA... ONGELMIA!" ], "CHI-AM06": [ - "YHY HY HY HY... NYT EN KOSKAAN TULE UUDELLEENVALITUKSI..." + "YHY HY HY... NYT EN KOSKAAN TULE UUDELLEENVALITUKSI..." ], "CHI-AM07": [ - "VOIH, MITÄ ON TAPAHTUNUT KYLÄNI ENERGIASÄTEELLE?" + "VOIH, MITÄ ON TAPAHTUNUT KYLÄMME ENERGIASÄTEELLE?" ], "CHI-AM08": [ "MINÄ... HE, MINÄ EN... (MUTINAA)" @@ -1309,7 +1298,7 @@ ], "EXP-AM05": [ "MINUN AIKOINANI MANNERTA PYSTYI TALLATA", - "ILMAN ETTÄ HIRVIÖT KÄVIVÄT KIMPPUUN!" + "ILMAN, ETTÄ HIRVIÖT KÄVIVÄT KIMPPUUN!" ], "EXP-LO02": [ "MINÄ TARVITSEN LISÄÄ EDELTÄJÄHELMIÄ." @@ -1338,22 +1327,22 @@ "EN OLE SAANUT YHTÄKÄÄN KIIKKIIN." ], "FIS-AM02": [ - "NE HIRVIÖT JOTKA LOUNASTIVAT VENETTÄNI", - "SAATTAVAT MUT VIELÄ KÖYHYYTEEN." + "NE VENETTÄNI LOUNASTANEET HIRVIÖT", + "SAATTAVAT MINUT VIELÄ KÖYHYYTEEN." ], "FIS-AM03": [ "HITTO NIIDEN ILKIÖIDEN KANSSA!", "KORIINI VAIN SIITÄ, KALASET, TULKAAHAN VAIN...", - "HEH HE HE HE HE..." + "HEH HE HE HE HEEE..." ], "FIS-AM04": [ - "VOI, MITEN MÄ RAKASTANKAAN KALAN TUOKSUA AAMUSELLA." + "VOI, MITEN RAKASTANKIN KALAN TUOKSUA AAMUSELLA." ], "FIS-AM05": [ - "OIH, JUST NYT KELPAISI SUOLATUT KALANHUULET RUISLEIVÄLLÄ." + "OIH, JUURI NYT KELPAISI SUOLATUT KALANHUULET RUISLEIVÄLLÄ." ], "FIS-AM06": [ - "MUISTAN VIELÄKIN SEN VONKALEEN JOKA PÄÄSI KARKUUN..." + "MUISTAN VIELÄKIN SEN VONKALEEN, JOKA PÄÄSI KARKUUN..." ], "FIS-LO01": [ "GRR!" @@ -1362,7 +1351,7 @@ "HA HA HA HA HA HAH!" ], "FIS-LO04": [ - "KURJAT FISUT... EIVÄT SITTEN KOSKAAN PÄÄDY MUN HAAVIINI!" + "KURJAT FISUT... EIVÄT SITTEN KOSKAAN PÄÄDY HAAVIINI!" ], "FIS-LO05": [ "HA HA HA AH HA HA HA HAH!" @@ -1377,10 +1366,10 @@ "NYT TULEE VONKALE!" ], "FIS-TA04": [ - "PÄÄSTIT JUMBOKOKOISEN OHI, NUORUKAINEN!" + "PÄÄSTIT JÄTTIKOKOISEN OHI!" ], "FIS-TA05": [ - "ÄLÄ PÄÄSTÄ TUOLLAISTA OHI ENÄÄ UUDESTAAN!" + "ÄLÄ ENÄÄ PÄÄSTÄ TUOLLAISTA OHI!" ], "FIS-TA06": [ "VANKASTI NYT, POIKA." @@ -1392,7 +1381,7 @@ "OHI MENI." ], "FIS-TA09": [ - "NÄYTTÄÄ SILTÄ ETTÄ ISOMPI HAAVI OLISI TARPEEN..." + "ISOMPI HAAVI TAITAA OLLA TARPEEN..." ], "FIS-TA10": [ "OHI TAAS!" @@ -1407,7 +1396,7 @@ "OIKEA!" ], "GAM-AM01": [ - "HEI, EIHÄN 1/20-TODENNÄKÖISYYS NYT NIIN PAHA OLE!" + "EIHÄN YKSI KAHDESTAKYMMENESTÄ NYT NIIN PAHA OLE!" ], "GAM-AM02": [ "EI, IHAN VARMA JUTTU SE OLI!" @@ -1416,16 +1405,16 @@ "HE HEE... SEURAAVALLA KERRALLA ISKEN JÄTTIPOTTIIN!" ], "GAM-AM04": [ - "HEH! JOS VAIN SAISIN HELMEN JOKAISESTA OHI MENNEESTÄ MAHDOLLISUUDESTA...!" + "JOS VAIN SAISIN HELMEN JOKAISESTA OHI MENNEESTÄ MAHDOLLISUUDESTA...!" ], "GAM-AM05": [ - "HEI, TYNNYRIT VOIVAT PALATA TYYLIIN KOSKA TAHANSA!" + "HEI, TYNNYRIT VOIVAT VIELÄ PALATA TYYLIIN!" ], "GAM-AM06": [ "ÄH... TARVITSEN TOSI ONNENPOTKUN." ], "GAM-AM07": [ - "ÄÄH, MILLÄ TODENNÄKÖISYYDELLÄ MUUTINKIN KAUPUNKIIN JOKA ON HYÖKKÄYKSEN KOHTEENA?" + "ÄÄH, MILLÄ TODENNÄKÖISYYDELLÄ MUUTINKIN KAUPUNKIIN, JOKA ON HYÖKKÄYKSEN KOHTEENA?" ], "GAM-AM08": [ "LUULIN SAANEENI NIIN HYVÄN VINKIN!" @@ -1434,16 +1423,16 @@ "UUSI PÄIVÄ, UUSI VEDONLYÖNTI." ], "GAM-AM10": [ - "VANNON ETTEI KUKAAN VOI NUJERTAA SITÄ HIRVIÖTÄ." + "LYÖN VETOA, ETTEI KUKAAN VOI NUJERTAA SITÄ HIRVIÖTÄ." ], "GAM-AM11": [ - "O-OU... KANNATTAISI VARMAAN NOSTAA KÄTEISENI JA UNOHTAA KOKO JUTTU." + "KANNATTAISI VARMAAN NOSTAA KÄTEISENI JA UNOHTAA KOKO JUTTU." ], "GAM-AM12": [ "NO JAA, EI SITÄ AINA VOI VOITTAA." ], "GAM-AM13": [ - "HEI, MILLEKKÄS TE NAURESKELETTE? MIKÄ ON HAUSKAA?" + "HEI, MILLE TE NAURESKELETTE? HUVITTAAKO TILANTEENI?" ], "GEO-AM01": [ "MM, ONPAS KIINTOISA KERROSTUMA..." @@ -1545,7 +1534,7 @@ "HA HA HAA!" ], "MAI-AM04": [ - "ECOSTA EI OLE ENÄÄ APUA SINULLE!" + "ECOSTA EI OLE SINULLE ENÄÄ APUA!" ], "MAI-AM05": [ "TEE JOTAIN!" @@ -1570,7 +1559,7 @@ "MIN-LO03": [ "KAIVA, WILLARD! KAIVA!", "JOO, MUTTA MIKSET SÄ SITTEN KAIVA!", - "SIKSI KOSKA MINÄ HOIDAN AJATTELUN!" + "KOSKA MINÄ HOIDAN AJATTELUN!" ], "MIN-LO04": [ "ÖÖH, GORDY? VOINKO MÄ PITÄÄ PAUSSIN?", @@ -1581,7 +1570,7 @@ "SYÖ LINTUSI!" ], "MIN-LO06": [ - "ÖÖH, GORDY? MUN HAKKUNI TARVII TERÄVÄMMÄN KÄRJEN.", + "ÖÖH, GORDY? MUN HAKKUNI TARVITSTEE TERÄVÄMMÄN KÄRJEN.", "TERÄVÄMMÄN JÄRJEN SINÄ TARVIT!" ], "MSH-AM01": [ @@ -1597,27 +1586,26 @@ "AHHAH! MINUSTA TULEE MAAILMAN RIKKAIN MIES! AH HA HA..." ], "MSH-AM05": [ - "OH HO HO! KUKAAN EI OLE KOSKAAN NÄHNYTKÄÄN NÄIN SUURTA JALOKIVEÄ! AH HA HA!" + "OH HO HO! KUKAAN EI OLE NÄHNYTKÄÄN NÄIN SUURTA JALOKIVEÄ! AH HA HA!" ], "MSH-AM06": [ "HELPPO ELÄMÄ, TÄÄLTÄ TULLAAN!" ], "MSH-AM07": [ - "MINUN HELMET! KAIKKI MINUN HELMET!" + "MINUN HELMIÄNI! KAIKKI MINUN HELMIÄNI!" ], "MSH-AM08": [], "MSH-AM09": [ - "(HEKOTUSTA) EN MALTA ODOTTAA RAHASTAA TÄMÄN KAUNOTTAREN!" + "EN MALTA ODOTTAA RAHASTAA TÄMÄN KAUNOTTAREN!" ], "MSH-AM10": [ "TÄMÄ NÄYTTÄÄ HARVINAISELTA KRISTIITTI ZLARKONIALTA! OH-HOH-HO!" ], "MSH-AM11": [ - "HETKINEN SENTÄÄN! NE OVAT KAIKKI MINUN! MINUN, SANON!" + "HETKINEN! NE OVAT KAIKKI MINUN!" ], "MSH-AM12": [ - "NOH, WILLARD. MITÄ AIOT TEHDÄ", - "NELJÄNNEKSELLÄSI PUOLISKOSTASI?" + "NOH, WILLARD. MITÄ AIOT TEHDÄ NELJÄNNEKSELLÄSI PUOLISKOSTASI?" ], "MSH-AM1A": [ "MINUSTA TULEE RIKAS!" @@ -1632,7 +1620,7 @@ "ÖÖH, OLLAANKO ME PIAN VALMIITA?" ], "MTA-AM02": [ - "HITSI, VOIDAANKO ME PITÄÄ PAUSSI?" + "HITSI, VOIDAANKO PITÄÄ PAUSSI?" ], "MTA-AM03": [ "UOH... MULLA ON NÄLKÄ..." @@ -1644,10 +1632,10 @@ "HITSI, ONPAS KAMALAN SUURI HELMI!" ], "MTA-AM06": [ - "ÖH... MÄ OON AINA HALUNNUT METSURIKSI..." + "ÖH... MÄ OLEN AINA HALUNNUT METSURIKSI..." ], "MTA-AM07": [ - "ÖH, GORDY LUPASI ANTAA MULLE PUOLET SIITÄ MITÄ MÄ PYSTYN KANTAMAAN!" + "GORDY LUPASI ANTAA MULLE PUOLET SIITÄ, MITÄ PYSTYN KANTAMAAN!" ], "MTA-AM08": [ "EH HEH... LINTUNEN ON PARAS YSTÄVÄNI..." @@ -1668,15 +1656,15 @@ "NUO KAKSI EIVÄT SITTEN OSAA KUUNNELLA..." ], "SAGELP04": [ - "HÄNESTÄ EI KOSKAAN TULE KUTEN ENONSA...", - "EN VÄLITÄ MITÄ MUUT SANOVAT." + "HÄNESTÄ EI KOSKAAN TULE KUIN ENONSA...", + "EN VÄLITÄ, MITÄ MUUT SANOVAT." ], "SAGELP05": [ "HALOO, SININEN TIETÄJÄ? HALOO?", "MISSÄ SINERTÄVÄSSÄ IHMESSÄ HÄN MAHTAA OLLA..." ], "SAGELP06": [ - "OI, VOI, VOI..." + "VOI, VOI, VOI..." ], "SAGELP11": [ "ONKO KETÄÄN KUULOLLA? HALOO?" @@ -1691,10 +1679,10 @@ "AIVAN..." ], "SAGELP23": [ - "EI..." + "EIHÄN..." ], "SAGELP24": [ - "MITÄ HEILLE ON VOINUT TAPAHTUA?" + "MITÄ HÄNELLE ON VOINUT TAPAHTUA?" ], "SAGELP31": [ "TÄMÄ EI VAIKUTA HYVÄLTÄ." @@ -1706,7 +1694,7 @@ "MAIA JA GOL OVAT PÄISTÄÄN VIALLA!" ], "SAGELP34": [ - "HNG, PIMEÄN ECON VOIMIA EI VAIN VOI HALLITA!" + "HMPH, PIMEÄN ECON VOIMIA EI VAIN VOI HALLITA!" ], "SAGELP35": [ "PIMEÄÄ ECOA JÄÄTIKÖILLÄ?" @@ -1724,7 +1712,7 @@ "ÄH... EN VAIN PYSTY SIIHEN ENÄÄ." ], "SCU-AM02": [ - "VOIH... KUNPA MINULLA OLISI INSPIRAATIOTA." + "VOIH... OLISIPA MINULLA INSPIRAATIOTA." ], "SCU-AM03": [ "OLEN YHTÄ INSPIROITUNUT KUIN... TÄMÄ KIVI TÄSSÄ." @@ -1739,16 +1727,16 @@ "VOI HITSI... PALAAKO HÄN KOSKAAN LUOKSENI?" ], "SCU-LO01": [ - "VOIHAN SENTÄÄN..." + "VOI SENTÄÄN..." ], "SKSP009F": [ "MAISTA TÄTÄ! MAISTA TÄTÄ! HA HA HAA!" ], "WAR-LO1A": [ - "(NYYHKÄILYÄ)" + "(NYYHKYTTÄÄ)" ], "WAR-LO1B": [ - "(NYYHKÄYS)" + "(NYYHKYTTÄÄ)" ], "WAR-LO1C": [ "(NIISTÄÄ JA NYYHKII)", @@ -1758,148 +1746,136 @@ "AIKA ALKAA KÄYDÄ VÄHIIN!" ], "YEL-AM02": [ - "HEI! PÄÄSTÄKÄÄ MUT ULOS TÄÄLTÄ!" + "HEI! PÄÄSTÄKÄÄ MINUT ULOS TÄÄLTÄ!" ], "YEL-AM03": [ - "KUN MÄ PÄÄSEN TÄÄLTÄ ULOS, NIIN JOHAN ALKAA PAUKKUMAAN!" + "KUN PÄÄSEN TÄÄLTÄ ULOS, NIIN JOHAN ALKAA PAUKKUMAAN!" ], "asstv100": [ - "NO NIIN, NYT TEILLÄ ON TARPEEKSI VOIMAKENNOJA KASVATTAMAAN LÄMPÖSUOJAN TEHOA.", + "NO NIIN, TEILLÄ ON TARPEEKSI VOIMAKENNOJA KASVATTAMAAN LÄMPÖSUOJAN TEHOA.", "HYPÄTKÄÄ KAIVOSKÄRRYN KYYTIIN KUILUN PERÄLLÄ LAAVAGEYSIRIN LUONA.", "TAPAAN TEIDÄT LAAVATUNNELIN SISÄÄNKÄYNNILLÄ,", - "JOTTA VOIN PARANTAA ZOOMERIA. KIIREHTIKÄÄ!" + "NIIN VOIN PARANNELLA ZOOMERIA. KIIREHTIKÄÄ!" ], "asstv101": [ - "HAHA, NO NIIN! TEILLÄ ON TARPEEKSI KENNOJA KASVATTAMAAN", - "LÄMPÖSUOJAN TEHOA.", + "HAHA, NO NIIN! TEILLÄ ON TARPEEKSI KENNOJA KASVATTAMAAN LÄMPÖSUOJAN TEHOA.", "TULKAA TAKAISIN TULIVUOREN KRAATERILLE.", - "ODOTAN TEITÄ LAAVATUNNELIN SISÄÄNKÄYNNILLÄ SYVEMMÄLLÄ LUOLASTOSSA, LAAVAPUTOUKSIEN LUONA.", - "TUO VOIMAKENNOT MUKANASI!" + "ODOTAN TEITÄ LAAVATUNNELIN SISÄÄNKÄYNNILLÄ, LAAVAPUTOUKSIEN LUONA.", + "TUOKAA VOIMAKENNOT MUKANANNE!" ], "asstv102": [ "KIIREHTIKÄÄ NIIDEN VOIMAKENNOJEN KANSSA!", - "ODOTTELEN TEITÄ LÄHELLÄ LAAVAGEYSIRIN PUISTA KAIVOSKÄRRYKUILUA." + "ODOTTELEN TEITÄ KAIVOSKUILUSSA LÄHELLÄ LAAVAGEYSIRIÄ." ], "asstv103": [ - "ÄLÄ UNOHDA KYTKEÄ TELEPORTTIA PÄÄLLE, JOTTA PÄÄSEMME LÄPI.", - "SINUN ON MENTÄVÄ PUNAISEN TIETÄJÄN LABRAAN", - "TULIVUOREN KRAATERIN KESKELLÄ, JOTTA SAAT SEN PÄÄLLE.", + "ÄLKÄÄ UNOHTAKO KÄYNNISTÄÄ TELEPORTTIA, JOTTA PÄÄSEMME LÄPI.", + "SE ON PUNAISEN TIETÄJÄN LABRASSA TULIVUOREN KRAATERIN KESKELLÄ.", "PÄÄSEMME SINNE VAIN, KUN SE ON AKTIVOITUNA." ], "asstv104": [ "HEI, ME OLEMME YHÄ KIVIKYLÄSSÄ!", - "KYTKE TELEPORTTI PÄÄLLE!" + "KYTKEKÄÄ SE TELEPORTTI PÄÄLLE!" ], "asstv105": [ "HALUAMME LIITTYÄ SEURAANNE TULIVUOREN KRAATERILLA!", - "MENE PUNAISEN TIETÄJÄN LABRAAN JA AKTIVOI PORTAALI." + "MENKÄÄ PUNAISEN TIETÄJÄN LABRAAN JA AKTIVOIKAA PORTAALI." ], "asstva73": [ - "MOI POJAT! LASKUJENI MUKAAN TULEMME TARVITSEMAAN", - "72 VOIMAKENNOA LÄMPÖSUOJAN TEHOKSI", - "LAAVAA VASTAAN MATKALLA GOLIN JA MAIAN LINNOITUKSEEN." + "MOIKKA! LASKUJENI MUKAAN LÄMPÖSUOJA TULEE TARVITSEMAAN 72 VOIMAKENNOA", + "KESTÄMÄÄN LAAVAA MATKALLA GOLIN JA MAIAN LINNOITUKSEEN." ], "asstva74": [ - "TEILLÄ EI OLE TARPEEKSI VOIMAKENNOJA SELVITÄKSENNE LAAVAN PINNALLA!", - "ETTE PÄÄSE GOLIN JA MAIAN LINNOITUKSEEN", + "TEILLÄ EI OLE TARPEEKSI VOIMAKENNOJA YLITTÄÄKSENNE LAAVAA!", + "ETTE PÄÄSE GOLIN JA MAIAN LINNOITUKSEEN,", "ENNEN KUIN OLETTE KERÄNNEET 72 VOIMAKENNOA!" ], "asstvb02": [ "HEI, HUOMASITTEKO TUON?", - "SINISEN ECON PURKUAUKOT YMPÄRI MAAILMAN OVAT AUENNEET!", - "MINÄ ARVASIN ETTÄ NE VOIDAAN KÄYNNISTÄÄ JOTENKIN.", - "ON VARMASTI PAIKKOJA JOISTA MUIDEN ECOJEN AUKOT VOIDAAN MYÖS AKTIVOIDA." + "SINISEN ECON PURKUAUKOT OVAT AUENNEET YMPÄRI MAAILMAN!", + "TIESIN, ETTÄ NE VOIDAAN KÄYNNISTÄÄ.", + "ON VARMASTI MAHDOLLISTA KÄYNNISTÄÄ MYÖS MUUT ECO-AUKOT." ], "asstvb03": [ - "HIENOA! TE PYSÄYTITTE KAIKKI MIINOJA PUDOTTELEVAT VAANIJAT!", - "NE OLIVAT UHKAILLEET VESISTÖJÄ KYLÄMME YMPÄRILLÄ JO VIIKKOJA.", - "TUO ZOOMERISI TAKAISIN TRANS-ALUSTALLE NIIN LÄHETÄN SEN TAKAISIN!" + "HIENOA! PYSÄYTITTE KAIKKI MIINOJA PUDOTTELEVAT VAANIJAT!", + "NE OLIVAT UHKAILLEET KYLÄMME YMPÄRISTÖÄ JO VIIKKOJA.", + "TUOKAA ZOOMERI TAKAISIN TRANS-ALUSTALLE, NIIN VIEN SEN TAKAISIN!" ], "asstvb04": [ - "HIENOA, OLETTE KERÄNNEET TARPEEKSI VOIMAKENNOJA ANTAMAAN VIRTAA LÄMPÖSUOJAANI!", + "HIENOA, OLETTE KERÄNNEET TARPEEKSI VOIMAKENNOJA LÄMPÖSUOJALLENI!", "TAVATKAA MINUT TULIKANJONIN SIISÄÄNKÄYNNILLÄ", "KIIPEÄMÄLLÄ KALLIOTA VILJELIJÄN MÖKIN TAKANA.", - "TUO VOIMAKENNOT MUKANASI, JA KIIRUHDA!", + "TUOKAA VOIMAKENNOT JA KIIRUHTAKAA!", "ISÄNI KERTOO NÄHNEENSÄ LISÄÄ VAANIJOITA LÄHISTÖLLÄ." ], "asstvb08": [ "KIIRUHTAKAA VOIMAKENNOJENNE KANSSA.", - "ODOTAN TEITÄ TULIKANJONIN LUONA", - "KALLION HUIPULLA, VILJELIJÄN MÖKIN TAKANA!" + "ODOTAN TEITÄ TULIKANJONILLA, KALLION PÄÄLLÄ VILJELIJÄN MÖKIN TAKANA!" ], "asstvb09": [ "TEILLÄ EI OLE TARPEEKSI VOIMAKENNOJA LÄMPÖSUOJAN VIRTALÄHTEEKSI.", - "ET VOI PÄÄSTÄ TULIKANJONIN LÄPI ENNEN KUIN KERÄÄT TARPEEKSI VOIMAKENNOJA." + "ETTE PÄÄSE TULIKANJONIN LÄPI, ENNEN KUIN KERÄÄTTE TARPEEKSI VOIMAKENNOJA." ], "asstvb20": [ "HIENOSTI LENNETTY! NUO VAANIJAT EIVÄT MAHTANEET MITÄÄN ZOOMERILLESI!", "TAAS YKSI VOIMAKENNO PUSSIIN!" ], "asstvb21": [ - "HYVÄÄ TYÖTÄ! ETTEKÖ OLEKIN ILOISIA", - "ETTÄ PELASTITTE MEIDÄN PIKKU FLUT-FLUT-YSTÄVÄMME?", + "HYVÄÄ TYÖTÄ!", + "EIKÖS OLEKIN IHANAA, ETTÄ PELASTITTE PIKKU FLUT-FLUT-YSTÄVÄMME?", "HÄNESTÄ VOI OLLA VIELÄ APUA MYÖHEMMIN.", - "MENKÄÄHÄN TAKAISIN TRANS-ALUSTAN LUO, NIIN MINÄ VIEN HÄNET KOTIIN." + "MENKÄÄHÄN TAKAISIN TRANS-ALUSTAN LUO, NIIN VIEN HÄNET KOTIIN." ], "asstvb22": [ - "VAU! TE NOSTITTE OSAN VEDENALAISITA RAUNIOISTA MEREN PINNALLE!", - "NÄYTTÄÄ SILTÄ ETTÄ SINÄ PYSTYT KÄYTTÄMÄÄN ECOA ENNENNÄKEMÄTTÖMIN TAVOIN!", - "YKSI VOIMAKENNOKIN NOUSI YLÖS RAUNION KANSSA. KIIPEÄ YLÖS HAKEMAAN SE." + "VAU! TE NOSTITTE OSAN VEDENALAISISTA RAUNIOISTA MEREN PINNALLE!", + "ILMEISESTI PYSTYMME KÄYTTÄMÄÄN ECOA ENNENNÄKEMÄTTÖMIN TAVOIN!", + "YKSI VOIMAKENNO NOUSI KAMMION KANSSA. KIIPEÄ YLÖS HAKEMAAN SE." ], "asstvb23": [ - "HIENOSTI TEHTY! KIVIKYLÄN ASUKKAAT VOIVAT VIIMEIN PÄÄSTÄÄ", - "YHTEISEN HELPOTUKSEN HUOKAUKSEN!", - "MUTTA MEILLÄ EI OLE AIKAA JUHLIA! KÄYTÄ ZOOMERIASI", - "NAVIGOIDAKSESI EDESSÄ AVAUTUVAA VUORISTOSOLAA.", - "OLE VAROVAINEN, NÄYTTÄÄ SILTÄ ETTÄ VAANIJAT OVAT TÄYTTÄNEET", - "KOKO SOLAN RÄJÄHTEILLÄ!", - "KUN SAAVUTAT TULIVUOREN KRAATERIN,", - "MUISTA KÄYDÄ PUNAISEN TIETÄJÄN LABRASSA", - "JA AKTIVOI SIELLÄ OLEVA TELEPORTTI, JOTTA MINÄ JA ISÄNI VOIMME LIITTYÄ SEURAANNE." + "HIENOA TYÖTÄ! KIVIKYLÄN ASUKKAAT VOIVAT VIIMEIN PÄÄSTÄÄ HELPOTUKSEN HUOKAUKSEN!", + "MUTTA MEILLÄ EI OLE AIKAA JUHLIA!", + "AJAKAA ZOOMERILLA EDESSÄ AVAUTUVAN VUORISTOSOLAN LÄPI.", + "OLKAA VAROVAISIA, VAANIJAT OVAT TÄYTTÄNEET KOKO SOLAN RÄJÄHTEILLÄ!", + "KUN SAAVUTATTE TULIVUOREN KRAATERIN, MUISTAKAA KÄYDÄ PUNAISEN TIETÄJÄN LABRASSA", + "JA AKTIVOIDA SIELLÄ OLEVA TELEPORTTI, NIIN VOIMME LIITTYÄ SEURAANNE." ], "asstvb24": [ - "VOI EI! NUO VAANIJAT AIKOVAT SUUNNATA", - "SOLAN PÄÄHÄN RÄJÄHTEIDEN SYTYTTIMEN LUOKSE!", - "JOS NE EHTIVÄT SINNE ENNEN TEITÄ,", - "KOKO SOLA TULEE RÄJÄHTÄMÄÄN!", - "TEIDÄN ON PAKKO PÄÄSTÄ NIIDEN EDELLE JA TUHOTA SYTYTIN,", - "TAI MATKAMME TYSSÄÄ TÄHÄN!" + "VOI EI! NUO VAANIJAT OVAT VARMAAN MATKALLA SYTYTTIMEN LUOKSE SOLAN PÄÄSSÄ!", + "JOS NE EHTIVÄT SINNE ENNEN TEITÄ, KOKO SOLA TULEE RÄJÄHTÄMÄÄN!", + "TEIDÄN ON PAKKO PÄÄSTÄ NIIDEN EDELLE JA TUHOTA SYTYTIN, TAI MATKAMME TYSSÄÄ TÄHÄN!" ], "asstvb25": [ "HIENOA TYÖTÄ! TE PÄÄSITTE SYTYTTIMELLE ENSIN!", - "PUNAISEN TIETÄJÄN LABRA ON SUORAAN EDESSÄNNE.", - "MENKÄÄ KÄYNNISTÄMÄÄN LABRAN TELEPORTTI NIIN VOIMME LIITTYÄ SEURAANNE." + "PUNAISEN TIETÄJÄN LABRA ON SUORAAN EDESSÄPÄIN.", + "MENKÄÄ KÄYNNISTÄMÄÄN TELEPORTTI, NIIN VOIMME LIITTYÄ SEURAANNE." ], "asstvb28": [ "HEI! ÄLKÄÄ UNOHTAKO MINUA JA TIETÄJÄÄ!", - "TEIDÄN ON KÄYNNISTETTÄVÄ TELEPORTTI JOTTA PÄÄSEMME SEN LÄPI!", + "TEIDÄN ON KÄYNNISTETTÄVÄ TELEPORTTI, JOTTA PÄÄSEMME SEN LÄPI!", "SE SIJAITSEE SINISEN TIETÄJÄN LABRASSA, TULIKANJONIN PÄÄDYSSÄ.", "JOS ETTE PÄÄSTÄ MEITÄ SEN LÄPI, EMME VOI AUTTAA TEITÄ!" ], "asstvb29": [ "HALOO! ME ODOTTELEMME YHÄ!", - "KÄYNNISTÄ SE TELEPORTTI!" + "KÄYNNISTÄKÄÄ SE TELEPORTTI!" ], "asstvb30": [ - "HEI, ME EMME VOI TULLA LUOKSESI ENNEN KUIN TELEPORTTI ON KÄYNNISSÄ!" + "HEI, ME EMME VOI TULLA LUOKSENNE ENNEN KUIN TELEPORTTI ON KÄYNNISSÄ!" ], "asstvb40": [ - "TÄMÄ LAITE ON KOMMUNIKAATTORI. SEN AVULLA ISÄNI JA MINÄ", - "VOIMME NEUVOA TEITÄ MILLOIN TAHANSA SEIKKAILUNNE AIKANA." + "TÄMÄ LAITE ON KOMMUNIKAATTORI.", + "SEN AVULLA VOIMME NEUVOA TEITÄ MILLOIN TAHANSA SEIKKAILUNNE AIKANA." ], "asstvb41": [ "NÄMÄ LEIJUVAT MUNAN MUOTOISET ESINEET OVAT EDELTÄJÄHELMIÄ.", - "JOS KERÄÄT NIITÄ TARPEEKSI, JOTKUT KYLÄLÄISISTÄ VOIVAT ANTAA TEILLE", - "VOIMAKENNON VAIHTOKAUPPANA." + "JOS KERÄÄT NIITÄ TARPEEKSI, JOTKUT KYLÄLÄISISTÄ VOIVAT ANTAA NIISTÄ VOIMAKENNON." ], "asstvb42": [ - "TÄMÄ TÄSSÄ ON VOIMAKENNO, TÄRKEIN KAIKISTA EDELTÄJIEN JÄÄNTEISTÄ MITÄ LÖYTÄÄ VOI!", - "SINUN ON KERÄTTÄVÄ NÄITÄ 20, JOTTA SAAN TARPEEKSI ENERGIAA YLLÄPITÄMÄÄN", - "ZOOMERISI LÄMPÖSUOJAA." + "TÄMÄ ON VOIMAKENNO, TÄRKEIN KAIKISTA EDELTÄJIEN JÄÄNTEISTÄ, MITÄ LÖYTÄÄ VOI!", + "SINUN ON KERÄTTÄVÄ NÄITÄ 20, JOTTA ZOOMERIN LÄMPÖSUOJA SAA VIRTAA." ], "asstvb44": [ "HEI, LÖYSIT YHDEN PARTIOKÄRPÄSISTÄNI!", - "LÄHETIN 7 KÄRPÄSTÄ JOKAISELLE ALUEELLE ETSIMÄÄN LISÄÄ VOIMAKENNOJA", + "LÄHETIN 7 KÄRPÄSTÄ JOKAISELLE ALUEELLE ETSIMÄÄN LISÄÄ VOIMAKENNOJA,", "MUTTA VAANIJAT OVAT KAAPANNEET NE KAIKKI!" ], "asstvb45": [ @@ -1908,25 +1884,25 @@ "VOIT LÖYTÄÄ LISÄÄKIN VOIMAKENNOJA." ], "asstvb46": [ - "OLE VAROVAINEN MERESSÄ. VEDET OVAT TÄPÖSEN TÄYNNÄ", - "VAANIJAHAITA, ENKÄ OLE KOSKAAN NÄHNYT KENENKÄÄN NUJERTAVAN SEMMOISTA.", - "PYSY KAUKANA NIISTÄ JOS TIEDÄT MIKÄ ON HYVÄKSESI!" + "OLE VAROVAINEN MERESSÄ. VEDET OVAT TÄPÖSEN TÄYNNÄ VAANIJAHAITA,", + "ENKÄ OLE KOSKAAN NÄHNYT KENENKÄÄN NUJERTAVAN SEMMOISTA.", + "PYSY KAUKANA NIISTÄ, JOS TIEDÄT MIKÄ ON HYVÄKSESI!" ], "asstvb47": [ - "MUISTA, TUOSSA ON VOIMAKENNO.", + "MUISTA, TUO ON VOIMAKENNO.", "SINUN ON KERÄTTÄVÄ NIITÄ NIIN MONTA KUIN VAIN PYSTYT." ], "asstvb48": [ - "TUO ON SINISEN ECON PURKUAUKKO! KESKITETYMPÄÄ KUIN ILMASSA LEIJUVIEN KERÄÄNTYMIEN,", - "TÄMÄ AUKKO TARJOAA TÄYDEN LATAUKSEN SINISTÄ ECOA,", - "MIKÄ ANTAA SINULLE VOIMAA PALJON PIDEMMÄKSI AIKAA." + "TUO ON SINISEN ECON PURKUAUKKO!", + "TIIVIIMPÄÄ KUIN ILMASSA LEIJUVAT KERÄÄNTYMÄT,", + "TÄMÄ AUKKO ANTAA TÄYDEN LATAUKSEN SINISTÄ ECOA, JOLLOIN SAAT VOIMAA PIDEMMÄKSI AIKAA." ], "asstvb71": [ - "TEILLÄ EI OLE TARPEEKSI VOIMAKENNOJA ANTAMAAN VIRTAA SINISEN TIETÄJÄN LAITTEELLE.", - "ME EMME VOI NOSTAA TUOTA LOHKARETTA ENNEN KUIN KERÄÄT 45 VOIMAKENNOA." + "TEILLÄ EI OLE TARPEEKSI VOIMAKENNOJA AKTIVOIMAAN SINISEN TIETÄJÄN LAITETTA.", + "EMME VOI NOSTAA TUOTA LOHKARETTA, ENNEN KUIN KERÄÄTTE 45 VOIMAKENNOA." ], "asstvb72": [ - "KUNNES ME SAAMME SELVILLE KUINKA SININEN TIETÄJÄ KATOSI,", + "KUNNES SAAMME SELVILLE MIKSI SININEN TIETÄJÄ KATOSI,", "TEIDÄN TULEE KERÄTÄ 45 VOIMAKENNOA HÄNEN LAITTEESEENSA.", "ANTAA PALAA!" ], @@ -1939,9 +1915,8 @@ "HYPÄTKÄÄ KYYTIIN MILLOIN VAIN." ], "sagevb01": [ - "JAHAS, NÄHTÄVÄSTI TE KAKSI OLETTE VIIMEINKIN", - "PÄÄTTÄNEET AVATA KERÄIMIENI TUKOKSET.", - "ANTAISIN TEILLE ONNITTELUNI", + "JAHAS, OLETTE VIIMEINKIN PÄÄTTÄNEET AVATA KERÄIMIENI TUKOKSET.", + "ANTAISIN TEILLE ONNITTELUNI,", "MUTTA TEILLÄ ON NIIN PALJON TEHTÄVÄÄ, ETTEN TUHLAA ENEMPÄÄ AIKAANNE.", "MUUTEN, JOS ASIANNE EIVÄT LUTVIUDU,", "DAXTERILLE ON AINA VAPAANA TYÖ HOITAA KYLÄMME ROTTAONGELMAA.", @@ -1954,11 +1929,11 @@ "JA SAADA AIKAAN MITTAAMATONTA TUHOA.", "PYYHI TUO TYPERÄ VIRNE POIS NAAMALTASI, DAXTER!", "TEILLÄ KAHDELLA ON VIELÄ PALJON TEHTÄVÄÄ.", - "JATKAKAA ETEENPÄIN VAIN!" + "JATKAKAA VAIN!" ], "sagevb03": [ - "VAIKUTATTE MINUA JÄLLEEN. MUTTA EHKÄ SE JOHTUUKIN VAIN SIITÄ, ETTÄ", - "ODOTUKSENI OVAT MITÄTTÖMÄT.", + "YLLÄTÄTTE MINUA JÄLLEEN.", + "MUTTA EHKÄ SE JOHTUUKIN VAIN SIITÄ, ETTÄ ODOTUKSENI OVAT MITÄTTÖMÄT.", "NO NIIN, NAUTISKELUN AIKA ON OHI.", "LIIKKEELLE SIITÄ!" ], @@ -1973,30 +1948,29 @@ "MUTTA JATKA VAIN. SE ON SULOISTA." ], "sagevb21": [ - "NUO PIENET VIHREÄT ENERGIAPALLOT MAASSA OVAT ERÄS TOINEN ECON MUODOISTA.", - "KERÄÄ 50 PIENTÄ, TAI YKSI ISO VIHREÄ ECO PALAUTTAAKSESI TERVEYTTÄSI." + "NUO VIHREÄT ENERGIAPALLOT MAASSA OVAT ERÄS TOINEN ECON MUODOISTA.", + "KERÄÄ 50 PIENTÄ TAI YKSI ISO VIHREÄ ECO PALAUTTAAKSESI TERVEYTTÄSI." ], "sagevb22": [ - "TÄMÄ ON SINISTÄ ECOA, MIKÄ SISÄLTÄÄ TIIVISTETTYÄ LIIKE-ENERGIAA.", - "SINISEN ECON AVULLA VOIT LIIKKUA NOPEASTI, RIKKOA LAATIKOITA, JA JOPA AKTIVOIDA JOITAKIN EDELTÄJIEN", - "ARTEFAKTEJA KUN LÄHESTYT NIITÄ." + "TÄMÄ ON SINISTÄ ECOA, JOKA SISÄLTÄÄ TIIVISTETTYÄ LIIKE-ENERGIAA.", + "SINISEN ECON AVULLA VOIT LIIKKUA NOPEASTI, RIKKOA LAATIKOITA,", + "JA JOPA AKTIVOIDA JOITAKIN EDELTÄJIEN ESINEITÄ, KUN LÄHESTYT NIITÄ." ], "sagevb23": [ - "HUOMAATKO, KUINKA JOKAINEN SINISEN ECON KERÄÄNTYMÄ JONKA KERÄÄT", + "HUOMAATKO, KUINKA JOKAINEN KERÄÄMÄSI SINISEN ECON KERÄÄNTYMÄ", "LISÄÄ SEN VOIMAN KÄYTTÖAIKAA." ], "sagevb24": [ "TÄMÄ TÄSSÄ ON EDELTÄJÄPORTTI.", - "SE VOIDAAN AVATA VAIN LÄHESTYMÄLLÄ OVEA", - "KUN KANAVOIT SINISTÄ ECOA KEHOSI LÄPI." + "SE AVAUTUU VAIN, KUN SITÄ LÄHESTYTÄÄN KANAVOIDESSA SINISTÄ ECOA KEHON LÄPI." ], "sagevb25": [ "HYVÄÄ TYÖTÄ, SININEN ECO SAI OVEN AVATTUA.", - "SINISEN ECON AVULLA ON MAHDOLLISTA JOHTAA ENERGIAA KAIKENLAISIIN", - "EDELTÄJIEN ESINEISIIN, JOTKA OVAT LOJUNEET ELOTTOMINA VUOSIKAUSIA." + "SINISEN ECON AVULLA VOI JOHTAA ENERGIAA KAIKENLAISIIN EDELTÄJIEN ESINEISIIN,", + "JOTKA OVAT LOJUNEET ELOTTOMINA VUOSIKAUSIA." ], "sagevb26": [ - "KIIKAREILLASI NÄET EDISTYKSESI MILLOIN TAHANSA MATKAN AIKANA." + "KIIKAREILLASI VOIT TARKASTELLA EDISTYSTÄSI MATKAN AIKANA." ], "sagevb27": [ "HYPPÄÄ KERRAN, JA HYPPÄÄ SITTEN ILMASSA UUDESTAAN PÄÄSTÄKSESI KORKEAMMALLE." @@ -2027,82 +2001,82 @@ ], "sagevb36": [ "JOSKUS ON HYVÄ ISKEÄ JUTTUJA SUUREMMALLA VOIMALLA.", - "RIKKOAKSESI TÄMÄNLAISIA LAATIKOITA, SINUN KANNATTAISI HYPÄTÄ ILMAAN", + "RIKKOAKSESI TÄLLAISIA LAATIKOITA, SINUN TULEE HYPÄTÄ ILMAAN", "JA SYÖKSYÄ SITTEN ALAS SEN PÄÄLLE, KÄDET EDELLÄ." ], "sagevb37": [ "KUN KERÄÄT HIEMAN ITSEVARMUUTTA, KOKEILE KÄYTTÄÄ LIIKKEITÄSI SARJASSA." ], "sagevb38": [ - "ET VOI TULLA TAKAISIN PORTAALIN LÄPI", - "ENNEN KUIN OLET LÖYTÄNYT SAAREN KAIKKI 4 VOIMAKENNOA." + "ETTE VOI TULLA TAKAISIN PORTAALIN LÄPI,", + "ENNEN KUIN OLETTE LÖYTÄNEET KAIKKI 4 VOIMAKENNOA SAARELLA." ], "sagevb39": [ - "HIENOA! LÖYSIT KAIKKI VOIMAKENNOT SAARELLA.", - "TULE PORTAALIN LUO, NIIN TUON TEIDÄT TAKAISIN LABRAAN. RIPEÄSTI!" + "HIENOA! LÖYSITTE KAIKKI VOIMAKENNOT SAARELLA.", + "TULKAA PORTAALIN LUO, NIIN TUON TEIDÄT TAKAISIN LABRAAN. RIPEÄSTI!" ], "sksp0001": [ "HEI, SE SÖPÖLÄINEN KEIRA OLI OIKEASSA! TÄÄLLÄ ON TRANS-ALUSTOJA!" ], "sksp0002": [ - "LUOTA MUHUN, NUO PIMEÄT ECO-LAATIKOT OVAT HUONO JUTTU!" + "USKO MINUA, NUO PIMEÄT ECO-LAATIKOT OVAT HUONO JUTTU!" ], "sksp0003": [ - "LYÖN VETOA ETTÄ JOS LÖYDÄMME KAIKKI NUO KUVOTTAVAN SÖPÖT KÄRPÄSET JOKA PAIKASTA,", + "LUULEN, ETTÄ JOS LÖYDÄMME KAIKKI NUO SÖPÖT KÄRPÄSET JOKA ALUEELTA,", "AINAKIN YHDELLÄ NIISTÄ TÄYTYY OLLA VOIMAKENNO!" ], "sksp0004": [ "AARTEITA! NYT PUHUTAAN ASIAA!" ], "sksp0005": [ - "EI NÄMÄ PUU-METALLISET BOKSIT NIIN HANKALILTA VAIKUTA!", - "LYÖN VETOA ETTÄ NE RIKKOUTUVAT, JOS SYÖKSYHYPPÄÄT NIIDEN PÄÄLLE." + "EI NÄMÄ PUU-METALLISET BOKSIT NIIN JÄYKILTÄ VAIKUTA!", + "NE VARMASTI RIKKOUTUVAT, JOS TEET SUKELLUSISKUN NIIDEN PÄÄLLE." ], "sksp0006": [ "NÄMÄ METALLISET LAATIKOT OVAT PAKSUMPIA KUIN NAUKIN KALLO!", - "MUTTA ON VARMASTI OLEMASSA JOKIN KEINO AVATA NE." + "MUTTA ON VARMASTI JOKIN KEINO AVATA NE." ], "sksp0007": [ - "YKSI SANA: VOIMAKENNOT. MEIDÄN TÄYTYY LÖYTÄÄ NIITÄ JA TILANTEEMME EI JUURI NYT KOVIN HYVÄLTÄ NÄYTÄ." + "YKSI SANA: VOIMAKENNOT.", + "MEIDÄN TÄYTYY LÖYTÄÄ NIITÄ JA TILANTEEMME EI JUURI NYT HYVÄLTÄ NÄYTÄ." ], "sksp0008": [ - "ME TARVITAAN HELMIÄ. HELMIÄ, JAK! MITEN IHMEESSÄ ME OSTAMME VOIMAKENNOJA JOS MEILLÄ EI OLE HELMIÄ!" + "ME TARVITSEMME HELMIÄ. HELMIÄ, JAK!", + "MITEN IHMEESSÄ OSTAMME VOIMAKENNOJA, JOS MEILLÄ EI OLE HELMIÄ!" ], "sksp0009": [ - "ONPAS OUDON NÄKÖINEN HÄRPÄKE! OLEN VARMA ETTÄ SAAMME TÄMÄN AUKI,", - "JOS KÄYTÄT TUOTA SÄKENÖIVÄÄ SINISTÄ ECOA." + "ONPAS OUDON NÄKÖINEN HÄRPÄKE!", + "SAAMME SEN VARMAAN AUKI, JOS KÄYTÄT TUOTA SÄKENÖIVÄÄ SINISTÄ ECOA." ], "sksp0010": [ "HEI, KÄYDÄÄN KATSOMASSA SEN KALANHÖNGÄN PIKAVENETTÄ TELAKASSA!" ], "sksp0011": [ - "MEIDÄN KANNATTAISI KYSYÄ KALASTAJALTA VIIDAKON PUROLLA", + "MEIDÄN KANNATTAISI KYSYÄ KALASTAJALTA VIIDAKON PUROLLA,", "JOS VOIMME LAINATA HÄNEN PIKAVENETTÄÄN JA KIITÄÄ USVASAARELLE!" ], "sksp0013": [ - "NÄITKO KUINKA SUUREN JÄLJEN", - "SEN VAANIJAHAIN PUREMA JÄTTI KALASTAJAN PAATTIIN?", + "NÄITKö KUINKA SUUREN JÄLJEN SEN VAANIJAHAIN PUREMA JÄTTI KALASTAJAN PAATTIIN?", "MEIDÄN ON PARAS PYSYÄ MELKO ETÄISYYDELLÄ NIISTÄ!", - "EN USKO ETTÄ PÄRJÄÄMME NIIN RAJUA OTUSTA VASTAAN." + "EN USKO, ETTÄ PÄRJÄÄMME NIIN RAJUA OTUSTA VASTAAN." ], "sksp0014": [ - "ME SAATIIN NYT HAALITTUA TARPEEKSI HELMIÄ VOIMAKENNOON.", - "MENNÄÄN TAKAISIN JA HOIDETAAN JO SE VAIHTOKAUPPA!" + "ME SAIMME NYT HAALITTUA TARPEEKSI HELMIÄ VOIMAKENNOON.", + "MENNÄÄN TAKAISIN JA HOIDETAAN SE VAIHTOKAUPPA JO!" ], "sksp0015": [ - "TÄMÄN TÄYTYY OLLA YKSI NIISTÄ EDELTÄJÄORAAKKELEISTA, JOISTA SE TIETÄJÄ AINA HÖPISEE.", - "TOIVOIN ETTEIVÄT NE OLISI OLLEET NÄIN RUMIA KASVOTUSTEN!" + "TÄMÄ ON KAI YKSI NIISTÄ ORAAKKELEISTA, JOISTA SE TIETÄJÄ AINA HÖPISEE.", + "TOIVON VAIN, ETTEIVÄT HE OLLEET NÄIN RUMIA KASVOTUSTEN!" ], "sksp0017": [ - "VOU! VILKAISEHAN TUOTA KOREILEVAA PATSASTA", - "LOJUMASSA TUOLLA KIVIEN PÄÄLLÄ." + "VAU! VILKAISEHAN TUOTA KOREILEVAA PATSASTA LOJUMASSA TUOLLA KIELEKKEELLÄ." ], "sksp0018": [ - "MEIDÄN KANNATTAISI MENNÄ KERTOMAAN SILLE HÖLÖSUU-PORMESTARILLE, ETTÄ HÄN ON ISOSTI VELKAA", - "KYLÄN ENERGIASÄTEEN YHDISTÄMISESTÄ!" + "MEIDÄN KANNATTAISI KERTOA SILLE HÖLÖSUU-PORMESTARILLE,", + "ETTÄ HÄN ON MEILLE ISOSTI VELKAA KYLÄN ENERGIASÄTEEN KORJAAMISESTA!" ], "sksp0019": [ - "HEI, LOKKEJA! SÄIKYTELLÄÄN NIITÄ IHAN HUVIN VUOKSI." + "HEI, LOKKEJA! SÄIKYTELLÄÄN NIITÄ HUVIN VUOKSI." ], "sksp0020": [ "JEE, HAHAA! TEHDÄÄN TUO UUDESTAAN!" @@ -2120,66 +2094,67 @@ "JEE, HA HA! JEE!!" ], "sksp0025": [ - "VAUTSI! NE SAIVAT AIKAAN KIVIVYÖRYN! KÄYDÄÄN KATSOMASSA MITÄ TAPAHTUI." + "VAUTSI! NE SAIVAT AIKAAN KIVIVYÖRYN! KÄYDÄÄN TUTKIMASSA." ], "sksp0026": [ - "HEI! TOI PELIKAANI NAPPASI VOIMAKENNON KITAANSA!", + "HEI! TUO PELIKAANI NAPPASI VOIMAKENNON KITAANSA!", "NÄYTETÄÄN SILLE MISTÄ PÄIN TUULEE!" ], "sksp0027": [ - "NOPEASTI NYT! MEIDÄN TÄYTYY PÄÄSTÄ VOIMAKENNON LUOKSE ENNEN KUIN PELIKAANI TAAS HOTKAISEE SEN." + "ÄKKIÄ! MEIDÄN TÄYTYY PÄÄSTÄ VOIMAKENNOLLE,", + "ENNEN KUIN PELIKAANI TAAS HOTKAISEE SEN." ], "sksp0028": [ - "POTKAISE MUNAA! HEE-HEE! POTKI SITÄ, POTKI SITÄ!" + "POTKAISE MUNAA! HEHEE! POTKI SITÄ, POTKI SITÄ!" ], "sksp0029": [ - "ÖH, MEIDÄN VARMAAN KANNATTAISI KESKUSTELLA LINTUBONGARIN KANSSA", - "JOS ME VAHINGOSSA VATKATTIINKIN SE FLUT-FLUTIN MUNA." + "ÖH... MEIDÄN VARMAAN KANNATTAISI PUHUA LINTUBONGARILLE,", + "JOS SAIMMEKIN VAHINGOSSA MUNAKOKKELIA AIKAAN." ], "sksp0030": [ - "HEI, KOETA LÄIMÄYTTÄÄ KIVIÄ, JOTTA NE SAADAAN POIS TIELTÄ!" + "HEI, KOETA LÄIMÄYTTÄÄ KIVIÄ, NIIN NE SAADAAN POIS TIELTÄ!" ], "sksp0031": [ - "UUU! TARTUTTAAN KANUUNAAN JA POSAUTELLAAN JUTTUJA!" + "VAU! TARTUTTAAN KANUUNAAN JA POSAUTELLAAN JUTTUJA!" ], "sksp0034": [ - "AUU, AUU, AUUU! SUKELLA NOIDEN HELMIEN PERÄÄN, JAK, SUKELLA!" + "AU AU AUUU! SUKELLA NOIDEN HELMIEN PERÄÄN, JAK, SUKELLA!" ], "sksp0035": [ - "NIIN ELIKKÄS, TÄSSÄ EDESSÄMME ON EDELTÄJÄLAUKAISIN", - "MUTTA SULLA EI OLE SITÄ SINISTÄ JUTTUA KÄYTÖSSÄSI. ELI SE EI AUTA MEITÄ!" + "EDESSÄMME ON SIIS EDELTÄJÄLAUKAISIN, MUTTA SINULLA EI OLE SITÄ SINISTÄ JUTTUA.", + "ELI SE EI AUTA MEITÄ!" ], "sksp0037": [ "NUO TORNIHÄRPÄKKEET YMPÄRI VIIDAKKOA VARMAAN OHJAAVAT ECO-SÄDETTÄ.", "MENNÄÄN SORKKIMAAN NIITÄ!" ], "sksp0038": [ - "HMM, JOS SININEN ECO SAA JOPA SILLAN PYSTYYN, OLEN VARMA ETTÄ SE AVAA MYÖS OVEN!", + "HMM... JOS SININEN ECO SAA JOPA SILLAN PYSTYYN, SE IHAN VARMASTI AVAA MYÖS OVEN!", "MENNÄÄN MEHUTTAMAAN SINUT UUDELLEEN." ], "sksp0039": [ - "HEI, NÄISSÄ TOLPISSA ON PIENET SALAMANMERKIT,", - "JA TUOLTA AUKOSTA TUOLLA VIRTAA SÄHKÖÄ.", - "AJATTELETKO SAMAA KUIN MÄKIN?" + "HEI, NÄISSÄ TOLPISSA ON PIENET SALAMAMERKIT,", + "JA TUOSTA AUKOSTA TUOLLA VIRTAA SÄHKÖÄ.", + "AJATTELETKO SAMAA KUIN MINÄKIN?" ], "sksp0040": [ - "KIIVETÄÄN TUON MASIINAN PÄÄLLE JA RIKOTAAN TUO ECO-SÄDETTÄ OHJAAVA PEILI!" + "KIIVETÄÄN MASIINAN PÄÄLLE JA RIKOTAAN TUO ECO-SÄDETTÄ KÄÄNTÄVÄ PEILI!" ], "sksp0041": [ - "MEIDÄN PITÄÄ PÄÄSTÄ TUON TORNIN HUIPULLE!" + "MEIDÄN TÄYTYY PÄÄSTÄ TÄMÄN TORNIN HUIPULLE!" ], "sksp0043": [ "EHKÄ MEIDÄN PITÄISI JÄLJITTÄÄ SE KALASTAJA.", - "MÄ KUULIN, ETTÄ SE ON VIIDAKOSSA PYYTÄMÄSSÄ KALOJA ALEMMAN PURON LUONA!" + "HÄN ON KUULEMMA VIIDAKOSSA KALASTAMASSA ALEMMAN PURON LUONA!" ], "sksp0049": [ "MUODOSTA SÄDE TÄHTÄÄMÄLLÄ SE SEURAAVAAN TORNIIN!" ], "sksp0050": [ - "RIKO SE PEILI, JAK!" + "RIKO TUO PEILI, JAK!" ], "sksp0051": [ - "HOIDA NUO ÖTÖKÄT, JAK! HOIDA NE!" + "HOIDA NUO ÖTÖKÄT, JAK!" ], "sksp0052": [ "MENNÄÄN SEURAAVAN PYLVÄÄN LUO JA YHDISTETÄÄN SÄDE SILLÄ!" @@ -2198,23 +2173,22 @@ "PIDETÄÄN SINUT LOITOLLA MÖNJÄSTÄ, JOOKOS?" ], "sksp0060": [ - "TÄMÄ MESTA SAA MUN KARVANI PYSTYYN!", - "JA USKO POIS, SE ON TÄYSIN ERILAINEN KOKEMUS", - "KUN OLET PÖRRÖN PEITOSSA!" + "TÄMÄ PAIKKA SAA KARVANI PYSTYYN!", + "JA USKO POIS, SE ON TÄYSIN ERILAINEN KOKEMUS, KUN OLET PÖRRÖN PEITOSSA!" ], "sksp0062": [ "AJETAAN NOITA PALLOVAANIJOITA PÄIN JA REVITÄÄN NE KAPPALEIKSI!" ], "sksp0063": [ - "MÄ SANOIN \"REVI VAANIJAT KAPPALEIKSI\", JAK. EI NIIDEN MIINOJA!", + "SANOIN \"REVI VAANIJAT KAPPALEIKSI\". EI NIIDEN MIINOJA!", "SÄÄNTÖ NUMERO YKSI: AINA VÄLTTELE MIINOJA!" ], "sksp0064": [ - "OLE SITTEN VARUILLASI! MUISTATHAN MITÄ TAPAHTUI VIIME VISIITILLÄMME." + "OLE SITTEN VARUILLASI! MUISTATHAN, MITÄ TAPAHTUI VIIME VISIITILLÄMME." ], "sksp0067": [ "ÄLÄ VAIN PUTOA USVAAN ALLAMME!", - "PELKÄÄNPÄ, ETTEMME NOUSISI ENÄÄ TAKAISIN PINTAAN." + "PELKÄÄN, ETTEMME NOUSISI ENÄÄ TAKAISIN PINTAAN." ], "sksp0069": [ "SE ON VÄIJYTYS, JAK! SE ON VÄIJYTYS!" @@ -2229,7 +2203,7 @@ "PUNAINEN ECO VOIMISTAA ISKUJASI." ], "sksp0073": [ - "TARVIMME SINISTÄ ECOA TÄMÄN ALUSTAN VIRITTÄMISEEN!" + "TARVITSEMME SINISTÄ ECOA TÄMÄN ALUSTAN VIRITTÄMISEEN!" ], "sksp0076": [ "JAK! TEE HYPPYJÄ, JOTTA PYSYMME LOITOLLA KUUMASTA MAASTA." @@ -2241,20 +2215,20 @@ "AJA NOIDEN EDELTÄJÄHYPPYRIEN YLI, JOTTA PYSYMME VIILEINÄ." ], "sksp0079": [ - "ÄÄH! MÄ KUOLEN! TÄÄLTÄ TULLAAN, ISOISÄ!", - "SINUN TÄYTYY SAADA TÄMÄ ROHJO TOISELLE PUOLEN ENNEN KUIN SE YLIKUUMENEE!" + "ÄÄH! MINÄ KUOLEN! TÄÄLTÄ TULLAAN, ISOISÄ!", + "SINUN TÄYTYY SAADA TÄMÄ ROHJO TOISELLE PUOLEN, ENNEN KUIN SE YLIKUUMENEE!" ], "sksp0080": [ - "KÄYTÄ HYPPYKÄÄNTÖÄ, JOTTA KÄÄNNYT TIUKEMMIN!" + "KÄYTÄ HYPPYKÄÄNTÖÄ, NIIN KÄÄNNYT TIUKEMMIN!" ], "sksp0081": [ "ÄÄH! EHKÄ MINUN PITÄISI AJAA!" ], "sksp0082": [ - "SINÄHÄN YRITÄT VÄLTTÄÄ NOITA PIMEÄN ECON BOKSEJA, EIKÖS?" + "SINÄHÄN YRITÄT VÄLTTÄÄ NOITA PIMEÄN ECON LAATIKOITA, EIKÖS?" ], "sksp0083": [ - "KATSOTAAN JOS SAAMME HYPÄTTYÄ ILMAAN NOISTA VAANIJOISTA!" + "KATSOTAAN, JOS SAAMME HYPÄTTYÄ ILMAAN NOISTA VAANIJOISTA!" ], "sksp0084": [ "LIIAN LÄHELLÄ, LIIAN LÄHELLÄ!" @@ -2266,7 +2240,7 @@ "MUUTAMA SEKUNTI VIELÄ, NIIN OLEMME FLUT-FLUT-PAISTIA!" ], "sksp0087": [ - "AJA PALLOJEN LÄPI JOTTA VIILENEMME!" + "AJA PALLOJEN LÄPI, JOTTA VIILENEMME!" ], "sksp0088": [ "TOINEN PALLO EDESSÄPÄIN!" @@ -2275,7 +2249,7 @@ "OLISINPA NUKKUNUT POMMIIN TÄNÄ AAMUNA!" ], "sksp0090": [ - "AJOIT PALLON OHI! TARVIMME NIITÄ TAI MUUTEN ME PAISTUTAAN!" + "AJOIT PALLON OHI! TARVITSEMME NIITÄ, TAI MUUTEN ME PAISTUMME!" ], "sksp0091": [ "TÄMÄ VEKOTIN YLIKUUMENEE!" @@ -2284,7 +2258,7 @@ "HAISTATKO SINÄKIN JOTAIN PALANUTTA?!" ], "sksp0093": [ - "MUN HÄNTÄ TAITAA OLLA TULESSA!" + "HÄNTÄNI LIEKEHTII!" ], "sksp0094": [ "KOHTA POSAHTAA!" @@ -2296,13 +2270,13 @@ "TÄÄLLÄKIN ON PARTIOKÄRPÄSIÄ!" ], "sksp009a": [ - "HA HA! NÄYTIMME SILLE ASIAN JOS TOISENKIN." + "HA HA! NÄYTIMME HÄNELLE ASIAN JOS TOISENKIN." ], "sksp009b": [ "NO NIIN, LISÄÄ HELMIÄ!" ], "sksp009c": [ - "TEE MULLE PALVELUS JA PYSY EROSSA NOISTA PIMEÄN ECON BOKSEISTA!" + "TEE MINULLE PALVELUS JA PYSY EROSSA NOISTA PIMEÄN ECON LAATIKOISTA!" ], "sksp009d": [ "JEE-HA-HA-HAA!" @@ -2320,16 +2294,16 @@ "LÖYSIMMEKÖ JO KAIKKI PARTIOKÄRPÄSET ALUEELTA?" ], "sksp009j": [ - "HEI, NÄYTTÄÄ SILTÄ ETTÄ PARTIOKÄRPÄSET OVAT AINA PUNAISISSA LAATIKOISSA." + "HEI, PARTIOKÄRPÄSET TAITAVAT OLLA AINA PUNAISISSA LAATIKOISSA." ], "sksp009k": [ - "NONIIN! SÄ LÖYSIT KAIKKI PARTIOKÄRPÄSET TÄLTÄ ALUEELTA!" + "NO NIIN! SINÄ LÖYSIT KAIKKI PARTIOKÄRPÄSET TÄLTÄ ALUEELTA!" ], "sksp0109": [ - "JIIHAA! ME VOITIMME ENNÄTYSAJAN!" + "JEEH! ME VOITIMME ENNÄTYSAJAN!" ], "sksp0110": [ - "OLEN SANONUT SEN ENNENKIN, JA SANON SEN UUDESTAAN...", + "OLEN SANONUT SEN ENNENKIN, JA SANON SEN VIELÄ...", "VÄLTÄ PIMEÄN ECON LAATIKOITA!" ], "sksp0111": [ @@ -2339,10 +2313,10 @@ "MENNÄÄN HAKEMAAN VOIMAKENNOMME GEOLOGILTA." ], "sksp0113": [ - "NUO OVAT VARMAAN NE SAIRASTUNEET KASVIT JOISTA SE KLAPIPÄÄ MAINITSI." + "NUO OVAT VARMAAN NE SAIRASTUNEET KASVIT, JOISTA SE KLAPIPÄÄ MAINITSI." ], "sksp0114": [ - "ME TARVIMME VIHREÄÄ ECOA PARANTAAKSEMME NUO KASVIT." + "TARVITSEMME VIHREÄÄ ECOA PARANTAAKSEMME NUO KASVIT." ], "sksp0115": [ "JAK, AJA VIHREÄN ECO-AUKON YLITSE." @@ -2355,7 +2329,7 @@ "TUOSSA ON SE MYYRIEN KOLO!" ], "sksp0118": [ - "NO NIIN, LENNETÄÄN NOIDEN SAIRAIDEN KASVIEN YLI!" + "JA NYT, LENNETÄÄN SAIRAIDEN KASVIEN YLI!" ], "sksp0119": [ "YKSI RINKULA HOIDETTU, MONTA JÄLJELLÄ!" @@ -2364,7 +2338,7 @@ "VAUHTIA! TUOLLA ON SEURAAVA RINKULA!" ], "sksp0121": [ - "NOPEASTI! SUN TÄYTYY LENTÄÄ JOKA RINKULAN LÄPI ENNEN KUIN NE SAMMUVAT!" + "NOPEASTI! LENNÄ JOKA RINKULAN LÄPI, ENNEN KUIN NE SAMMUVAT!" ], "sksp0122": [ "HEI! TUO RUOHO HIDASTAA MEITÄ..." @@ -2373,10 +2347,10 @@ "NOPEASTI, SEURAA TUOTA PUTKEA!" ], "sksp0124": [ - "MULLA ON PAHA TUNNE TÄSTÄ." + "MINULLA ON PAHA TUNNE TÄSTÄ." ], "sksp0125": [ - "NÄYTTÄISI, ETTÄ NUO JUTUT TARVITSEVAT SINISEN ECO-LATAUKSEN." + "NUO JUTUT TAITAVAT TARVITA SINISEN ECO-LATAUKSEN." ], "sksp0126": [ "KÄYDÄÄN NOUTAMASSA VOIMAKENNO TÄMÄN HÄRVELIN PÄÄLTÄ!" @@ -2391,37 +2365,37 @@ "ÄÄK! TUO PIMEÄ ECO SAAVUTTAA MEITÄ." ], "sksp0130": [ - "ÖÖH, MÄ USKON ETTÄ MEIDÄN TÄYTYY KYTKEÄ PÄÄLLE KAIKKI NUO ALUSTAT TAI JOTAIN..." + "LUULEN, ETTÄ MEIDÄN TÄYTYY KYTKEÄ PÄÄLLE KAIKKI NUO ALUSTAT TAI JOTAIN..." ], "sksp0131": [ - "HEI! SÄHÄN VOISIT HYPÄTÄ JA SYÖKSYÄ NOIDEN TYYPPIEN PÄÄLLE!" + "HEI! VOISIT VARMAAN SUKELLUSHYÖKÄTÄ NOIDEN TYYPPIEN PÄÄLLE!" ], "sksp0132": [ - "EE-EE! HEI! HEEI! HEEEI!" + "EE-EEH! HEI! HEEI! HEEEI!" ], "sksp0133": [ - "VEIKKAAN, ETTÄ SAAMME NUO KAIKKI LADATTUA KERRALLA!" + "VEIKKAAN, ETTÄ SAAMME NE KAIKKI LADATTUA KERRALLA!" ], "sksp0134": [ "MITÄ JOS VAIKKA VAROISIMME NOITA KUUMIA PUTKIA?!" ], "sksp0135": [ - "TUO VESI ON NÄYTTÄÄ VAARALLISELTA KUN SE VAIHTAA VÄRIÄ!" + "TUO VESI ON NÄYTTÄÄ VAARALLISELTA, KUN SE VAIHTAA VÄRIÄ!" ], "sksp0136": [ - "SUN TÄYTYY POISTUA VEDESTÄ ENNEN KUIN SE VAIHTAA VÄRIÄ!" + "SINUN TÄYTYY POISTUA VEDESTÄ, ENNEN KUIN SE VAIHTAA VÄRIÄ!" ], "sksp0137": [ - "LUULISIN, ETTÄ SAAMME AMMUTTUA NUO MURIKAT JOS MEILLÄ OLISI KELTAISTA ECOA." + "KELTAINEN ECO SAATTAISI TEHOTA NOIHIN MURIKOIHIN." ], "sksp0138": [ "MEIDÄN KANNATTAISI AMPUA NUO ISOT LOHKAREET KIINNI TUKINARUSSA." ], "sksp0139": [ - "EHKÄ ME VOISIMME AUTTAA SITÄ KUMMAJAISTA LÖYTÄMÄÄN SEN LEMMIKKI." + "EHKÄ VOISIMME AUTTAA SITÄ KUMMAJAISTA LÖYTÄMÄÄN HÄNEN LEMMIKKI." ], "sksp0140": [ - "FLUT-FLUT LIITÄÄ PIDEMMÄLLE, JOS SE HYPPÄÄ UUDELLEEN ILMASSA!" + "FLUT-FLUT LIITÄÄ PIDEMMÄLLE, JOS HÄN HYPPÄÄ UUDELLEEN ILMASSA!" ], "sksp0141": [ "ÄLÄ KOSKE TUOHON MUSTAAN, KUUMAAN TERVAAN, TAI MUUTEN SATTUU!" @@ -2433,11 +2407,10 @@ "ÄÄH! IRROTA KIELEN OTE!" ], "sksp0144": [ - "AMMU NUO ROTANPESÄT JOTTA ROTAT LAKKAAVAT ILMESTYMÄSTÄ." + "AMMU NUO ROTANPESÄT, JOTTA ROTAT LAKKAAVAT ILMESTYMÄSTÄ." ], "sksp0145": [ - "VAUTSI! SÄ VOIT AMPUA TULIPALLOJA", - "KUN SULLA ON KELTAISTA ECOA KÄYTÖSSÄ." + "VAUTSI! VOIT AMPUA TULIPALLOJA, KUN SINULLA ON KELTAISTA ECOA KÄYTÖSSÄ." ], "sksp0146": [ "HEI! TUOHAN ON KELTAISTA ECOA!" @@ -2452,7 +2425,7 @@ "HEI, TUO NÄYTTÄISI YHDELTÄ ILMALAIVAN KIINNITYSNARULTA!" ], "sksp0150": [ - "VARO SAMMAKKOA KUN SE ON LATAUTUNUT!" + "VARO SAMMAKKOA, KUN SE ON LATAUTUNUT!" ], "sksp0151": [ "JUOKSE, JAK!" @@ -2461,32 +2434,32 @@ "VARO, JAK! SE ON VÄIJYTYS!" ], "sksp0153": [ - "HEI, TUON TÄYTYY OLLA SE EDELTÄJIEN ARTEFAKTI, JOTA VAANIJAT ETSIVÄT!", - "SE NÄYTTÄÄ JÄTTIMÄISEN ROBOTIN KÄDELTÄ!" + "HEI, TUON TÄYTYY OLLA SE EDELTÄJÄESINE, JOTA VAANIJAT ETSIVÄT!", + "SE NÄYTTÄÄ JÄTTIMÄISELTÄ ROBOTIN KÄDELTÄ!" ], "sksp0154": [ "TUO MUSTA TERVA NÄYTTÄÄ KUUMALTA JA VAARALLISELTA!" ], "sksp0155": [ - "AMMU LEPAKOITA NIILLÄ SUN KELTAISILLA ECO-JUTUILLA!" + "AMMU LEPAKOITA NIILLÄ KELTAISILLA ECO-JUTUILLASI!" ], "sksp0156": [ "EHKÄ VOIMME ALITTAA NUO LEPAKOT!" ], "sksp0157": [ - "SIIS NÄITKÖ SÄ TON? ENÄÄ KOLME LIITINTÄ JÄLJELLÄ!" + "NÄITKÖ SINÄ TUON? ENÄÄ KOLME KÖYTTÄ JÄLJELLÄ!" ], "sksp0158": [ "VAUTSI! ENÄÄ KAKSI KÖYTTÄ." ], "sksp0159": [ - "TUO ILMALAIVA ON IHAN HIUKSEN VARASSA! ETSITÄÄN VIIMEINEN KIINNITYSNARU!" + "TUO ILMALAIVA ON IHAN HIUKSEN VARASSA! ETSITÄÄN VIIMEINEN KÖYSI!" ], "sksp0160": [ "HEI! SIINÄ SE FLUT-FLUT ON!" ], "sksp0161": [ - "MÄ INHOAN ROTTIA! JA OLEN MELKEIN YKSI NIISTÄ." + "MINÄ INHOAN ROTTIA! JA OLEN MELKEIN YKSI NIISTÄ." ], "sksp018a": [ "SE LAISKA VILJELIJÄ ON MEILLE VOIMAKENNON VELKAA!", @@ -2502,13 +2475,13 @@ "PYSY NIIDEN EDELLÄ, NIIN MEILLÄ ON KAIKKI HYVIN!" ], "sksp0303": [ - "KERÄÄ SINISTÄ ECOA TEHOSTAAKSESI NOPEUTTASI!" + "KERÄÄ SINISTÄ ECOA LISÄTÄKSESI NOPEUTTA!" ], "sksp0304": [ - "VARO PUITA, JAK! NE HIDASTAA MEITÄ!" + "VARO PUITA, JAK! NE HIDASTAVAT MEITÄ!" ], "sksp0305": [ - "MITÄ ENEMMÄN SINISTÄ ECOA SAAMME, SITÄ NOPEAMMIN ME KULJETAAN!" + "MITÄ ENEMMÄN SINISTÄ ECOA SAAMME, SITÄ NOPEAMMIN KULJEMME!" ], "sksp0306": [ "VAROHAN NIITÄ RÄJÄHTEITÄ!" @@ -2517,7 +2490,7 @@ "VARO NOITA KOLOJA!" ], "sksp0308": [ - "EHKÄPÄ MUN KANNATTAISI AJAA!" + "EHKÄPÄ MINUN PITÄISI AJAA!" ], "sksp0309": [ "TUOSSA ON YKSI NIISTÄ VAANIJOISTA!" @@ -2526,7 +2499,7 @@ "OTA NE KIINNI, JAK!" ], "sksp0311": [ - "ME OHITETTIIN YKSI!" + "ME OHITIMME YHDEN!" ], "sksp0312": [ "ÄH, YKSI VAANIJOISTA OHITTI MEIDÄT!" @@ -2556,19 +2529,19 @@ "NE VOITTAVAT MEIDÄT PIAN SYTYTTIMEN LUO!" ], "sksp0321": [ - "ME TEHTIIN SE! ME ESTIMME NIITÄ RÄJÄYTTÄMÄSTÄ TÄTÄ SOLAA!" + "ME TEIMME SEN! ESTIMME NIITÄ RÄJÄYTTÄMÄSTÄ TÄTÄ SOLAA!" ], "sksp0327": [ - "LUULEN, ETTÄ TUO OLI VIIMEINEN PIMEÄN ECON KRISTALLI!" + "TUO TAISI OLLA VIIMEINEN PIMEÄ ECO-KRISTALLI!" ], "sksp0328": [ - "EHKÄ PYSTYT AMPUMAAN PAREMMIN, JOS TÄHTÄÄT KIIKAREILLASI." + "EHKÄ AMMUT PAREMMIN, JOS TÄHTÄÄT KIIKAREILLASI." ], "sksp0329": [ "VOI EI! LISÄÄ PIMEÄÄ ECOA!" ], "sksp0330": [ - "MUSTA TUNTUU, ETTÄ JÄTIMME PARI KRISTALLIA TUHOAMATTA." + "EN USKO, ETTÄ TUHOSIMME KAIKKIA KRISTALLEJA VIELÄ." ], "sksp0331": [ "AMMU NUO PILAREITA SYÖVÄT VAANIJAT!" @@ -2577,7 +2550,7 @@ "ÄLÄ ANNA VALOJEN SAMMUA!" ], "sksp0333": [ - "LYÖ KRISTALLIA NIIN SAAMME HIEMAN VALOA." + "LYÖ KRISTALLIA, NIIN SAAMME HIEMAN VALOA." ], "sksp0334": [ "JUOKSE! TUO KRISTALLI POSAHTAA PIAN!" @@ -2586,22 +2559,22 @@ "EEH, NE LÖYSIVÄT EDELTÄJÄROBOTIN!" ], "sksp0336": [ - "RIKO NIIDEN MUNAT ENNEN KUIN NE KUORIUTUU!" + "RIKO NIIDEN MUNAT, ENNEN KUIN NE KUORIUTUVAT!" ], "sksp0337": [ "TÄÄLLÄ ON KARMIVAA..." ], "sksp0338": [ - "NÄYTTÄÄ SILTÄ, ETTÄ HÄMÄHÄKINSEITIT HAJOAVAT KAHDEN POMPUN JÄLKEEN." + "ILMEISESTI HÄMÄHÄKINSEITIT HAJOAVAT KAHDEN POMPUN JÄLKEEN." ], "sksp0339": [ - "MÄ. INHOAN. HÄMÄHÄKKEJÄ..." + "MINÄ. INHOAN. HÄMÄHÄKKEJÄ..." ], "sksp0340": [ "VAUVAHÄMÄHÄKIT JAHTAAVAT!" ], "sksp0341": [ - "ME TAIDETAAN OLLA HÄMÄHÄKKIEN PESÄSSÄ!" + "TAIDAMME OLLA HÄMÄHÄKKIEN PESÄSSÄ!" ], "sksp0342": [ "VARO, LISÄÄ HÄMÄHÄKKEJÄ!" @@ -2613,19 +2586,19 @@ "KUINKA PÄÄSEMME SISÄLLE LINNOITUKSEEN?" ], "sksp0346": [ - "EHKÄ PUNAINEN ECO VOI PÄIHITTÄÄ TÄMÄN TYYPIN!" + "EHKÄ PUNAISELLA ECOLLA VOIMME PÄIHITTÄÄ TÄMÄN TYYPIN!" ], "sksp0347": [ - "KIEPPUHYPYLLÄ PÄÄSEMME YLI!" + "SYÖKSYHYPYLLÄ PÄÄSEMME YLI!" ], "sksp0348": [ "MEIDÄN TÄYTYY LÖYTÄÄ KEINO AVATA TÄMÄ PURKUAUKKO!" ], "sksp0349": [ - "TUO TUOLLA NÄYTTÄISI ECON KATKAISIMELTA!" + "TUO TUOLLA NÄYTTÄISI ECO-KATKAISIMELTA!" ], "sksp0350": [ - "MÄTKÄISE SITÄ KUN SEN PIIKIT OVAT PIILOSSA!" + "MÄTKÄISE SITÄ, KUN SEN PIIKIT OVAT PIILOSSA!" ], "sksp0351": [ "PAINA SITÄ NAPPIA!" @@ -2634,16 +2607,16 @@ "VIKKELÄSTI! ENNEN KUIN NE PUTOAVAT TAKAISIN ALAS!" ], "sksp0359": [ - "SUN TÄYTYY KÄYTTÄÄ PUNAISTA ECOA!" + "SINUN TÄYTYY KÄYTTÄÄ PUNAISTA ECOA!" ], "sksp0360": [ - "NO NIIN! ME AVATTIIN KAIKKI SULJETUT KELTAISEN ECON AUKOT!" + "NO NIIN! AVASIMME KAIKKI SULJETUT KELTAISEN ECON AUKOT!" ], "sksp0362": [ - "KATSOS! SYVÄJÄÄDYTETTY VOIMAKENNO!" + "KATSO! SYVÄJÄÄTYNYT VOIMAKENNO!" ], "sksp0363": [ - "VAIN FLUT-FLUTTI PYSTYY HYPPÄÄMÄÄN NOIN KORKEALLE!" + "VAIN FLUT-FLUT PYSTYY HYPPÄÄMÄÄN NOIN PITKÄLLE!" ], "sksp0364": [ "NOPEASTI NYT, TAI ME PAAHDUTAAN!" @@ -2655,25 +2628,25 @@ "VÄISTELE TAI AMMU NOITA MIINOJA, JAK!" ], "sksp0367": [ - "YRITÄ LÖYTÄÄ TIE NOIDEN PIMEIDEN ECO-TYNNYRIEN HALKI!" + "PUJOTTELE NOIDEN PIMEIDEN ECO-TYNNYRIEN HALKI!" ], "sksp0368": [ - "JATKA OSUMISTA NOIHIN VIILENNYSPALLOIHIN!" + "JATKA VIILENNYSPALLOIHIN OSUMISTA!" ], "sksp0369": [ - "ME KUUMENNUTAAN LIIKAA!" + "ME KUUMENNUMME LIIKAA!" ], "sksp0370": [ - "NYT ME MOSSAHDETAAN!" + "NYT ME RÄJÄHDÄMME!" ], "sksp0371": [ - "LENNÄ SINISEEN ECOON, JAK!" + "NAPPAA SINISTÄ ECOA, JAK!" ], "sksp0372": [ "AMMU TIESI KAIKEN LÄPI!" ], "sksp0373": [ - "JIHUU! SIINÄPÄS OLI KYYTI!" + "JIHUU! OLIPAS SIINÄ KYYTI!" ], "sksp0374": [ "JES! KÄÄNNY JA PALA, BEIBI!" @@ -2682,25 +2655,25 @@ "AMMU NOITA VOIMAKUULIA AVATAKSESI OVEN!" ], "sksp0376": [ - "AMMU NIITÄ VOIMAKUULIA ENNEN KUIN ME PAISTUMME ELÄVÄLTÄ!" + "AMMU NIITÄ VOIMAKUULIA, ENNEN KUIN PAISTUMME ELÄVÄLTÄ!" ], "sksp0378": [ - "OVI ON AUKI, ANNETAAN MENNÄ!" + "OVI ON AUKI, JATKETAAN MATKAA!" ], "sksp0379": [ "NYT ZOOMATAAN!" ], "sksp0380": [ - "ME PÄÄSTIIN LÄPI!" + "ME PÄÄSIMME LÄPI!" ], "sksp0381": [ - "TUHOA GENERAATTORI NIIN VAPAUTAT TIETÄJÄN!" + "TUHOA GENERAATTORI, NIIN VAPAUTAMME TIETÄJÄN!" ], "sksp0382": [ - "ROIKU VAAN SIINÄ REUNALLA!" + "ROIKU VAIN SIINÄ REUNALLA!" ], "sksp0383": [ - "ME SAIMME SEURAA, JAK! LÄJITTÄIN VAANIJOITA!" + "SAIMME SEURAA, JAK! LÄJITTÄIN VAANIJOITA!" ], "sksp0384": [ "TUHOA NUO GENERAATTORIT!" @@ -2709,7 +2682,7 @@ "PAINA NAPPIA!" ], "sksp0386": [ - "TOI ROBOTTI EI MUA PELOTA!" + "TUO ROBOTTI EI MINUA PELOTA!" ], "sksp0387": [ "KIIVETÄÄN YLÖS NOITA ALUSTOJA!" @@ -2724,7 +2697,7 @@ "MEIDÄN TÄYTYY PELASTAA KAIKKI TIETÄJÄT!" ], "sksp0391": [ - "USKOTHAN SÄ ETTÄ GOL VOI VIELÄ MUUTAA MUT TAKAISIN?" + "USKOTKO, ETTÄ GOL VIELÄ MUUTTAISI MINUT TAKAISIN?" ], "sksp0392": [ "TÄMÄ SIIS ON GOLIN JA MAIAN LINNOITUS. IHAN MUKAVA JA KODIKAS." @@ -2733,7 +2706,7 @@ "LASKEUDU SEURAAVALLE LAUKAISIMELLE!" ], "sksp0394": [ - "NAPPAA TUO KELTAINEN ECO!" + "NAPPAA TUOTA KELTAISTA ECOA!" ], "sksp0395": [ "AMMU SITÄ ROBOTTIA, JAK!" @@ -2760,7 +2733,7 @@ "OTA PUNAISTA ECOA!" ], "sksp0403": [ - "MULLA ON PAHA TUNNE TÄSTÄ!" + "MINULLA ON PAHA TUNNE TÄSTÄ!" ], "sksp0404": [ "KÄYTÄ LAUKAISINTA, NOPEASTI NYT!" @@ -2787,7 +2760,7 @@ "HYPPÄÄ VÄISTÄÄKSESI RÄJÄHDYKSIÄ!" ], "sksp0412": [ - "NYT ME HOIDETAAN HOMMA!" + "NYT HOIDAMME HOMMAN!" ], "sksp0413": [ "HYVIN AMMUTTU, KAMU!" @@ -2799,7 +2772,7 @@ "SIELTÄ SE TULEE!" ], "sksp0416": [ - "JEEH! SÄ TEIT SEN!" + "JEEH! SINÄ TEIT SEN!" ], "sksp0417": [ "SANOKAA HYVÄT YÖT, GOL JA MAIA!" @@ -2808,28 +2781,28 @@ "MÄTKÄISE LUUT KUMOON!" ], "sksp0443": [ - "ISKE NOITA TOLPPIA YLÖSPÄIN NIIDEN ALAPUOLELTA!" + "ISKE NOITA TOLPPIA YLÖS NIIDEN ALAPUOLELTA!" ], "sksp0444": [ - "ME ODOTELLAAN. HALOO?" + "TÄÄLLÄ ODOTELLAAN. HALOO?" ], "sksp0449": [ - "PAINA START -NÄPPÄINTÄ ALOITTAAKSESI PELIN." + "PELAA PAINAMALLA START-NÄPPÄINTÄ." ], "sksp0450": [ - "SÄ HALUAT LOPETTAA PELAAMISEN?" + "VAI HALUAT LOPETTAA PELAAMISEN?" ], "sksp0451": [ "ENPÄ USKONUTKAAN." ], "sksp0452": [ - "OKEI, NÄHDÄÄN MYÖHEMMIN." + "SELVÄ, NÄHDÄÄN MYÖHEMMIN." ], "sksp0455": [ - "KEITÄ NÄMÄ KAIKKI IHMISET OIKEIN OVAT?" + "KEITÄ NÄMÄ KAIKKI IHMISET OVAT?" ], "sksp0466": [ - "MÄ OLIN HYVÄ. VAI MITÄ, TYTÖT?" + "MINÄ OLIN HYVÄ. VAI MITÄ, TYTÖT?" ], "sksp0b42": [ "ÄLÄ ANNA KELTAISTEN KALOJEN LIVAHTAA, NE PAINAVAT VIISI KILOA VONKALEELTA.", diff --git a/game/assets/jak1/subtitle/subtitle_lines_sv-SE.json b/game/assets/jak1/subtitle/subtitle_lines_sv-SE.json index 9fad926c6b..4512d747d6 100644 --- a/game/assets/jak1/subtitle/subtitle_lines_sv-SE.json +++ b/game/assets/jak1/subtitle/subtitle_lines_sv-SE.json @@ -46,7 +46,7 @@ "VISMÄNNEN HAR BLIVIT KIDNAPPADE,", "GOL OCH MAIA HAR SAMLAT IHOP TILLRÄCKLIGT MED ECO", "FÖR ATT KUNNA GENOMFÖRA SIN HEMSKA PLAN,", - "OCH FÖR ATT KUNNA STOPPA DEM, SÅ MÅSTE NI", + "OCH FÖR ATT KUNNA STOPPA DOM, SÅ MÅSTE NI", "SLÅ ER FRAM HELA VÄGEN GENOM DERAS CITADELL!", "EH... JA. SÅ KAN MAN, EH... NOG SAMMANFATTA DET HELA.", "NI MÅSTE RÄDDA MIN FAR INNAN DET ÄR FÖR SENT!", @@ -323,7 +323,7 @@ ], "explorer-resolution": [ "JAG SER ATT NI TVÅ ÄR TILLBAKA FÖR ATT GENOMFÖRA BYTET. BRA, BRA, MYCKET BRA!", - "ÄH, DU HAR MED DIG ÖH, DOM PRECURSOR-KULOR VI KOM ÖVERENS OM?", + "ÄH, NI HAR MED ER ÖH, DOM PRECURSOR-KULOR VI KOM ÖVERENS OM?", "JAG HOPPAS ATT DU FÅR ANVÄNDNING AV DEN HÄR SURT FÖRVÄRVADE KRAFTCELLEN.", "TACK SÅ MYCKET, GODDAG, ADJÖ!" ], @@ -2242,7 +2242,7 @@ ], "sksp0079": [ "AH! JAG KOMMER ATT DÖ! JAG KOMMER, FARFAR!", - "DU MÅSTE FÅ DEN HÄR SAKEN ÖVER TILL ANDRA SIDAN INNAN DEN BLIR ÖVERHETTAD!" + "NI MÅSTE FÅ DEN HÄR SAKEN ÖVER TILL ANDRA SIDAN INNAN DEN BLIR ÖVERHETTAD!" ], "sksp0080": [ "ANVÄND KURVAN FÖR ATT KUNNA STYRA BÄTTRE!" diff --git a/game/assets/jak1/subtitle/subtitle_meta_fi-FI.json b/game/assets/jak1/subtitle/subtitle_meta_fi-FI.json index d290ff23ee..a24b6310ec 100644 --- a/game/assets/jak1/subtitle/subtitle_meta_fi-FI.json +++ b/game/assets/jak1/subtitle/subtitle_meta_fi-FI.json @@ -1,4 +1,4213 @@ { - "cutscenes": {}, - "hints": {} + "cutscenes": { + "assistant-firecanyon-resolution": [ + { + "clear": false, + "frame_start": 25, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 140, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 143, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 180, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 296, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 343, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 346, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 458, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 462, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 546, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 552, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 636, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 639, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 696, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 792, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 795, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 870, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 956, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 962, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1140, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1146, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1222, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1228, + "offscreen": false, + "speaker": "KEIRA" + } + ], + "assistant-introduction-blue-eco-switch": [ + { + "clear": false, + "frame_start": 23, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 175, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 193, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 308, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 312, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 430, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 505, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 648, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 739, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 742, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 842, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 945, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 954, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1052, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1138, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1246, + "offscreen": false, + "speaker": "" + } + ], + "assistant-introduction-race-bike": [ + { + "clear": false, + "frame_start": 9, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 63, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 126, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 245, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 308, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 312, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 382, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 508, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 598, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 665, + "offscreen": false, + "speaker": "" + } + ], + "assistant-lavatube-end-resolution": [ + { + "clear": false, + "frame_start": 58, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 143, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 147, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 227, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 318, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 447, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 450, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 503, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 591, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 644, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 786, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 876, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 888, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1011, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1014, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1112, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1158, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1191, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1200, + "offscreen": false, + "speaker": "DAXTER" + } + ], + "assistant-lavatube-start-resolution": [ + { + "clear": false, + "frame_start": 0, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 48, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 157, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 227, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 230, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 285, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 288, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 400, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 457, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 463, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 590, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 617, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 663, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 672, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 784, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 790, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 885, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 895, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 987, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1060, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1184, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1187, + "offscreen": false, + "speaker": "KEIRA" + } + ], + "billy-accept": [ + { + "clear": false, + "frame_start": 5, + "offscreen": false, + "speaker": "BILLY" + }, + { + "clear": false, + "frame_start": 109, + "offscreen": false, + "speaker": "BILLY" + } + ], + "bird-lady-introduction": [ + { + "clear": false, + "frame_start": 125, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 245, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 251, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 328, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 331, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 454, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 457, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": false, + "frame_start": 579, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 648, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 654, + "offscreen": true, + "speaker": "BIRDWATCHER" + }, + { + "clear": false, + "frame_start": 794, + "offscreen": true, + "speaker": "BIRDWATCHER" + }, + { + "clear": false, + "frame_start": 854, + "offscreen": true, + "speaker": "BIRDWATCHER" + }, + { + "clear": false, + "frame_start": 946, + "offscreen": true, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 1041, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1044, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 1198, + "offscreen": false, + "speaker": "" + } + ], + "bird-lady-reminder-2": [ + { + "clear": false, + "frame_start": 58, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 170, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 174, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": true, + "frame_start": 313, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 316, + "offscreen": false, + "speaker": "BIRDWATCHER" + }, + { + "clear": false, + "frame_start": 405, + "offscreen": false, + "speaker": "BIRDWATCHER" + } + ], + "bluesage-resolution": [ + { + "clear": false, + "frame_start": 63, + "offscreen": false, + "speaker": "BLUE SAGE" + }, + { + "clear": true, + "frame_start": 162, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 165, + "offscreen": false, + "speaker": "BLUE SAGE" + }, + { + "clear": false, + "frame_start": 253, + "offscreen": false, + "speaker": "BLUE SAGE" + }, + { + "clear": true, + "frame_start": 420, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 430, + "offscreen": false, + "speaker": "BLUE SAGE" + }, + { + "clear": false, + "frame_start": 563, + "offscreen": false, + "speaker": "BLUE SAGE" + }, + { + "clear": true, + "frame_start": 666, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 672, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 879, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 894, + "offscreen": true, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 980, + "offscreen": false, + "speaker": "" + } + ], + "farmer-introduction": [ + { + "clear": false, + "frame_start": 1, + "offscreen": false, + "speaker": "FARMER" + }, + { + "clear": false, + "frame_start": 113, + "offscreen": false, + "speaker": "FARMER" + }, + { + "clear": false, + "frame_start": 257, + "offscreen": false, + "speaker": "FARMER" + }, + { + "clear": false, + "frame_start": 372, + "offscreen": false, + "speaker": "FARMER" + }, + { + "clear": true, + "frame_start": 454, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 456, + "offscreen": false, + "speaker": "FARMER" + } + ], + "fisher-introduction": [ + { + "clear": false, + "frame_start": 0, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 47, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 100, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 103, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 226, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 229, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 290, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 293, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 419, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 425, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 515, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 521, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 569, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 572, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 665, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 671, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": false, + "frame_start": 719, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 808, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 814, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 955, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 961, + "offscreen": false, + "speaker": "FISHERMAN" + } + ], + "fisher-resolution": [ + { + "clear": false, + "frame_start": 0, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 115, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 120, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": true, + "frame_start": 185, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 199, + "offscreen": false, + "speaker": "FISHERMAN" + }, + { + "clear": false, + "frame_start": 277, + "offscreen": false, + "speaker": "FISHERMAN" + } + ], + "geologist-introduction": [ + { + "clear": false, + "frame_start": 27, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": false, + "frame_start": 98, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 198, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 203, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 276, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 323, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 326, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 392, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 402, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": false, + "frame_start": 470, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 557, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 566, + "offscreen": true, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 682, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 685, + "offscreen": true, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 808, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 822, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": false, + "frame_start": 890, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 945, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 955, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 1028, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1035, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1150, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1163, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 1232, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": false, + "frame_start": 1342, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": false, + "frame_start": 1460, + "offscreen": false, + "speaker": "GEOLOGIST" + }, + { + "clear": true, + "frame_start": 1506, + "offscreen": false, + "speaker": "" + } + ], + "green-sagecage-resolution": [ + { + "clear": false, + "frame_start": 35, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 158, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 282, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 402, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 405, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 460, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 576, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 702, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 705, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 823, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 983, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1108, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1161, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1238, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "mayor-resolution-donation": [ + { + "clear": false, + "frame_start": 28, + "offscreen": false, + "speaker": "MAYOR" + }, + { + "clear": false, + "frame_start": 150, + "offscreen": false, + "speaker": "MAYOR" + }, + { + "clear": true, + "frame_start": 219, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 224, + "offscreen": false, + "speaker": "MAYOR" + }, + { + "clear": false, + "frame_start": 365, + "offscreen": false, + "speaker": "MAYOR" + } + ], + "sage-bluehut-introduction-crop-dusting": [ + { + "clear": false, + "frame_start": 3, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 144, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 152, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 220, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 357, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 360, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 440, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 591, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 597, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 720, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 787, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 896, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 948, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 951, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1168, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1195, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1254, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1310, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "sage-intro-sequence-a": [ + { + "clear": false, + "frame_start": 24, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 120, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 255, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 260, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 324, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 451, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 454, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 578, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 581, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 708, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 720, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 818, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 955, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 1064, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1087, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 1165, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 1297, + "offscreen": true, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 1444, + "offscreen": true, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 1536, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1542, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1677, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1683, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1872, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1955, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 2080, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 2141, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2145, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 2281, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 2440, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 2488, + "offscreen": false, + "speaker": "DAXTER" + } + ], + "sage-intro-sequence-d1": [ + { + "clear": false, + "frame_start": 137, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 220, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 283, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 383, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 515, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 550, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 579, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 692, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 793, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 863, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 920, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 960, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1079, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1186, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 1220, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1329, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1431, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1493, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1496, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1639, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1718, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1831, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1934, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "sage-intro-sequence-d2": [ + { + "clear": false, + "frame_start": 3, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 114, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 224, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 270, + "offscreen": false, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 393, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 396, + "offscreen": false, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 512, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 515, + "offscreen": false, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 608, + "offscreen": false, + "speaker": "???" + }, + { + "clear": false, + "frame_start": 656, + "offscreen": false, + "speaker": "???" + }, + { + "clear": true, + "frame_start": 696, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 699, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 780, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 857, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 910, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1049, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1133, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1243, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1246, + "offscreen": true, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1355, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1435, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1529, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1532, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1582, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1685, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1689, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1805, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1872, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1878, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 1993, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 2069, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2072, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 2189, + "offscreen": false, + "speaker": "" + } + ], + "sage-introduction-misty-cannon": [ + { + "clear": false, + "frame_start": 24, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 136, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 258, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 261, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 387, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 393, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 525, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 528, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 628, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 720, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 788, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 807, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 906, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1018, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1171, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1177, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1232, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1235, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1340, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "sage-reminder-1-generic": [ + { + "clear": false, + "frame_start": 54, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 178, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 181, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 259, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "sage-reminder-1-misty-cannon": [ + { + "clear": false, + "frame_start": 24, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 86, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 215, + "offscreen": true, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 317, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 320, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 409, + "offscreen": false, + "speaker": "SAMOS" + } + ], + "sage-reminder-2-generic": [ + { + "clear": false, + "frame_start": 27, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 137, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 215, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 320, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 323, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 455, + "offscreen": false, + "speaker": "" + } + ], + "sage-village3-introduction": [ + { + "clear": false, + "frame_start": 6, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 153, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 183, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 321, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 321, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 418, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 441, + "offscreen": false, + "speaker": "OLD MAN" + }, + { + "clear": true, + "frame_start": 500, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 528, + "offscreen": false, + "speaker": "OLD MAN" + }, + { + "clear": false, + "frame_start": 618, + "offscreen": false, + "speaker": "OLD MAN" + }, + { + "clear": false, + "frame_start": 672, + "offscreen": false, + "speaker": "WOMAN" + }, + { + "clear": true, + "frame_start": 800, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 805, + "offscreen": false, + "speaker": "WOMAN" + }, + { + "clear": true, + "frame_start": 860, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 884, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 965, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 969, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1060, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1180, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1265, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1282, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1372, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": false, + "frame_start": 1516, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": false, + "frame_start": 1680, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": true, + "frame_start": 1813, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1828, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": true, + "frame_start": 1990, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1996, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": true, + "frame_start": 2212, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2223, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 2357, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": false, + "frame_start": 2452, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": true, + "frame_start": 2508, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2520, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": false, + "frame_start": 2648, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": false, + "frame_start": 2715, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 2758, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2768, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": false, + "frame_start": 2841, + "offscreen": false, + "speaker": "GOL" + }, + { + "clear": true, + "frame_start": 3028, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3034, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 3128, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": false, + "frame_start": 3210, + "offscreen": false, + "speaker": "MAIA" + }, + { + "clear": true, + "frame_start": 3300, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3303, + "offscreen": true, + "speaker": "MAIA" + }, + { + "clear": true, + "frame_start": 3460, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3495, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 3538, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3541, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 3586, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3595, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 3690, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 3772, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3785, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 3822, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3828, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 3897, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3903, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 4080, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 4189, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 4192, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 4316, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 4324, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 4398, + "offscreen": false, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 4460, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 4464, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 4545, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 4664, + "offscreen": false, + "speaker": "" + } + ], + "sage-village3-introduction-dark-eco": [ + { + "clear": false, + "frame_start": 7, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 60, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 66, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 179, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 185, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 284, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 296, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 453, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 562, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 568, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 634, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 637, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 752, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 761, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 820, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 896, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 907, + "offscreen": false, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 950, + "offscreen": false, + "speaker": "" + } + ], + "sculptor-introduction": [ + { + "clear": false, + "frame_start": 30, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 154, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 161, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 282, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 285, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 334, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 343, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 424, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 428, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": false, + "frame_start": 518, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 622, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 631, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 751, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 757, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 915, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 918, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 1085, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1089, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 1182, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1191, + "offscreen": true, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 1278, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1281, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 1370, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1376, + "offscreen": false, + "speaker": "SCULPTOR" + }, + { + "clear": true, + "frame_start": 1436, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1464, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1634, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1643, + "offscreen": false, + "speaker": "DAXTER" + } + ], + "warrior-introduction": [ + { + "clear": false, + "frame_start": 24, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 128, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 137, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 212, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 264, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 337, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 402, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 594, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 760, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 928, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 1033, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1044, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 1172, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1178, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 1255, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 1303, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1310, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 1395, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 1515, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 1640, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1669, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 1868, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 2030, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2040, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 2200, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2222, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 2330, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2360, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 2454, + "offscreen": true, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 2561, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2566, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 2719, + "offscreen": false, + "speaker": "DAXTER" + }, + { + "clear": true, + "frame_start": 2766, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2770, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 2880, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 2943, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 2949, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": false, + "frame_start": 3036, + "offscreen": false, + "speaker": "WARRIOR" + }, + { + "clear": true, + "frame_start": 3173, + "offscreen": false, + "speaker": "" + }, + { + "clear": false, + "frame_start": 3197, + "offscreen": false, + "speaker": "WARRIOR" + } + ] + }, + "hints": { + "ASSTLP24": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + } + ] + }, + "ASSTLP36": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + } + ] + }, + "CHI-AM02": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "MAYOR" + }, + { + "clear": false, + "frame_start": 218, + "speaker": "MAYOR" + } + ] + }, + "FIS-AM03": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "FISHERMAN" + }, + { + "clear": false, + "frame_start": 135, + "speaker": "FISHERMAN" + }, + { + "clear": false, + "frame_start": 424, + "speaker": "FISHERMAN" + } + ] + }, + "MIN-LO01": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": false, + "frame_start": 180, + "speaker": "WILLARD" + }, + { + "clear": false, + "frame_start": 360, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 505, + "speaker": "" + } + ] + }, + "MIN-LO04": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": false, + "frame_start": 220, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 435, + "speaker": "" + } + ] + }, + "MIN-LO06": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": false, + "frame_start": 220, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 435, + "speaker": "" + } + ] + }, + "MSH-AM02": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 188, + "speaker": "" + } + ] + }, + "MSH-AM04": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 385, + "speaker": "" + } + ] + }, + "MSH-AM06": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 255, + "speaker": "" + } + ] + }, + "MSH-AM09": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 400, + "speaker": "" + } + ] + }, + "MSH-AM11": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 240, + "speaker": "" + } + ] + }, + "MSH-AM12": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + } + ] + }, + "MSH-AM1A": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 135, + "speaker": "" + } + ] + }, + "MSH-AM3A": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "GORDY" + }, + { + "clear": true, + "frame_start": 161, + "speaker": "" + } + ] + }, + "MTA-AM02": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": true, + "frame_start": 266, + "speaker": "" + } + ] + }, + "MTA-AM04": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": true, + "frame_start": 346, + "speaker": "" + } + ] + }, + "MTA-AM06": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": true, + "frame_start": 408, + "speaker": "" + } + ] + }, + "MTA-AM08": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "WILLARD" + }, + { + "clear": true, + "frame_start": 366, + "speaker": "" + } + ] + }, + "SAGELP05": { + "id": "0", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 211, + "speaker": "SAMOS" + } + ] + }, + "asstv101": { + "id": "450", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 260, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 390, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 610, + "speaker": "KEIRA" + } + ] + }, + "asstv103": { + "id": "452", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 160, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 450, + "speaker": "KEIRA" + } + ] + }, + "asstva73": { + "id": "427", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 342, + "speaker": "KEIRA" + } + ] + }, + "asstvb02": { + "id": "289", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 110, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 310, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 440, + "speaker": "KEIRA" + } + ] + }, + "asstvb08": { + "id": "2b2", + "lines": [ + { + "clear": false, + "frame_start": 20, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 140, + "speaker": "KEIRA" + } + ] + }, + "asstvb09": { + "id": "24f", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 233, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 500, + "speaker": "" + } + ] + }, + "asstvb21": { + "id": "328", + "lines": [ + { + "clear": false, + "frame_start": 50, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 111, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 290, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 420, + "speaker": "KEIRA" + } + ] + }, + "asstvb23": { + "id": "604", + "lines": [ + { + "clear": false, + "frame_start": 45, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 340, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 450, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 650, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 940, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 1176, + "speaker": "KEIRA" + }, + { + "clear": true, + "frame_start": 1410, + "speaker": "" + } + ] + }, + "asstvb24": { + "id": "605", + "lines": [ + { + "clear": false, + "frame_start": 30, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 310, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 525, + "speaker": "KEIRA" + } + ] + }, + "asstvb28": { + "id": "36f", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 184, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 380, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 585, + "speaker": "KEIRA" + } + ] + }, + "asstvb40": { + "id": "900", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 115, + "speaker": "KEIRA" + } + ] + }, + "asstvb41": { + "id": "901", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 180, + "speaker": "KEIRA" + } + ] + }, + "asstvb42": { + "id": "902", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 333, + "speaker": "KEIRA" + } + ] + }, + "asstvb46": { + "id": "905", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 270, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 426, + "speaker": "KEIRA" + } + ] + }, + "asstvb48": { + "id": "907", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 104, + "speaker": "KEIRA" + }, + { + "clear": false, + "frame_start": 253, + "speaker": "KEIRA" + } + ] + }, + "sagevb01": { + "id": "288", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 352, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 493, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 712, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 884, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1116, + "speaker": "SAMOS" + } + ] + }, + "sagevb02": { + "id": "28a", + "lines": [ + { + "clear": false, + "frame_start": 6, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 390, + "speaker": "" + }, + { + "clear": false, + "frame_start": 411, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 555, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 710, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 863, + "speaker": "" + }, + { + "clear": false, + "frame_start": 879, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1065, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1188, + "speaker": "SAMOS" + } + ] + }, + "sagevb03": { + "id": "36a", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 130, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 420, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 613, + "speaker": "SAMOS" + } + ] + }, + "sagevb04": { + "id": "36b", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 240, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 475, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 685, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 868, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1020, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1039, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 1205, + "speaker": "SAMOS" + }, + { + "clear": true, + "frame_start": 1430, + "speaker": "" + }, + { + "clear": false, + "frame_start": 1449, + "speaker": "SAMOS" + } + ] + }, + "sagevb22": { + "id": "909", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 291, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 503, + "speaker": "SAMOS" + } + ] + }, + "sagevb24": { + "id": "90b", + "lines": [ + { + "clear": false, + "frame_start": 3, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 169, + "speaker": "SAMOS" + } + ] + }, + "sagevb25": { + "id": "90c", + "lines": [ + { + "clear": false, + "frame_start": 3, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 250, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 580, + "speaker": "SAMOS" + } + ] + }, + "sagevb36": { + "id": "917", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 215, + "speaker": "SAMOS" + }, + { + "clear": false, + "frame_start": 418, + "speaker": "SAMOS" + } + ] + }, + "sksp0005": { + "id": "284", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 167, + "speaker": "DAXTER" + } + ] + }, + "sksp0007": { + "id": "286", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 148, + "speaker": "DAXTER" + } + ] + }, + "sksp0008": { + "id": "287", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 188, + "speaker": "DAXTER" + } + ] + }, + "sksp0009": { + "id": "251", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 98, + "speaker": "DAXTER" + } + ] + }, + "sksp0013": { + "id": "232", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 325, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 475, + "speaker": "DAXTER" + } + ] + }, + "sksp0017": { + "id": "235", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + } + ] + }, + "sksp0018": { + "id": "25e", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 133, + "speaker": "DAXTER" + } + ] + }, + "sksp0026": { + "id": "237", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 202, + "speaker": "DAXTER" + } + ] + }, + "sksp0027": { + "id": "274", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 136, + "speaker": "DAXTER" + } + ] + }, + "sksp0029": { + "id": "275", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 143, + "speaker": "DAXTER" + } + ] + }, + "sksp0035": { + "id": "25c", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 243, + "speaker": "DAXTER" + } + ] + }, + "sksp0037": { + "id": "25f", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 219, + "speaker": "DAXTER" + } + ] + }, + "sksp0038": { + "id": "23c", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 282, + "speaker": "DAXTER" + } + ] + }, + "sksp0039": { + "id": "25b", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 202, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 401, + "speaker": "DAXTER" + } + ] + }, + "sksp0043": { + "id": "24e", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 101, + "speaker": "DAXTER" + } + ] + }, + "sksp0059": { + "id": "26e", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 124, + "speaker": "DAXTER" + } + ] + }, + "sksp0060": { + "id": "26f", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 170, + "speaker": "DAXTER" + } + ] + }, + "sksp0063": { + "id": "27f", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 343, + "speaker": "DAXTER" + } + ] + }, + "sksp0079": { + "id": "504", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + }, + { + "clear": false, + "frame_start": 269, + "speaker": "DAXTER" + } + ] + }, + "sksp0145": { + "id": "359", + "lines": [ + { + "clear": false, + "frame_start": 0, + "speaker": "DAXTER" + } + ] + } + } } diff --git a/game/assets/jak1/text/game_base_text_fi-FI.json b/game/assets/jak1/text/game_base_text_fi-FI.json index faba814149..fe645c5260 100644 --- a/game/assets/jak1/text/game_base_text_fi-FI.json +++ b/game/assets/jak1/text/game_base_text_fi-FI.json @@ -6,16 +6,16 @@ "0107": "HALUATKO PELATA UUDELLEEN?", "0108": "LOPETA", "0109": "TAUKO", - "010a": "EFEKTIEN VOIMAKKUUS", - "010b": "MUSIIKIN VOIMAKKUUS", - "010c": "PUHEEN VOIMAKKUUS", + "010a": "ÄÄNITEHOSTEET", + "010b": "MUSIIKKI", + "010c": "PUHE", "010d": "KIELI", - "010e": "VÄRÄHTELYT", + "010e": "VÄRINÄTOIMINTO", "010f": "VINKIT", "0110": "KESKITÄ RUUTU", "0111": "PÄÄLLÄ", "0112": "POIS", - "0113": "KÄYTÄ D-PAD:IA", + "0113": "KÄYTÄ SUUNTANÄPPÄIMIÄ", "0114": "ENGLISH", "0115": "FRANÇAIS", "0116": "DEUTSCH", @@ -24,36 +24,36 @@ "0119": "にほんご", "011a": "PAINA VAIHTAAKSESI 90 HELMEÄ VOIMAKENNOON.", "011b": "PAINA VAIHTAAKSESI 120 HELMEÄ VOIMAKENNOON.", - "011c": "PAINA MENNÄKSESI.", - "011d": "PAINA PERUAKSESI.", + "011c": "MATKUSTA PAINAMALLA .", + "011d": "PERU PAINAMALLA .", "011e": "GEYSIRSAARI", "011f": "VIHREÄN TIETÄJÄN MÖKKI", "0120": "SINISEN TIETÄJÄN MÖKKI", "0121": "PUNAISEN TIETÄJÄN MÖKKI", "0122": "GOLIN AND MAIAN LINNOITUS", - "0123": "PAINA PUHUAKSESI SAMOSILLE", - "0124": "PAINA PUHUAKSESI KEIRALLE", + "0123": "PAINA PUHUAKSESI SAMOSILLE.", + "0124": "PAINA PUHUAKSESI KEIRALLE.", "0125": "KUVASUHDE", - "0126": "VIDEON TILA", + "0126": "VIDEOTILA", "0127": "PELIASETUKSET", "0128": "GRAFIIKKA-ASETUKSET", "0129": "ÄÄNIASETUKSET", "012a": "4X3", "012b": "16X9", - "012c": "60HZ", - "012d": "50HZ", + "012c": "60 HZ", + "012d": "50 HZ", "012e": "JAK AND DAXTER", "012f": "LÖYDÄ KÄTKETTY VOIMAKENNO", - "0130": "LIIAN VÄHÄN TILAA MUISTIKORTILLA MEMORY_CARD_(PS2, INSERTED IN MEMORY_CARD_SLOT_~D", - "0131": "EI MEMORY_CARD_(PS2, LIITETTYNÄ IN MEMORY_CARD_SLOT_~D", - "0132": "MEMORY_CARD_(PS2, PAIKASSA MEMORY_CARD_SLOT_~D ON ALUSTAMATON", - "0133": "JAK AND DAXTER VAATII ~DKB VAPAATA TILAA", - "0134": "KIINNITÄ MEMORY_CARD_(PS2, JOSSA ON TARPEEKSI TILAA, MUUTEN PELITIETOJA EI VOIDA TALLENTAA", + "0130": "EI TARPEEKSI TILAA MUISTIKORTILLA MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D", + "0131": "EI MEMORY_CARD_(PS2) LIITETTYNÄ PAIKASSA MEMORY_CARD_SLOT_~D", + "0132": "MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D ON ALUSTAMATON", + "0133": "JAK AND DAXTER VAATII ~D KT VAPAATA TILAA", + "0134": "SYÖTÄ MEMORY_CARD_(PS2), JOSSA ON TARPEEKSI TILAA, MUUTEN PELITIETOJASI EI VOIDA TALLENTAA", "0135": "ILMAN ALUSTAMISTA PELITIETOJA EI VOIDA TALLENTAA", "0136": "TALLENNETAAN TIETOJA", "0137": "LADATAAN TIETOJA", - "0138": "ÄLÄ POISTA MEMORY_CARD_(PS2, IN MEMORY_CARD_SLOT_~D TAI SAMMUTA LAITETTASI", - "0139": "HALUATKO PÄÄLLEKIRJOITTAA TÄMÄN?", + "0138": "ÄLÄ POISTA MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D TAI SAMMUTA LAITETTASI", + "0139": "HALUATKO KORVATA SEN?", "013a": "ALUSTA?", "013c": "KYLLÄ", "013d": "EI", @@ -62,7 +62,7 @@ "0140": "VALITSE TALLENNUSPAIKKA", "0141": "VALITSE LADATTAVA TALLENNUS", "0142": "JAK AND DAXTER -TALLENNUS ON JO OLEMASSA VALITSEMASSASI TIEDOSTOSSA", - "0143": "SYÖTÄ MEMORY_CARD_(PS2, JOKA SISÄLTÄÄ JAK AND DAXTER -TALLENNUSTIETOJA PAIKKAAN MEMORY_CARD_SLOT_~D", + "0143": "SYÖTÄ JAK AND DAXTER -PELITIETOJA SISÄLTÄVÄ MEMORY_CARD_(PS2) PAIKKAAN MEMORY_CARD_SLOT_~D", "0144": "JATKA?", "014b": "LATAA PELI", "014c": "TALLENNA PELI", @@ -72,29 +72,29 @@ "0150": "ASETUKSET", "0151": "VIRHE LADATTAESSA", "0152": "VIRHE TALLENTAESSA", - "0153": "VIRHE ALUSTAMISESSA", + "0153": "VIRHE ALUSTAESSA", "0154": "VIRHE LUODESSA TALLENNUSTIEDOSTOA", - "0156": "MEMORY_CARD_(PS2, PAIKASTA MEMORY_CARD_SLOT_~D POISTETTIIN", - "0157": "AUTOMAATTITALLENNUS ON POISTETTU KÄYTÖSTÄ", - "0158": "KÄYTÄ TALLENNA PELI -ASETUSTA TALLENTAAKSESI PELIN MANUAALISESTI JA UUDELLEENKÄYNNISTÄÄKSESI AUTOMAATTITALLENNUKSEN", - "0159": "JAK AND DAXTER -TALLENNUSTIETOJA EI LÖYTYNYT MEMORY_CARD_(PS2, PAIKASSA MEMORY_CARD_SLOT_~D", + "0156": "MEMORY_CARD_(PS2) PAIKASTA MEMORY_CARD_SLOT_~D POISTETTIIN", + "0157": "AUTOMAATTINEN TALLENNUS ON POISTETTU KÄYTÖSTÄ", + "0158": "TALLENNA PELISI MANUAALISESTI, NIIN AUTOMAATTINEN TALLENNUS PALAUTETAAN KÄYTTÖÖN", + "0159": "JAK AND DAXTER -TALLENNUSTIETOJA EI LÖYTYNYT KORITLTA MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D", "015a": "HALUATKO LUODA UUDEN JAK AND DAXTER -TALLENNUKSEN?", - "015b": "TARKISTA MEMORY_CARD_(PS2, PAIKASSA MEMORY_CARD_SLOT_~D", + "015b": "TARKISTA MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D", "015c": "UUSI PELI", "015d": "TAKAISIN?", "015e": "OK", "015f": "POISTU DEMOSTA", "0160": "KUN OHEINEN KUVAKE ILMESTYY, EDISTYKSESI TALLENNETAAN", - "0161": "KUN TÄMÄ KUVAKE ON RUUDULLA, ÄLÄ POISTA THE MEMORY_CARD_(PS2, TAI SAMMUTA LAITETTASI", + "0161": "KUN TÄMÄ KUVAKE ON RUUDULLA, ÄLÄ IRROTA MEMORY_CARD_(PS2) TAI SAMMUTA LAITETTASI", "0162": "TEHTÄVÄ SUORITETTU", - "0163": "TARKISTA MEMORY_CARD_(PS2, IN MEMORY_CARD_SLOT_~D JA YRITÄ UUDELLEEN", + "0163": "TARKISTA MEMORY_CARD_(PS2) PAIKASSA MEMORY_CARD_SLOT_~D JA YRITÄ UUDELLEEN", "0164": "RUUTU OTTAA NYT KÄYTTÖÖN 60HZ-TILAN", "0165": "JOS KUVA NÄKYY VIRHEELLISENÄ, TELEVISIOSI EI TUE TÄTÄ TILAA", - "0166": "JOS NÄIN KÄY, ODOTA 10 SEKUNTIA NIIN RUUTU PALAUTETAAN TAKAISIN", + "0166": "JOS NIIN KÄY, ODOTA 10 SEKUNTIA, NIIN RUUTU PALAUTUU TAKAISIN", "0167": "RUUTU ON NYT 60HZ-TILASSA", "0168": "HALUATKO PITÄÄ TÄMÄN TILAN KÄYTÖSSÄ?", - "0169": "KÄYTÄ D-PAD:IA VALITAKSESI TASON", - "016a": "LEVY ON POISTETTU", + "0169": "VALITSE TASO SUUNTANÄPPÄIMILLÄ", + "016a": "LEVY POISTETTIIN", "016b": "SYÖTÄ JAK AND DAXTER -LEVY SISÄÄN, JOTTA VOIT JATKAA PELAAMISTA", "016c": "VIRHE TIETOJEN LUKEMISESSA", "016d": "TARKISTA JAK AND DAXTER -LEVYSI JA YRITÄ UUDELLEEN", @@ -104,7 +104,7 @@ "0171": "YHTEENSÄ KERÄTTY:", "0200": "TUO 90 HELMEÄ PORMESTARILLE", "0201": "TUO 90 HELMEÄ ENOLLESI", - "0202": "PAIMENNA NAUKIT TAKAISIN AITAUKSEENSA", + "0202": "PAIMENNA NAUKIT TAKAISIN AITAUKSEEN", "0203": "PALAA VILJELIJÄN LUO", "0204": "TUO 120 HELMEÄ ORAAKKELILLE", "0205": "AVAA ECO-KERÄIMIEN TUKOKSET", @@ -117,9 +117,9 @@ "020c": "YHDISTÄ ECO-SÄTEET", "020d": "KIIPEÄ TEMPPELIN HUIPULLE", "020e": "ETSI SINISEN ECON KATKAISIN", - "020f": "PÄIHITÄ PIMEÄN ECON KASVI", + "020f": "PÄIHITÄ PIMEÄ ECO-KASVI", "0210": "NAPPAA 200 KILOA KALAA", - "0211": "OTA KIINNI VEISTÄJÄN MUUSA", + "0211": "NAPPAA KIINNI VEISTÄJÄN MUUSA", "0212": "VIE MUUSA TAKAISIN VEISTÄJÄLLE", "0213": "KIIPEÄ VAANIJAPAATTIIN", "0214": "PYSÄYTÄ KANUUNA", @@ -135,7 +135,7 @@ "021e": "VIHREÄN TIETÄJÄN MÖKKI", "021f": "KEIRAN TALLI", "0220": "SANDOVERIN KYLÄ", - "0221": "VARTIJARANTA", + "0221": "VAHTIRANTA", "0222": "KIELLETTY VIIDAKKO", "0223": "USVASAARI", "0224": "TULIKANJONI", @@ -145,14 +145,14 @@ "0228": "FLUT FLUT", "0229": "HELMIORAAKKELI", "022a": "TRANS-ALUSTA", - "022b": "VIHREÄN ECON KERÄIMET", + "022b": "VIHREÄT ECO-KERÄIMET", "022c": "EDELTÄJÄHELMI", "022d": "VOIMAKENNO", "022e": "NAPPAA PUDONNUT VOIMAKENNO", "022f": "KORJAA ECO-SÄDE", "0230": "PALAA PORMESTARIN LUO", "0262": "TUTKI RANNIKKOA", - "0263": "KIIPEÄ VARTIJAN PÄÄLLE", + "0263": "KIIPEÄ VAHDIN PÄÄLLE", "0264": "SEURAA ROTKOA MERENRANNALLE", "0265": "AVAA LUKITTU TEMPPELIN OVI", "0266": "YLLÄ VOIMAKENNOLLE ZOOMERILLA", @@ -223,7 +223,7 @@ "040e": "KIIPEÄ VALTAVAA ROBOTTIA", "040f": "TUTKI PIMEÄÄ LUOLAA", "0410": "AMMU JAUHAVAT VAANIJAT KIIKARIESI AVULLA", - "0411": "TUHOA PIMEÄN ECON KRISTALLIT", + "0411": "TUHOA PIMEÄT ECO-KRISTALLIT", "0412": "PÄIHITÄ LUOLAN LEPAKOT", "0413": "VAPAUTA 7 PARTIOKÄRPÄSTÄ", "0414": "PUNAISEN TIETÄJÄN LABRA", diff --git a/game/assets/jak1/text/game_custom_text_de-DE.json b/game/assets/jak1/text/game_custom_text_de-DE.json index 8c2e7ee330..d70b4be201 100644 --- a/game/assets/jak1/text/game_custom_text_de-DE.json +++ b/game/assets/jak1/text/game_custom_text_de-DE.json @@ -204,7 +204,7 @@ "1601": "CONTROLLER AUSWÄHLEN", "1602": "STICK DEADZONE", "1603": "IGNORIERE WENN UNFOKUSIERT", - "1604": "CONTROLLER LED FÜR LEBEN", + "1604": "CONTROLLER LED FÜR HP", "1605": "CONTROLLER LED FÜR ECO", "1606": "KAMERA VERFOLGEN", "1607": "HORIZONTALE SENSITIVITÄT", diff --git a/game/assets/jak1/text/game_custom_text_fi-FI.json b/game/assets/jak1/text/game_custom_text_fi-FI.json index 2d2e627047..32be947d32 100644 --- a/game/assets/jak1/text/game_custom_text_fi-FI.json +++ b/game/assets/jak1/text/game_custom_text_fi-FI.json @@ -2,15 +2,15 @@ "1000": "KUVAKULMA-ASETUKSET", "1001": "NORMAALI", "1002": "KÄÄNTEINEN", - "1003": "ENSIMMÄISEN PERSOONAN VAAKAKAMERA", - "1004": "ENSIMMÄISEN PERSOONAN PYSTYKAMERA", - "1005": "KOLMANNEN PERSOONAN VAAKAKAMERA", - "1006": "KOLMANNEN PERSOONAN PYSTYKAMERA", + "1003": "VAAKAOHJAUS (1. PERSOONA)", + "1004": "PYSTYOHJAUS (1. PERSOONA)", + "1005": "VAAKAOHJAUS (3. PERSOONA)", + "1006": "PYSTYOHJAUS (3. PERSOONA)", "1007": "PALAUTA OLETUKSET", "1010": "HELPPOKÄYTTÖISYYS", "1011": "EDELTÄJÄHELMIEN HEHKU", "1020": "PS2-ASETUKSET", - "1021": "PS2 LATAUSNOPEUS", + "1021": "PS2-LATAUSNOPEUS", "1022": "PARTIKKELEIDEN VÄHENNYS", "1023": "MUSIIKIN ULOS HÄIVYTYS", "1024": "MUSIIKIN SISÄÄN HÄIVYTYS", @@ -24,11 +24,11 @@ "1034": "KOKORUUTU", "1035": "RESOLUUTIO", "1036": "~D X ~D", - "1037": "PS2 KUVASUHDE", - "1038": "KUN PS2 KUVASUHDE ON KÄYTÖSSÄ, VAIN KUVASUHTEET 4X3 JA 16X9 OVAT VALITTAVISSA. JATKA?", + "1037": "PS2-KUVASUHDE", + "1038": "KUN PS2-KUVASUHDE ON KÄYTÖSSÄ, VAIN KUVASUHTEET 4X3 JA 16X9 OVAT VALITTAVISSA. JATKA?", "1039": "KUVASUHDE (PS2)", - "1040": "TEKSTITYKSET KÄYTÖSSÄ", - "1041": "TEKSTITYKSET EI KÄYTÖSSÄ", + "1040": "TEKSTITYS KÄYTÖSSÄ", + "1041": "TEKSTITYS EI KÄYTÖSSÄ", "1042": "TEKSTIN KIELI", "1043": "NÄYTTÖ", "1044": "NÄYTTÖ ~D", @@ -50,8 +50,8 @@ "1075": "ALHAINEN", "1076": "MINIMI", "1077": "PS2", - "1078": "TEKSTITYKSET", - "1079": "VINKKITEKSTITYKSET", + "1078": "TEKSTITYS", + "1079": "VINKKIEN TEKSTITYS", "1080": "HUIJAUKSET", "1081": "SALAISUUDET", "1082": "VALITSE KAPPALE", @@ -68,8 +68,8 @@ "1093": "LOPUTON KELTAINEN ECO", "1094": "VAIHTOEHTOINEN DAXTER", "1095": "HAAVOITTUMATTOMUUS", - "1096": "KAIKKI MUSIIKKIKAPPALEET", - "1097": "TODELLINEN VUOROKAUDEN AIKA", + "1096": "KAIKKI MUSIIKKITYYLIT", + "1097": "TODELLINEN VUOROKAUDENAIKA", "1098": "LÄPÄISE PELI 100%", "1099": "LÄPÄISE PELI", "1100": "KELTAINEN TIETÄJÄ", @@ -96,17 +96,17 @@ "1500": "SPEEDRUN-TILA", "138": "ÄLÄ LISÄÄ TAI POISTA MITÄÄN OHEISLAITTEITA, SAMMUTA LAITETTASI TAI SAMMUTA PELIÄ", "161": "KUN TÄMÄ KUVAKE ON RUUDULLA, ÄLÄ LISÄÄ TAI POISTA MITÄÄN OHEISLAITTEITA, SAMMUTA LAITETTASI TAI SAMMUTA PELIÄ", - "100c": "AUTO-TALLENNUS POIS PÄÄLTÄ", - "100d": "HALUATKO VARMASTI LOPETTAA AUTO-TALLENTAMISEN?", - "100e": "LOPETA AUTO-TALLENNUS", + "100c": "AUTOM. TALLENNUS POIS", + "100d": "HALUATKO VARMASTI LOPETTAA AUTOMAATTISEN TALLENNUKSEN?", + "100e": "LOPETA AUTOM. TALLENNUS", "100f": "SEKALAISET", "103a": "SOVITA RUUTUUN", "103b": "PYSTYTAHDISTUS", "103c": "4X3 (PS2)", "103d": "16X9 (PS2)", "103e": "~DX~D", - "103f": "OTA TEKSTITYKSET KÄYTTÖÖN PAINAMALLA ", - "107a": "TEKSTITYSTEN KIELI", + "103f": "OTA TEKSTITYS KÄYTTÖÖN PAINAMALLA ", + "107a": "TEKSTITYKSEN KIELI", "107b": "NÄYTÄ PUHUJA TEKSTITYKSISSÄ", "107c": "AINA", "107d": "EI KOSKAAN", @@ -120,7 +120,7 @@ "109f": "KÄÄNTEINEN MAAILMA", "10a0": "SUURIPÄINEN JAK", "10c0": "MUSIIKKISOITIN", - "10c1": "VÄLIANIMAATIO-SOITIN", + "10c1": "VÄLINÄYTÖSSSOITIN", "10c2": "TOISTA LOPPUTEKSTIT", "10c3": "LEIKEKIRJA", "10d0": "OLETUS", @@ -160,7 +160,7 @@ "10f2": "SOLAN LOPPUOSA", "10f3": "HÄMÄHÄKKILUOLAAN", "10f4": "LUMIVUORILLE", - "10f5": "KAIVOSMIEHET", + "10f5": "MAINARIT", "10f6": "ROBOTTILUOLAN TELINEET", "10f7": "EDELTÄJÄROBOTIN HUIPPU", "10f8": "PÄÄLUOLA", @@ -171,10 +171,10 @@ "10fd": "LUMIPALLOT", "10fe": "TUNNELIN KESKIOSA", "10ff": "TUNNELIN LOPPU", - "1501": "OHITA VÄLIANIMAATIOT", + "1501": "VÄLINÄYTÖSTEN OHITUKSET", "1502": "VALITSE TARKISTUSPISTE", "1503": "SPEEDRUN-ASETUKSET", - "1504": "VAROITUS: NÄMÄ ASETUKSET AUTOMAATTITALLENTAVAT ENSIMMÄISEEN TALLENNUSPAIKKAAN!", + "1504": "VAROITUS: NÄMÄ ASETUKSET TALLENTAVAT AUTOMAATTISESTI ENSIMMÄISEEN TALLENNUSPAIKKAAN!", "1505": "ALOITA SPEEDRUN UUDELLEEN", "1506": "UUSI TÄYDEN PELIN SPEEDRUN", "150e": "UUSI YKSITTÄISEN TASON SPEEDRUN", @@ -199,16 +199,16 @@ "1521": "HUBI 1 100%", "1522": "HUBI 2 100%", "1523": "HUBI 3 100%", - "1524": "KAIKKI VÄLIANIMAATIOT", + "1524": "KAIKKI VÄLINÄYTÖKSET", "1600": "OHJAUSSYÖTTEEN ASETUKSET", "1601": "VALITSE OHJAIN", "1602": "ANALOGISAUVAN KATVEALUE", - "1603": "ÄLÄ HUOMIOI, JOS IKKUNA EI AKTIIVINEN", + "1603": "ÄLÄ HUOMIOI TYÖPÖYDÄLLÄ", "1604": "OHJAIMEN LED TERVEYDELLE", "1605": "OHJAIMEN LED ECO-VOIMILLE", "1606": "KAMERAN OHJAUS HIIRELLÄ", - "1607": "VAAKASUUNTAINEN HERKKYYS", - "1608": "PYSTYSUUNTAINEN HERKKYYS", + "1607": "HERKKYYS (VAAKASUUNTA)", + "1608": "HERKKYYS (PYSTYSUUNTA)", "1609": "PELAAJAN OHJAUS HIIRELLÄ", "160a": "PELIOHJAIMEN KYTKENNÄT", "160b": "NÄPPÄIMISTÖN KYTKENNÄT", @@ -220,8 +220,8 @@ "1611": "MUUTA KYTKENTÖJÄ", "1612": "OHJAIN ~D", "1613": "PIILOTA OSOITIN AUTOMAATTISESTI", - "1614": "MÄÄRITTÄMÄTÖN", + "1614": "TYHJÄ", "1615": "TUNTEMATON", - "1616": "MUITA ASETUKSIA RUUDUN KOOLLE EI SAATAVISSA", + "1616": "MUITA KUVASUHTEITA EI OLE SAATAVILLA", "1617": "OHJAIMEN LED LÄMPÖMITTARILLE" } diff --git a/game/assets/jak1/text/game_custom_text_ja-JP.json b/game/assets/jak1/text/game_custom_text_ja-JP.json index 5bf220ec39..6660ebb149 100644 --- a/game/assets/jak1/text/game_custom_text_ja-JP.json +++ b/game/assets/jak1/text/game_custom_text_ja-JP.json @@ -16,59 +16,59 @@ "1024": "ミュージック ゲイン", "1025": "アクター カリング", "1026": "バックグラウンド カリング", - "1027": "かんきょう マッピングを きょうせいする", + "1027": "??マッピングを???に?行", "1030": "DISCORDリッチプレゼンス", "1031": "スクリーンモード", "1032": "ウィンドウ", "1033": "ボーダレス", "1034": "フルスクリーン", - "1035": "かいぞうど", + "1035": "?像?", "1036": "~D X ~D", - "1037": "PS2 アスペクト ひ", - "1038": "PS2アスペクトひが ゆうこうになると、4X3と16X9しか せんたくできません ぞっこうしますか?", - "1039": "アスペクト ひ (PS2)", - "1040": "じまくあり", - "1041": "じまくなし", - "1042": "テキストのことば", - "1043": "ディスプレー", - "1044": "ディスプレー ~D", + "1037": "PS2 アスペクト?", + "1038": "PS2アスペクト?が??になると、4?3と16?9しかのアスペクト?が??できません.?行しますか?", + "1039": "アスペクト? (PS2)", + "1040": "??あり", + "1041": "??なし", + "1042": "テキスト??", + "1043": "ディスプレイ", + "1044": "ディスプレイ ~D", "1050": "MSAA", "1051": "~DX", "1052": "2X", "1053": "4X", "1054": "8X", "1055": "16X", - "1060": "フレームレート (じっけんてき)", + "1060": "フレームレート (???)", "1061": "60", "1062": "100", "1063": "150", "1070": "LEVEL OF DETAIL (はいけい)", "1071": "LEVEL OF DETAIL (ぜんけい)", - "1072": "さいこう", - "1073": "たかい", - "1074": "ふつう", - "1075": "ひくい", - "1076": "さいてい", + "1072": "??", + "1073": "?", + "1074": "中", + "1075": "?", + "1076": "??", "1077": "PS2", - "1078": "じまく", - "1079": "ヒントじまく", + "1078": "??", + "1079": "ヒント??", "1080": "チート", "1081": "シークレット", - "1082": "きょくをせんたくする", - "1083": "スタイルをせんたくする", + "1082": "?を??する", + "1083": "スタイルを??する", "1084": "チューンドプリカーソルロボット", "1085": "スタッフロール", "1086": "?????", "1087": "ハイブリッドラーカー クロウ", "1088": "サカナとりゲームのテーマ", "1089": "チャレンジーのテーマ", - "1090": "むげんの青のエコ", - "1091": "むげんの赤のエコ", - "1092": "むげんの緑のエコ", - "1093": "むげんの黄のエコ", - "1094": "へんかのダクスター", - "1095": "むてき", - "1096": "すべてBGMのへんか", + "1090": "??の青のエコ", + "1091": "??の赤のエコ", + "1092": "??の緑のエコ", + "1093": "??の黄のエコ", + "1094": "?わりのダクスター", + "1095": "??", + "1096": "???トラック", "1097": "リアルタイムオブデイ", "1098": "100%クリア", "1099": "ゲームクリア", @@ -76,8 +76,8 @@ "1101": "赤の賢者", "1102": "青の賢者", "1103": "城のハブ", - "1104": "プリカーソルロボットの中かん", - "1105": "プリカーソルロボットのけつまつ", + "1104": "プリカーソルロボットの中?", + "1105": "プリカーソルロボットの?わり", "1106": "スタイル 1", "1107": "スタイル 2", "1110": "ENGLISH (UK)", @@ -94,37 +94,37 @@ "111b": "POLSKI", "111c": "LIETUVIŲ KALBA", "1500": "スピードラン モード", - "138": "しゅうへんききをぬいたり, さしたり, でんげんを きったりは しないでください", - "161": "このアイコンが あらわれているあいだ、しゅうへんききをぬいたり, さしたり, でんげんを きったりは しないでください", + "138": "????をぬいたり, さしたり, ??を?ったりは しないでください", + "161": "このアイコンが あらわれている?、????をぬいたり, さしたり, ??を?ったりは しないでください", "100c": "オートセーブ オフ", - "100d": "オートセーブをきっても よろしいでしょうか?", - "100e": "DISABLE AUTO-SAVE", - "100f": "そのほか", - "103a": "FIT TO SCREEN", - "103b": "すいちょくどうき", + "100d": "オートセーブを?っても よろしいでしょうか?", + "100e": "オートセーブを??にする", + "100f": "その?", + "103a": "スクリーンに合わせる", + "103b": "????", "103c": "4X3 (PS2)", "103d": "16X9 (PS2)", "103e": "~DX~D", - "103f": " で じまくのきりかえ", - "107a": "じまくのことば", - "107b": "じまくではなしてをひょうじする", - "107c": "イツモ", + "103f": " で ??の?り?え", + "107a": "??の??", + "107b": "??にスピーカーを??", + "107c": "いつも", "107d": "いつもしなく", - "107e": "OFF-SCREEN", - "107f": "ヒントロッグ", + "107e": "オフ スクリーン", + "107f": "ヒントログ", "109a": "ビッグヘッド ジャック", "109b": "スモールヘッド ジャック", "109c": "ビッグハンドジャック", - "109d": "あたまがおおきいキャラクター", + "109d": "ビッグヘッドキャラクター", "109e": "テクスチャなしモード", - "109f": "かがみ世界", - "10a0": "でかいヘッド ジャック", - "10c0": "BGM プレイヤー", - "10c1": "SCENE PLAYER", + "109f": "??世界", + "10a0": "ビッグヘッド ジャック", + "10c0": "ミュージックプレイヤー", + "10c1": "プレイヤーを??", "10c2": "スタッフロール", "10c3": "スクラップブック", "10d0": "デフォルト", - "10d1": "みしよう", + "10d1": "???", "10d2": "セイジィ", "10d3": "セイジィの家", "10d4": "小鳥のオバチャマ", diff --git a/game/assets/jak2/subtitle/subtitle_lines_fr-FR.json b/game/assets/jak2/subtitle/subtitle_lines_fr-FR.json index 7214f43f43..af91ced625 100644 --- a/game/assets/jak2/subtitle/subtitle_lines_fr-FR.json +++ b/game/assets/jak2/subtitle/subtitle_lines_fr-FR.json @@ -1,6 +1,9 @@ { "cutscenes": {}, "other": { + "DSbop001": [ + "Tu as l'air vraiment en colère, Jak." + ], "agnt001": [ "Hé, conduisez prudemment !" ], @@ -2016,22 +2019,22 @@ "Les scanners indiquent des oeufs de Metal Heads toujours actifs." ], "daxm001": [ - "Shoot the platform, Jak." + "Vise la plateforme, Jak." ], "daxm002": [ - "We need something to get through that gate!" + "Il nous faut quelque chose pour passer ce portail !" ], "daxm003": [ - "Shoot the Metal Head when he moves his shield!" + "Tire sur le Metal Head dès qu'il bouge son bouclier !" ], "daxm004": [ - "Hit him in his stomach!" + "Vise l'estomac !" ], "daxm005": [ - "Whoa! That path dropped like uh... a rock!" + "Waouh, ce sentier plonge... à pic !" ], "daxm006": [ - "Smack the box, baby!" + "Trop de la balle, mon chou !" ], "daxm007": [ "That's what I call a rocky road!" @@ -2040,10 +2043,10 @@ "We gotta get to the top!" ], "daxm009": [ - "We made it!!" + "On l'a fait !!" ], "daxm010": [ - "Rock 'n roll!" + "Le délire !" ], "ds001": [ "On doit trouver le Baron, Jak." @@ -6553,18 +6556,6 @@ "kwbf042": [ "Arghh ! Espèce de... !" ], - "mtn-plat-buried-rocks-a": [ - "*Tremblement de terre*" - ], - "mtn-step-plat-rocks-a": [ - "*Une plateforme apparait dans le mur*" - ], - "mtn-step-plat-rocks-b": [ - "*Des plateformes apparaissent dans le mur*" - ], - "mtn-step-plat-rocks-c": [ - "*Des plateformes apparaissent dans le mur et le rocher*" - ], "ora006": [ "Rapportez-moi encore 200 Gemmes Crâniennes de Metal Heads", "et je vous montrerai une autre énergie noire." @@ -7559,12 +7550,6 @@ "c'est sûrement quelque chose de précieux.", "Vous devriez jeter un oeil." ], - "tombplta": [ - "*Les pilliers prennent de la hauteur*" - ], - "tombpltb": [ - "*Un escalier apparait et s'assemble*" - ], "tor001": [ "L'opération est un véritable succès. Tous les membres des Souterrains sont sains et saufs.", "Rentrez à la cachette, j'ai une nouvelle mission à vous confier en attendant que ça se calme." @@ -7806,12 +7791,6 @@ "Ils entrent de force !!", "Ils sont trop nombreux !! Jak !!! AHHHH !!!" ], - "wtrdrain": [ - "*L'eau se vide du SAS*" - ], - "wtrfill": [ - "*Le SAS se remplit d'eau*" - ], "ys001": [ "Excellent les gars ! Revenez à la cachette,", "j'ai une autre mission pour vous." @@ -7850,7 +7829,7 @@ "mog": "Mog", "onin": "Onin", "oracle": "Oracle", - "pecker": "Pecker", + "pecker": "Mog", "precursor": "Precurseur", "samos": "Samos", "sig": "Sig", diff --git a/game/assets/jak2/subtitle/subtitle_lines_it-IT.json b/game/assets/jak2/subtitle/subtitle_lines_it-IT.json index 1b966ee884..81635d9808 100644 --- a/game/assets/jak2/subtitle/subtitle_lines_it-IT.json +++ b/game/assets/jak2/subtitle/subtitle_lines_it-IT.json @@ -2,7 +2,7 @@ "cutscenes": {}, "other": { "DSbop001": [ - "Sembri davvero arrabbiato, Jak." + "Jak, sembri così arrabbiato." ], "DSbop002": [ "Ti ricordi come si salta?" @@ -16,23 +16,23 @@ "dovresti raggiungerlo." ], "DSbop005": [ - "Bel lavoro, vedi? Ce l'hai ancora!" + "Good job, see? You still got it!" ], "DSbop006": [ - "Non ho mai trovato né pelle né capelli di Keira o Samos.", - "Non so dove siano andati." + "I never found hide nor hair of Keira or Samos.", + "I don't know where they went." ], "DSbop007": [ - "Non so dove ci abbia portato quel pazzo veicolo del Rift, ma...", - "È una specie di grande città!" + "I don't know where that crazy rift vehicle took us, but...", + "It's some kind of big city!" ], "DSbop008": [ - "È un posto difficile, Jak. Ti ricordi", - "come combattere, giusto? Prova a rompere quella cassa con un calcio." + "It's a tough place, Jak. You DO remember", + "how to fight, right? Try breaking that crate with a kick." ], "DSbop009": [ - "Stai bene, socio! Bel calcio rotante!", - "Risolve un po' di quella rabbia, eh?" + "Looking good, partner! Nice spin kick!", + "Works out some of that anger, eh?" ], "DSbop010": [ "Ci sono molte casse delle Guardie Kremizi", @@ -41,24 +41,24 @@ "DSbop011": [ "Bene! La cassa aveva una scorta di energia all'interno.", "Raccoglila, devi mantenerti in forze, Jak, altrimenti chi combatterà?", - "chi combatterà?" + "who'll do the fighting?" ], "DSbop016": [ - "Se salti e poi ti tuffi, cadrai a terra", - "abbastanza duro da rompere un sacco di cose.", - "Rompere le cose è divertente, vero?" + "Se salti e ti tuffi, la forza con cui cadrai al suolo", + "ti consentirà di rompere molte cose.", + "Spaccare roba è divertente, eh?" ], "DSbop017": [ "Guardie, Jak! Fai quello che sai fare meglio!" ], "agnt001": [ - "Ehi ehi, guida con prudenza!" + "Hey hey, drive carefully!" ], "agnt002": [ - "Attenzione!" + "Look out!" ], "agnt003": [ - "Guardalo!" + "Watch it!" ], "agnt004": [ "Whoa whoa whoa whoa!" @@ -67,82 +67,82 @@ "Whoa!" ], "agnt006": [ - "Sei pazzo!" + "You're crazy!" ], "agnt007": [ - "Sei fuori di testa!?" + "Are you out of your mind!?" ], "agnt008": [ - "Attento!" + "Watch out!" ], "agnt009": [ - "Quello faceva male!" + "That one hurt!" ], "agnt010": [ - "Stai attento, ci aspetta una parte difficile della città." + "Stay sharp, we've got a tough part of town coming up." ], "agnt011": [ - "Adesso ci siamo!" + "Now we're in for it!" ], "agnt012": [ - "Stai sprecando i cittadini!" + "You're wasting citizens!" ], "agnt013": [ - "Non colpire i civili, amico!" + "Don't hit the civvies, man!" ], "agnt014": [ - "Amico, stai colpendo la gente!" + "Man, you are hitting people!" ], "agnt015": [ - "Guarda dove stai andando!" + "Look where you're going!" ], "agnt016": [ - "Vai uomo!" + "Go man!" ], "agnt017": [ - "Mantieni la testa giù!" + "Tieni la testa giù!" ], "agnt018": [ - "Ci stanno sparando!" + "They're shooting at us!" ], "agnt019": [ - "Siamo morti se non guidi più veloce!" + "We are dead if you don't drive faster!" ], "agnt020": [ - "Continuare!" + "Keep going!" ], "agnt021": [ - "Fallo, amico, fallo!" + "Do it, man, do it!" ], "agnt022": [ "Sbrigati, amico!" ], "agnt023": [ - "Non viaggio sul retro, prendi una due posti!" + "I ain't riding on the back, pick up a two-seater!" ], "agnt024": [ - "Comprati una macchina più grande!" + "Get a bigger car!" ], "agnt025": [ "Prendi un veicolo più grande." ], "agnt026": [ - "Prendine uno con due posti, va bene?" + "Get one with two seats, will ya?" ], "agnt027": [ "Prendi un altro veicolo." ], "agnt028": [ - "Ci stanno addosso." + "They're onto us." ], "agnt029": [ - "Siamo seguiti." + "We're being followed." ], "agnt030": [ - "Stiamo prendendo una batosta!" + "We're taking a beating!" ], "agnt031": [ - "Non possiamo sopportare molto di più!" + "We can't take much more of that!" ], "agnt032": [ "Stai cercando di morire!?" @@ -154,31 +154,31 @@ "Sei sicuro di essere dalla nostra parte?" ], "agnt035": [ - "Girati, GIRA!" + "Turn, TURN!" ], "agnt036": [ - "Buona mossa." + "Good move." ], "agnt037": [ "Morte al Barone!" ], "agnt038": [ - "Grazie a Mar sei qui, le guardie Krimzon sono ovunque!" + "Thank Mar you're here, Krimzon Guards are everywhere!" ], "agnt039": [ - "Era ora, andiamo via di qui!" + "It's about time, let's get out of here!" ], "agnt040": [ - "Bene, bene, giusto in tempo. VIA! VIA! VIA!" + "Good, good, just in time. GO, GO, GO!" ], "agnt041": [ - "Finalmente dobbiamo muoverci!" + "Finally, we need to move!" ], "agnt042": [ - "Cavolo, cominciavo a pensare che non ti saresti fatto vivo." + "Man, I was beginning to think you wouldn't show up." ], "agnt043": [ - "Non un momento troppo presto, voliamo!" + "Not a moment too soon, let's fly!" ], "agnt044": [ "Portami al mio nuovo rifugio, presto!" @@ -187,1057 +187,1057 @@ "Grazie, buona fortuna!" ], "agnt046": [ - "Buona guida, vai a salvare il resto dei nostri ragazzi." + "Good driving, go save the rest of our guys." ], "agnt047": [ - "OK, sono fuori di qui!" + "OK, I'm out of here!" ], "agnt048": [ - "Ci vediamo al prossimo incontro." + "See you at the next meeting." ], "agnt049": [ - "Grazie, sei un salvavita." + "Thanks, you're a life saver." ], "agnt050": [ - "Qui è dove scendo." + "This is where I get off." ], "agnt051": [ - "Sono felice che tu sia dalla nostra parte." + "I'm glad you're on our side." ], "agnt052": [ - "Uffa!" + "Ugh!" ], "agnt053": [ - "Che schifo!" + "Ugh!" ], "agnt054": [ - "Ah!" + "Hah!" ], "agnt055": [ "Ahhh!" ], "agnt056": [ - "Guidare con attenzione!" + "Drive carefully!" ], "agnt057": [ - "Attenzione!" + "Look out!" ], "agnt058": [ - "Guardalo!" + "Watch it!" ], "agnt059": [ "WHOA!" ], "agnt060": [ - "Sei pazzo!" + "You're crazy!" ], "agnt061": [ - "Sei fuori di testa?!" + "Are you out of your mind?!" ], "agnt062": [ - "Attento!" + "Watch out!" ], "agnt063": [ - "Quello faceva male." + "That one hurt." ], "agnt064": [ - "Stai attento, stiamo affrontando una parte difficile della nostra città." + "Stay sharp, we got a tough part of our town coming up." ], "agnt065": [ - "Adesso ci siamo." + "Now we're in for it." ], "agnt066": [ - "State sprecando cittadini!" + "You're wasting citizens!" ], "agnt067": [ - "Non colpire i civili, amico!" + "Don't hit the civvies, man!" ], "agnt068": [ - "Amico, stai colpendo la gente!" + "Man, you're hitting the people!" ], "agnt069": [ - "Guarda dove stai andando!" + "Look where you're going!" ], "agnt070": [ - "Vai amico, VAI!" + "Go man, GO!" ], "agnt071": [ - "Mantieni la testa giù!" + "Keep your head down!" ], "agnt072": [ - "Ci stanno sparando!" + "They're shooting at us!" ], "agnt073": [ - "Siamo morti se non guidi più veloce!" + "We're dead if you don't drive faster!" ], "agnt074": [ - "Continuare!" + "Keep going!" ], "agnt075": [ - "Fallo, amico, fallo!" + "Do it, man, do it!" ], "agnt076": [ - "Sbrigati, amico!" + "Hurry up, man!" ], "agnt077": [ - "Non viaggio sul retro, prendi una due posti!" + "I ain't riding on the back, pick up a two-seater!" ], "agnt078": [ - "Prendi un veicolo più grande." + "Get a bigger vehicle." ], "agnt079": [ - "Ci hanno scoperti!" + "They're onto us!" ], "agnt080": [ - "Siamo seguiti!" + "We're being followed!" ], "agnt081": [ - "Stiamo prendendo una batosta!" + "We're taking a beating!" ], "agnt082": [ - "Non ne possiamo più." + "We can't take much more of that." ], "agnt083": [ - "Stai cercando di morire?" + "You trying to die?" ], "agnt084": [ - "Dove ti ha trovato Torn?" + "Where'd Torn find you?" ], "agnt085": [ - "Sei sicuro di essere dalla nostra parte?" + "You sure you're on our side?" ], "agnt086": [ - "Gira, gira!" + "Turn, TURN!" ], "agnt087": [ - "Buona mossa!" + "Good move!" ], "agnt088": [ - "Morte al Barone!" + "Death to the Baron!" ], "agnt089": [ - "Grazie a Mar sei qui, le guardie Krimzon sono ovunque!" + "Thank Mar you're here, Krimzon Guards are everywhere!" ], "agnt090": [ - "È ora, andiamo via da qui!" + "It's about time, let's get out of here!" ], "agnt091": [ - "Bene, giusto in tempo, VIA, VIA, VIA!" + "Good, just in time, GO, GO, GO!" ], "agnt092": [ - "Finalmente dobbiamo muoverci!" + "Finally, we need to move!" ], "agnt093": [ - "Cavolo, cominciavo a pensare che non ti saresti fatto vivo." + "Man, I was beginning to think you wouldn't show up." ], "agnt094": [ - "Non un momento troppo presto, voliamo!" + "Not a moment too soon, let's fly!" ], "agnt095": [ - "Portami al mio nuovo rifugio, presto!" + "Get me to my new safehouse, quickly!" ], "agnt096": [ - "Grazie, buona fortuna!" + "Thanks, good luck!" ], "agnt097": [ - "Buona guida, vai a salvare il resto dei nostri ragazzi." + "Good driving, go save the rest of our guys." ], "agnt098": [ - "Ok, me ne vado!" + "OK, I'm out of here!" ], "agnt099": [ - "Ci vediamo al prossimo incontro!" + "See ya at the next meeting!" ], "agnt100": [ - "Grazie, mi hai salvato la vita." + "Thanks, you're a life-saver." ], "agnt101": [ - "Qui è dove scendo." + "This is where I get off." ], "agnt102": [ - "Sono felice che tu sia dalla nostra parte." + "I'm glad you're on our side." ], "agnt103": [ - "Attenzione!" + "Look out!" ], "agnt104": [ - "EHI!" + "Hey!" ], "agnt105": [ - "Ahia!" + "Augh!" ], "agnt106": [ - "Andiamo amico, stai cercando di uccidermi!?" + "Come on man, you trying to kill me!?" ], "agnt107": [ - "Calmati!" + "Take it easy!" ], "agnt108": [ - "Uffa!" + "Ughh!" ], "agnt109": [ - "Uffa!" + "Ughh!" ], "agnt110": [ "Ahhh!" ], "agnt111": [ - "Uffa!" + "Oof!" ], "agnt112": [ "Ah!" ], "agnt113": [ - "Ah!" + "Ahh!" ], "agnt114": [ - "Uffa!" + "Oof!" ], "agnt115": [ - "Ok, amico, muoviti!" + "Okay, buddy, move!" ], "agnt116": [ - "Attenzione!" + "Look out!" ], "agnt117": [ - "Tieni gli occhi sulla strada!" + "Keep your eyes on the road!" ], "agnt118": [ - "Guardalo!" + "Watch it!" ], "agnt119": [ - "Grazie per il passaggio." + "Thanks for the lift." ], "agnt120": [ - "Ci vediamo al prossimo incontro." + "See ya at the next meeting." ], "agnt121": [ - "Bene, andiamo!" + "Right, let's go!" ], "agnt122": [ - "Guida, amico, guida!" + "Drive, man, drive!" ], "agnt123": [ - "C'è mancato poco!" + "That was close!" ], "agnt124": [ - "Sei sicuro di sapere cosa stai facendo?" + "You sure you know what you're doing?" ], "agnt125": [ - "Ok, grazie, buona fortuna." + "Ok, thanks, good luck." ], "agnt126": [ - "Grande andiamo." + "Great, let's go." ], "agnt127": [ - "Guida, amico, guida!" + "Drive, man, drive!" ], "agnt128": [ - "C'è mancato poco!" + "That was close!" ], "agnt129": [ - "Sei sicuro di sapere cosa stai facendo?" + "You sure you know what you're doing?" ], "agnt130": [ - "OK, grazie, buona fortuna!" + "OK, thanks, good luck!" ], "agnt131": [ - "Cosa ti ha fatto perdere così tanto tempo?" + "What took you so long?" ], "agnt132": [ - "Muoviti come se avessi uno scopo, amico!" + "Move like you got a purpose, man!" ], "agnt133": [ - "Forza, forza, i KG ci hanno scoperto!" + "GO, GO, the KG are onto us!" ], "agnt134": [ - "Tenete duro, ci siamo quasi!" + "Stay sharp, we're almost there!" ], "agnt135": [ - "Bene, hai fatto bene, dirò all'Ombra che siamo salvi!" + "Good, you did well, I'll tell the Shadow we're safe!" ], "asha001": [ - "La vendetta è una stronzata, e io lo sono." + "Payback's a bitch, and I'm it." ], "asha002": [ - "Attento al culo, sono solo una donna esteriormente." + "Watch your ass, I'm only woman on the outside." ], "asha003": [ - "Lascia che ti riduca alle dimensioni...", - "Non che tu ne abbia." + "Let me knock you down to size...", + "Not that you have any." ], "asha004": [ - "Le armi piccole non mi fanno andare avanti." + "Small guns don't get me going." ], "asha005": [ - "È una pistola minuscola..." + "That's a tiny gun..." ], "asha006": [ - "Non sai con chi hai a che fare." + "You don't know who you're dealing with." ], "asha007": [ - "Non ho mai detto che potevi toccarmi lì." + "I never said you could touch me there." ], "asha008": [ - "Prendi quello!" + "Take that!" ], "asha009": [ - "Eccone alcuni." + "Here's some." ], "asha010": [ - "Pronti per un altro?" + "Ready for another?" ], "asha011": [ - "Come ti senti?" + "How's that feel?" ], "asha012": [ - "Sembra che faccia male." + "Seems like it hurts." ], "asha013": [ - "Oh, che male." + "Oh, that hurt." ], "asha014": [ - "Uffa!" + "Ugh!" ], "asha015": [ - "Bene!" + "Ough!" ], "asha016": [ "Ah!" ], "asha017": [ - "Ah!" + "Agh!" ], "asha018": [ - "Colpiscimi ancora e perderai qualcosa di veramente prezioso!" + "Hit me again and you'll lose something really valuable!" ], "asha019": [ - "Non intelligente!" + "Not smart!" ], "asha020": [ - "Ascolta, amico, da che parte stai?" + "Listen, buddy, whose side are you on?" ], "asha021": [ - "Non farmi del male." + "Don't make me hurt you." ], "asha022": [ - "Fallo di nuovo e ti metto giù." + "Do that again and I'll put you down." ], "asha023": [ - "Impara a controllare la tua pistola, amico." + "Learn to control your gun, buddy." ], "asha024": [ - "Dove hai imparato a combattere?" + "Where'd you learn to fight?" ], "asha025": [ - "Controlla i tuoi obiettivi, signore." + "Check your targets, mister." ], "asha026": [ - "Non farlo di nuovo." + "Don't do that again." ], "asha027": [ - "Forse dovrei essere dietro di te." + "Maybe I should be behind you." ], "asha028": [ - "Non lo accetterò!" + "I won't take that!" ], "asha029": [ - "Un altro così e canterai come soprano." + "Another one like that and you'll be singing soprano." ], "asha030": [ - "Riprendine un po'." + "Have some back." ], "asha031": [ - "Non farlo di nuovo!" + "Don't do that again!" ], "asha032": [ - "Bella ripresa." + "Nice shooting." ], "asha033": [ - "Bel tiro, ragazzo blu." + "Good shooting, blue boy." ], "asha034": [ - "Buon lavoro." + "Good work." ], "asha035": [ - "Abbattili tutti!" + "Take 'em all down!" ], "asha036": [ - "Prendiamoli!" + "Let's get 'em!" ], "asha037": [ - "Arrivano!" + "Here they come!" ], "asha038": [ - "Ho bisogno di aiuto!" + "I need some help!" ], "asha039": [ - "Cavolo, ce ne sono un sacco!" + "Man, there are a lot of 'em!" ], "asha040": [ - "Altri in arrivo." + "More coming." ], "asha041": [ - "L'ho preso." + "I got him." ], "asha042": [ - "Più potenza di fuoco!" + "More firepower!" ], "asha043": [ - "Ancora uno in meno!" + "One more down!" ], "asha044": [ - "Aiutarmi!" + "Help me out!" ], "asha045": [ - "Ci stanno aggirando!" + "They're out-flanking us!" ], "asha046": [ - "Siamo circondati!" + "We're surrounded!" ], "asha047": [ - "Sparare! Sparare!" + "Shoot! Shoot!" ], "asha048": [ - "Non ha un bell'aspetto." + "It's not looking good." ], "asha049": [ - "Aiutami!" + "Help me!" ], "asha050": [ - "Eccone uno per mio padre!" + "Here's one for my father!" ], "asha051": [ - "Maledetti Metal Head..." + "Damn Metal Heads..." ], "asha052": [ "Bullseye." ], "asha053": [ - "Ce ne sono altre di queste cose!" + "There's some more of those things!" ], "asha054": [ - "Prendili tutti!" + "Get 'em all!" ], "asha055": [ - "Uffa..." + "Ugh..." ], "asha056": [ "Hm-agh..." ], "asha057": [ - "Ah... ah..." + "Hah...agh..." ], "asht002": [ - "Avevi ragione, Jak. Ciò che sta facendo mio padre è sbagliato.", - "Ho bisogno di aiutare a risolvere questo problema. Se arrivi alla Fabbrica di Armi,", - "Forse possiamo fermarlo. Ci vediamo lì." + "You were right, Jak. What my father's doing is wrong.", + "I need to help fix this. If you get to the Weapons Factory,", + "maybe we can stop him. I'll meet you there." ], "asht006": [ - "Penso che sia giunto il momento di agire.", - "I Metal Heads sono così concentrati nell'attaccare la città,", - "potrebbero aver lasciato il loro nido vulnerabile.", - "Jak, devi andare nella Zona Desolata", - "e sfonda la barriera del Nest in ogni modo possibile.", - "Forse se entri e fai fuori il leader dei Metal Head", - "l'esercito crollerà. È un azzardo,", - "ma potrebbe essere la nostra unica possibilità." + "I think now's the time to act.", + "The Metal Heads are so focused on attacking the city,", + "they may have left their nest vulnerable.", + "Jak, you've got to get out to the Wasteland", + "and breach the Nest barrier any way you can.", + "Maybe if you get inside and take out the Metal Head leader", + "the army will collapse. It's a long shot,", + "but it might be our only chance." ], "bar001": [ - "Non prestare attenzione alle voci infondate su", - "forniture ecologiche basse. Come vostro Barone, vi assicuro,", - "la città ha una scorta infinita di negozi ecologici.", - "Quelli che direbbero che stiamo finendo,", - "stanno solo cercando di spaventare e sovvertire!", - "Ho tutto sotto controllo, te lo comando", - "non avere paura." + "Pay no attention to the groundless rumors about", + "low eco supplies. As your Baron, I assure you,", + "the city has an endless supply of eco stores.", + "Those who would say we are running out,", + "are only trying to frighten and subvert!", + "I have everything in control, I command you", + "to have no fear." ], "bar004": [ - "Andare!" + "Go!" ], "bb01fail": [ - "Penso che dovresti esercitarti di più." + "I think you should practice more." ], "bb01int": [ - "Jak, questo è Torn. La metropolitana ha bisogno di buoni autisti", - "per le nostre missioni sui veicoli. Dimostra le tue abilità su", - "Ring Challenge e forse ti faremo entrare in azione." + "Jak, this is Torn. The Underground needs good drivers", + "for our vehicle missions. Prove your skills on the", + "Ring Challenge and maybe we'll let you in on the action." ], "bb01win": [ - "Non male, penso che potremmo usarti.", - "Ecco una piccola ricompensa per il tuo impegno." + "Not bad, I think we can use ya.", + "Here's a little reward for your effort." ], "bb02fail": [ - "Sei ancora un po' timido. Riprova." + "You're still a little timid. Try again." ], "bb02int": [ - "Vorremmo vederti dimostrare le tue abilità di guida. Affronta", - "un'altra Ring Challenge, vediamo cosa hai ottenuto." + "We'd like to see you prove your driving skills. Take on", + "another Ring Challenge, let's see what you've got." ], "bb02win": [ - "Non male. Potresti essere il mio autista per la fuga in qualsiasi momento." + "Not bad. You could be my getaway driver any time." ], "bb03fail": [ - "Sapevo che questo sarebbe stato troppo per te. Continuare a praticare." + "I knew this one would prove too much for ya. Keep practicing." ], "bb03int": [ - "La prossima Ring Challenge separerà gli uomini dai ragazzi.", - "Vediamo se riesci a gestirlo." + "The next Ring Challenge will separate the men from the boys.", + "Let's see if you can handle it." ], "bb03win": [ - "Guida molto piacevole. Comincio a pensare che potresti davvero", - "aiutaci, Jak." + "Very nice driving. I'm starting to think you could really", + "help us, Jak." ], "bb04fail": [ - "Peccato, speravo che potessi farlo. Continua a provare." + "Too bad, I kinda hoped you could do this. Keep trying." ], "bb04int": [ - "Strappato qui. Non so nemmeno perché ti permetto di provarlo", - "Ring Challenge, non l'ho mai battuto io stesso. Immagino di essere morbosamente", - "curioso. Batti questo e sarai il miglior pilota", - "che la metropolitana abbia mai avuto." + "Torn here. I don't even know why I'm lettin' you try this", + "Ring Challenge, never beat it myself. I guess I'm morbidly", + "curious. Beat this one and you'll be the best driver", + "the Underground's ever had." ], "bb04win": [ - "Molto carino, Jak! Sei il miglior pilota che abbiamo mai avuto." + "Very nice, Jak! You're the best driver we've ever had." ], "bb05fail": [ - "Non hai preso tutti i Bomb Bot, Jak!" + "You didn't get all the Bomb Bots, Jak!" ], "bb05int": [ - "Jak, si dice che in città ci siano sempre più robot bomba.", - "Sono una minaccia pericolosa e ho bisogno che tu li localizzi", - "e distruggerli tutti prima che danneggino i nostri interessi." + "Jak, reports say more bomb bots are roaming the city.", + "They're a dangerous menace, and I need you to locate", + "and destroy each one before they hurt our interests." ], "bb05win": [ - "Buon lavoro! Questo dovrebbe incidere sul bilancio di guerra del Barone." + "Good work! That oughta put a dent in the Baron's war budget." ], "bb06int": [ - "Jak, abbiamo bisogno che tu elimini un altro gruppo di Bomb Bot.", - "Queste armi mobili continuano ad apparire in città, dobbiamo eliminarle il prima possibile." + "Jak, we need you to take out another group of Bomb Bots.", + "These mobile weapons keep showing up in the city, we gotta take them out as soon as possible." ], "bb06win": [ - "Un altro mucchio di rottami metallici per il robot bomba per il KG", - "compattatori di rifiuti. Missione compiuta, quella della metropolitana", - "molto grato per il tuo servizio." + "Another pile of bomb bot scrap metal for the KG", + "trash compactors. Mission accomplished, the Underground's", + "most grateful for your service." ], "bb07fail": [ - "Hai perso un agente! NON va affatto bene, Jak! Missione fallita!" + "You lost an agent! NOT good at all, Jak! Mission failed!" ], "bb07int": [ - "Lacerato qui, ho bisogno che tu esca e sposti altri nostri agenti in nuove posizioni in città.", - "Le spie dei KG osservano ogni nostra mossa, quindi fai attenzione ai guai. Buona fortuna." + "Torn here, I need you to go out and move more of our Agents to new locations in the city.", + "KG spies are watching our every move, so look out for trouble. Good luck." ], "bb07win": [ - "Bel lavoro di navetta! Stai mantenendo in vita la gente là fuori." + "Nice shuttle work! You're keepin' people alive out there." ], "bb08fail": [ - "Uno dei nostri migliori agenti è stato arrestato. L'Ombra NON lo sarà", - "lieto! Hai fallito." + "One of our best agents was arrested. The Shadow will NOT be", + "pleased! You failed." ], "bb08int": [ - "Jak, alcuni dei nostri agenti sono stati nuovamente compromessi.", - "Trovali tutti e portali in nascondigli speciali in città.", - "Le pattuglie di guardia sono in massima allerta, quindi sarà dura. Mantieni la testa giù!" + "Jak, some of our Agents have been compromised again.", + "Find each one and take them to special hideouts in the city.", + "The guard patrols are on high alert, so this is going to be a tough one. Keep your head down!" ], "bb08win": [ - "È stata una bella guida, Jak.", - "La metropolitana può respirare un po' più facilmente adesso." + "That was good driving, Jak.", + "The Underground can breathe a little easier now." ], "bb09fail": [ - "Ci hai messo troppo tempo, Jak. Annulliamo la riunione." + "You took too long, Jak. We're calling off the meeting." ], "bb09int": [ - "Jak, avremo una riunione clandestina", - "con alcuni agenti speciali. Raccogli ogni agente", - "e portarli rapidamente al luogo dell'incontro." + "Jak, we're having an Underground meeting", + "with some special Agents. Pick up each Agent", + "and bring them to the meeting place quickly." ], "bb09win": [ - "Lavoro veloce, Jak! Un giorno, potremmo anche", - "invitarvi a questi incontri." + "Fast work, Jak! Some day, we might even", + "invite you to these meetings." ], "bb10fail": [ - "Non abbastanza veloce, amico! Devi essere veloce", - "con quelle consegne." + "Not fast enough, buddy! You've gotta be quick", + "with those deliveries." ], "bb10int": [ - "Jak, devi dimostrare ancora una volta le tue abilità di guida.", - "Uno dei nostri agenti ha lasciato un pacco,", - "Ho bisogno che venga consegnato al Hideout. Immediatamente." + "Jak, you've got to prove your driving skills once again.", + "One of our Agents dropped off a package,", + "I need it delivered to the Hideout. Immediately." ], "bb10win": [ - "Buon lavoro, Jak!" + "Good work, Jak!" ], "bb11fail": [ - "Il contenuto del pacco non ce l'ha fatta. Vai più veloce la prossima volta!" + "The package contents didn't make it. Go faster next time!" ], "bb11int": [ - "Jak, ho bisogno che tu prenda un pacchetto di ecologici", - "verso la centrale elettrica. Arrivare rapidamente o il contenuto", - "sarà inutile per Vin." + "Jak, I need you to take a package of eco", + "over to the power station. Get there quickly or the contents", + "will be useless to Vin." ], "bb11win": [ - "Bella guida, Jak." + "Nice driving, Jak." ], "bb12fail": [ - "Non hai spinto abbastanza, novellino. Riprova." + "You didn't push it hard enough, newbie. Try again." ], "bb12int": [ - "Qui è Torn, abbiamo un altro pacco da consegnare", - "per lo Stadio. Fai presto!" + "This is Torn, we've got another package delivery", + "for the Stadium. Make it quick!" ], "bb12win": [ - "Non male alla guida. Dovresti davvero gareggiare", - "nel campionato cittadino." + "Not bad driving. You really oughta race", + "in the city championship." ], "bb13fail": [ - "Devi lavorare sulla velocità, amico." + "You gotta work on your speed, man." ], "bb13int": [ - "Ho bisogno che porti un oggetto di valore a Onin.", - "Non sarai in grado di guidare per tutta la strada,", - "ma devi comunque muoverti velocemente. Buona fortuna." + "I need you to take a valuable item over to Onin.", + "You won't be able to drive the whole way,", + "but you still have to move fast. Good luck." ], "bb13win": [ - "Questo è il modo per farlo, buon lavoro." + "That's the way to get it done, good work." ], "bb14fail": [ - "Troppo tardi, Jak! L'agente annulla la cosa.", - "Devi raggiungerlo più velocemente!" + "Too late, Jak! The agent is calling it off.", + "You need to reach it faster!" ], "bb14int": [ - "Jak, abbiamo un agente che aspetta la consegna di un pacco.", - "Le spie della guardia stanno tenendo d'occhio questo ragazzo,", - "quindi se non lo raggiungi velocemente, verrà arrestato.", - "Portagli il pacco prima che sia troppo tardi." + "Jak, we have an Agent waiting for a package delivery.", + "Guard spies are watching this guy,", + "so if you don't get to him fast, he'll be arrested.", + "Take the package to him before it's too late." ], "bb14win": [ - "Bel lavoro, la consegna è stata un successo. Mi piace il tuo stile, Jak." + "Nice work, the delivery was a success. I like your style, Jak." ], "bb15fail": [ - "Hai fatto un casino, Jak! Non sei riuscito a raggiungere la zona sicura", - "come abbiamo chiesto." + "You screwed up, Jak! You didn't get it to the safe zone", + "as we asked." ], "bb15farr": [ - "Scendi dalla bici e allontanati, Jak!!" + "Get off the bike and get clear, Jak!!" ], "bb15int": [ - "Jak, abbiamo trovato una bomba negli Slums", - "era destinato all'Ombra.", - "Ho bisogno che tu lo vada a prendere e lo porti alla Farm Area", - "dove abbiamo contrassegnato una zona sicura dove può esplodere.", - "Vai velocemente." + "Jak, we found a bomb in the Slums", + "that was meant for the Shadow.", + "I need you to pick it up and take it out to the Farm Area", + "where we've marked a safe zone where it can explode.", + "Go quickly." ], "bb15win": [ - "È stato un lavoro fantastico, Jak! Grazie, lo dico davvero." + "That was amazing work, Jak! Thank you, I really mean that." ], "bb16fail": [ - "Non hai eliminato abbastanza guardie!", - "Dobbiamo colpirli più forte!" + "You didn't take out enough guards!", + "We need to hit them harder!" ], "bb16int": [ - "Jak, questo è Torn.", - "La guardia personale d'élite di Erol si sta muovendo per la città.", - "Dobbiamo colpirli e colpirli forte! Tirane fuori abbastanza", - "guardie prima di dover annullare la missione.", - "Se ci sono troppe poche guardie, avremo perso un'opportunità di", - "infliggere danni reali ai nostri nemici." + "Jak, this is Torn.", + "Erol's elite personal guard are moving through the city.", + "We need to hit them and hit them hard! Take out enough", + "guards before I have to call off the mission.", + "Get too few guards and we'll have missed an opportunity to", + "inflict real damage on our enemies." ], "bb16win": [ - "Bellissimo mordi e fuggi, Jak! Questo invierà un messaggio a Erol." + "Great hit 'n' run, Jak! That'll send a message to Erol." ], "bb17fail": [ - "Sembra che quella cosa sia troppo difficile da usare. Per ora passiamo." + "Looks like that thing's too hard to use. We'll pass for now." ], "bb17int": [ - "Stiamo valutando il nuovo JET-Board per l'uso in metropolitana", - "missioni. Abbiamo sentito che sei abbastanza bravo con quelle cose,", - "mostraci cosa può fare. Segna abbastanza punti con il", - "Judge-bot e valuteremo se aggiungerlo al nostro arsenale." + "We're evaluating the new JET-Board for use in Underground", + "missions. We heard you're pretty good with that thing,", + "show us what it can do. Score enough points with the", + "judge-bot and we'll consider adding it to our arsenal." ], "bb17win": [ - "Oh! Puoi davvero fare a pezzi il cemento con quel bambino!", - "Buon lavoro." + "Wow! You can really tear up the concrete with that baby!", + "Good work." ], "bb18fail": [ - "Non sono ancora sicuro che la JET-Board sia così utile." + "I'm still not sure the JET-Board's that useful." ], "bb18int": [ - "Ecco un altro ottimo posto per valutare le prestazioni", - "del consiglio di amministrazione del JET. Cerca di ottenere abbastanza punti anche qui." + "Here's another great place to evaluate the performance", + "of the JET-Board. Try to get enough points here as well." ], "bb18win": [ - "Mosse dolci, Jak. Il KG avrebbe avuto difficoltà", - "catturandoci su quei bambini." + "Sweet moves, Jak. The KG would have a hard time", + "catching us on those babies." ], "bb19fail": [ - "Non li hai presi tutti. Riprova." + "You didn't get them all. Try again." ], "bb19int": [ - "Stiamo valutando l'uso dei fari di ricerca nelle missioni.", - "Raccogli tutti i segnali il più velocemente possibile.", - "Devi muoverti velocemente su questo." + "We're evaluating the use of homing beacons in missions.", + "Get all of the beacons as fast as you can.", + "You gotta move quickly on this one." ], "bb19win": [ - "Lavoro eccellente. Sei una grande risorsa", - "nella metropolitana, Jak." + "Excellent work. You're a great asset", + "to the Underground, Jak." ], "bb20fail": [ - "Troppo lento, Jak! Quando l'Ombra chiede, devi consegnare." + "Too slow, Jak! When the Shadow asks, you need to deliver." ], "bb20int": [ - "L'Ombra ha bisogno che tu raccogli dell'eco verde per il suo", - "esperimenti. Ottieni tutto prima che l'eco svanisca." + "The Shadow needs you to collect some green eco for his", + "experiments. Get all of it before the eco vanishes." ], "bb20win": [ - "Non male. Metterò una buona parola con l'Ombra." + "Not bad. I'll put in a good word with the Shadow." ], "bb21fail": [ - "Continua a provare. Devi sviluppare le tue abilità qui." + "Keep tryin'. You need to develop your skills here." ], "bb21int": [ - "A volte ci piace \"prendere in prestito\" la Krimzon Guard", - "attrezzatura. Porta fuori quella moto da pattuglia dei KG a fare un giro", - "e colpire tutti i bersagli entro il limite di tempo." + "Sometimes we like to \"borrow\" Krimzon Guard", + "equipment. Take that KG patrol bike out for a spin", + "and hit all the targets within the time limit." ], "bb21win": [ - "Bella ripresa. La Guardia ti adorerebbe come recluta.", - "Ecco invece una piccola ricompensa per restare con noi." + "Nice shooting. The Guard would looove you as a recruit.", + "Here's a little reward to stay with us instead." ], "bb22fail": [ - "Non sei arrivato alle cabine abbastanza in fretta, Jak." + "You didn't get the booths fast enough, Jak." ], "bb22int": [ - "Parte della propaganda del Barone è inquietante", - "i civili. Togli quelle cabine e fermeremo Praxis", - "dal diffondere le sue bugie." + "Some of the Baron's propaganda is unnerving", + "the civilians. Take out those booths and we'll stop Praxis", + "from spreading his lies." ], "bb22win": [ - "Buon lavoro! Questo dovrebbe far tacere un po' il Barone." + "Good work! That should shut up the Baron a bit." ], "bb23fail": [ - "Hai perso, Jak. Se vuoi vincere,", - "faresti meglio a lavorare sulle tue abilità di velocità." + "You lost, Jak. If you wanna win,", + "you better work on your speed skills." ], "bb23int": [ - "Il miglior pilota di The Underground vuole sfidarti", - "a una gara sul Ring Course One.", - "Pensi di poter gestire un po' di concorrenza?" + "The Underground's top racer wants to challenge you", + "to a race on Ring Course One.", + "Think you can handle a little competition?" ], "bb23win": [ - "Congratulazioni! Hai battuto lo sfidante!" + "Congratulations! You beat the challenger!" ], "bb24fail": [ - "Il nostro ragazzo ti ha portato in questo. La prossima volta sarai più fortunato." + "Our boy took you on this one. Better luck next time." ], "bb24int": [ - "Sei pronto per una piccola gara, Jak?", - "Il nostro miglior pilota vuole affrontarti sul Ring Course Two.", - "Questo bambino è un po' più difficile.", - "Vediamo se riesci a raccogliere la sfida." + "Up for a little race, Jak?", + "Our top driver wants to face you on Ring Course Two.", + "This baby's a little more difficult.", + "Let's see if you can rise to the challenge." ], "bb24win": [ - "L'hai battuto, Jak. Bella guida." + "You beat him, Jak. Nice driving." ], "bb25fail": [ - "Sembra che tu non sia il miglior pilota di questa città, Jak.", - "Hai perso!" + "Looks like you're not the top racer in this town, Jak.", + "You lost!" ], "bb25int": [ - "Il campione della corsa Underground ti vuole ancora,", - "questa volta sul difficile percorso Ring Course Three.", - "Questo diventerà peloso." + "The Underground's race champion wants at you again,", + "this time on the difficult Ring Course Three.", + "This one's gonna get hairy." ], "bb25win": [ - "Congratulazioni, hai battuto il nostro miglior pilota. Ben fatto." + "Congratulations, you beat our best racer. Well done." ], "bb26int": [ - "Questo è Torn, un buon agente della metropolitana conosce la città", - "dentro e fuori, a vista. Vediamo come te la cavi,", - "arrivare a questo posto nel limite di tempo indicato", - "e riceverai una ricompensa. VIA!" + "This is Torn, a good Underground agent knows the city", + "inside and out, by sight. Let's see how you stack up,", + "get to this place in the time limit given", + "and you'll get a reward. GO!" ], "bb27int": [ - "Ecco un'altra occasione per dimostrare la tua conoscenza della città." + "Here's another chance to prove your knowledge of the city." ], "bb28int": [ - "Trova questo posto prima che scada il tempo." + "Find this place before time runs out." ], "bb29int": [ - "Ecco una cosa difficile, batti il ​​tempo fino a qui." + "Here's a tough one, beat the clock to here." ], "bb30int": [ - "Riconosci questo posto? Trovalo velocemente e una ricompensa sarà tua." + "Recognize this place? Find it fast and a reward is yours." ], "bb31int": [ - "Ecco un posto poco conosciuto, trovalo velocemente e rimarrai colpito." + "Here's a little known place, find it fast and I'll be impressed." ], "bb32int": [ - "Mi piacerebbe vederti trovare questo posto. Impressionami, Jak." + "I'd like to see you find this place. Impress me, Jak." ], "bb33int": [ - "Arriva subito e sorprendimi." + "Get here fast and surprise me." ], "bb34int": [ - "Ecco un'altra destinazione, vieni qui velocemente." + "Here's another destination, get here quickly." ], "bb35int": [ - "Trova questo posto, velocemente!" + "Find this spot, fast!" ], "bb36int": [ - "Raggiungi quest'area e sarai ricompensato." + "Reach this area and be rewarded." ], "bb37int": [ - "Pensi di poter trovare questo posto?" + "Think you can find this place?" ], "bb38fail": [ - "Non così bene, Jak! Forse dovresti calibrare quella scheda." + "Not so good, Jak! Maybe you should calibrate that board." ], "bb38int": [ - "Stiamo ancora valutando il JET-Board.", - "Vediamo se riesci a raccogliere tutti i potenziamenti energetici", - "nel termine assegnato." + "We're still evaluating the JET-Board.", + "Let's see if you can collect all of the energy boosts", + "in the time limit allotted." ], "bb38win": [ - "Belle mosse, ragazzo volante." + "Nice moves, fly-boy." ], "bb39fail": [ - "Così vicino, ma in questo settore significa morto." + "Soo close, but in this business that means dead." ], "bb39int": [ - "Metti alla prova il JET-Board su un percorso ad anello.", - "Batti il ​​tempo e ti farò tatuare la faccia come la mia." + "Take that JET-Board through its paces on a Ring Course.", + "Beat the time and I'll get your face tattooed like mine." ], "bb39win": [ - "Buona velocità lungo il percorso, Jak!", - "Quello sembrava troppo facile." + "Good speed through the course, Jak!", + "That one looked too easy." ], "bb40fail": [ - "Sembra che tu abbia trovato il tuo partner, Jak!", - "Sei stato troppo lento in quel percorso." + "Looks like you've met your match, Jak!", + "You were too slow on that course." ], "bb40int": [ - "Mi piacerebbe vederti portare il JET-Board attraverso un altro", - "Corso ad anello. Renderemo questo un po' più interessante,", - "vediamo se riesci a completarlo in tempo." + "I'd like to see you take the JET-Board through another", + "Ring Course. We'll make this one a little more interesting,", + "let's see if you can complete it in time." ], "bb40win": [ - "Oh! Anche io avrei problemi con quello, bel lavoro!" + "Wow! Even I'd have trouble on that one, good job!" ], "bf001": [ - "Il mio scudo è impermeabile ai tuoi attacchi!" + "My shield is impervious to your attacks!" ], "bf002": [ - "Non puoi farmi del male!" + "You cannot hurt me!" ], "bf003": [ - "Stupido! Niente può toccarmi!" + "Fool! Nothing can touch me!" ], "bf004": [ - "Sei impotente!" + "You're powerless!" ], "bf005": [ - "Non c'è niente che tu possa fare!" + "There is nothing you can do!" ], "bf006": [ - "AH AH AH AH AH AH!" + "HAHAHAHAHAHA!" ], "bf007": [ - "AHAHAHAH!" + "HAHAHAHA!" ], "bf008": [ - "Vieni a prendermi!" + "Come get me!" ], "bf009": [ - "Avvicinati!" + "Come closer!" ], "bf010": [ - "Provami adesso!" + "Try me now!" ], "bf011": [ - "Rendiamolo personale!" + "Let's make this personal!" ], "bf012": [ - "Sorpresa!" + "Surprise!" ], "bf013": [ - "Non cadere!" + "Don't fall!" ], "bf014": [ - "Ti schiaccerò!" + "I will crush you!" ], "bf015": [ - "Prendi questo!" + "Take this!" ], "bf016": [ - "Eccomi!" + "Here I come!" ], "bf017": [ - "Perché non morirai?!" + "Why won't you die?!" ], "bf018": [ - "I tuoi poteri dell'Eco Oscuro mi sorprendono!" + "Your Dark Eco powers surprise me!" ], "bf019": [ - "La tua arroganza sarà la tua rovina!" + "Your arrogance will be your downfall!" ], "bf020": [ - "La Pietra è mia!" + "The Stone is mine!" ], "bf021": [ - "Dammi la Pietra!" + "Give me the Stone!" ], "bf022": [ - "Rilascialo!" + "Release it!" ], "bf023": [ - "Voglio la Pietra!" + "I want the Stone!" ], "bf024": [ - "Argh, lascia andare!" + "Argh, let go!" ], "bf025": [ - "È mio!" + "It's mine!" ], "bf026": [ - "Prova questi per la taglia!" + "Try these on for size!" ], "bf027": [ - "Ecco un piccolo regalo!" + "Here's a little present!" ], "bf028": [ - "Ne vuoi ancora?" + "Want some more?" ], "bf029": [ - "Mi stanco di questo, ora muori!" + "I grow tired of this, now you die!" ], "bf030": [ - "Non puoi scappare da questi!" + "You cannot run away from these!" ], "bf031": [ - "Permettimi di condividere il dolore!" + "Allow me to share the pain!" ], "bf032": [ - "Adesso sei mio!" + "Now you're mine!" ], "bf033": [ - "Ecco un po' di inferno!" + "Here's some hell!" ], "bf034": [ - "Dì Buonanotte!" + "Say good night!" ], "bf035": [ - "Goditi la tua prossima vita!" + "Enjoy your next life!" ], "bf036": [ - "È finita!" + "It's over!" ], "bf037": [ - "Brucia all'inferno!" + "Burn in hell!" ], "bf038": [ - "La Pietra è mia! Lascia che ti mostri cosa può fare!" + "The Stone is mine! Let me show you what it can do!" ], "bf039": [ - "Ora vedi il potere della Pietra in mani capaci!" + "Now you see the Stone's power in capable hands!" ], "bf040": [ - "Che ne dici di questa potenza?" + "How's that for power?" ], "bf041": [ - "Ora capisci!" + "Now you see!" ], "bf042": [ - "Sono invincibile adesso!" + "I am invincible now!" ], "bf043": [ - "Non puoi correre per sempre!" + "You cannot run forever!" ], "bf044": [ - "Ho tutto il potere di cui ho bisogno!" + "I have all the power I need!" ], "bf045": [ - "Non puoi evitarlo!" + "You can't avoid this!" ], "bf046": [ - "Ecco qualcosa di speciale!" + "Here's a little something special!" ], "bf047": [ - "Vieni da me!" + "Come to me!" ], "bf048": [ - "Vieni qui!" + "Come here!" ], "bf049": [ - "Avviciniamoci!" + "Let's get closer!" ], "bf050": [ - "Niente può salvarti adesso!" + "Nothing can save you now!" ], "bf051": [ - "Sei storia!" + "You're history!" ], "bf052": [ - "Sono io il salvatore della città, non tu!" + "I am the city's savior, not you!" ], "bf053": [ - "Morire!" + "Die!" ], "bf054": [ - "È finita!" + "It's over!" ], "bf055": [ - "Ti ho preso!" + "I've got you!" ], "bf056": [ - "Adesso muori!" + "Now you die!" ], "bf057": [ - "NOOOOO!" + "NOOOOOO!" ], "bf058": [ - "NO!" + "No!" ], "bf059": [ "NO!" ], "bf060": [ - "Urgh!" + "Uorghh!" ], "bf061": [ - "Ah!" + "Ahh!" ], "bf062": [ "Ungh!" ], "bf063": [ - "Raghhh!" + "Raghh!" ], "bf064": [ - "Finiamolo adesso!" + "We finish this now!" ], "bf065": [ - "Mangia questo!" + "Eat this!" ], "bf066": [ - "Fermare!" + "Stop!" ], "bf067": [ - "Idiota, non sei all'altezza di me!" + "You idiot, you're no match for me!" ], "bf068": [ - "Perché non muori!?" + "Why don't you die!?" ], "bf069": [ - "Arrenditi e lo farò indolore!" + "Give up and I'll make it painless!" ], "bf070": [ - "Non puoi vincere!" + "You cannot win!" ], "bf071": [ - "Ah!" + "Aha!" ], "bf072": [ - "Ahah!" + "Haha!" ], "bf073": [ "AH!" @@ -1246,73 +1246,73 @@ "Urgh!" ], "bf075": [ - "Puoi fare di meglio!" + "You can do better than that!" ], "bf076": [ - "Sei mio!" + "You're mine!" ], "bf077": [ - "Perché non vuoi morire!?" + "Why won't you die!?" ], "bf078": [ - "Ho il potere supremo!" + "I have the ultimate power!" ], "bf079": [ - "Morire!" + "Die!" ], "bf080": [ - "E' la tua occasione migliore?" + "Is that your best shot?" ], "bf081": [ - "Adesso muori!" + "Now you die!" ], "bf082": [ - "Scendi dalla mia torre!" + "Get off my tower!" ], "bf083": [ - "Vedremo a riguardo!" + "We'll see about that!" ], "bf084": [ - "Pensi davvero di avere una possibilità?" + "You really think you have a chance?" ], "bf085": [ - "Temimi!" + "Fear me!" ], "bf086": [ - "Non sei nessuno!" + "You're nothing!" ], "bf087": [ - "Il mio scudo è ora ricaricato!" + "My shield is now recharged!" ], "bf088": [ - "Prova questi per la taglia!" + "Try these on for size!" ], "bf089": [ - "Avrei dovuto ucciderti molto tempo fa!" + "I should have killed you long ago!" ], "bf090": [ - "Mai un momento di noia, eh?" + "Never a dull moment, eh?" ], "bf091": [ - "Stai fermo!" + "Stand still!" ], "bf092": [ - "Torna da dove sei venuto!" + "Go back to wherever you came from!" ], "bf093": [ - "Morirete entrambi per mano mia!" + "You're both going to die by my hand!" ], "bf094": [ - "Avvicinati!" + "Come closer!" ], "bf095": [ - "All'estremità!" + "To the end!" ], "bf096": [ - "Non puoi vincere!" + "You cannot win!" ], "bf097": [ - "Vieni qui!" + "Come here!" ], "bf098": [ "ARGHHH!" @@ -1324,184 +1324,184 @@ "Urgh!" ], "bf101": [ - "Uffa!" + "Oof!" ], "bf102": [ - "Nooooo!" + "Noooo!" ], "bf103": [ - "NO!" + "No!" ], "bf104": [ - "Non di nuovo!" + "Not again!" ], "bf105": [ - "Non può essere!" + "It can't be!" ], "bf106": [ - "Non questa volta!" + "Not this time!" ], "bf107": [ - "Fermare!" + "Stop!" ], "bf108": [ - "Dannazione!" + "Damn!" ], "bf109": [ - "Perché, piccolo...!" + "Why, you little...!" ], "bf110": [ - "Adesso mi hai fatto arrabbiare!" + "Now you've made me angry!" ], "bf111": [ - "Impressionante, ma proviamoci di nuovo!" + "Impressive, but let's try that again!" ], "bf112": [ - "L'uomo più forte vince sempre!" + "The stronger man always wins!" ], "bf113": [ - "La tua perdita era inevitabile, Jak!" + "Your loss was inevitable, Jak!" ], "bf114": [ - "Non potresti mai essere un barone!" + "You could never be a baron!" ], "bf115": [ - "Lo sapevo che eri debole!" + "I knew you were weak!" ], "bf116": [ - "Mhm, mi aspettavo di più da te!" + "Hm, I expected more from you!" ], "bf117": [ - "Perdere è per i deboli!" + "Losing is for the weak!" ], "bf118": [ - "Che patetico!" + "How pathetic!" ], "bf119": [ - "Era troppo facile!" + "That was too easy!" ], "bf120": [ - "Scusa, vecchio mio, è solo guerra!" + "Sorry, old boy, it's just war!" ], "bf121": [ - "Peccato che tu non abbia quello che serve!" + "Too bad you don't have what it takes!" ], "bf122": [ - "Ha vinto il migliore!" + "The better man won!" ], "bf123": [ - "Siamo simili, Jak... oh, tranne che tu sei morto!" + "We're similar, Jak... oh, except you're dead!" ], "bf124": [ - "Senti la furia della Pietra Precursore!" + "Feel the fury of the Precursor Stone!" ], "bf125": [ - "Con il potere della Pietra sono invincibile!" + "With the Stone's power, I am invincible!" ], "bf126": [ - "Tutti mi temeranno adesso!" + "All will fear me now!" ], "bf127": [ - "Tempo di morire!" + "Time to die!" ], "bf128": [ - "I miei piccoli amici si prenderanno cura di te!" + "My little friends will take care of you!" ], "bf129": [ - "Non puoi scappare per sempre, Jak!" + "You can't run forever, Jak!" ], "bf130": [ - "Ora ho te!" + "Now I've got you!" ], "bf131": [ - "Sorpresa!" + "Surprise!" ], "bf132": [ - "Ho di meglio da fare che perdere tempo con te!" + "I have better things to do than waste my time with you!" ], "bf133": [ - "Tu non sei niente!" + "You are nothing!" ], "bf134": [ - "Insetto fastidioso, muori!" + "Annoying insect, die!" ], "bf135": [ - "Non male, ma lascia che ti mostri cos'è il vero potere!" + "Not bad, but let me show you what real power is!" ], "bf136": [ - "Senti questo!" + "Feel this!" ], "bru001": [ - "Ottimo alito puzzolente di un serpente d'oca!", - "Siete eroi per i Lurker!", - "Ormai vedo solo molto felice, grazie! Ruhuhuh.", - "Siete membri onorari della tribù dei Lurker adesso.", - "Non dimentichiamolo: se mai hai bisogno di noi, ti aiutiamo!" + "Great smelly breath of a goosesnake!", + "Heroes to Lurker people you be!", + "By now just see much happy thanks! Ruhuhuh.", + "You honorary members of Lurker tribe now.", + "We no forget - if ever you need us, we help you!" ], "bru002": [ - "Ho sentito che voi due cercate un pezzo del luccicante Sigillo di Mar.", - "Anche Brutter ama le cose luccicanti.", - "Ho un pezzo, penso. Nelle baraccopoli dell'acqua,", - "incombe su di me e tu sei libero di avere.", - "Regalo da Brutter!" + "I hears you two look for a piece of Mar's shiny Seal.", + "Brutter loves shiny bright things too.", + "I have piece I thinks. It in Water Slums,", + "hanging over me hut and you free to have.", + "Gift from Brutter!" ], "bru004": [ - "Bravi voi due! Non c'è guerriero migliore in tutte le tribù dei Lurker!", - "Mantieni Sigillo. Ami le cose luccicanti proprio come Brutter." + "You two good! No better warrior in all Lurker tribes!", + "You keep Seal. You love shiny things just like Brutter." ], "cit001": [ - "EHI!" + "Hey!" ], "cit004": [ - "Guardalo!" + "Watch it!" ], "cit008": [ - "NO!" + "No!" ], "cit010": [ "Argh!" ], "cit016": [ - "Stai lontano!" + "Stay away!" ], "cit033": [ - "EHI!" + "Hey!" ], "cit034": [ - "Attenzione!" + "Look out!" ], "cit035": [ - "Attento!" + "Watch out!" ], "cit046": [ - "Andare via!" + "Go away!" ], "cit047": [ - "Lasciami in pace!" + "Leave me alone!" ], "cit051": [ - "Sei pazzo?" + "Are you crazy?" ], "cit053": [ - "Sei pazzo?!" + "Are you insane?!" ], "cit055": [ - "Ehi, quello è il mio veicolo!" + "Hey, that's my vehicle!" ], "cit056": [ - "Ridammi il mio veicolo!" + "Gimme back my vehicle!" ], "cit057": [ - "Cosa fai?" + "What are you doing?" ], "cit058": [ - "Per favore, non prenderlo!" + "Please, don't take it!" ], "cit097": [ - "Uffa!" + "Ugh!" ], "cit097a": [ - "Ahhh!" + "Aahh!" ], "cit097b": [ "Aaghhh!" @@ -1513,1592 +1513,1592 @@ "AAHHH!" ], "cit098": [ - "Ah!!" + "Ahh!!" ], "cit098a": [ "Urgh!" ], "cit098b": [ - "Uffa!" + "Ugh!" ], "cit098c": [ - "Uffa!" + "Ugh!" ], "cit098d": [ - "Ah!" + "Ahh!" ], "cit099": [ - "NO!" + "No!" ], "cit099a": [ - "Nooooo!" + "Noooo!" ], "cit099b": [ - "NO!" + "No!" ], "cit099c": [ - "NO!" + "No!" ], "cit099d": [ "Nooo!" ], "cit100": [ - "Per favore!" + "Please!" ], "cit100a": [ - "Per favore!" + "Please!" ], "cit100b": [ - "Per favore!" + "Please!" ], "cit100c": [ - "Per favore!" + "Please!" ], "cit101": [ - "Fermare!" + "Stop!" ], "cit101a": [ - "Fermare!" + "Stop!" ], "cit101b": [ - "Fermare!" + "Stop!" ], "cit101c": [ - "Fermare!" + "Stop!" ], "cit103": [ - "Suona l'allarme!" + "Sound the alarm!" ], "cit103a": [ - "Suona l'allarme!" + "Sound the alarm!" ], "cit104": [ - "Guardie ✔!" + "Guards!" ], "cit104a": [ - "Guardie ✔! Aiutaci!" + "Guards! Help us!" ], "cit105": [ - "Aiutaci!" + "Help us!" ], "cit120": [ - "Tienilo lontano da me!" + "Keep away from me!" ], "cit120a": [ - "Tienilo lontano da me!" + "Keep away from me!" ], "cit137a": [ - "Aspettare!" + "Wait!" ], "cityv001": [ - "Lasciando la zona sicura della città." + "Leaving city safe zone." ], "cityv002": [ - "Lasciare la città a proprio rischio e pericolo." + "Leaving city at your own risk." ], "cityv003": [ - "Uscendo dalla città." + "Exiting city." ], "cityv004": [ - "Scudo esterno apribile." + "Opening outer shield." ], "cityv005": [ - "Decontaminazione completata." + "Decontamination complete." ], "cityv006": [ - "Entrando in Haven City." + "Entering Haven City." ], "cityv007": [ "Rientro in città." ], "cityv008": [ - "Bentornato." + "Welcome back." ], "cityv009": [ - "È bello vederti ancora vivo." + "It's good to see you still alive." ], "cityv010": [ - "Autorizzazione di sicurezza concessa." + "Security clearance granted." ], "cityv011": [ - "Ingresso negato. Non hai l'autorizzazione appropriata." + "Entrance denied. You do not have proper clearance." ], "cityv012": [ - "Non sono in grado di ottemperare." + "I am unable to comply." ], "cityv013": [ - "Per favore, torna con l'autorizzazione adeguata." + "Please come back with proper clearance." ], "cityv014": [ - "Accesso negato." + "Access denied." ], "cityv015": [ - "Hai bisogno dell'autorizzazione rossa per questo cancello." + "You need Red Clearance for this gate." ], "cityv016": [ - "Hai bisogno dell'autorizzazione verde per questo cancello." + "You need Green Clearance for this gate." ], "cityv017": [ - "Hai bisogno dell'autorizzazione gialla per questo cancello." + "You need Yellow Clearance for this gate." ], "cityv018": [ - "Hai bisogno dell'autorizzazione blu per questo cancello." + "You need Blue Clearance for this gate." ], "cityv019": [ - "Hai bisogno dell'autorizzazione viola per questo cancello." + "You need Purple Clearance for this gate." ], "cityv020": [ - "Per questa porta è necessaria una speciale autorizzazione nera." + "You need special Black Clearance for this door." ], "cityv021": [ - "Accesso garantito." + "Access granted." ], "cityv022": [ - "Porta aperta." + "Door open." ], "cityv023": [ - "Porta chiusa." + "Door closed." ], "cityv024": [ - "Prego entra." + "Please enter." ], "cityv025": [ - "Portale Warp in linea." + "Warp Gate online." ], "cityv026": [ - "Avvertenza: scorte eco scarse." + "Warning: Eco supplies low." ], "cityv027": [ - "I sistemi di backup falliscono." + "Backup systems failing." ], "cityv028": [ - "Avvertenza: lo stoccaggio ecologico è al di sotto dei minimi di sicurezza." + "Warning: Eco storage is below safe minimums." ], "cityv029": [ - "Rete ecologica instabile." + "Eco Grid unstable." ], "cityv030": [ - "Teste di metallo rilevate nel sito minerario." + "Metal Heads detected at Mining Site." ], "cityv031": [ - "Metal Head rilevati nel sito di perforazione." + "Metal Heads detected at Drilling Site." ], "cityv032": [ - "Attendere l'autorizzazione." + "Stand by for clearance." ], "cityv033": [ - "Buona giornata." + "Have a nice day." ], "cityv034": [ - "Benvenuto." + "Welcome." ], "cityv035": [ - "Questa è un'area riservata." + "This is a restricted area." ], "cityv036": [ - "Stai violando l'ordinanza sulla velocità 51d, accosta." + "You are in violation of Speed Ordinance 51d, pull over." ], "cityv037": [ - "Ho allertato le autorità." + "I have alerted the authorities." ], "cityv038": [ - "Questo settore è chiuso." + "This sector is closed." ], "cityv039": [ - "Avviso: evasione dalla prigione in corso." + "Allarme: evasione in corso." ], "cityv040": [ - "Allerta: città sotto attacco." + "Alert: City under attack." ], "cityv041": [ - "Attacco Metal Head in corso." + "Metal Head attack in progress." ], "cityv042": [ - "Tutti i cittadini vanno in rifugi sicuri." + "All citizens go to safe shelters." ], "cityv043": [ - "Eco Grid sempre più instabile." + "Eco Grid growing unstable." ], "cityv044": [ - "L'Eco Grid non funziona. Ripeto: l'Eco Grid non funziona." + "The Eco Grid is down. Repeat: The Eco Grid is down." ], "cityv045": [ - "Allarme rosso: muro difensivo della città compromesso." + "Red alert: City shield wall compromised." ], "cityv046": [ - "Movimento non autorizzato nel sistema fognario." + "Unauthorized movement in sewer system." ], "cityv047": [ - "Questa è un'area riservata. Difese attivate." + "This is a restricted area. Defenses activated." ], "cityv048": [ - "Stai sconfinando. Le difese entrano in azione." + "You are trespassing. Defenses coming online." ], "cityv049": [ - "Mi pento dell'uso della forza. Inserimento dei sistemi." + "I regret use of force. Systems arming." ], "cityv050": [ - "Intruso neutralizzato." + "Trespasser neutralized." ], "cityv051": [ - "Sospettato distrutto." + "Suspect destroyed." ], "cityv052": [ - "Sono autorizzato a usare la forza." + "I am authorized to use force." ], "cityv053": [ - "Allerta generale: disordini in corso. Guardie Krimzon in viaggio." + "General alert: Riot in progress. Krimzon Guards en route." ], "cityv054": [ - "Arrenditi. Tu sei sotto arresto." + "Arrenditi. Sei in arresto." ], "cityv055": [ "Non c'è via di fuga." ], "cityv056": [ - "Ti trovi in ​​un settore riservato. Questo settore è in massima allerta." + "Sei in un settore ad accesso limitato. Il settore è in stato di allerta." ], "cityv057": [ - "Tu sei sotto arresto. Arrenditi." + "Sei in arresto. Arrenditi." ], "cityv058": [ - "Questo settore è interdetto." + "This sector is off limits." ], "cityv061": [ - "Tutti i sistemi sono tornati online e in verde." + "All systems back online and in the green." ], "cityv062": [ - "La corsa sta per iniziare." + "The race is about to begin." ], "cityv063": [ - "Benvenuti nel sistema di trasporto cittadino." + "Benvenuto nel sistema di trasporti cittadino." ], "cityv064": [ - "Puoi entrare nel tuo veicolo in qualsiasi momento." + "You can thrust in your vehicle at any time." ], "cityv065": [ - "La frenata aiuterà nel controllo del veicolo." + "Braking will assist in vehicle control." ], "cityv067": [ - "Fare il backup è facile." + "Backing up is easy." ], "cityv068": [ - "Puoi passare il mouse su una delle due zone: bassa e alta." + "You can hover in one of two zones: low and high." ], "cityv069": [ - "Prova a cambiare zona al passaggio del mouse." + "Try switching hover zones." ], "cityv070": [ - "Cambiare zona al passaggio del mouse può aiutare a evitare il traffico o", - "ostacoli al suolo." + "Switching hover zones may help avoid traffic or", + "ground obstacles." ], "cityv075": [ - "Avviso: distruzione del veicolo imminente." + "Alert: Vehicle destruction imminent." ], "cityv076": [ - "Per favore guida con più attenzione la prossima volta." + "Please drive more carefully next time." ], "cityv077": [ - "Grazie per aver utilizzato il veicolo." + "Thank you for using the vehicle." ], "cityv078": [ - "Buona giornata." + "Have a nice day." ], "cityv079": [ - "Attenzione: sistemi di raffreddamento dei missili danneggiati." + "Warning: Missile cooling systems damaged." ], "cityv080": [ - "Avviso: guasto del sistema di raffreddamento di riserva.", - "Avviati interventi di emergenza." + "Alert: Backup cooling system failure.", + "Emergency overrides initiated." ], "cityv081": [ - "Sistemi missilistici in sovraccarico critico.", - "Il failsafe non risponde." + "Missile systems at critical overload.", + "Failsafe not responding." ], "cityv082": [ - "Pericolo: la detonazione della testata è imminente.", - "Evacuare immediatamente." + "Danger: Warhead detonation imminent.", + "Evacuate immediately." ], "cityv087": [ - "Arrivo al piano della Sala del Trono." + "Arriving at Throne Room floor." ], "cityv088": [ - "Arrivo al piano terra." + "Arriving at ground floor." ], "cityv093": [ - "Sei stato condannato al licenziamento." + "You have been sentenced to termination." ], "cityv094": [ - "Quest'area è riservata.", - "Avvio del licenziamento con estremo pregiudizio." + "This area is restricted.", + "Initiating termination with extreme prejudice." ], "cityv095": [ - "Quest'area è aperta solo al personale della Guardia Krimzon." + "This area open to Krimzon Guard personnel only." ], "cityv096": [ - "La città è in massima allerta." + "The city is on high alert." ], "cityv097": [ - "La città è sotto attacco.", - "Tutti i cittadini si dirigono verso rifugi sicuri." + "The city is under attack.", + "All citizens proceed to safe shelters." ], "cityv098": [ - "La città è sotto attacco. Per favore, restate nelle vostre case." + "The city is under attack. Please stay in your homes." ], "cityv099": [ - "Gli aggressori Metal Head si stanno infiltrando nel sistema." + "Metal Head aggressors are infiltrating the system." ], "cityv100": [ - "Congratulazioni per aver ricevuto un Security Pass." + "Congratulations on receiving a Security Pass." ], "cityv107": [ - "Uso non autorizzato della porta della Fortezza.", - "Attivazione serbatoio di sicurezza." + "Unauthorized use of Fortress door.", + "Activating security tank." ], "cityv108": [ - "Armi Gunpod in arrivo." + "Gunpod weapons coming online." ], "cityv109": [ - "Surriscaldamento delle armi." + "Weapons overheating." ], "cityv110": [ - "Armi non funzionanti. Si prega di attendere il raffreddamento." + "Weapons inoperative. Please wait for cooling." ], "cityv111": [ - "Le armi sono tornate online." + "Weapons back online." ], "cityv112": [ - "Il gunpod ha subito gravi danni." + "The gunpod has taken severe damage." ], "cityv130": [ - "La mappa della città viene visualizzata in basso a destra." + "La mappa della città è mostrata in basso a destra." ], "cityv132": [ "Segui le icone sulla mappa", - "per raggiungere mete importanti." + "per raggiungere luoghi importanti." ], "cityv134": [ - "Avviso intruso." + "Intruder alert." ], "cityv135": [ - "Stand-by." + "Stand by." ], "cityv146": [ - "Sto riscontrando un sovraccarico del circuito.", - "Attiva i miei interruttori di bypass entro il limite di tempo", - "e sarai ricompensato." + "I'm experiencing a circuit overload.", + "Turn on my bypass switches within the time limit", + "and you will be rewarded." ], "cityv147": [ - "Non sei riuscito ad attivare in tempo la rete di bypass.", - "I miei circuiti della Zona C sono sovraccarichi." + "You failed to turn on the bypass grid in time.", + "My C-Zone circuits have overloaded." ], "cityv148": [ - "Hai attivato con successo il bypass", - "per i miei circuiti in tempo.", - "Ecco una ricompensa." + "You successfully switched on the bypass", + "for my circuits in time.", + "Here is a reward." ], "cityv149": [ - "Ho bisogno di alimentazione di emergenza per i miei Eco Converter.", - "Accendi rapidamente tutti i circuiti disponibili", - "per stabilizzare l’Eco Grid." + "I need emergency power for my Eco Converters.", + "Switch on all available circuits quickly", + "to stabilize the Eco Grid." ], "cityv150": [ - "Non hai raggiunto tutti gli interruttori in tempo.", - "L’Eco Grid è ancora instabile." + "You didn't reach all the switches in time.", + "The Eco Grid is still unstable." ], "cityv151": [ - "Hai attivato con successo i circuiti", - "per stabilizzare l’Eco Grid.", - "Hai guadagnato una ricompensa." + "You successfully switched on the circuits", + "to stabilize the Eco Grid.", + "You have earned a reward." ], "cityv152": [ - "Ho rilevato una fuoriuscita di Eco scuro.", - "È necessario rimuovere rapidamente questo pericolo", - "prima che la città venga contaminata." + "I have detected a Dark Eco spill.", + "You must remove this hazard quickly", + "before the city is contaminated." ], "cityv153": [ - "Non hai rimosso tutto l'Eco Oscuro abbastanza velocemente." + "You did not remove all the Dark Eco quickly enough." ], "cityv154": [ - "Hai rimosso il pericolo dell'Eco Oscuro in tempo.", - "La città ti è grata." + "You removed the Dark Eco hazard in time.", + "The city is grateful to you." ], "cityv155": [ - "I sensori indicano un ammasso di Blue Eco in città.", - "Raccogli tutta l'eco prima che si dissipi", - "e sarai ricompensato." + "Sensors indicate a cluster of Blue Eco in the city.", + "Collect all eco before it dissipates", + "and you will be rewarded." ], "cityv156": [ - "Non hai recuperato tutta l'eco." + "You did not retrieve all of the eco." ], "cityv157": [ - "Hai recuperato con successo l'eco.", - "Ecco la tua ricompensa." + "You successfully retrieved the eco.", + "Here is your reward." ], "cityv158": [ - "Necessaria una risposta di emergenza.", - "I robot bomba in fuga sono stati rilevati e si sono diretti verso", - "aree popolate. Neutralizza tutti i robot bomba", - "prima che sia troppo tardi." + "Emergency response needed.", + "Runaway bomb bots detected and headed for", + "populated areas. Neutralize all bomb bots", + "before it's too late." ], "cityv159": [ - "Non sei riuscito a neutralizzare i robot bomba in fuga." + "You failed to neutralize the runaway bomb bots." ], "cityv160": [ - "Hai distrutto i robot bomba in fuga.", - "La città ringrazia." + "You destroyed the runaway bomb bots.", + "The city thanks you." ], "cityv161": [ - "Raggiungi rapidamente questo punto del gioco", - "e riceverai un premio." + "Get to this point in the game quickly", + "and you will receive a prize." ], "cityv162": [ - "Prova a trovare questo posto." + "Try to find this spot." ], "cityv163": [ - "Puoi identificare questo posto e arrivarci?" + "Can you identify this place and get there?" ], "cityv164": [ - "Raggiungilo nel tempo assegnato e la ricompensa sarà tua." + "Make it here in the time allotted and a reward is yours." ], "cityv165": [ - "Trova questo posto e riceverai un premio." + "Find this spot for a prize." ], "cityv166": [ - "Raggiungi questo posto per un premio." + "Get to this spot for a prize." ], "cityv167": [ - "Sono stati rilevati Metal Head nel percorso delle armi.", - "Neutralizzateli tutti immediatamente." + "Metal Heads have been detected in the gun course.", + "Neutralize them all immediately." ], "cityv168": [ - "Non li hai uccisi tutti." + "You did not kill them all." ], "cityv169": [ - "Scatto eccellente. Minaccia eliminata." + "Excellent shooting. Threat eliminated." ], "cityv170": [ - "Ottieni un punteggio elevato sul JET-Board e ricevi un premio." + "Get a high score on the JET-Board and receive a prize." ], "cityv171": [ - "Prova a ottenere un punteggio elevato e ricevi un premio." + "Try for a high score and receive a prize." ], "cityv172": [ - "Non hai ottenuto un punteggio sufficientemente alto." + "You did not achieve a high enough score." ], "cityv173": [ - "Congratulazioni, hai ottenuto un punteggio abbastanza alto." + "Congratulations, you achieved a high enough score." ], "cityv174": [ - "Benvenuti al computer centrale dello stadio.", - "Seleziona la tua sfida." + "Welcome to the Stadium Central Computer.", + "Please select your challenge." ], "cityv175": [ - "Attenzione, tutti i cittadini:", - "La gara di Classe 1 sta per iniziare." + "Attention, all citizens:", + "The Class 1 Race is about to begin." ], "cityv176": [ - "Attenzione, tutti i cittadini:", - "La Gara di Classe 2 sta per iniziare." + "Attention, all citizens:", + "The Class 2 Race is about to begin." ], "cityv177": [ - "Attenzione, tutti i cittadini:", - "La Gara di Classe 3 sta per iniziare." + "Attention, all citizens:", + "The Class 3 Race is about to begin." ], "cityv178": [ - "Ti va di provare a battere il record del corso?" + "Care to try for the course record?" ], "cityv179": [ - "Congratulazioni, hai raggiunto il record d'oro." + "Congratulations, you achieved the gold record." ], "cityv180": [ - "Congratulazioni, hai raggiunto il record d'argento." + "Congratulations, you achieved the silver record." ], "cityv181": [ - "Congratulazioni, hai raggiunto il record di bronzo." + "Congratulations, you achieved the bronze record." ], "cityv182": [ - "Ti va di provare a segnare un record?" + "Care to try for a high score record?" ], "cityv183": [ - "Ti piacerebbe provare a ottenere un punteggio elevato?" + "Would you like to try for a high score?" ], "cityv184": [ - "Benvenuti alle prove a tempo di corsa." + "Welcome to the Racing Time Trials." ], "cityv185": [ - "Vorresti gareggiare per un tempo record?" + "Would you like to race for a record time?" ], "cityv186": [ - "Scegli il tuo corso." + "Choose your course." ], "cityv187": [ - "Ti piacerebbe provare a ottenere un record del corso?" + "Would you like to try for a course record?" ], "cityv188": [ - "Ti piacerebbe utilizzare le sfere per acquistare un segreto?" + "Would you like to use Orbs to buy a secret?" ], "cityv189": [ - "Non hai abbastanza sfere per questo segreto." + "You do not have enough Orbs for this secret." ], "cityv190": [ - "Segreto attivato." + "Secret activated." ], "cityv191": [ - "Tutti i segreti sono attivati." + "All secrets are activated." ], "cityv192": [ - "Per favore, esci dalla tuta da Titano." + "Please exit the Titan Suit." ], "cityv193": [ - "Devi uscire dalla tuta da Titano." + "You must exit the Titan Suit." ], "cityv194": [ - "I veicoli devono rimanere entro i limiti della città." + "Vehicles must remain within city limits." ], "cityv195": [ - "Uscita negata. Obiettivi nemici ancora presenti." + "Exit denied. Enemy targets still present." ], "cityv196": [ - "Uscita negata. Uova di Metal Head ancora rilevate." + "Exit denied. Metal Head eggs still detected." ], "cityv197": [ - "Gli scanner mostrano che le uova di Metal Head sono ancora attive." + "Scanners show Metal Head eggs still active." ], "daxm001": [ - "Spara alla piattaforma, Jak." + "Shoot the platform, Jak." ], "daxm002": [ - "Ci serve qualcosa per attraversare quel cancello!" + "We need something to get through that gate!" ], "daxm003": [ - "Spara a Metal Head quando muove lo scudo!" + "Shoot the Metal Head when he moves his shield!" ], "daxm004": [ - "Colpiscilo allo stomaco!" + "Hit him in his stomach!" ], "daxm005": [ - "Ehi! Quel sentiero è caduto come uh... una roccia!" + "Whoa! That path dropped like uh... a rock!" ], "daxm006": [ - "Sbatti la scatola, tesoro!" + "Smack the box, baby!" ], "daxm007": [ - "Questa è quella che io chiamo una strada rocciosa!" + "That's what I call a rocky road!" ], "daxm008": [ - "Dobbiamo arrivare in cima!" + "We gotta get to the top!" ], "daxm009": [ - "Ce l'abbiamo fatta!!" + "We made it!!" ], "daxm010": [ - "Rock n roll!" + "Rock 'n roll!" ], "ds001": [ - "Dobbiamo trovare il Barone, Jak." + "We gotta find the Baron, Jak." ], "ds005": [ - "Jak, quelli sono Metal Heads!" + "Jak, those are Metal Heads!" ], "ds006": [ - "Finalmente ora possiamo vedere l'Ombra!", - "Cosa devi fare in questo posto per farti notare?" + "Finally, now we get to see the Shadow!", + "What do ya gotta do around this place to get noticed?" ], "ds012": [ - "Quella deve essere la chiave di rubino della città." + "That must be the Ruby Key to the city." ], "ds013": [ - "Le statue stanno diventando una specie in via di estinzione da queste parti." + "Statues are becoming an endangered species around here." ], "ds014": [ - "Quindi questa è la tomba spaventosa di Marte, eh?", - "Non sembra così male." + "So this is Mar's scary tomb, eh?", + "Doesn't look so bad." ], "ds016": [ - "Riportiamo i soldi a Krew." + "Let's bring the money back to Krew." ], "ds017": [ - "Devono essere le munizioni e il missile che Torn ci ha detto di far esplodere!" + "That must be the ammo and missile Torn told us to blow up!" ], "ds018": [ - "Prendi il carro armato per sparare al missile!" + "Get the tank to shoot the missile!" ], "ds019": [ - "Rompi quei tubi al centro." + "Break those tubes in the center." ], "ds020": [ - "Per favore, dimmi che ricordi come rotolare..." + "Per favore, dimmi che ti ricordi ancora come fare..." ], "ds023": [ - "Rockeggiamo!" + "Let's rock!" ], "ds024": [ - "Eccoci qui!" + "Here we go!" ], "ds025": [ - "Va bene!" + "All right!" ], "ds026": [ - "Sì!" + "Yeah!" ], "ds028": [ - "O si!" + "Oh yeah!" ], "ds029": [ - "Torniamo in città." + "Let's go back to the city." ], "ds030": [ - "Penso che dovremmo tornare in città, Jak." + "I think we need to go back to the city, Jak." ], "ds031": [ - "Andiamo a parlare con Torn." + "Let's go talk to Torn." ], "ds032": [ - "Torniamo al nascondiglio sotterraneo." + "Let's go back to the Underground Hideout." ], "ds043": [ - "Puoi fare un salto più lungo rotolandoci dentro." + "Se arrivi veloce puoi saltare più lontano." ], "ds044": [ - "Usa un salto in lungo per superare questo divario." + "Use a long jump to get across this gap." ], "ds045": [ - "Bella forma!" + "Nice form!" ], "ds046": [ "Se ti abbassi prima di saltare, arriverai più in alto.", "Devi saltare più in alto per raggiungere quella sporgenza, Jak." ], "ds047": [ - "Ooh, è alto.", - "Dovrai saltare,", - "poi salta di nuovo in aria per arrivare lassù." + "Ooh, that's a high one.", + "You'll need to jump,", + "then jump again in the air to get up there." ], "ds048": [ - "Colpiscili ancora, Jak!" + "Hit 'em again, Jak!" ], "ds049": [ - "Fai un calcio rotante!" + "Do a spin kick!" ], "ds050": [ - "Robotan, corri!" + "Robotank, run!" ], "ds051": [ - "Ehi, dovremmo restare con il Sig." + "Hey, we should stay with Sig." ], "ds052": [ - "Ehi, ragazzone, stai vicino, eh?" + "Hey, big guy, keep close, huh?" ], "ds053": [ - "Siamo troppo lontani dal Sig." + "We're too far away from Sig." ], "ds054": [ - "Segui il piano, Jak, proteggi Sig!" + "Stick with the plan, Jak, protect Sig!" ], "ds055": [ - "Uh oh, dov'è Sig?" + "Uh oh, where's Sig?" ], "ds056": [ - "Wow, che esplosione!" + "Wow, what a blast!" ], "ds057": [ - "Sig ha una buona mira." + "Sig's a good shot." ], "ds058": [ - "Vai ad aiutare Sig!" + "Go help Sig!" ], "ds059": [ - "Bella ripresa, Sig!" + "Nice shootin', Sig!" ], "ds060": [ - "Sei il mio eroe!" + "You're my hero!" ], "ds061": [ - "Oh oh, Sig è nei guai!" + "Uh oh, Sig's in trouble!" ], "ds062": [ - "C'è un altro Metal Head che insegue il nostro ragazzo!", - "Spara, spara!" + "There's another Metal Head going after our boy!", + "Shoot it, shoot it!" ], "ds063": [ - "Tieni Sig al sicuro, Jak!" + "Keep Sig safe, Jak!" ], "ds064": [ - "Whoa, Sig è davvero malmenato!" + "Whoa, Sig's really getting roughed up!" ], "ds065": [ - "Sparagli, sparagli!" + "Shoot 'em, shoot 'em!" ], "ds066": [ - "Sig muori, noi moriamo." + "Sig dies, we die." ], "ds067": [ - "Oddio, facciamo schifo..." + "Oof, we suck..." ], "ds068": [ - "Dobbiamo tenerli lontani da Sig." + "We have to keep 'em away from Sig." ], "ds069": [ - "Dobbiamo trovare la valvola per riaprire l'acqua." + "We need to find the valve to turn the water back on." ], "ds094": [ - "Robotan, corri!" + "Robotank, run!" ], "ds095": [ - "Ecco di nuovo quel carro armato!" + "Here comes that tank again!" ], "ds096": [ - "Prendi il carro armato per sparare al missile!" + "Get the tank to shoot the missile!" ], "ds099": [ - "Dobbiamo arrivare in cima a quella torre!" + "We need to get to the top of that tower!" ], "ds100": [ - "Sali sulla torre in rovina, Jak!" + "Climb the ruined tower, Jak!" ], "ds111": [ - "Dovremmo tornare con la tuta da titano per fare questo percorso." + "We should come back with the Titan Suit to do this path." ], "ds112": [ - "Hai un pugno meccanico, Jak. Usalo!" + "You've got a mechanical fist, Jak. Use it!" ], "ds113": [ - "Rompi la porta!" + "Break the door!" ], "ds114": [ - "Tigorilla da 800 sterline in arrivo!" + "800 pound Tigorilla comin' through!" ], "ds115": [ - "Lavoro strepitoso, Jak! Oh, è stato divertente." + "Smashing work, Jak! Oh, that was funny." ], "ds116": [ - "Spara alla piattaforma, Jak." + "Shoot the platform, Jak." ], "ds117": [ - "Ci serve qualcosa per oltrepassare quel cancello." + "We need something to get through that gate." ], "ds118": [ - "Spara al Metal Head quando muove il suo scudo." + "Shoot the Metal Head when he moves his shield." ], "ds119": [ - "Colpiscilo allo stomaco." + "Hit him in his stomach." ], "ds120": [ - "Wow, quel sentiero scendeva come un... sasso!" + "Whoa, that path dropped like a... a rock!" ], "ds121": [ - "Sbatti la scatola, tesoro!" + "Smack the box, baby!" ], "ds128": [ - "Bene, abbiamo finito." + "Good, we're through." ], "ds129": [ - "Spara, Jak!" + "Shoot the gun, Jak!" ], "ds143": [ - "Dovremmo mantenere in vita gli uomini di Krew, Jak!" + "We're supposed to keep Krew's guys alive, Jak!" ], "ds144": [ - "Salvali, Jak!" + "Save 'em, Jak!" ], "ds145": [ - "Non mi piace, Jak..." + "Don't like this, Jak..." ], "ds146": [ - "Dietro di noi, Jak!" + "Behind us, Jak!" ], "ds147": [ - "Teste di metallo! Ovunque!" + "Metal Heads! Everywhere!" ], "ds148": [ - "Proteggici, Jak! Ma prima io." + "Protect us, Jak! But first me." ], "ds150": [ - "Prendi un veicolo, Jak! È più veloce." + "Take a vehicle, Jak! It's faster." ], "ds151": [ - "Usa la tua JET-Board!" + "Use your JET-Board!" ], "ds152": [ - "Abbiamo compagnia, Jak! Molte guardie!" + "We got company, Jak! Lots of guards!" ], "ds160": [ - "Esatto, siamo cattivi! La Pietra Precursore è nostra!" + "That's right, we're bad! The Precursor Stone is ours!" ], "ds161": [ - "C'è la pistola di Mar, Jak! Andiamo a dare un'occhiata." + "There's Mar's gun, Jak! Let's go check it out." ], "ds162": [ "Queste sfere Precursor valgono molto ora.", - "Potremmo trovarne alcuni nascosti in giro,", - "o chiedi ad alcuni di svolgere compiti difficili.", - "Potremo comprare cose con loro!" + "dovremmo trovarne alcune qui in giro,", + "o riceverne completando alcune missioni.", + "Vendendole potremmo comprare molte cose!" ], "ds163": [ - "Jak, ora che abbiamo il Palace Security Pass,", - "andiamo a divertirci nella culla del grand'uomo!" + "Jak, now that we have the Palace Security Pass,", + "let's go have some fun in the big man's crib!" ], "ds164": [ - "Torna indietro per uscire dal mech." + "Back up to get out of the mech." ], "ds165": [ "Siamo liberi, Jak! Grazie a me.", - "Bello respirare un po' d'aria fresca, eh?", - "Prenderemo quel Barone Praxis, va bene!" + "È bello respirare dell'aria fresca, eh?", + "La faremo vedere al Barone Praxis!" ], "ds166": [ - "Non uscirò da questa capsula", - "finché non ucciderai tutti quei pazzi Metal Head volanti!" + "I'm not getting out of this pod", + "'till you kill all those crazy flyin' Metal Heads!" ], "ds167": [ - "Mi chiedo perché abbiano voluto che proteggessimo la capanna di Samos.", - "Forse ora incontreremo l'Ombra." + "I wonder why they wanted us to protect Samos' Hut.", + "Maybe now we'll get to meet the Shadow." ], "ds168": [ - "C'è l'Anello Rift!" + "There's the Rift Ring!" ], "ds173": [ "Ahhh!" ], "ds174": [ - "Oooh!" + "Ooooh!" ], "ds175": [ "Whoa-whoa-oaa-ah!" ], "ds176": [ - "Ehi!" + "Whoa!" ], "ds177": [ - "EHI!" + "Hey!" ], "ds178": [ - "Ehi, guardalo!" + "Hey, watch that!" ], "ds179": [ - "Oh!" + "Ooh!" ], "ds180": [ - "Oh ragazzo!" + "Oh, boy!" ], "ds181": [ - "Oh!" + "Uooaaoh!" ], "ds182": [ - "Wow, c'era mancato poco!" + "Wow, that was close!" ], "ds183": [ - "Oh ragazzo!" + "Oh, boy!" ], "ds184": [ - "SÌ!" + "Yes!" ], "ds185": [ - "Sì!" + "Yeah!" ], "ds186": [ - "Ehi, guardalo!" + "Hey, watch it!" ], "ds187": [ - "Va bene!" + "All right!" ], "ds188": [ - "Spostati!" + "Move over!" ], "ds189": [ - "Fulmine arancione in arrivo!" + "Orange Lightning coming through!" ], "ds190": [ - "Rotolando con gli amici!" + "Rollin' with the homies!" ], "ds191": [ - "Sei mio!" + "You're mine!" ], "ds192": [ - "Sono là!" + "There they are!" ], "ds193": [ - "EHI! Guarda dove guidi!" + "Hey! Watch where you're drivin'!" ], "ds194": [ - "Come posso guidare questa cosa?" + "How do I drive this thing?" ], "ds195": [ - "Si, è esatto! Sono cattivo!" + "Yeah, that's right! I'm bad!" ], "ds196": [ - "Fuori dai piedi!" + "Outta my way!" ], "ds197": [ - "Fuori dai piedi!" + "Outta my way!" ], "ds198": [ - "Muoviti o perdilo, amico!" + "Move it or lose it, buddy!" ], "ds199": [ - "Mm... ciao ciao!" + "Mm... bye-bye!" ], "ds200": [ - "Ultimo giro!" + "Last lap!" ], "ds201": [ - "Dai dai!" + "Come on, come on!" ], "ds202": [ - "Dai dai dai!" + "Come on, come on, come on!" ], "ds203": [ - "Accelerare a fondo!" + "Pedal to the metal!" ], "ds204": [ - "Ooooah, devo recuperare!" + "Ooooah, I gotta catch up!" ], "ds205": [ - "Girati e brucia, tesoro!" + "Turn and burn, baby!" ], "ds206": [ - "Oooh, sarà vicino!" + "Oooh, it's gonna be close!" ], "ds207": [ - "Mangia la mia polvere, amico!" + "Eat my dust, buddy!" ], "ds208": [ - "Capito!" + "Gotcha!" ], "ds209": [ - "Questa è la mia traccia, nonna!" + "This is my track, grandma!" ], "ds210": [ - "Impara a guidare!" + "Learn to drive!" ], "ds211": [ - "Girati, girati!" + "Turn, turn!" ], "ds212": [ - "Passaci sopra!" + "Step on it!" ], "ds213": [ - "Oooh, ho vinto, ho vinto!" + "Oooh, I won, I won!" ], "ds214": [ - "Sì, è un buon tempo sul giro." + "Yeee, that's a good lap time." ], "ds215": [ - "O si! Sto spaccando!" + "Oh, yeah! I'm rockin'!" ], "ds216": [ - "Un altro giro nel libro dei record!" + "Another lap in the record book!" ], "ds217": [ - "Guarda bene la mia coda!" + "Take a good look at my tail!" ], "ds218": [ "Wahoo!" ], "ds219": [ - "Ehi, ragazzo zanna, sbrigati ed entra,", - "ti portiamo a Brutter!" + "Hey, fang boy, hurry up and get in,", + "we'll take you to Brutter!" ], "ds220": [ - "Ecco il tuo ragazzo, Brutter! Andiamo a prendere un altro animale!" + "Here's your boy, Brutter! We're off to get another animal!" ], "ds221": [ - "Ehi, amante degli animali, porta il tuo sedere peloso nel veicolo!" + "Yo, animal lover, get your furry butt in the vehicle!" ], "ds222": [ - "Ecco un'altra bestia da soma!" + "Here's another beast of burden!" ], "ds223": [ - "Nel veicolo, amico, possiamo salvarti!" + "In the vehicle, buddy, we can save you!" ], "ds224": [ - "Un altro Lurker liberato." + "Another Lurker freed." ], "ds225": [ - "Muoviamoci, respiro eco! Dobbiamo portarti a Brutter." + "Let's move, eco breath! We gotta get you to Brutter." ], "ds226": [ - "Ehi, Brutter! Guarda cosa ha portato dentro il gatto tacchino." + "Hey, Brutter! Look what the cat turkey dragged in." ], "ds227": [ - "Guarda cosa abbiamo trovato!" + "Lookie what we found!" ], "ds228": [ - "Riconosci questo mostro?" + "You recognize this monster?" ], "ds229": [ - "Ce l'abbiamo fatta! Li abbiamo salvati tutti!" + "We did it! We saved them all!" ], "ds230": [ - "Prendi il camioncino, Jak!" + "Catch the paddywagon, Jak!" ], "ds231": [ - "Distruggi il carro di risaia!" + "Crash the paddywagon!" ], "ds232": [ - "Ancora un po' di danni e siamo fuori!" + "A little more damage and we got the sucker!" ], "ds233": [ - "Sta fumando, Jak! Colpiscilo ancora!" + "He's smoking, Jak! Hit him again!" ], "ds234": [ - "Ciò ha causato qualche danno!" + "That caused some damage!" ], "ds235": [ - "Un altro così e ha finito!" + "One more like that and he's through!" ], "ds236": [ - "Trova il prossimo veicolo!" + "Find the next vehicle!" ], "ds237": [ - "Sì, l'abbiamo tolto!" + "Yes, we took it out!" ], "ds238": [ - "Caccia e distruggi, tesoro!" + "Hunt and destroy, baby!" ], "ds239": [ - "Colpiscilo, colpiscilo!" + "Hit it, hit it!" ], "ds240": [ - "Tiralo fuori!" + "Take it out!" ], "ds241": [ - "Raccogli il Lurker, Jak!" + "Pick up the Lurker, Jak!" ], "ds242": [ - "Prendi il Lurker!" + "Get the Lurker!" ], "ds243": [ - "Dobbiamo prendere quel Lurker laggiù." + "We need to pick up that Lurker back there." ], "ds244": [ - "Di solito non mi piace essere così vicino ai Lurkers." + "Usually, I don't like to be this close to Lurkers." ], "ds245": [ - "Ehehe, sembri un simpatico, uh... animale." + "Ehehe, you seem like a nice, uh... animal." ], "ds246": [ - "Facile, amico. Non mordermi!" + "Easy, buddy. Don't bite me!" ], "ds247": [ - "Ehi, smettila di sbavare su di me!" + "Hey, stop slobbering on me!" ], "ds248": [ - "Si sta ricaricando!" + "He's recharging!" ], "ds249": [ - "Ooh, l'abbiamo preso bene quella volta!" + "Ooh, we got him good that time!" ], "ds250": [ - "Sì, ora sta male!" + "Yeah, now he's hurtin'!" ], "ds251": [ - "Bel tiro, Jak!" + "Good shot, Jak!" ], "ds252": [ - "In arrivo!" + "Incoming!" ], "ds253": [ - "Sì, ce l'abbiamo fatta!" + "Yeah, we got him!" ], "ds254": [ - "Jak, nasconditi dietro i pilastri quando spara!" + "Jak, hide behind the pillars when he shoots!" ], "ds255": [ - "Ha la Pietra Precursore!" + "He's got the Precursor Stone!" ], "ds256": [ - "Lanciagli la bomba, Jak!" + "Kick the bomb right at him, Jak!" ], "ds257": [ - "Quello lo ha colpito!" + "That one hit him!" ], "ds258": [ - "Attenzione!" + "Look out!" ], "ds259": [ - "Salta il divario!" + "Jump the gap!" ], "ds260": [ - "Sì, l'hai colpito!" + "Yeah, you hit him!" ], "ds261": [ - "Come se non ce ne fosse già abbastanza di Krew." + "As if there wasn't enough of Krew already." ], "ds262": [ - "Spara a tutti, Jak! Li sistemeremo più tardi..." + "Shoot 'em all, Jak! We'll sort 'em out later..." ], "ds263": [ - "C'è il vero Krew! Sparagli!" + "There's the real Krew! Shoot him!" ], "ds264": [ - "L'hai preso!" + "You got him!" ], "ds265": [ - "Guardati le spalle, Jak!" + "Watch your back, Jak!" ], "ds266": [ - "Stanno arrivando di nuovo!" + "They're comin' again!" ], "ds267": [ - "Adesso ci hai fatto incazzare." + "Now you've got us mad." ], "ds268": [ - "Bel tiro, Jak! Il grand'uomo sta soffrendo adesso." + "Good shot, Jak! The big man is hurtin' now." ], "ds269": [ - "E lo sfidante è a terra!" + "And the challenger is down for the count!" ], "ds270": [ - "Continua a muoverti, tesoro! Sparerà!" + "Keep movin', baby! He's gonna shoot!" ], "ds271": [ - "Evviva, ecco che arrivano i Metallari!" + "Wooh, here come some Metal Heads!" ], "ds272": [ - "Proteggi il bambino!" + "Protect the kid!" ], "ds273": [ - "Uccidi tutti i Metal Head!" + "Kill all the Metal Heads!" ], "ds274": [ - "Altri Metal Head!" + "More Metal Heads!" ], "ds275": [ - "Spara alle gambe di Kor, Jak!" + "Shoot Kor's legs out, Jak!" ], "ds276": [ - "È a terra, Jak! Colpiscilo in testa!" + "He's down, Jak! Hit him in the head!" ], "ds277": [ - "Stivale alla testa, stivale alla testa!" + "Boot to the head, boot to the head!" ], "ds278": [ - "Penso che dovremmo nasconderci da qualche parte!" + "I think we should hide somewhere!" ], "ds279": [ - "Mettiti al riparo prima che esploda!" + "Take cover before he blows!" ], "ds280": [ - "Sì, quella volta l'hai preso bene!" + "Yeah, you got him good that time!" ], "ds281": [ - "Oh cavolo, adesso è arrabbiato!" + "Oh, man, now he's angry!" ], "ds282": [ - "Prendilo, Jak!" + "Get him, Jak!" ], "ds283": [ - "Sparerà!" + "He's gonna shoot!" ], "ds284": [ - "Bel colpo, socio!" + "Nice hit, partner!" ], "ds285": [ - "Ciò doveva fargli male." + "That had to hurt him." ], "ds286": [ - "Hai combinato guai con gli eroi sbagliati, amico!" + "You messed with the wrong heroes, buddy!" ], "ds287": [ - "Sparagli ancora, Jak!" + "Shoot him again, Jak!" ], "ds288": [ - "Jak, stiamo prendendo una batosta!" + "Jak, we're taking a beating!" ], "ds289": [ - "Stai lontano dall'Eco Oscuro!" + "Stay away from the Dark Eco!" ], "ds302": [ - "L'abbiamo quasi preso, Jak!" + "We've almost got him, Jak!" ], "ds303": [ - "Questo è tutto! Ce l'hai fatta!" + "That's it! You did it!" ], "ds305": [ - "Spara all'interruttore per cambiare il nastro trasportatore", - "direzione!" + "Shoot the switch to change the coveyor belt's", + "direction!" ], "ds306": [ - "Devi azionare l'interruttore, Jak!" + "You gotta shoot the switch, Jak!" ], "ds307": [ - "Trova l'interruttore per cambiare la direzione del trasportatore!" + "Find the switch to change the conveyor's direction!" ], "ds321": [ - "Elimina le torrette!" + "Take out the turrets!" ], "ds322": [ - "Colpisci le torrette, Jak!" + "Hit the turrets, Jak!" ], "ds323": [ - "Stai facendo qualche danno!" + "Doin' some damage!" ], "ds324": [ - "Indossa la tuta da Titano!" + "Get in the Titan Suit!" ], "ds325": [ - "Spara a quella nave!" + "Shoot that ship!" ], "ds326": [ - "Sì, quella nave lo sente adesso!" + "Yeah, that ship's feelin' it now!" ], "ds327": [ - "Ooh, colpi diretti." + "Ooh, direct hits." ], "ds328": [ - "Penso che ti sia fatto male quella volta!" + "I think you hurt it that time!" ], "ds329": [ - "La nave sta affondando! Ce l'hai fatta, Jak!" + "The ship's goin' down! You did it, Jak!" ], "ds353": [ - "Dev'essere il missile che Torn vuole che facciamo esplodere!" + "That must be the missile Torn wants us to blow up!" ], "ds354": [ - "Rompi quei tubi al centro, Jak!" + "Break those tubes in the center, Jak!" ], "ds372": [ - "Devo guidare il JET-Board su questo, Jak!" + "Gotta ride the JET-Board on this one, Jak!" ], "ds375": [ - "Attenti al raggio!" + "Look out for the ray!" ], "ds378": [ - "Dobbiamo rompere tutti i cavi di supporto!" + "We gotta break all the support cables!" ], "ds379": [ - "Levigare le basi di supporto per rompere i cavi." + "Grind on the support bases to break the cables." ], "ds394": [ - "Ragno! Ragno! Huff... huff... odio i ragni!" + "Spider! Spider! Huff... huff... I hate spiders!" ], "ds395": [ - "Devo correre, devo correre!" + "Gotta run, gotta run!" ], "ds398": [ - "Il primo raggio!" + "The first beam!" ], "ds399": [ - "La seconda trave! La porta si sta aprendo!" + "The second beam! The door's opening!" ], "ds404": [ - "C'è Sig!" + "There's Sig!" ], "ds405": [ - "Fai entrare i blocchi nelle fessure, Jak!" + "Get the blocks to go into the slots, Jak!" ], "ds406": [ - "Spara o calcia i blocchi!" + "Shoot or kick the blocks!" ], "ds407": [ - "Devi inserire i blocchi negli slot più velocemente!" + "You have to get the blocks in the slots faster!" ], "ds408": [ - "Corri, come!" + "Run, Jak!" ], "ds409": [ - "Continua a muoverti!" + "Keep moving!" ], "ds410": [ - "Dobbiamo stare al passo con quella cosa!" + "We gotta stay ahead of that thing!" ], "ds439": [ - "Spara a tutte le uova di Metal Head, Jak!" + "Shoot all the Metal Head eggs, Jak!" ], "ds440": [ - "Non abbiamo preso tutte quelle uova disgustose!" + "We didn't get all those nasty eggs!" ], "ds441": [ - "Ci siamo persi qualche uovo Metal Head!" + "We missed some Metal Head eggs!" ], "ds461": [ - "Dobbiamo saltare sulla cassa che pende dalla gru!" + "We gotta jump onto the crate dangling from the crane!" ], "ds462": [ - "Usa il tuo hoverboard su questo percorso!" + "Use your hoverboard on this path!" ], "ds463": [ - "Puoi macinare per attraversare quei tubi usando il tuo", + "You can grind to cross those pipes using your", "hoverboard!" ], "ds464": [ - "Percorri l'half-pipe fino alla fine!" + "Ride the half-pipe to the end!" ], "ds466": [ - "Devi sganciare una bomba in ogni pozzo, Jak!" + "You gotta drop a bomb into each well, Jak!" ], "ds467": [ - "Usa la rampa per arrivare abbastanza in alto da far cadere la bomba!" + "Use the ramp to get high enough to drop the bomb in!" ], "ds468": [ - "Devo saltare più in alto!" + "Gotta jump higher!" ], "ds469": [ - "Solo un minuto prima del brindisi, Jak!" + "Only a minute before we're toast, Jak!" ], "ds470": [ - "Mancano 30 secondi, poi facciamo BOOM!" + "30 seconds left, then we go BOOM!" ], "ds471": [ - "Mancano dieci secondi, Jak!" + "Ten seconds left, Jak!" ], "ds472": [ - "Ne manca uno, ne mancano cinque!" + "That's one well down, five to go!" ], "ds473": [ - "Due pozzi sono storia, ne restano quattro!" + "Two wells are history, four left!" ], "ds474": [ - "Tre pozzi tagliati, ne restano solo tre!" + "Three wells cut, only three to go!" ], "ds475": [ - "Questo è il quarto, beh, sono rimasti due ragazzacci!" + "That's the fourth well, two bad boys left!" ], "ds476": [ - "Hai preso bene il quinto, ne manca solo uno!" + "You got the fifth well, only one to go!" ], "ds477": [ - "Li hai presi tutti, Jak!" + "You got 'em all, Jak!" ], "ds478": [ - "L'ultimo pozzo è dove abbiamo salvato Vin!" + "The last well is up where we rescued Vin!" ], "ds479": [ - "Ora è vulnerabile!" + "Now he's vulnerable!" ], "ds480": [ - "Portalo fuori!" + "Take him out!" ], "ds481": [ - "Prendilo mentre è vulnerabile!" + "Get him while he's vulnerable!" ], "ds482": [ - "Eccolo che arriva..." + "Here he comes..." ], "ds483": [ - "Come ci si sente ad avere i pantaloni abbassati, Barone?" + "How's it feel to have your pants down, Baron?" ], "ds484": [ "Sparategli, sparategli!" ], "ds485": [ - "Attenzione!" + "Look out!" ], "ds487": [ - "Facile, Jak, dobbiamo portare questo tizio in salvo!" + "Easy, Jak, we gotta get this guy to safety!" ], "ds488": [ - "Stiamo subendo un sacco di danni, amico!" + "We're takin' a lotta damage, buddy!" ], "ds489": [ - "Ci stanno prendendo a calci nel sedere!" + "We're gettin' our butts kicked!" ], "ds490": [ - "Forse dovrei guidare..." + "Maybe I should drive..." ], "ds491": [ - "Andiamo, Wondergoon,", - "ti porteremo in un posto sicuro in città!" + "Let's go, wondergoon,", + "we'll take you to a safe place in the city!" ], "ds492": [ - "Ok, il giro è finito, vai fuori!" + "Okay, ride's over, out you go!" ], "ds493": [ - "Tutti a bordo della Metropolitana!", - "Prossima fermata: il tuo nuovo rifugio!" + "All aboard the Underground railroad!", + "Next stop: Your new safehouse!" ], "ds494": [ - "Credo che questa sia la tua fermata!" + "I believe this is your stop!" ], "ds495": [ - "Il servizio taxi dei combattenti per la libertà di Daxter!", - "Sbrigati, amico, non abbiamo tutto il giorno." + "Daxter's Freedom Fighter Taxi Service!", + "Hurry up, buddy, we ain't got all day." ], "ds496": [ - "Casa libera, tesoro!", - "Non dimenticare di dire a Torn quanto ce la siamo cavata bene!" + "Home free, baby!", + "Don't forget to tell Torn how well we did!" ], "ds497": [ - "Cerchi un passaggio, ragazzo combattente?" + "You looking for a lift, fighter boy?" ], "ds498": [ - "Ok, è qui che scendi. Quindi... scendi." + "Okay, this is where you get off. So... get off." ], "ds499": [ - "Ce l'abbiamo fatta, Jak!", - "Abbiamo portato tutti i combattenti nei nuovi rifugi!" + "We did it, Jak!", + "We got all the fighters to the new safehouses!" ], "ds500": [ - "Le statue stanno diventando una specie in via di estinzione da queste parti." + "Statues are becoming an endangered species around here." ], "ds501": [ - "Ho preso un talkbox.", - "La gente della città usa queste cose per comunicare", - "insieme." + "I got us a talkbox.", + "The city people use these things to communicate", + "with each other." ], "ds502": [ - "Andiamo a vedere Onin e la sua scimmia pazza." + "Let's go see Onin and her crazy monkey bird." ], "ds503": [ - "Penso che dovremmo tornare in città, Jak." + "I think we need to go back to the city, Jak." ], "dsek001": [ - "Ragazzo! Resta con lui, Jak!" + "Kid! Stay with him, Jak!" ], "dsek002": [ - "Raggiungili, Jak!" + "Catch up to them, Jak!" ], "dsek003": [ - "Dove sono andati?!" + "Where'd they go?!" ], "dsek004": [ - "Eccoli di nuovo!" + "There they go again!" ], "dsek005": [ - "Uh oh, ecco che arrivano i guai!" + "Uh oh, here comes trouble!" ], "dsek006": [ - "Più guardie!?" + "More guards!?" ], "dsek007": [ - "Ragazzo, per favore! Mi stai uccidendo!" + "Kid, please! You're killin' me!" ], "dsek008": [ - "Ecco, cagnolino, cagnolino..." + "Here, poochie, poochie..." ], "dsek009": [ - "Ecco di nuovo quel pazzo crocadog...!" + "There goes that crazy crocadog again...!" ], "dsek010": [ - "Insegui il bambino!" + "Chase after the Kid!" ], "dsek011": [ - "Stai al passo con il bambino!" + "Keep up with the Kid!" ], "dsek012": [ - "Coccodrillo!" + "Crocadog!" ], "dsek013": [ - "Uff, finalmente... portiamo questi due a Kor!" + "Phew, finally... let's get these two to Kor!" ], "ero001": [ - "Levatevi dai piedi!" + "Out of my way!" ], "ero002": [ - "Possiedo questa traccia!" + "I own this track!" ], "ero003": [ - "Lascia perdere, eco-maniaco!" + "Give it up, eco freak!" ], "ero004": [ - "Tempo di restituzione." + "Payback time." ], "ero005": [ - "Rendiamolo interessante!" + "Let's make this interesting!" ], "ero006": [ - "Mangia muro!" + "Eat wall!" ], "ero007": [ - "Tempo di morire!" + "Time to die!" ], "ero008": [ - "Spostati!" + "Move over!" ], "ero009": [ - "Prendimi adesso, perdente!" + "Catch me now, loser!" ], "ero010": [ - "Sono troppo veloce per te!" + "I'm too fast for you!" ], "ero011": [ - "Ora stai gareggiando con i grandi!" + "Now you're racing with the big boys!" ], "ero012": [ - "Eccone uno per il Barone." + "Here's one for the Baron." ], "ero013": [ - "Prendi questo!" + "Take this!" ], "ero014": [ - "Lo stai rendendo troppo facile!" + "You're making this too easy!" ], "ero015": [ - "Ahahah, ciao ciao!" + "Hahaha, bye bye!" ], "ero016": [ - "Ne vuoi un po?" + "You want some?" ], "ero017": [ - "Ora capisci perché non perdo mai." + "Now you see why I never lose." ], "ero018": [ - "La folla mi ama!" + "The crowd loves me!" ], "ero019": [ - "Ah!" + "Ahh!" ], "ero020": [ - "Ecco un po' di dolore!" + "Here's some pain!" ], "ero021": [ - "Prova a cancellarli!" + "Try to erase these!" ], "ero022": [ - "Come sono i tuoi riflessi?" + "How's your reflexes?" ], "ero023": [ - "Troppo per te?!" + "Too much for you?!" ], "ero024": [ - "Aveva abbastanza?" + "Had enough?" ], "ero025": [ - "Evitalo, saputello!" + "Avoid this, smart-ass!" ], "ero026": [ - "Di' buonanotte, maniaco dell'ambiente!" + "Say goodnight, eco freak!" ], "ero027": [ - "Non puoi battermi!" + "You can't beat me!" ], "ero028": [ - "Morirei prima di lasciarti vincere!" + "I'd die before I let you win!" ], "ero029": [ - "Questo sarà il tuo ultimo giro." + "This will be your last lap." ], "ero030": [ - "Schiantati e brucia!" + "Crash and burn!" ], "ero031": [ - "All'estremità!" + "To the end!" ], "ero032": [ - "Ultimo giro da vivere!" + "Last lap to live!" ], "ero033": [ - "Adesso mettiamo fine a tutto questo!" + "Now we end this!" ], "ero034": [ - "Non vedrai il traguardo!" + "You won't see the finish line!" ], "ero035": [ - "MORIRE!" + "DIE!" ], "ero036": [ - "Morire!" + "Die!" ], "ero037": [ - "Ahahahah!" + "Hahahaha!" ], "ero038": [ - "SÌ!" + "YEAH!" ], "ero039": [ - "AH!" + "HA!" ], "ero040": [ "NO!" @@ -3107,185 +3107,185 @@ "NOOOOO!" ], "ero042": [ - "AHHHHH!" + "AHHHHHH!" ], "ero043": [ - "Eccoci qui." + "Here we go." ], "ero044": [ - "Arrivederci." + "See you later." ], "ero045": [ - "Scemo! Non puoi sconfiggermi." + "Fool! You cannot defeat me." ], "ero046": [ - "Ti sei perso uno squillo." + "You missed a ring." ], "ero047": [ - "Questa gara è mia!" + "This race is mine!" ], "ero048": [ - "Non potrai mai essere veloce come me!" + "You can never be as fast as me!" ], "ero049": [ - "Keira vuole un vero uomo." + "Keira wants a real man." ], "ero050": [ - "Che sfortuna, vecchio mio." + "Bad luck, old chap." ], "ero051": [ - "Bel tentativo." + "Nice try." ], "ero052": [ - "Spostati!" + "Move over!" ], "ero053": [ - "Levatevi dai piedi!" + "Out of my way!" ], "ero054": [ - "Attraversando!" + "Coming through!" ], "ero055": [ - "Ciao ciao!" + "Bye bye!" ], "ero056": [ - "Eccomi!" + "Here I come!" ], "ero057": [ - "Abituati a guardarmi le spalle!" + "Get used to watching my back!" ], "ero058": [ - "Questa è la mia città, maniaco dell'ambiente." + "This is my city, eco freak." ], "ero059": [ - "Sembri sciatto, Jak." + "Looking sloppy, Jak." ], "ero060": [ - "Lasciar perdere!" + "Give it up!" ], "ero061": [ - "Non questa volta." + "Not this time." ], "ero062": [ - "Sei un po' nervoso?" + "Getting a bit nervous?" ], "ero063": [ - "Torna qui!" + "Come back here!" ], "ero064": [ - "Fai largo, lento!" + "Move over, slowpoke!" ], "ero065": [ - "È qui che ti ho battuto." + "This is where I beat you." ], "ero066": [ - "Allungamento finale!" + "Final stretch!" ], "ero067": [ - "È finita!" + "It's over!" ], "ero068": [ - "Possiedo questa città." + "I own this city." ], "ero069": [ - "Che cosa? Da dove vieni?" + "What? Where'd you come from?" ], "ero070": [ - "Sei solo fortunato." + "You're just lucky." ], "ero071": [ - "Non puoi gestire la velocità!" + "You can't handle the speed!" ], "ero072": [ - "Muori, mostro." + "Die, freak." ], "ero073": [ - "NO!" + "No!" ], "ero074": [ - "FERMARE!" + "STOP!" ], "ero075": [ - "Ahahahah!" + "Hahahaha!" ], "ero076": [ - "AHAHA!" + "HAHA!" ], "ero077": [ "Ahhh!" ], "ero078": [ - "Bene!" + "Ough!" ], "ero079": [ - "Uffa!" + "Oof!" ], "ero080": [ - "Battilo, mostro!" + "Beat it, freak!" ], "ero081": [ - "Ti va di tornare sulla sedia?" + "Care to get back in the chair?" ], "ero082": [ - "Questa gara è stata troppo facile." + "This race was too easy." ], "ero083": [ - "È stato più facile di quanto pensassi batterti." + "It was easier than I thought to beat you." ], "ero084": [ - "Neanche lontanamente, Keira sta scommettendo sull'uomo sbagliato." + "Not even close, Keira's betting on the wrong man." ], "ero085": [ - "Perdente! Mi disgusti!" + "Loser! You disgust me!" ], "ero086": [ - "Vedi Jak, vinco e ottengo quello che voglio.", - "Un giorno sarò Barone, allora la città pagherà davvero!" + "You see Jak, I win, and I get what I want.", + "Someday I will be Baron, then the city will really pay!" ], "ero087": [ - "Avrei dovuto sapere che non saresti stato all'altezza." + "I should have known you'd be no match." ], "ero088": [ - "Se vinco, Keira mi amerà!" + "I win, Keira's going to love me!" ], "ero089": [ - "Forse dovresti tornare da dove sei venuto." + "Maybe you should go back to wherever you came from." ], "ero090": [ - "Riceverò un bacio di vittoria da Keira più tardi." + "I'll get a victory kiss from Keira later." ], "ero091": [ - "Ancora una volta dimostro la mia superiorità." + "Again I prove my superiority." ], "ero092": [ - "Vedi? Non sei all'altezza di me." + "You see? You are no match for me." ], "ero093": [ - "Peccato, ho vinto!" + "Too bad, I win!" ], "ero094": [ - "Hahahaha, patetico insetto, ho vinto!" + "Hahahaha, pathetic insect, I win!" ], "ero095": [ - "Non potrai mai sconfiggermi!" + "You can never defeat me!" ], "ero096": [ "Ahhh!...ahh." ], "ero097": [ - "Uffa!" + "Ugh!" ], "ero098": [ - "Uhhh!" + "Ughhh!" ], "ero099": [ - "SÌ!" + "Dahh!" ], "ero100": [ - "Già!" + "Yaughh!" ], "ero101": [ - "AUGH!" + "AUGHH!" ], "ero102": [ "OW!" @@ -3294,973 +3294,973 @@ "DAHHH!" ], "ero104": [ - "FIGLIA!" + "DAUGHH!" ], "erol001": [ - "Ti sto cercando, maniaco dell'ambiente,", - "e quando ti troverò desidererai di essere morto in prigione." + "I'm looking for you, eco freak,", + "and when I find you, you'll wish you died in prison." ], "erol002": [ - "Questo è Erol. Sembra che tu sia a corto di amici.", - "Li abbiamo arrestati tutti e li abbiamo gettati nella tua", - "prigione preferita. A proposito, quella bionda, Tess", - "ha urlato così deliziosamente quando è stata arrestata.", - "Non vedo l'ora che arrivi il suo turno sulla sedia.", - "Ha ha ha ha ha...." + "This is Erol. Looks like you're running out of friends.", + "We've arrested them all and thrown them into your", + "favorite prison. By the way, that blonde girl Tess", + "screamed so delightfully when she was arrested.", + "I can't wait for her turn in the chair.", + "Hahahahaha...." ], "erol003": [ - "Questo è Erol. Ricorda solo che è l'unica ragione per cui te lo permetto", - "camminare è così posso affrontarti nella corsa del campionato!" + "This is Erol. Just remember, the only reason I'm letting you", + "walk is so I can face you in the championship race!" ], "hal001": [ - "Tranquillo! Ecco che arriva il bel ragazzo." + "Quiet! Here comes pretty boy." ], "hal002": [ - "Era ora che ti facessi vedere. Ok, facciamolo." + "'Bout time you showed up. Okay, let's do this." ], "hal003": [ - "Krew ha detto che ci proteggerai fino alla statua." + "Krew said you'll protect us all the way to the statue." ], "hal004": [ - "Scendiamo!" + "We go down!" ], "hal006": [ - "Da questa parte!" + "This way!" ], "hal007": [ - "AHH! È un Metal Head! Spara, spara!" + "AHH! It's a Metal Head! Shoot it, shoot it!" ], "hal008": [ - "Resta con noi!" + "Stay with us!" ], "hal009": [ - "Cavolo, Krew si arrabbierà se sbagli tutto." + "Man, Krew's gonna be pissed if you mess this up." ], "hal010": [ - "Non lasciarci morire!" + "Don't leave us to die!" ], "hal011": [ - "Se ci abbandoni, Krew ti rovinerà!" + "You ditch us and Krew's gonna mess you up!" ], "hal012": [ - "Dobbiamo stare insieme." + "We need to stay together." ], "hal013": [ - "Pensavo che questo ragazzo avrebbe dovuto proteggerci!" + "I thought this guy was supposed to be protecting us!" ], "hal014": [ - "Questo è tutto! Stiamo annullando la missione,", - "non andiamo finché non sei serio." + "That's it! We're calling the mission off,", + "we don't go until you're serious." ], "hal015": [ - "Non verrò ucciso a causa di questo perdente,", - "questa missione è finita." + "I'm not getting killed because of this loser,", + "this mission is over." ], "hal019": [ - "Torniamo indietro prima che veniamo uccisi tutti." + "Let's go back before we all get killed." ], "hal020": [ - "Uffa, questo posto puzza." + "Ugh, this place stinks." ], "hal021": [ - "Ho una brutta sensazione riguardo questo posto." + "I got a bad feeling about this place." ], "hal022": [ - "Oh oh, credo di essermelo fatto addosso." + "Uh oh, I think I wet myself." ], "hal023": [ - "NO! Per favore!" + "No! Please!" ], "hal024": [ - "Voglio andare a casa." + "I wanna go home." ], "hal025": [ - "Uhh, sento delle cose." + "Uhh, I'm hearing things." ], "hal026": [ - "Torniamo indietro." + "Let's go back." ], "hal027": [ - "Muovete le chiappe, o le muovo io per voi!" + "Move your butts, or I'll move 'em for ya!" ], "hal028": [ - "Questo lavoro è meglio di essere uno spazzino." + "This job beats being a garbage man." ], "hal029": [ - "L'odore dello zolfo non è grandioso?" + "Ain't the smell of sulphur grand?" ], "hal030": [ - "Copriti le orecchie!" + "Cover your ears!" ], "hal031": [ - "Adoro questo lavoro." + "I love this job." ], "hal032": [ - "Fantastico, ora siamo intrappolati in questa fossa di melma!" + "Great, now we're trapped in this slime pit!" ], "hal033": [ - "Spara, tesoro, spara!" + "Shoot, baby, shoot!" ], "hal034": [ - "Ah! Il soffitto striscia!" + "Ahh! The ceiling's crawling!" ], "hal035": [ - "Non posso scappare!" + "I can't get away!" ], "hal036": [ - "Ce n'è uno che viene dritto verso di me!" + "There's one coming right at me!" ], "hal037": [ - "Mi vede!" + "It sees me!" ], "hal038": [ - "Ah! Stai lontano!" + "Ahh! Stay away!" ], "hal039": [ - "Mi sta colpendo!" + "It's hitting me!" ], "hal040": [ - "Gahh, morirò qui!" + "Gahh, I'm gonna die here!" ], "hal041": [ - "Mi sto fulminando!" + "I'm getting zapped!" ], "hal042": [ - "Questa sarà la mia fine!" + "This'll be the end of me!" ], "hal043": [ - "Aiutami! Ho otto bambini da sfamare!" + "Help me! I've got eight kids to feed!" ], "hal044": [ - "Bel lavoro, quelli erano dei Metal Head schifosi." + "Nice work, those were some nasty Metal Heads." ], "hal045": [ - "Ecco, perché non ti rendi utile?" + "There you are, why don't you make yourself useful?" ], "hal046": [ - "Continua a muoverti!" + "Keep moving!" ], "hal047": [ - "Andiamo avanti, non stiamo diventando più giovani." + "On we go, we're not getting any younger." ], "hal048": [ - "Ah! Stanno strisciando lungo i muri!" + "Ahh! They're crawling down the walls!" ], "hal049": [ - "Ben fatto, è qui che entro in gioco." + "Way to go, this is where I come in." ], "hal050": [ - "Vuoi dire coprirti il ​​culo! Fuoco nel buco!" + "You mean cover your ass! Fire in the hole!" ], "hal051": [ - "Faresti meglio a tenere la testa bassa, tesoro." + "You better keep your head down, sugar." ], "hal052": [ - "Il tuo alito cattivo, muoviamoci." + "Your bad breath, let's move." ], "hal053": [ - "Ti ha stirato i capelli, eh?", - "Hehe, la prossima volta mi ascolterai. Ok, muoviamoci." + "That straightened your hair, huh?", + "Hehe, next time you'll listen to me. Okay, let's move." ], "hal054": [ - "Oof, doveva far male.", - "Ti avevo detto di stare indietro, ma nessuno ascolta mai Jinx." + "Oof, that had to hurt.", + "I told you to keep back, but no one ever listens to Jinx." ], "hal055": [ - "Altri di quei mostri!" + "More of those monsters!" ], "hal056": [ - "E allora, abbiamo una squadra da sogno qui. Fai le tue cose, Jak!" + "So what, we got a dream team here. Do your stuff, Jak!" ], "hal057": [ - "Jak! Porta il tuo sedere quassù e fai le tue cose." + "Jak! Get your butt up here and do your thing." ], "hal058": [ - "Portali fuori, ragazzo blu." + "Take 'em out, blue boy." ], "hal059": [ - "Sei piuttosto brava con quel ferro, biondina." + "You're pretty handy with that iron, blondie." ], "hal060": [ - "Stai zitto, Mog." + "Shut up, Mog." ], "hal061": [ - "Eccoli di nuovo!" + "Here they come again!" ], "hal062": [ - "Sali qui e guadagnati il ​​tuo mantenimento!" + "Get up here and earn your keep!" ], "hal063": [ - "Krew aveva ragione su di te. Hai la magia, amico." + "Krew was right about you. You got the magic, man." ], "hal064": [ - "Bel litigio, amico, cominci a piacermi." + "Nice fighting, man, I'm beginning to like you." ], "hal065": [ - "Ok... non sembra una bella cosa. Jak, sei sveglio!" + "Okay... that doesn't look good. Jak, you're up!" ], "hal066": [ - "Oh! Raggi di morte!", - "Resto qui finché non fai qualcosa a riguardo." + "Wow! Beams of death!", + "I'm staying right here 'til you do something about that." ], "hal067": [ - "Uhh, Jak. Penso che tu sia l'uomo giusto per questo lavoro." + "Uhhh, Jak. I think you're the man for this job." ], "hal068": [ - "Salta le travi, Jak." + "Jump the beams, Jak." ], "hal069": [ - "Belle mosse." + "Nice moves." ], "hal070": [ - "Sì... lo desideri, Tubby." + "Yeah... you wish, tubby." ], "hal071": [ - "Resteremo qui finché non li avrete eliminati quei Metallari." + "We're staying put 'til you take out those Metal Heads." ], "hal072": [ - "Dolce come una ballerina, ehehehe..." + "Sweet as a ballerina, hehehehe..." ], "hal073": [ - "Lasciali scemi, Jak!" + "Knock 'em silly, Jak!" ], "hal074": [ - "Questo sarà rumoroso!" + "This one's gonna be loud!" ], "hal075": [ - "Questo è troppo facile." + "This is too easy." ], "hal080": [ - "Non ci muoveremo finché non li ucciderai tutti!" + "We ain't moving, 'til you kill 'em all!" ], "hal081": [ - "OK, usciamo di qui prima che ne ritornino altri." + "OK, let's get out of here before more come back." ], "hal082": [ - "Ti stai guadagnando i soldi oggi. Finiamola!" + "You're earning your dough today. Let's finish this!" ], "hal083": [ - "Sono impressionato, Jak. Metterò una buona parola con il capo." + "I'm impressed, Jak. I'll put in a good word with the boss." ], "hal084": [ - "Sì, fallo, Jinx." + "Yeah, do it, Jinx." ], "hal085": [ - "Amico, Jinx, cosa hai messo in quei bastoncini?" + "Man, Jinx, what'd you put in those boomsticks?" ], "hal086": [ - "Guardalo andare." + "Look at him go." ], "hal087": [ - "Potrei saltare così." + "I could jump like that." ], "hal088": [ - "Vattene via da me, mostro pazzo!" + "Get away from me, you crazy monster!" ], "hal090": [ - "È qui che entro io, tappati le orecchie." + "This is where I come in, cover your ears." ], "hal091": [ - "Fuoco nel buco!" + "Fire in the hole!" ], "hal092": [ - "E andiamo avanti." + "And on we go." ], "hal093": [ - "Per favore, permettetemi." + "Please, allow me." ], "hal094": [ - "Una fogna non intasata, in arrivo." + "One unclogged sewer, comin' up." ], "hal095": [ - "Questo è il mio boom!" + "This is my boomshtick!" ], "hal096": [ - "Bum, tesoro!" + "Boom, baby!" ], "hal097": [ - "Abbiamo chiarito la questione, muoviamoci." + "We're clear, let's move." ], "hal101": [ - "Ah! Lascerà un segno." + "Ahh! That's gonna leave a mark." ], "hal102": [ - "Morire! Un piccolo aiuto non farebbe male!" + "Die! A little help would be good!" ], "hal103": [ - "Attento, bel ragazzo, o ti risistemano la faccia." + "Watch it, pretty boy, or I'll rearrange your face." ], "hal104": [ - "Hai un prurito al dito sul grilletto." + "You got an itchy trigger finger." ], "hal107": [ - "Pezzo di torta." + "Piece of cake." ], "hal108": [ - "Vieni qui, Jak!" + "Get over here, Jak!" ], "hal109": [ - "Stai vicino, bel ragazzo!" + "Stay close, pretty boy!" ], "hal111": [ - "Resta con noi, duro!" + "Keep with us, tough guy!" ], "hal112": [ - "Sei d'intralcio, Jak, muoviti!" + "You're in the way, Jak, move!" ], "hal113": [ - "Se fossi in te non starei lì!" + "I wouldn't stand there if I were you!" ], "hal114": [ - "Sarà rumoroso." + "This is gonna be loud." ], "hal115": [ - "OH!" + "Oh!" ], "hal116": [ - "OH!" + "Oh!" ], "hal117": [ - "EHI!" + "Hey!" ], "hal118": [ - "È una trappola!" + "It's a trap!" ], "hal119": [ - "Sì, perché ci siamo iscritti a questo?" + "Yeah, why did we sign up for this?" ], "hal120": [ - "Ho 30 chiavi di esplosivo ad alto potenziale legate alla schiena...", - "Grande..." + "I got 30 keys of high explosives strapped to my back...", + "Great..." ], "hal121": [ - "Chiudi le tue trappole lamentose e continua a muoverti." + "Just shut your whiny traps and keep moving." ], "hal122": [ - "Uh, dobbiamo?" + "Uh, do we have to?" ], "hal123": [ - "Uhh, hai sentito?" + "Uhh, did you hear that?" ], "hal124": [ - "Siamo proprio morti, amico." + "We are so dead, man." ], "hal125": [ - "Stai zitto! Vado avanti e controllo..." + "Shut up! I'll go ahead and check it out..." ], "hal126": [ - "Cavolo, quella cosa è brutta." + "Man, that thing's ugly." ], "hal127": [ - "Prendilo, amico, prima che sia lui a prendere noi." + "Get him, man, before he gets us." ], "hal128": [ - "Anche loro arrivano da dietro!" + "They're coming up from behind, too!" ], "hal129": [ - "Come sta il mio eroe?" + "Jak's my hero." ], "hal130": [ - "Sembra che abbia fatto benzina." + "Sounds like I got gas." ], "hal131": [ - "Odio Krew." + "I hate Krew." ], "hal132": [ - "Sono sicuro che non tornerò così!" + "I'm sure not going back that way!" ], "hal133": [ - "Sta arrivando per me!" + "It's coming for me!" ], "hal134": [ - "Penso che mi voglia!" + "I think it wants me!" ], "hal135": [ - "Aiutami, Jak!" + "Help me, Jak!" ], "hal136": [ - "Sto per morire!" + "I'm gonna die!" ], "hal137": [ - "Mi ha preso!" + "It got me!" ], "hal138": [ - "Come! Salvami!" + "Jak! Save me!" ], "hal139": [ - "Uffa! Mi ha preso!" + "Ughh! It got me!" ], "hal140": [ - "Uh! Quel raggio è intelligente." + "Oughh! That beam smarts." ], "hal141": [ - "Mi hanno sparato!" + "I've been shot!" ], "hal142": [ - "Sono stato colpito!" + "I'm hit!" ], "hal143": [ - "Uffa!" + "Ughh!" ], "hal144": [ - "Oddio! Aiutami!" + "Ughh! Help me!" ], "hal145": [ - "Ehi amico, guardalo!" + "Hey man, watch it!" ], "hal146": [ - "Ohh, colpiscimi ancora e ti colpisco!" + "Ohh, hit me again and I'll pound you!" ], "hal147": [ - "Nessuno è mio amico..." + "Nobody's my friend..." ], "hal148": [ - "Uffa!" + "Oof!" ], "hal149": [ "Uh!" ], "hal150": [ - "Ah!" + "Ahh!" ], "hal151": [ - "Mi ha preso!" + "He's got me!" ], "hal152": [ - "Ah!! Non di nuovo!" + "Gahh!! Not again!" ], "hal153": [ - "Sto morendo!" + "I'm dying!" ], "hal154": [ - "Ancora una volta così, allora sarò storia passata." + "Any more like that, then I'm history." ], "hal155": [ - "Mi spareranno!" + "I'm getting shot!" ], "hal156": [ - "Sicuro! Perché non uccidi anche me?" + "Sure! Why don't you kill me too?" ], "hal157": [ - "Controlla i tuoi obiettivi, fifone!" + "Check your targets, wimp boy!" ], "hal158": [ - "Spara alle teste lucide, non a me!" + "Shoot the shine-heads, not me!" ], "hal159": [ - "Ah!" + "Ahh!" ], "hal161": [ - "Uffa!" + "Ugh!" ], "hal162": [ - "OH!" + "Oh!" ], "hal163": [ - "OH!" + "Oh!" ], "hal164": [ "Ah!" ], "hal165": [ - "Attenzione!" + "Look out!" ], "hal166": [ - "Non lo faremo con un novellino, annullo tutto!" + "We're not doing this with a rookie, I'm calling this off!" ], "hal167": [ - "Questo è tutto, abbiamo finito! Torna quando fai sul serio." + "That's it, we're done! Come back when you're serious." ], "hal168": [ - "Sono alle strette!" + "I'm cornered!" ], "hal169": [ - "Mi sparerà!" + "It's gonna shoot me!" ], "hal170": [ - "Jak! Fare qualcosa!" + "Jak! Do something!" ], "hal171": [ - "Ah! Mi ha preso!" + "Ahh! It got me!" ], "hal172": [ - "No no no! Aiuto!" + "No no no! Help!" ], "hal173": [ - "Si stanno avvicinando troppo, Jak!" + "They're getting too close, Jak!" ], "hal174": [ - "Mi prenderà!" + "It's gonna get me!" ], "hal175": [ - "Mi uccideranno qui!" + "I'm getting killed here!" ], "hal176": [ - "Jak! Sto per diventare carne di metallo!" + "Jak! I'm about to be metal meat!" ], "hal177": [ - "Aghh! Quel raggio brucia!" + "Aghh! That beam burns!" ], "hal178": [ - "Mi sta sparando!" + "It's shooting me!" ], "hal179": [ - "Attenzione al raggio!" + "Watch out for the beam!" ], "hal180": [ - "Mi hanno sparato!" + "I'm shot!" ], "hal181": [ - "Sono intrappolato!" + "I'm trapped!" ], "hal182": [ - "Stai indietro... lo farò esplodere a distanza." + "Get back... I'm gonna detonate this one remotely." ], "hal183": [ - "Ehi!" + "He-hah!" ], "hal184": [ - "Bene!" + "Alright!" ], "hal185": [ - "Andiamo!" + "Let's go!" ], "hal186": [ - "Muoviti!" + "Move it!" ], "hal187": [ - "Ci sono un sacco di Metal Heads." + "That's a lot of Metal Heads." ], "hal188": [ - "Uffa!" + "Oof!" ], "hal189": [ - "Dagh!" + "Daghh!" ], "hal190": [ - "Uh..." + "Oughh..." ], "hal191": [ - "Krew è morto per avermi coinvolto in questa cosa!" + "Krew's dead for getting me into this!" ], "jak001": [ - "Bene!" + "Alright!" ], "jak002": [ - "Sì!" + "Yeah!" ], "jak003": [ - "Whoo!" + "Wooo!" ], "jak004": [ - "Eccoci qui!" + "Here we go!" ], "jak005": [ - "Carino!" + "Nice!" ], "jak006": [ - "Rock n roll!" + "Rock 'n roll!" ], "jak007": [ - "Giusto!" + "Right on!" ], "jak008": [ - "Freddo!" + "Cool!" ], "jak009": [ - "Freddo!" + "Cool!" ], "jak010": [ - "O si!" + "Oh, yeah!" ], "jak011": [ - "Arrivo!" + "Comin' through!" ], "jak012": [ - "Attenzione!" + "Look out!" ], "jak013": [ - "Ultimo giro!" + "Last lap!" ], "jak014": [ - "Attento!" + "Watch out!" ], "jak015": [ - "Ehi!" + "Whoa!" ], "jak016": [ - "Ehi!" + "Whoa!" ], "jak017": [ - "Aspetta, Dax!" + "Hold on, Dax!" ], "jak018": [ - "Aspetta, Dax!" + "Hang on, Dax!" ], "jak020": [ - "Whoa... ragazzo, c'era mancato poco." + "Whoa... boy that was close." ], "jak021": [ - "NO!" + "No!" ], "jak022": [ - "Non questa volta." + "Not this time." ], "jak023": [ "Huargh!" ], "jak024": [ - "Magra, tesoro, magra!" + "Lean, baby, lean!" ], "jak025": [ - "Catturatelo dall'interno!" + "Catch him on the inside!" ], "jak026": [ - "Questo è il MIO spettacolo!" + "This is MY show!" ], "jak027": [ - "Ahah, l'abbiamo preso!" + "Haha, we got him!" ], "jak028": [ - "Attento!" + "Watch out!" ], "jak029": [ - "Sei morto, Erol!" + "You're dead, Erol!" ], "jak030": [ - "Ci vediamo!" + "See ya!" ], "jak031": [ - "Ahah!" + "Haha!" ], "jak032": [ - "Whoo!" + "Wooo!" ], "jak033": [ - "Ultimo giro!" + "Last lap!" ], "jak034": [ - "Dopo." + "Later." ], "jak035": [ - "Dobbiamo recuperare il ritardo!" + "We gotta catch up!" ], "jak036": [ "Eccolo!" ], "jak037": [ - "Avanti, tesoro, mostrami cosa sai fare!" + "Come on, baby, show me what you got!" ], "jak038": [ - "Eccoci qui!" + "Here we go!" ], "jak039": [ "Urgh!" ], "jak040": [ - "Prendo questo." + "I'll take this." ], "jak041": [ - "Ho bisogno di prendere in prestito questo." + "I need to borrow this." ], "jak042": [ - "Spostati, amico!" + "Move over, buddy!" ], "jak044": [ - "Fuori dal veicolo!" + "Outta the vehicle!" ], "jak045": [ - "Fuori dai piedi, amico!" + "Outta my way, buddy!" ], "jak046": [ - "Grazie per il passaggio." + "Thanks for the lift." ], "jak047": [ - "Ti dispiace se guido?" + "Mind if I drive?" ], "jak048": [ - "Mi piace il colore di questo veicolo." + "I like the color of this vehicle." ], "jak049": [ - "Il mio adesso." + "Mine now." ], "jak050": [ - "«Scusate, ma ne ho bisogno." + "'Scuse me, but I need this." ], "jak051": [ - "Fai una passeggiata, amico!" + "Take a hike, buddy!" ], "jak052": [ - "Prova a camminare." + "Try walking." ], "jak053": [ - "Mi spiace, ma ho fretta!" + "Sorry, but I'm in a hurry!" ], "jak054": [ - "Devo andare!" + "Gotta go!" ], "jak055": [ - "Prendi un altro veicolo!" + "Get another vehicle!" ], "jak056": [ - "Porco della strada!" + "Road hog!" ], "jak057": [ - "Frenati!" + "Brake yourself!" ], "jak059": [ - "Ahah, ne vuoi un po'?" + "Haha, you want some?" ], "jak060": [ - "Procuratene alcuni!" + "Get some!" ], "jak061": [ - "Sì, sentilo!" + "Yeah, feel it!" ], "jak062": [ - "Morire!" + "Die!" ], "jak063": [ - "Un duro in arrivo!" + "Badass comin' through!" ], "jak064": [ - "Avere paura. Abbi molta paura." + "Be afraid. Be very afraid." ], "jak065": [ - "Oooh, deve far male." + "Oooh, that's gotta hurt." ], "jak066": [ - "Questa è la vendetta." + "This is payback." ], "jak067": [ - "La pratica!" + "DIE, Praxis!" ], "jak068": [ - "Hai finito, Kor!" + "You're finished, Kor!" ], "jak069": [ - "Questa è la mia città, Kor!" + "This is my town, Kor!" ], "jak070": [ - "Sorpresa... non puoi uccidermi nella mia forma oscura." + "Surprise... you can't kill me in my dark form." ], "jak071": [ - "Adesso paghi tu!" + "Now you pay!" ], "jak072": [ - "Torna al passato, Kor! Perché sei storia." + "Go back to the past, Kor! 'Cause you're history." ], "jak073": [ - "Io vinco." + "I win." ], "jak074": [ - "Avresti dovuto uccidermi quando ne avevi la possibilità, Praxis." + "You should have killed me when you had the chance, Praxis." ], "jak075": [ - "Daxter, stai zitto e guardami le spalle." + "Daxter, just shut up and watch my back." ], "jak076": [ - "Comunque, Daxter." + "Whatever, Daxter." ], "jak077": [ - "La smetterai di blaterare?" + "Will you stop yappin'?" ], "jak078": [ - "Quando sei diventato più piccolo, anche il tuo cervello è diventato più piccolo." + "When you got smaller, so did your brain." ], "jak079": [ - "Sei sulla MIA spalla. TU sei il compagno." + "You're on MY shoulder. YOU'RE the sidekick." ], "jak080": [ - "Finché sei sulla MIA spalla, tieni la bocca chiusa." + "As long as you're on MY shoulder, keep your mouth shut." ], "jd001": [ - "Ehi, ragazzo! Aspettare! Ritorno!", - "Dobbiamo proteggerlo!" + "Hey, kid! Wait! Come back!", + "We gotta protect him!" ], "jk001": [ - "Aspetta, RAGAZZO!" + "Wait, KID!" ], "jk002": [ - "Eccolo!" + "There he goes!" ], "jk003": [ - "Lascialo solo!" + "Leave him alone!" ], "jk004": [ - "RAGAZZO!" + "KID!" ], "jk005": [ - "Scegli qualcuno della tua taglia!" + "Pick on someone your own size!" ], "jk006": [ - "Ragazzo, attento!" + "Kid, look out!" ], "jk007": [ - "Ti piace quando qualcuno reagisce?" + "How do YOU like it when somebody fights back?" ], "jk008": [ - "Lascia stare il bambino!" + "Leave the kid alone!" ], "jk009": [ - "È solo un ragazzino!" + "He's just a kid!" ], "jk010": [ - "Stai lontano da lui!" + "Keep away from him!" ], "jk011": [ - "Adesso mi hai fatto incazzare!" + "Now you've pissed me off!" ], "jk012": [ - "Mangia questo!" + "Eat this!" ], "jk013": [ - "Indietro!" + "Back off!" ], "jk014": [ - "Dobbiamo salire sul veicolo con Kid!" + "We gotta get in the vehicle with the Kid!" ], "jk015": [ - "Aspettare!" + "Hold on!" ], "jk016": [ - "Tieni la testa bassa, ragazzo!" + "Keep your head down, Kid!" ], "jk017": [ - "Resta con me, Kid, e sarai al sicuro." + "Stick with me, Kid, and you'll be safe." ], "jk018": [ - "Resta con me, ragazzo!" + "Stay with me, Kid!" ], "jk019": [ - "Sali sul veicolo, Dax!" + "Get in the vehicle, Dax!" ], "kei001": [ - "Puoi salire e scendere dal JET-Board in qualsiasi momento." + "You can get on and off the JET-Board at any time." ], "kei002": [ - "Puoi saltare sul tuo JET-Board!" + "You can jump on your JET-Board!" ], "kei003": [ - "Salta su quella sporgenza." + "Jump up on that ledge." ], "kei004": [ - "Prova a saltare su quella cassa." + "Try jumping up on that crate." ], "kei005": [ - "Salta oltre quell'ostacolo." + "Jump over that obstacle." ], "kei006": [ - "Puoi fare un salto più alto abbassandoti prima di saltare!" + "You can get a higher jump by ducking before you jump!" ], "kei007": [ - "Prova a fare un salto con l'anatra oltre quell'ostacolo." + "Try doing a duck jump over that obstacle." ], "kei008": [ - "Salta e salta ancora un po' dopo essere atterrato", - "per un lancio ancora più grande!" + "Jump and jump again a little after you've landed", + "for an even bigger launch!" ], "kei009": [ - "Prova ad alzarti sulla sporgenza più alta con un salto potenziato!" + "Try getting up on that higher ledge with a boost jump!" ], "kei010": [ - "Puoi girare in aria!" + "You can spin in the air!" ], "kei011": [ - "Ottieni un 360 perfetto per un aumento di velocità!" + "Land a perfect 360 for a speed boost!" ], "kei012": [ - "Bel giro!" + "Nice spin!" ], "kei013": [ - "È possibile atterrare su una rotaia e poi scivolarci sopra." + "You can land on a rail and grind across it." ], "kei014": [ - "Prova a macinare su quel binario." + "Try grinding on that rail." ], "kei016": [ - "Puoi fare delle capriole mentre salti!" + "You can do flips while you jump!" ], "kei017": [ - "Si possono fare anche dei trucchi per divertimento." + "You can also do tricks for fun." ], "kei018": [ - "Prova a mettere insieme una serie di mosse per ottenere punti." + "Try to put a number of moves together to get points." ], "kei019": [ - "Ottieni abbastanza punti per vincere la sfida!" + "Get enough points to win the challenge!" ], "kei020": [ - "Punti insufficienti! Lavora sulle tue mosse." + "Not enough points! Work on your moves." ], "kei021": [ - "Buon lavoro!" + "Good job!" ], "kei022": [ - "Vicino, ma non del tutto lì." + "Close, but not quite there." ], "kei023": [ - "Riprova." + "Try again." ], "kei024": [ - "Ancora un po' di lavoro e potresti vincere!" + "A little more work and you just might win!" ], "kei025": [ - "Non buono! Punti insufficienti." + "No good! Not enough points." ], "kei026": [ - "La metropolitana ha detto che avevi bisogno di aiuto,", - "non sarai in grado di catturare quei Metal Heads nel", - "Foresta a piedi, quindi ho lasciato il mio JET-Board alla camera di equilibrio", - "vicino all'uscita della città. Dato che stai aiutando la metropolitana,", - "Te lo lascerò anche tenere!" + "The Underground said you needed some help,", + "you won't be able to catch those Metal Heads in the", + "Forest on foot so I've left my JET-Board at the airlock", + "near the city exit. Since you're helping the Underground,", + "I'll even let you keep it!" ], "kei027": [ - "Jak, questa è Keira. Non dimenticare: mi servono ancora due artefatti", - "per far funzionare Rift Rider! Mi serve la mappa temporale e il file", - "Gemma energetica del Cuore di Mar, altrimenti non andremo da nessuna parte!" + "Jak, this is Keira. Don't forget - I still need two artifacts", + "to make the Rift Rider work! I need the Time Map and the", + "Heart of Mar Energy Gem, or we're not going anywhere!" ], "kei028": [ - "Mi servono ancora quei due artefatti o questo mucchio di spazzatura", - "non si sposterà di un isolato e tanto meno attraverso il Rift", - "e torniamo ai nostri tempi!", - "Devi trovare il Cuore di Mar e la Mappa del Tempo", - "oppure siamo bloccati!" + "I still need those two artifacts or this pile of junk", + "won't move one city block, much less through the Rift", + "and back to our own time!", + "You've got to find the Heart of Mar and the Time Map", + "or we're stuck!" ], "kei029": [ - "Questa è Keira. Grazie per aver preso gli artefatti, ragazzi.", - "È strano... la mappa temporale aveva un sacco di vecchie coordinate", - "dentro. Vieni a trovarmi allo Stadio." + "This is Keira. Thanks for getting the artifacts, guys.", + "It's strange... the Time Map had a bunch of old coordinates", + "in it. Come see me at the Stadium." ], "kg001": [ - "Chiama rinforzi!" + "Call for backup!" ], "kg001a": [ - "Chiama rinforzi!" + "Call for backup!" ], "kg002": [ - "Congelare!" + "Freeze!" ], "kg002a": [ - "Congelare!" + "Freeze!" ], "kg004": [ - "Fermati!" + "Halt!" ], "kg004a": [ - "Fermati!" + "Halt!" ], "kg005": [ - "Ottieni più incrociatori qui!" + "Get more cruisers in here!" ], "kg005a": [ - "Aggiungi altri cruiser qui!" + "Get more cruisers in here!" ], "kg006": [ - "Resa!" + "Surrender!" ], "kg006a": [ - "Resa!" + "Surrender!" ], "kg007": [ "Quì il volo è vietato!" @@ -4275,97 +4275,97 @@ "Fermo!" ], "kg009": [ - "Dì Buonanotte!" + "Say good night!" ], "kg010": [ "Chiudete l'area." ], "kg011": [ - "Fermare il veicolo!" + "Stop the vehicle!" ], "kg011a": [ - "Fermare il veicolo!" + "Stop the vehicle!" ], "kg012": [ - "Sei in arresto!" + "You're under arrest!" ], "kg012a": [ - "Sei in arresto!" + "You're under arrest!" ], "kg013": [ - "Ehi, tu!" + "You there!" ], "kg014": [ - "Ne vuoi un po?!" + "You want some?!" ], "kg015": [ "L'accesso è vietato." ], "kg016": [ - "Fermare!" + "Stop!" ], "kg018": [ - "EHI!" + "Hey!" ], "kg019": [ - "Lo facciamo nel modo più semplice o nel modo più difficile." + "We do this the easy way, or the hard way." ], "kg020": [ - "Rallentare!" + "Slow down!" ], "kg020a": [ - "Rallentare!" + "Slow down!" ], "kg021": [ - "Spostati!" + "Move over!" ], "kg021a": [ - "Spostati!" + "Move over!" ], "kg022": [ - "Chiama altri Hellcats!" + "Call in more Hellcats!" ], "kg023": [ - "Richiedo backup!" + "Requesting backup!" ], "kg023a": [ - "Richiedo backup!" + "Requesting backup!" ], "kg024": [ - "Sospettato a piedi!" + "Suspect on foot!" ], "kg024a": [ - "Sospettato a piedi!" + "Suspect on foot!" ], "kg025": [ - "Sospetto nel veicolo!" + "Suspect in vehicle!" ], "kg025a": [ - "Sospetto nel veicolo!" + "Suspect in vehicle!" ], "kg026": [ - "Il sospetto è fuggito nel settore cinque!" + "Suspect fleeing into sector five!" ], "kg026a": [ - "Il sospetto è fuggito nel settore cinque!" + "Suspect fleeing into sector five!" ], "kg027": [ - "Il sospetto si sta spostando nel settore sei!" + "Suspect moving to sector six!" ], "kg027a": [ - "Il sospetto si sta spostando nel settore sei!" + "Suspect moving into sector six!" ], "kg028": [ - "Inseguimento ad alta velocità nel settore quattro!" + "High-speed chase in sector four!" ], "kg028a": [ - "Inseguimento ad alta velocità nel settore quattro!" + "High-speed chase in sector four!" ], "kg029": [ - "Controllo del settore tre." + "Checking sector three." ], "kg029a": [ - "Controllo del settore tre." + "Checking sector three." ], "kg030": [ "Pattugliamento settore nove." @@ -4404,16 +4404,16 @@ "Nulla fin ora." ], "kg036": [ - "Roger, lo sto ancora cercando." + "Roger that, still looking." ], "kg036a": [ - "Roger, lo sto ancora cercando." + "Roger that, still looking." ], "kg037": [ - "Roger, spareremo a vista." + "Roger, we'll shoot on sight." ], "kg037a": [ - "Roger, spareremo a vista." + "Roger, we'll shoot on sight." ], "kg038": [ "Comunicare la descrizione dei sospetti." @@ -4425,190 +4425,190 @@ "Fuori dal veicolo!" ], "kg040": [ - "Chiama altri Hellcats!" + "Call in more Hellcats!" ], "kg040a": [ - "Chiama altri Hellcats!" + "Call in more Hellcats!" ], "kg041": [ - "La zona è sicura." + "The area is secure." ], "kg041a": [ - "La zona è sicura." + "The area is secure." ], "kg042": [ - "Niente da segnalare." + "Nothing to report." ], "kg042a": [ - "Niente da segnalare." + "Nothing to report." ], "kg043": [ - "Procedendo come previsto." + "Proceeding as planned." ], "kg043a": [ - "Procedendo come previsto." + "Proceeding as planned." ], "kg044": [ - "L'ho perso." + "I lost him." ], "kg044a": [ - "L'ho perso." + "I lost him." ], "kg045": [ - "Il soggetto non è in vista." + "Subject is not in sight." ], "kg045a": [ - "Soggetto non in vista." + "Subject not in sight." ], "kg046": [ - "Se n'è andato." + "He's gone." ], "kg046a": [ - "È scomparso!" + "He disappeared!" ], "kg047": [ - "Dov'è andato?" + "Where'd he go?" ], "kg047a": [ - "Dov'è andato?" + "Where'd he go?" ], "kg048": [ - "Contatto visivo perso." + "Lost visual contact." ], "kg048a": [ - "Perdita del contatto visivo." + "Lost visual contact." ], "kg049": [ - "E' semplicemente scappato." + "He just ducked out." ], "kg049a": [ - "E' semplicemente scappato." + "He just ducked out." ], "kg050": [ - "E' fuori dalla vista." + "He's out of sight." ], "kg050a": [ - "E' fuori dalla vista." + "He's out of sight." ], "kg051": [ - "Lo stiamo perdendo!" + "We're losing him!" ], "kg051a": [ - "Lo stiamo perdendo!" + "We're losing him!" ], "kg052": [ - "Continuiamo la nostra ricerca." + "Continuing our sweep." ], "kg052a": [ - "Continuiamo la nostra ricerca." + "Continuing our sweep." ], "kg053": [ - "Sto cercando nel settore quattro." + "Searching sector four." ], "kg053a": [ - "Sto cercando nel settore quattro." + "Searching sector four." ], "kg054": [ - "Ricerca nel settore sette." + "Searching sector seven." ], "kg054a": [ - "Ricerca nel settore sette." + "Searching sector seven." ], "kg055": [ - "Ricerca nel settore tre." + "Searching sector three." ], "kg055a": [ - "Ricerca nel settore tre." + "Searching sector three." ], "kg056": [ - "Continuare a cercare." + "Keep looking." ], "kg056a": [ - "Continuare a cercare." + "Keep looking." ], "kg057": [ - "Deve essere qui da qualche parte." + "He's got to be here somewhere." ], "kg057a": [ - "Deve essere qui da qualche parte." + "He's got to be here somewhere." ], "kg058": [ - "Non riesco a trovarlo." + "I can't find him." ], "kg058a": [ - "Non riesco a trovarlo." + "I can't find him." ], "kg059": [ - "Nessun segno del soggetto." + "No sign of the subject." ], "kg059a": [ - "Nessun segno del soggetto." + "No sign of the subject." ], "kg060": [ - "Non lo vedo da nessuna parte." + "I don't see him anywhere." ], "kg060a": [ - "Non lo vedo da nessuna parte." + "I don't see him anywhere." ], "kg061": [ - "Ancora cercando." + "Still searching." ], "kg061a": [ - "Ancora cercando." + "Still searching." ], "kg062": [ - "Alla ricerca dell'obiettivo." + "Searching for the target." ], "kg062a": [ - "Alla ricerca dell'obiettivo." + "Searching for the target." ], "kg063": [ - "Deve essere qui." + "He must be here." ], "kg063a": [ - "Deve essere qui." + "He must be here." ], "kg064": [ - "Era proprio qui." + "He was just here." ], "kg064a": [ - "Era proprio qui." + "He was just here." ], "kg065": [ - "Lo abbiamo perso." + "We lost him." ], "kg065a": [ - "Lo abbiamo perso." + "We lost him." ], "kg066": [ - "Se n'è andato." + "He got away." ], "kg066a": [ - "Se n'è andato." + "He got away." ], "kg067": [ - "È fuggito." + "He escaped." ], "kg067a": [ - "È fuggito." + "He escaped." ], "kg068": [ - "Ci ha scosso." + "He shook us." ], "kg068a": [ - "Ci ha scosso." + "He shook us." ], "kg069": [ - "Sembra che se ne sia andato." + "Looks like he's gone." ], "kg069a": [ - "Sembra che se ne sia andato." + "Looks like he's gone." ], "kg070": [ - "L'ho trovato!" + "I found him!" ], "kg070a": [ - "L'ho trovato!" + "I found him!" ], "kg071": [ "Eccolo." @@ -4617,172 +4617,172 @@ "Eccolo!" ], "kg072": [ - "Attenzione, bersaglio in vista." + "Be advised, target in sight." ], "kg072a": [ - "Attenzione, obiettivo in vista!" + "Be advised, target in sight!" ], "kg073": [ - "Abbiamo un'identificazione positiva." + "We have a positive ID." ], "kg073a": [ - "Abbiamo un'identificazione positiva." + "We have a positive ID." ], "kg074": [ - "Lo vedo!" + "I see him!" ], "kg074a": [ - "Lo vedo!" + "I see him!" ], "kg075": [ - "È laggiù, prendilo!" + "He's over there, get him!" ], "kg075a": [ - "E' qui!" + "He's over here!" ], "kg076": [ - "Prendilo!" + "Get him!" ], "kg076a": [ - "Prendilo!" + "Get him!" ], "kg077": [ - "Ho riacquisito l'obiettivo!" + "I've reacquired the target!" ], "kg077a": [ - "Ho riacquisito l'obiettivo!" + "I've reacquired the target!" ], "kg078": [ - "Mi sto avvicinando." + "I'm closing in." ], "kg078a": [ - "Mi sto avvicinando!" + "I'm closing in!" ], "kg079": [ - "Gli sto addosso!" + "I'm on him!" ], "kg079a": [ - "Gli sto addosso!" + "I'm on him!" ], "kg080": [ - "Sono all'inseguimento!" + "I'm in pursuit!" ], "kg080a": [ - "Sono all'inseguimento!" + "I'm in pursuit!" ], "kg081": [ - "Perseguire l'obiettivo." + "Pursuing target." ], "kg081a": [ - "Perseguire l'obiettivo!" + "Pursuing target!" ], "kg082": [ - "Non lasciarlo scappare!" + "Don't let him get away!" ], "kg082a": [ - "Non lasciarlo scappare!" + "Don't let him get away!" ], "kg083": [ - "Prendilo!" + "Get him!" ], "kg083a": [ - "Prendilo!" + "Get him!" ], "kg084": [ - "Dopo di lui!" + "After him!" ], "kg084a": [ - "Dopo di lui!" + "After him!" ], "kg085": [ - "Ho una visuale!" + "I have a visual!" ], "kg085a": [ - "Ho una visuale!" + "I have a visual!" ], "kg086": [ - "Lo vediamo!" + "We see him!" ], "kg086a": [ - "Lo vediamo!" + "We see him!" ], "kg087": [ - "Fermati là!" + "Stop right there!" ], "kg087a": [ - "Fermati là!" + "Stop right there!" ], "kg088": [ - "Lo tengo d'occhio!" + "I have a bead on him!" ], "kg088a": [ - "Lo tengo d'occhio!" + "I have a bead on him!" ], "kg089": [ - "Sono colpito!" + "I'm hit!" ], "kg089a": [ - "Sono colpito!" + "I'm hit!" ], "kg090": [ - "Uomo a terra!" + "Man down!" ], "kg090a": [ - "Uomo a terra!" + "Man down!" ], "kg091": [ - "Ho bisogno di rinforzi!" + "I need backup!" ], "kg091a": [ - "Ho bisogno di rinforzi!" + "I need backup!" ], "kg092": [ - "Fermatelo!" + "Stop him!" ], "kg092a": [ - "Fermatelo!" + "Stop him!" ], "kg093": [ - "Attenzione!" + "Look out!" ], "kg093a": [ - "Attenzione!" + "Look out!" ], "kg094": [ - "Eccolo, sparagli!" + "There he is, shoot him!" ], "kg094a": [ - "Eccolo, sparagli!" + "There he is, shoot him!" ], "kg095": [ - "Portalo fuori!" + "Take him out!" ], "kg095a": [ - "Portalo fuori!" + "Take him out!" ], "kg096": [ - "Fuga del prigioniero in corso, suona l'allarme!" + "Prisoner escape in progress, sound the alarm!" ], "kg096a": [ - "Evasione dalla prigione in corso, date l'allarme!" + "Prison escape in progress, sound the alarm!" ], "kg097": [ - "Prigioniero al secondo livello!" + "Prigioniero al livello due!" ], "kg097a": [ - "Prigioniero al secondo livello!" + "Prisoner on level two!" ], "kg098": [ - "Prigioniero trasferito al sottolivello B!" + "Prisoner moving to sub-level B!" ], "kg098a": [ - "Prigioniero trasferito al sottolivello B!" + "Prisoner moving to sub-level B!" ], "kg099": [ - "Pensiamo che sia nei tubi!" + "We think he's in the pipes!" ], "kg099a": [ - "Pensiamo che sia nei tubi!" + "We think he's in the pipes!" ], "kg100": [ "Iniziamo la perlustrazione." @@ -4791,124 +4791,124 @@ "Iniziamo la perlustrazione." ], "kg101": [ - "Abbiamo un prigioniero in vista, entrate!" + "We have prisoner in sight, move in!" ], "kg101a": [ - "Abbiamo un prigioniero in vista, entrate!" + "We have prisoner in sight, move in!" ], "kg102": [ - "Abbiamo movimento al primo livello!" + "C'è movimento al livello uno!" ], "kg102a": [ - "Abbiamo movimento al primo livello!" + "C'è movimento al livello uno!" ], "kg103": [ - "Avvicinati!" + "Close in!" ], "kg103a": [ - "Avvicinati!" + "Close in!" ], "kg104": [ - "Ci stiamo trasferendo!" + "Stiamo entrando!" ], "kg104a": [ - "Ci stiamo trasferendo!" + "Stiamo entrando!" ], "kg105": [ - "Metti al sicuro il blocco di celle!" + "Secure the cell block!" ], "kg105a": [ - "Metti al sicuro il blocco di celle!" + "Secure the cell block!" ], "kg106": [ - "Non prendete prigionieri!" + "Take no prisoners!" ], "kg106a": [ - "Non prendete prigionieri!" + "Take no prisoners!" ], "kg107": [ - "Avvistato il prigioniero, lo abbiamo preso!" + "Prisoner sighted, we got him!" ], "kg107a": [ - "Avvistato il prigioniero, lo abbiamo preso!" + "Prisoner sighted, we got him!" ], "kg108": [ - "Il prigioniero è ancora in libertà!" + "Prisoner is still on the loose!" ], "kg108a": [ - "Il prigioniero è ancora a piede libero!" + "Prisoner is still on the loose!" ], "kg109": [ - "Pensiamo che stia per uscire!" + "We think he's going for an exit!" ], "kg109a": [ - "Pensiamo che stia per uscire!" + "We think he's going for an exit!" ], "kg110": [ - "Cercando stanze." + "Searching rooms." ], "kg110a": [ - "Cercando stanze." + "Searching rooms." ], "kg111": [ - "Prigioniero libero nel complesso." + "Prisoner loose in complex." ], "kg111a": [ - "Prigioniero libero nel complesso." + "Prisoner loose in complex." ], "kg112": [ - "Sei autorizzato a sparare per uccidere." + "You are authorized to shoot to kill." ], "kg112a": [ - "Sei autorizzato a sparare per uccidere." + "You are authorized to shoot to kill." ], "kg113": [ - "Via! Via! Via! Spazza la zona!" + "Go, go, go! Sweep the area!" ], "kg113a": [ - "Via! Via! Via! Spazza la zona!" + "Go go go! Sweep the area!" ], "kg114": [ - "Perquisizione nei sotterranei." + "Searching the sub-basements." ], "kg114a": [ - "Perquisizione nei sotterranei." + "Searching the sub-basements." ], "kg115": [ - "Il blocco delle celle è chiaro." + "Cell block is clear." ], "kg115a": [ - "Il blocco delle celle è chiaro." + "Cell block is clear." ], "kg116": [ - "La stanza del serbatoio è libera." + "Tank room is clear." ], "kg116a": [ - "La stanza del serbatoio è libera." + "Tank room is clear." ], "kg117": [ - "Attivare i carri armati antisommossa." + "Activate riot tanks." ], "kg117a": [ - "Attiva i carri armati antisommossa." + "Activate riot tanks." ], "kg118": [ - "Il carro armato antisommossa ha un prigioniero in vista." + "Riot tank has prisoner in sight." ], "kg118a": [ - "Il carro armato antisommossa ha un prigioniero in vista." + "Riot tank has prisoner in sight." ], "kg119": [ - "Avviso intruso." + "Intruder alert." ], "kg119a": [ - "Avviso intruso!" + "Intruder alert!" ], "kg120": [ - "Attivazione delle difese di sicurezza." + "Activating security defenses." ], "kg120a": [ - "Attivazione delle difese di sicurezza." + "Activating security defenses." ], "kg121": [ "Fornire la descrizione dei sospetti." @@ -4917,537 +4917,537 @@ "Fornire la descrizione dei sospetti." ], "kg122": [ - "Ho dei civili in vista." + "I've got civvies in sight." ], "kg122a": [ - "Ho dei civili in vista." + "I've got civvies in sight." ], "kg123": [ - "Ho dei sospetti in vista." + "I've got suspects in sight." ], "kg123a": [ - "Ho dei sospetti in vista." + "I've got suspects in sight." ], "kg124": [ - "Odio l'odore di questa parte della città." + "I hate the smell of this part of the city." ], "kg124a": [ - "Odio l'odore in questa parte della città." + "I hate the smell in this part of the city." ], "kg125": [ - "Giusto, controlleremo." + "Right, we'll check it out." ], "kg125a": [ - "Giusto, controlleremo." + "Right, we'll check it out." ], "kg126": [ - "Confermato, sospettato clandestino neutralizzato." + "Confirmed, Underground suspect neutralized." ], "kg126a": [ - "Confermato, sospettato clandestino neutralizzato." + "Confirmed, Underground suspect neutralized." ], "kg127": [ - "Sono tutti colpevoli!" + "They're all guilty!" ], "kg127a": [ - "Sono tutti colpevoli!" + "They're all guilty!" ], "kg128": [ - "Qui è l'Unità Alfa, siamo in viaggio." + "This is Unit Alpha, we're en route." ], "kg128a": [ - "Qui è l'Unità Alfa, siamo in viaggio." + "This is Unit Alpha, we're en route." ], "kg129": [ - "Roger, continuiamo la nostra ricerca." + "Roger, continuing our sweep." ], "kg129a": [ - "Roger, continuiamo la nostra ricerca." + "Roger, continuing our sweep." ], "kg130": [ - "Unità Zulu, in arrivo." + "Unit Zulu, moving in." ], "kg130a": [ - "Unità Zulu, in arrivo." + "Unit Zulu, moving in." ], "kg131": [ - "Roger, stiamo facendo il nostro giro." + "Roger that, we're making our sweep." ], "kg131a": [ - "Roger, stiamo facendo il nostro giro." + "Roger that, we're making our sweep." ], "kg132": [ - "Io dico di sparargli tutti e sistemarli più tardi." + "I say shoot 'em all and sort 'em out later." ], "kg132a": [ - "Io dico di sparargli tutti e sistemarli più tardi." + "I say shoot 'em all and sort 'em out later." ], "kg133": [ - "Hai il diritto di morire!" + "You have the right to die!" ], "kg134": [ - "Blocca e carica!" + "Lock and load!" ], "kg135": [ - "Apri il fuoco!" + "Aprite il fuoco!" ], "kg136": [ - "Allerta, allerta!" + "Alert, alert!" ], "kg137": [ - "Non muoverti!" + "Don't move!" ], "kg138": [ - "Fallo!" + "Do it!" ], "kg139": [ - "Via! Via! Via!" + "Go, go, go!" ], "kg140": [ - "Affiancateli!" + "Flank 'em!" ], "kg141": [ - "Entra!" + "Move in!" ], "kg142": [ - "Portateli fuori!" + "Take 'em out!" ], "kg143": [ - "Spaccate qualche testa!" + "Bust some heads!" ], "kg144": [ - "Arrestatelo!" + "Arrest him!" ], "kg145": [ - "Sparagli, sparagli!" + "Shoot 'em, shoot 'em!" ], "kg146": [ - "Muori, fuorilegge!" + "Die, outlaw!" ], "kg147": [ - "Sei storia!" + "You're history!" ], "kg148": [ - "Mangia questo!" + "Eat this!" ], "kg149": [ - "Procuratene alcuni!" + "Get some!" ], "kg150": [ - "Fuoco fuoco!" + "Fire, fire!" ], "kg151": [ - "Eccone uno per la Guardia!" + "Here's one for the Guard!" ], "kg152": [ - "Arrenditi, fuorilegge!" + "Give it up, outlaw!" ], "kg153": [ - "Ecco un po' di dolore!" + "Here's some pain!" ], "kg154": [ - "Tempo di rimborso!" + "Payback time!" ], "kg155": [ - "Avrei dovuto arrendermi!" + "Shoulda given up!" ], "kg156": [ - "Ho bisogno di fuoco di copertura!" + "I need cover fire!" ], "kg157": [ - "Chiama i rinforzi!" + "Call in reinforcements!" ], "kg158": [ - "Sparo!" + "I'll shoot!" ], "kg159": [ - "Morire!" + "Die!" ], "kg160": [ - "Ti hanno beccato!" + "You're busted!" ], "kg161": [ - "Rivolta in corso!" + "Riot in progress!" ], "kg162": [ - "Invia le truppe!" + "Send in the troops!" ], "kg163": [ - "Lasciar perdere!" + "Give it up!" ], "kg164": [ - "Fategliela pagare!" + "Make 'em pay!" ], "kg165": [ - "Taggateli e impacchettateli!" + "Tag 'em and bag 'em!" ], "kg165a": [ - "Taggateli e impacchettateli!" + "Tag 'em and bag 'em!" ], "kg165b": [ - "Taggateli e impacchettateli!" + "Tag 'em and bag 'em!" ], "kg166": [ - "Un'altra tacca per la mia pistola." + "Another notch for my gun." ], "kg166a": [ - "Un'altra tacca per la mia pistola." + "Another notch for my gun." ], "kg166b": [ - "Un'altra tacca per la mia pistola." + "Another notch for my gun." ], "kg167": [ - "Questo è stato facile!" + "This one was easy!" ], "kg167a": [ - "Questo è stato facile!" + "This one was easy!" ], "kg167b": [ - "Questo è stato facile!" + "This one was easy!" ], "kg168": [ - "Sospetto neutralizzato." + "Suspect neutralized." ], "kg168a": [ - "Sospetto neutralizzato." + "Suspect neutralized." ], "kg168b": [ - "Sospetto neutralizzato." + "Suspect neutralized." ], "kg169": [ - "Non ho nemmeno sudato." + "Didn't even work up a sweat." ], "kg169a": [ - "Non ho nemmeno sudato." + "Didn't even work up a sweat." ], "kg169b": [ - "Non ho nemmeno sudato." + "Didn't even work up a sweat." ], "kg170": [ - "Portatelo qui per... interrogarlo, eheheh..." + "Take him in for... questioning, hehehe..." ], "kg170a": [ - "Portatelo qui per... interrogarlo, eheheh..." + "Take him in for... questioning, hehehe..." ], "kg170b": [ - "Portatelo qui per... interrogarlo, eheheh..." + "Take him in for... questioning, hehehe..." ], "kg171": [ - "Un altro morde la polvere." + "Another one bites the dust." ], "kg171a": [ - "Un altro morde la polvere." + "Another one bites the dust." ], "kg171b": [ - "Un altro morde la polvere." + "Another one bites the dust." ], "kg172": [ - "Deve aver fatto male." + "That must have hurt." ], "kg172a": [ - "Deve aver fatto male." + "That must have hurt." ], "kg172b": [ - "Deve aver fatto male." + "That must have hurt." ], "kg173": [ - "C'è molto altro da dove viene." + "There's plenty more where that came from." ], "kg173a": [ - "C'è molto altro da dove viene." + "There's plenty more where that came from." ], "kg173b": [ - "C'è molto altro da dove viene." + "There's plenty more where that came from." ], "kg174": [ - "Feccia di cittadino." + "Citizen scum." ], "kg174a": [ - "Feccia di cittadino." + "Citizen scum." ], "kg174b": [ - "Feccia di cittadino." + "Citizen scum." ], "kg175": [ - "Non combattere la legge, figliolo." + "Don't fight the law, son." ], "kg175a": [ - "Non combattere la legge, figliolo." + "Don't fight the law, son." ], "kg175b": [ - "Non combattere la legge, figliolo." + "Don't fight the law, son." ], "kg176": [ - "Tu sei sotto arresto!" + "Sei in arresto!" ], "kg177": [ - "Muoviti!" + "Get moving!" ], "kg178a": [ - "È scomparso!" + "He vanished!" ], "kg179": [ - "Ragazzi, avete sentito degli ultimi attacchi dei Metal Head?" + "You guys hear about the latest Metal Head attacks?" ], "kg179b": [ - "Oh ragazzi, avete sentito degli ultimi attacchi dei Metal Head?" + "Oh you guys hear about the latest Metal Head attacks?" ], "kg180": [ - "La settimana scorsa abbiamo perso tre squadre." + "We lost three squads last week." ], "kg180a": [ - "La settimana scorsa abbiamo perso tre squadre." + "We lost three squads last week." ], "kg180b": [ - "La settimana scorsa abbiamo perso tre squadre." + "We lost three squads last week." ], "kg181": [ - "Ho sentito che la metropolitana sta diventando più forte." + "I hear the Underground are getting stronger." ], "kg181a": [ - "Ho sentito che la metropolitana sta diventando più forte." + "I hear the Underground are getting stronger." ], "kg181b": [ - "Ho sentito che la metropolitana sta diventando più forte." + "I hear the Underground are getting stronger." ], "kg182": [ - "Sono solo voci, privato, tieni la bocca chiusa." + "Just rumors, private, keep your mouth shut." ], "kg182a": [ - "Sono solo voci, privato, tieni la bocca chiusa." + "Just rumors, private, keep your mouth shut." ], "kg182b": [ - "Sono solo voci, privato, tieni la bocca chiusa." + "Just rumors, private, keep your mouth shut." ], "kg183": [ - "O noi o loro, non ci sono vie di mezzo." + "It's us or them, there's no in-between." ], "kg183a": [ - "O noi o loro, non c'è via di mezzo." + "It's us or them, there's no in-between." ], "kg183b": [ - "O noi o loro, non c'è via di mezzo." + "It's us or them, there's no in-between." ], "kg184": [ - "Non preoccuparti, il Barone ci salverà." + "Don't worry, the Baron will save us." ], "kg184a": [ - "Non preoccuparti, il Barone ci salverà." + "Don't worry, the Baron will save us." ], "kg184b": [ - "Non preoccuparti, il Barone ci salverà." + "Don't worry, the Baron will save us." ], "kg185": [ - "Non ho fiducia in nessuno." + "I got no faith in nobody." ], "kg185a": [ - "Non ho fiducia in nessuno." + "I ain't got no faith in nobody." ], "kg185b": [ - "Non ho fiducia in nessuno." + "I got no faith in nobody." ], "kg186": [ - "Hai visto quel nuovo pilota JX-7? Dolce giro." + "Seen that new JX-7 racer? Sweet ride." ], "kg186a": [ - "Hai visto quel nuovo pilota JX-7? Dolce giro." + "You seen that new JX-7 racer? Sweet ride." ], "kg186b": [ - "Hai visto quel nuovo pilota JX-7? È un viaggio dolce." + "Seen that new JX-7 racer? It's a sweet ride." ], "kg187": [ - "Hai visto qualcosa?" + "You seen anything?" ], "kg187a": [ - "Hai visto qualcosa?" + "You seen anything?" ], "kg187b": [ - "Hai visto qualcosa?" + "You seen anything?" ], "kg188": [ - "NO." + "No." ], "kg188a": [ - "NO." + "No." ], "kg188b": [ - "No." + "Nah." ], "kg189": [ - "Tieni gli occhi aperti." + "Keep your eyes peeled." ], "kg189a": [ - "Tieni gli occhi aperti." + "Keep your eyes peeled." ], "kg189b": [ - "Tieni gli occhi aperti." + "Keep your eyes peeled." ], "kg190": [ - "Ho appena ricevuto un avviso radio, stai calmo." + "I just got a radio alert, stay frosty." ], "kg190a": [ - "Ho appena ricevuto un avviso radio, stai calmo." + "I just got a radio alert, stay frosty." ], "kg190b": [ - "Ho appena ricevuto un avviso radio, stai calmo." + "I just got a radio alert, stay frosty." ], "kg191": [ - "Non fidarsi mai di un civile." + "Never trust a civilian." ], "kg191a": [ - "Non fidarsi mai di un civile." + "Never trust a civilian." ], "kg191b": [ - "Non fidarsi mai di un civile." + "Never trust a civilian." ], "kg192": [ - "Non fidarti mai di nessuno." + "Never trust anyone." ], "kg192a": [ - "Non fidarti mai di nessuno." + "Never trust anyone." ], "kg192b": [ - "Non fidarti mai di nessuno." + "Never trust anyone." ], "kg193": [ - "Viva il KG!" + "Long live the KG!" ], "kg193a": [ - "Viva il KG!" + "Long live the KG!" ], "kg193b": [ - "Viva il KG!" + "Long live the KG!" ], "kg194": [ - "Non c'è stata una rivolta per il cibo da quando abbiamo portato i carri armati." + "We ain't had a food riot since we brought in them tanks." ], "kg194a": [ - "Non c'è stata una rivolta per il cibo da quando abbiamo portato i carri armati." + "We ain't had a food riot since we brought in them tanks." ], "kg194b": [ - "Non c'è stata una rivolta per il cibo da quando abbiamo portato i carri armati." + "We ain't had a food riot since we brought in them tanks." ], "kg195": [ - "Mi annoio, voglio sgranocchiare la testa." + "I'm bored, I want to crunch heads." ], "kg195a": [ - "Mi annoio, voglio sgranocchiare la testa." + "I'm bored, I want to crunch heads." ], "kg195b": [ - "Mi annoio, ho voglia di schiacciare teste." + "I'm bored, I want to crunch heads." ], "kg196": [ - "Voglio fare il culo a qualcuno." + "I want to kick some ass." ], "kg196a": [ - "Ugh... voglio dare un calcio a qualcuno." + "Ugh... I want to kick some butt." ], "kg196b": [ - "Voglio dare un calcio a qualcuno." + "I want to kick some butt." ], "kg197": [ - "Hai sentito che la metropolitana ha preso le nostre munizioni al quartier generale?" + "Did you hear the Underground got our ammo at HQ?" ], "kg197a": [ - "Hai sentito che è arrivata la metropolitana?", - "le nostre munizioni al quartier generale?" + "Did you hear the Underground got to", + "our ammo at HQ?" ], "kg197b": [ - "Hai sentito che è arrivata la metropolitana?", - "le nostre munizioni al quartier generale?" + "Did you hear the Underground got to", + "our ammo at HQ?" ], "kg198": [ - "La vendetta è una stronzata!" + "Payback's a bitch!" ], "kg198a": [ - "La vendetta è una stronzata!" + "Payback's a bitch!" ], "kg198b": [ - "La vendetta è una vera stronzata!" + "Payback's a bitch!" ], "kg199": [ - "Animali!" + "Animals!" ], "kg199a": [ - "Animali!" + "Animals!" ], "kg199b": [ - "Animali!" + "Animals!" ], "kg200": [ - "Ho sentito che l'Ombra è morta da anni." + "I hear the Shadow's been dead for years." ], "kg200a": [ - "Ho sentito che l'Ombra è morta da anni." + "I hear the Shadow's been dead for years." ], "kg200b": [ - "Ho sentito che l'Ombra è morta da anni." + "I hear the Shadow's been dead for years." ], "kg201": [ - "Forse, ma gli altri sono feccia dell'underground", - "stanno ancora correndo qua e là." + "Maybe, but the rest of them Underground scum", + "are still scurrying about." ], "kg201a": [ - "Forse, ma gli altri sono feccia dell'underground", - "stanno ancora correndo qua e là." + "Maybe, but the rest of them Underground scum", + "are still scurrying about." ], "kg201b": [ - "Forse, ma gli altri sono feccia dell'underground", - "stanno ancora correndo qua e là." + "Maybe, but the rest of them Underground scum", + "are still scurrying about." ], "kg202": [ - "Posso sparare a qualcuno adesso?" + "Can I shoot someone now?" ], "kg202a": [ - "Posso sparare a qualcuno adesso?" + "Can I shoot someone now?" ], "kg202b": [ - "Posso sparare a qualcuno adesso?" + "Can I shoot someone now?" ], "kg203": [ - "Mi piace la nuova armatura." + "I like the new armor." ], "kg203a": [ - "Mi piace la nuova armatura." + "I like the new armor." ], "kg203b": [ - "Mi piace la nuova armatura." + "I like the new armor." ], "kg204": [ - "Si, anch'io. Più comfort al cavallo." + "Yeah, me too. More comfort in the crotch." ], "kg204a": [ - "Si, anch'io. Più comfort al cavallo." + "Yeah, me too. More comfort in the crotch." ], "kg204b": [ - "Si, anch'io. Più comfort al cavallo." + "Yeah, me too. More comfort in the crotch." ], "kg205": [ - "Se non succede qualcosa di interessante presto,", - "Ora comincerò a spararti." + "If something interesting doesn't happen soon,", + "I'm going to start shooting you." ], "kg205a": [ - "La prossima volta posso uccidere un civile?" + "Next time, can I kill a civvy?" ], "kg205b": [ - "La prossima volta posso uccidere un civile?" + "Next time, can I kill a civvy?" ], "kg206a": [ - "Se non succede qualcosa di interessante presto,", - "Ti sparerò." + "If something interesting doesn't happen soon,", + "I'm gonna shoot you." ], "kg206b": [ - "Se non succede qualcosa di interessante presto,", - "Inizierò a spararti." + "If something interesting doesn't happen soon,", + "I'm gonna start shooting you." ], "kg207": [ - "Hai raccolto le tue mazzette questa settimana?" + "Did you collect your bribes this week?" ], "kg207a": [ - "Raccoglierai le mazzette questa settimana?" + "You collect your bribes this week?" ], "kg207b": [ - "Raccoglierai le mazzette questa settimana?" + "You collect your bribes this week?" ], "kg208": [ "Shhh..." @@ -5465,750 +5465,750 @@ "Shh." ], "kg210": [ - "Ho sentito che qualcuno sta usando le vecchie camere di equilibrio sul muro.", - "Pfft, pazzo bastardo." + "I hear someone's been using the old wall airlocks.", + "Pfft, crazy bastard." ], "kg210a": [ - "Ho sentito che qualcuno sta usando le vecchie camere di equilibrio sul muro.", - "Pazzo bastardo." + "I hear someone's been using the old wall airlocks.", + "Crazy bastard." ], "kg210b": [ - "Ho sentito che qualcuno sta usando le vecchie camere di equilibrio sul muro.", - "Pazzo bastardo." + "I hear someone's been using the old wall airlocks.", + "Crazy bastard." ], "kg211": [ - "Sono stato in servizio per due giorni di fila." + "I've been on duty for two days straight." ], "kg211a": [ - "Sono stato in servizio per due giorni di fila." + "I've been on duty for two days straight." ], "kg211b": [ - "Sono stato in servizio per due giorni di fila." + "I've been on duty for two days straight." ], "kg212": [ - "Pfft, non lamentarti. Ho una pattuglia delle fogne la prossima settimana." + "Pfft, don't complain. I've got sewer patrol next week." ], "kg212a": [ - "Non lamentarti, ho una pattuglia delle fogne la prossima settimana." + "Don't complain, I got sewer patrol next week." ], "kg212b": [ - "Non lamentarti. Ho una pattuglia delle fogne la prossima settimana." + "Don't complain. I got sewer patrol next week." ], "kg213": [ - "Ahh, povero bastardo. Quale comandante hai fatto incazzare?" + "Ahh, you poor bastard. Which commander did you piss off?" ], "kg213a": [ - "Ahh, povero bastardo. Quale comandante hai fatto incazzare?" + "Ahh, you poor bastard. Which commander did you piss off?" ], "kg213b": [ - "Eheh, povero bastardo. Quale comandante hai fatto incazzare?" + "Hehe, poor bastard. Which commander did you piss off?" ], "kg214": [ - "Dico morte alla metropolitana." + "I say death to the Underground." ], "kg214a": [ - "Dico morte alla metropolitana." + "I say death to the Underground." ], "kg214b": [ - "Dico morte alla metropolitana." + "I say death to the Underground." ], "kg215": [ - "Voglio davvero uccidere quel ragazzo dell'Ombra." + "I wanna so kill that Shadow guy." ], "kg215a": [ - "Voglio uccidere quel ragazzo dell'Ombra!" + "I want to kill that Shadow guy!" ], "kg215b": [ - "Voglio uccidere quel ragazzo dell'Ombra!" + "I want to kill that Shadow guy!" ], "kg216": [ - "E non dimenticare quel traditore di Torn." + "And don't forget that traitor Torn." ], "kg216a": [ - "E non dimenticare quel traditore, Torn." + "And don't forget that traitor Torn." ], "kg216b": [ - "Non dimenticare quel traditore, Torn!" + "Don't forget that traitor Torn!" ], "kg217": [ - "La morte è troppo bella per lui." + "Death's too good for him." ], "kg217a": [ - "La morte è troppo bella per lui." + "Death's too good for him." ], "kg217b": [ - "La morte è troppo bella per lui." + "Death's too good for him." ], "kg218": [ - "Perché stiamo cercando un ragazzino?" + "Why are we looking for some kid?" ], "kg218a": [ - "Perché stiamo cercando un ragazzino?" + "Why are we looking for some kid?" ], "kg218b": [ - "Perché stiamo cercando un ragazzino?" + "Why are we looking for some kid?" ], "kg219": [ - "Non lo so, ordini del Barone." + "I don't know, Baron's orders." ], "kg219a": [ - "Non lo so, ordini di Baron." + "I dunno, Baron's orders." ], "kg219b": [ - "Non lo so, ordini di Baron." + "I dunno, Baron's orders." ], "kg220": [ - "Ehi, hanno già trovato la Tomba di Mar?" + "Hey, have they found Mar's Tomb yet?" ], "kg220a": [ - "Hanno già trovato la Tomba di Mar?" + "Have they found Mar's Tomb yet?" ], "kg220b": [ - "Hanno già trovato la Tomba di Mar?" + "Have they found Mar's Tomb yet?" ], "kg221": [ - "Se lo facessero non ce lo direbbero." + "They wouldn't tell us if they did." ], "kg221a": [ - "No, non ce lo direbbero se lo facessero." + "Nah, they wouldn't tell us if they did." ], "kg221b": [ - "No, non ce lo direbbero se lo facessero." + "Nah, they wouldn't tell us if they did." ], "kg222": [ - "Ho una grossa scommessa sulle prossime gare cittadine." + "I've got a big bet on the next city races." ], "kg222a": [ - "Ho fatto una grossa scommessa sulle prossime gare cittadine." + "I got a big bet on the next city races." ], "kg222b": [ - "Ho una grossa scommessa sulle prossime gare cittadine." + "Got a big bet on the next city races." ], "kg223": [ - "Erol è il mio ragazzo. Vince sempre." + "Erol's my boy. He always wins." ], "kg223a": [ - "Erol è il mio ragazzo. Vince sempre." + "Erol's my boy. He always wins." ], "kg223b": [ - "Erol è il mio ragazzo. Vince sempre." + "Erol's my boy. He always wins." ], "kg224": [ - "Andrai alle gare cittadine questa volta?" + "You going to the city races this time?" ], "kg224a": [ - "Andrai alle gare cittadine questa volta?" + "You going to the city races this time?" ], "kg224b": [ - "Questa volta andrai alle gare cittadine?" + "You going to the city races this time?" ], "kg225": [ - "Io ci sarò." + "I'll be there." ], "kg225a": [ - "Io ci sarò." + "I'll be there." ], "kg225b": [ - "Io ci sarò." + "I'll be there." ], "kg226": [ - "Ci sono state alcune gravi vittime tra le guardie questa settimana." + "There've been some serious guard casualties this week." ], "kg226a": [ - "Ci sono state alcune gravi vittime tra le guardie questa settimana." + "There've been some serious guard casualties this week." ], "kg226b": [ - "Ci sono state alcune gravi vittime tra le guardie questa settimana." + "There've been some serious guard casualties this week." ], "kg227": [ - "Sì, qualche combattente ribelle sta fomentando la situazione." + "Yeah, some rebel fighter is stirring up the pot good." ], "kg227a": [ - "Sì, qualche combattente ribelle sta mescolando bene la situazione." + "Yeah, some rebel fighter is stirring the pot good." ], "kg227b": [ - "Qualche combattente ribelle sta mescolando bene la situazione." + "Some rebel fighter is stirring the pot good." ], "kg228": [ - "Mi piacerebbe essere io a portarlo fuori." + "I'd love to be the one to take him out." ], "kg228a": [ - "Mi piacerebbe essere io a portarlo fuori." + "I'd love to be the one to take him out." ], "kg228b": [ - "Oh, mi piacerebbe essere io a portarlo fuori." + "Oh I'd love to be the one to take him out." ], "kg229": [ - "Prendiamo da bere più tardi." + "Let's get drinks later." ], "kg229a": [ - "Prendiamo da bere più tardi." + "Let's get drinks later." ], "kg229b": [ - "Prendiamo da bere più tardi." + "Let's get drinks later." ], "kg230": [ - "Ho una brutta sensazione riguardo a questa guerra." + "I got a bad feeling about this war." ], "kg230a": [ - "Ho una brutta sensazione riguardo a questa guerra." + "I got a bad feeling about this war." ], "kg230b": [ - "Ho un brutto presentimento su questa guerra." + "I got a bad feeling about this war." ], "kg231": [ - "Ho sentito che ci sono altri attacchi di Metal Head", - "di quanto il quartier generale ammetta." + "I hear there are more Metal Head attacks", + "than HQ's admitting." ], "kg231a": [ - "Ho sentito che ci sono altri attacchi dei Metal Head", - "di quanto il quartier generale ammetta." + "I hear there are more Metal Head attacks", + "than HQ's admitting." ], "kg231b": [ - "Sì, ho sentito che ci sono altri attacchi dei Metal Head", - "di quanto il quartier generale ammetta." + "Yeah, I hear there are more Metal Head attacks", + "than HQ's admitting." ], "kg232": [ - "I resoconti che ho visto non sono buoni.", - "Penso che la città sia nei guai." + "The reports I've seen aren't good.", + "I think the city's in trouble." ], "kg232a": [ - "I resoconti che ho visto non sono buoni.", - "Penso che la città sia nei guai." + "The reports I've seen aren't good.", + "I think the city's in trouble." ], "kg232b": [ - "I resoconti che ho letto non sono buoni.", - "Penso che la città sia nei guai." + "The reports I've seen aren't good.", + "I think the city's in trouble." ], "kg233": [ - "Sono preoccupato per questo nuovo ragazzo", - "lottando per la metropolitana." + "I'm worried about this new guy", + "fighting for the Underground." ], "kg233a": [ - "Sono preoccupato per questo nuovo ragazzo", - "lottando per la metropolitana." + "I'm worried about this new guy", + "fighting for the Underground." ], "kg233b": [ - "Sono preoccupato per questo nuovo ragazzo che combatte per la metropolitana.", - "lottando per la metropolitana." + "I'm worried about this new guy fighting for the Underground.", + "fighting for the Underground." ], "kg234": [ - "Sì, dicono che possa trasformarsi in una specie di... mostro." + "Yeah, they say he can change into some kind of... monster." ], "kg234a": [ - "Sì, dicono che può trasformarsi in una specie di mostro." + "Yeah, they say he can change into some kind of monster." ], "kg234b": [ - "Dicono che possa trasformarsi in una specie di mostro." + "They say he can change into some kind of monster." ], "kg235": [ - "Non preoccuparti, presto la sua testa sarà sul muro della torre." + "Don't worry, his head'll be on the tower wall soon enough." ], "kg235a": [ - "Non preoccuparti, presto la sua testa sarà sul muro della torre." + "Don't worry, his head'll be on the tower wall soon enough." ], "kg235b": [ - "Non preoccuparti, presto la sua testa sarà sul muro della torre." + "Don't worry, his head'll be on the tower wall soon enough." ], "kg236": [ - "Eheheh." + "Hehehe." ], "kg236a": [ - "Eheheh." + "Hehehe." ], "kg236b": [ - "Eheheh." + "Hehehe." ], "kg237a": [ - "Eheheh..." + "Hehehe..." ], "kg237b": [ - "Eheheh..." + "Hehehe..." ], "kg238a": [ "Hahaha..." ], "kg239a": [ - "Ah!" + "Hah!" ], "kg239b": [ - "Ah!" + "Hah!" ], "kg240a": [ - "Eheheh..." + "Hehehe..." ], "kg241a": [ - "Sospetto in un noto veicolo sotterraneo!" + "Suspect in known Underground vehicle!" ], "kg242a": [ - "Ha un carico, muoviti!" + "He's got a cargo, move in!" ], "kg243a": [ - "Ferma quel veicolo!" + "Stop that vehicle!" ], "kg244a": [ - "Sei in arresto, accosta!" + "You're under arrest, pull over!" ], "kg245a": [ - "Consegnare il veicolo!" + "Surrender the vehicle!" ], "kg246a": [ - "Siamo all'inseguimento!" + "We are in pursuit!" ], "kg247a": [ - "Ha un pacco!" + "He's got a package!" ], "kg248a": [ - "Il sospettato ha un carico sospetto!" + "Suspect has suspicious cargo!" ], "kg249a": [ - "Pensiamo che sia una spedizione illegale." + "We think it's an illegal shipment." ], "kg250a": [ - "Tutte le unità si avvicinano al veicolo!" + "All units close in on vehicle!" ], "kg251a": [ - "Il sospetto si muove ad alta velocità!" + "Suspect moving at high speed!" ], "kg252a": [ - "Non possiamo tenere il passo!" + "We can't keep up!" ], "kg253a": [ - "E' al porto!" + "He's in the port!" ], "kg254a": [ - "Se n'è andato!" + "He got away!" ], "kg255a": [ - "Il sospettato ha dato inizio all'inseguimento!" + "Suspect has taken out pursuit!" ], "kg256a": [ - "Veicolo distrutto, l'abbiamo preso!" + "Vehicle destroyed, we got him!" ], "kg257a": [ - "Bel lavoro ragazzi, è a terra." + "Nice work boys, he's down." ], "kg258a": [ - "Inseguimento eccellente." + "Excellent pursuit." ], "kg259a": [ - "Trasporto di guardia sotto attacco, richiediamo supporto!" + "Guard transport under attack, requesting support!" ], "kg260a": [ - "Stiamo subendo danni!" + "We're takin' damage!" ], "kg261a": [ - "Ci sta inseguendo!" + "He's after us!" ], "kg262a": [ - "Sta cercando di far schiantare il trasporto!" + "He's trying to crash the transport!" ], "kg263a": [ - "Abbiamo avuto un'imboscata ai trasporti, le unità rispondono!" + "We've had a transport ambush, units respond!" ], "kg264a": [ - "Sta prelevando un prigioniero!" + "He's picking up a prisoner!" ], "kg265a": [ - "Abbiamo perso un prigioniero Lurker." + "We lost a Lurker prisoner." ], "kg266a": [ - "Ha un prigioniero Lurker con sé!" + "He's got a Lurker prisoner with him!" ], "kg267a": [ - "Tirateli fuori tutti!" + "Take 'em all out!" ], "kg268a": [ - "Pensiamo che stia aiutando i Lurker a fuggire!" + "We think he's helping the Lurkers escape!" ], "kg269a": [ - "Ha già fatto fuori due dei nostri trasporti!" + "He's taken out two of our transports already!" ], "kg270a": [ - "È di nuovo solo." + "He's alone again." ], "kg271a": [ - "Dove sta andando?!" + "Where's he heading?!" ], "kg272a": [ - "Terminare con estremo pregiudizio!" + "Terminate with extreme prejudice!" ], "kg273a": [ - "Sta attaccando un altro trasporto!" + "He's attacking another transport!" ], "kg274a": [ - "Siamo inseguiti, mandate una scorta!" + "We're being chased, send in an escort!" ], "kg275a": [ - "Abbiamo perso questo passeggero." + "We lost this passenger." ], "kg276a": [ - "Lo stiamo perdendo!" + "We're losing him!" ], "kg277a": [ - "Li abbiamo presi!" + "We got 'em!" ], "kg278a": [ - "Li abbiamo presi, ti insegnano a fregare il KG!" + "We got 'em, teach ya to screw with the KG!" ], "kg279a": [ - "Accostati, amante dei Lurker!" + "Pull over, Lurker lover!" ], "kg280a": [ - "C'è un ragazzino, guardatelo." + "There's a kid, check him out." ], "kg281a": [ - "Il Barone vuole che tutti i bambini di questa città vengano arrestati." + "The Baron wants every kid in this city arrested." ], "kg282a": [ - "Arrenditi al bambino!" + "Surrender the child!" ], "kg283a": [ - "Lascia perdere il ragazzo!" + "Give up the kid!" ], "kg284a": [ - "Se non si arrendono, uccidili tutti!" + "If they won't surrender, kill them all!" ], "kg285a": [ - "Non uccidere il ragazzo." + "Don't kill the kid." ], "kg286a": [ - "Il Barone vuole il ragazzo vivo!" + "The Baron wants the kid alive!" ], "kg287a": [ - "Trova il ragazzo!" + "Find the boy!" ], "kg288a": [ - "Potrebbe essere quello il ragazzo che il Barone vuole." + "That could be the kid the Baron wants." ], "kg289a": [ - "Dopo di loro!" + "After them!" ], "kg290a": [ - "Non muoverti, ragazzo!" + "Don't move, boy!" ], "kg291a": [ - "Porta fuori quel bastardino!" + "Take out that mutt!" ], "kg292a": [ - "Dovremmo ucciderli tutti!" + "We should kill 'em all!" ], "kg293a": [ - "Hanno preso un veicolo!" + "They've taken a vehicle!" ], "kg294a": [ - "Se ottieni un tiro nitido, prendilo!" + "If you get a clear shot, take it!" ], "kg295a": [ - "Il sospettato sta fuggendo a bordo di un veicolo!" + "Suspect is fleeing in vehicle!" ], "kg296a": [ - "Il veicolo del sospettato attraversa la sezione sette." + "Suspect's vehicle moving through section seven." ], "kg297a": [ - "Pensiamo che il ragazzo sia con quel mostro della metropolitana." + "We think the kid's with that Underground freak." ], "kg298a": [ - "Eliminateli, ma tenete in vita il ragazzo!" + "Take 'em out, but keep the kid alive!" ], "kg299a": [ - "Sono di nuovo a piedi!" + "They're on foot again!" ], "kg300a": [ - "Cos'è quella cosa?!" + "What is that thing?!" ], "kg301a": [ - "Spara a quella cosa, spara!" + "Shoot that thing, shoot it!" ], "kg302a": [ - "Cosa sta facendo?!" + "What's he doing?!" ], "kg303a": [ - "È quel mostro!" + "It's that monster!" ], "kg304a": [ - "Le storie sono vere!" + "The stories are true!" ], "kg305a": [ - "È il mostro oscuro!" + "It's the dark monster!" ], "kg306a": [ - "È lui!" + "It's him!" ], "kg307a": [ - "È l'eco-maniaco oscuro!" + "It's the dark eco freak!" ], "kg308a": [ - "Uccidilo, uccidilo!" + "Kill it, kill it!" ], "kg309a": [ - "Il sospetto si è trasformato in", - "una creatura di qualche tipo." + "Suspect has transformed into", + "a creature of some kind." ], "kg310a": [ - "Certo è brutto." + "Sure is ugly." ], "kg311a": [ - "Quella è una brutta creatura." + "That's one ugly creature." ], "kg312a": [ - "Attenzione!" + "Look out!" ], "kg313a": [ - "Ricaderci!" + "Fall back!" ], "kg314a": [ - "Sta sprecando tutti!" + "He's wasting everybody!" ], "kg315a": [ - "Non possiamo ucciderlo!" + "We can't kill it!" ], "kg316a": [ - "Mantenete i vostri uomini a terra!" + "Stand your ground men!" ], "kg317a": [ - "La Guardia Krimzon non scappa!" + "The Krimzon Guard do not run!" ], "kg318a": [ - "Attenzione ai suoi artigli!" + "Watch out for his claws!" ], "kg319a": [ - "Stai lontano dai suoi dardi energetici!" + "Keep clear of his energy bolts!" ], "kg320a": [ - "Questo è un raid, non resistere!" + "This is a raid, do not resist!" ], "kg321a": [ - "Entra!" + "Move in!" ], "kg322a": [ - "Per ordine del barone Praxis,", - "tutti qui devono essere licenziati!" + "By order of Baron Praxis,", + "everyone here is to be terminated!" ], "kg323a": [ - "Arrenditi e non soffrirai molto." + "Surrender and you will not suffer much." ], "kg324a": [ - "È quel mostro mostruoso della metropolitana!" + "It's that Underground monster freak!" ], "kg325a": [ - "Prendilo!" + "Get him!" ], "kg326a": [ - "Tutte le unità convergono su Water Slums!" + "All units converge on Water Slums!" ], "kg327a": [ - "Abbiamo un combattente sotterraneo!" + "We've got an Underground fighter!" ], "kg328a": [ - "Bruciateli!" + "Burn 'em down!" ], "kg329a": [ - "Stare insieme!" + "Stay together!" ], "kg330a": [ - "Li abbiamo messi alle strette!" + "We've got 'em cornered!" ], "kg331a": [ - "Il sospettato è stato messo alle strette nella sezione due." + "Suspect cornered in section two." ], "kg332a": [ "Non c'è via di fuga!" ], "kg333a": [ - "La resistenza è inutile!" + "Resistance is futile!" ], "kg334a": [ - "Rinuncia al manufatto, maniaco dell'eco!" + "Give up the artifact, eco freak!" ], "kg335a": [ - "Li abbiamo tagliati fuori!" + "We've cut 'em off!" ], "kg336a": [ - "È intrappolato!" + "He's trapped!" ], "kg337a": [ - "Li abbiamo presi!" + "We got 'em!" ], "kg338a": [ - "Stiamo subendo un fuoco pesante!" + "We're taking heavy fire!" ], "kg339a": [ - "Stiamo subendo pesanti perdite, inviate rinforzi!" + "We're taking heavy casualties, send in backup!" ], "kg340a": [ - "Questo ragazzo sa come combattere!" + "This guy knows how to fight!" ], "kg341a": [ - "Mantieni la posizione!" + "Hold your ground!" ], "kg342a": [ - "Non ritirarti!" + "Do not retreat!" ], "kg343a": [ - "Abbiamo perso la squadra Beta!" + "We lost Beta squad!" ], "kg344a": [ - "Abbiamo bisogno di più uomini!" + "We need more men!" ], "kg345a": [ - "È sul sentiero a sud!" + "He's on the south path!" ], "kg346a": [ - "È nell'acqua!" + "He's in the water!" ], "kg347a": [ - "È vicino alla capanna est, tutte le unità convergono!" + "He's near the east hut, all units converge!" ], "kg348a": [ - "Lo perderemo!" + "We're gonna lose him!" ], "kg349a": [ - "Avviso intruso, suona l'allarme!" + "Intruder alert, sound the alarm!" ], "kg350a": [ - "La Fortezza è sotto attacco!" + "The Fortress is under attack!" ], "kg351a": [ - "Questa è casa nostra, ragazzo!" + "This is our house, boy!" ], "kg352a": [ - "Gli Ottoni stanno entrando nella nostra Fortezza!" + "You've got brass coming into our Fortress!" ], "kg353a": [ - "Non uscirai vivo da qui!" + "You won't get out of here alive!" ], "kg354a": [ - "Grazie per averlo reso facile." + "Thanks for making this easy." ], "kg355a": [ - "Stiamo subendo pesanti perdite." + "We're taking heavy casualties." ], "kg356a": [ - "Sta penetrando in profondità, fermalo!" + "He's getting in deep, stop him!" ], "kg357a": [ - "Porta fuori questo tizio, è un ordine!" + "Take this guy out, that's an order!" ], "kg358a": [ - "Invia la squadra d'assalto!" + "Send in the shock squad!" ], "kg359a": [ - "Porta la pesante potenza di fuoco!" + "Bring in the heavy firepower!" ], "kg360a": [ - "Mandate le guardie dello scudo!" + "Send in the shield guards!" ], "kg361a": [ - "Gli sto addosso!" + "I'm on him!" ], "kg362a": [ - "Lasciamelo fare!" + "Let me at 'em!" ], "kg363a": [ - "Li ho presi!" + "I got 'em!" ], "kg364a": [ - "Finitelo!" + "Finish him off!" ], "kg365a": [ - "Si sta muovendo verso la stanza delle munizioni!" + "He's moving toward the ammo room!" ], "kg366a": [ - "Intercetta l'intruso prima che si avvicini troppo!" + "Intercept the intruder before he gets in too far!" ], "kg367a": [ - "Sta arrestando un sospettato." + "He's picking up a suspect." ], "kg368a": [ - "Ha un agente della metropolitana con sé!" + "He's got an Underground agent with him!" ], "kg369a": [ - "Tirateli fuori entrambi!" + "Take 'em both out!" ], "kg370a": [ - "Ha arrestato un altro sospettato." + "He's picked up another suspect." ], "kg371a": [ - "Abbiamo perso il ragazzo che ha lasciato!" + "We lost the guy he dropped off!" ], "kg372a": [ - "Ha un passeggero." + "He's got a passenger." ], "kg373a": [ - "L'autista sta lavorando con la metropolitana." + "Driver is working with the Underground." ], "kg374a": [ - "Sospetto che il veicolo abbia subito danni, ma sia ancora in movimento." + "Suspect vehicle taking damage, but still moving." ], "kg375a": [ - "Dobbiamo tagliarli via!" + "We need to cut 'em off!" ], "kg376a": [ - "Ha un altro agente!" + "He's got another agent!" ], "kg377a": [ - "Il sospetto guida in modo irregolare!" + "Suspect driving erratically!" ], "kg378a": [ - "Il sospettato continua a fuggire!" + "Suspect still evading!" ], "kg379a": [ - "Li abbiamo presi questa volta!" + "We got 'em this time!" ], "kg380a": [ - "Veicolo sospetto distrutto!" + "Suspect vehicle destroyed!" ], "kg381a": [ - "Sta per prendere un altro veicolo!" + "He's going for another vehicle!" ], "kg382a": [ - "Li abbiamo fatti fuori!" + "We took 'em out!" ], "kg383a": [ - "È fritto!" + "He's toast!" ], "kg384a": [ - "Un'altra vittoria per il KG, bel tiro, ragazzi." + "Another win for the KG, good shooting, men." ], "kg385a": [ - "Il sospettato è sfuggito alla cattura." + "Suspect has evaded capture." ], "kg386a": [ - "Bene!" + "Ough!" ], "kg387a": [ - "Eh!" + "Huh!" ], "kg388a": [ "Arghh!" ], "kg389a": [ - "Uffa!" + "Ughh!" ], "kg390a": [ - "Uh!" + "Hugh!" ], "kg391a": [ - "Bene!" + "Aughh!" ], "kg392a": [ - "Hah!" + "Haugh!" ], "kg393a": [ - "Uffa!" + "Oof!" ], "kg394a": [ - "Ah!" + "Hah!" ], "kg395a": [ - "Uffa!" + "Ugh!" ], "kg396a": [ - "Ah!" + "Hah!" ], "kg397a": [ - "Uffa!" + "Ugh!" ], "kg398a": [ "Huff!" @@ -6217,19 +6217,19 @@ "Argh!" ], "kg400a": [ - "Ah!" + "Hah!" ], "kg401a": [ - "Eh!" + "Huh!" ], "kg402a": [ - "Eh!" + "Huuh!" ], "kg403a": [ - "Ahah!" + "Haah!" ], "kg404a": [ - "Ah!" + "Ahh!" ], "kg405a": [ "Ahh...!" @@ -6238,25 +6238,25 @@ "Arrgh!" ], "kg407a": [ - "Oh!" + "Uargh!" ], "kg408a": [ - "Uffa...!" + "Ugh...!" ], "kg409a": [ - "Uffa!" + "Ugh!" ], "kg410a": [ "Nargh!" ], "kg411a": [ - "Ah!" + "Hah!" ], "kg412a": [ - "Uffa...!" + "Ugh...!" ], "kg413a": [ - "Ah...!" + "Gah...!" ], "kg414a": [ "Ah!" @@ -6265,236 +6265,236 @@ "Argh!" ], "kg416a": [ - "Uffa...!" + "Ugh...!" ], "kg417a": [ - "Ehm..." + "Uh..." ], "kg418a": [ "Ah...!" ], "kg419a": [ - "Uffa!" + "Uugh!" ], "kg420a": [ "Ah...!" ], "kg421a": [ - "Eh...!" + "Huah...!" ], "kg422a": [ - "Oddio!" + "Agh!" ], "kg423a": [ - "Hung...!" + "Hungh...!" ], "kg424a": [ "Argh!" ], "kg425a": [ - "Uffa!" + "Ugh!" ], "kg426a": [ - "Uffa!" + "Ugh!" ], "kg427a": [ - "Uffa!" + "Ugh!" ], "kg428a": [ - "Uffa!" + "Oof!" ], "kgv001": [ - "Fermare!" + "Stop!" ], "kgv002": [ - "Apri il fuoco!" + "Aprite il fuoco!" ], "kgv003": [ - "Entra!" + "Move in!" ], "kgv004": [ - "Portateli fuori!" + "Take 'em out!" ], "kgv005": [ - "Portalo giù!" + "Take him down!" ], "kgv006": [ - "Sparagli, sparagli!" + "Shoot 'em, shoot 'em!" ], "kgv007": [ - "Muori, fuorilegge!" + "Die, outlaw!" ], "kgv008": [ - "Mangia questo!" + "Eat this!" ], "kgv009": [ - "Fuoco fuoco!" + "Fire, fire!" ], "kgv010": [ - "Arrenditi, fuorilegge!" + "Give it up, outlaw!" ], "kgv011": [ "Chiudete l'area." ], "kgv012": [ - "Chiama i rinforzi!" + "Call in reinforcements!" ], "kgv013": [ - "Rivolta in corso!" + "Riot in progress!" ], "kgv014": [ - "Chiama rinforzi!" + "Call for backup!" ], "kgv015": [ - "Fermare il veicolo!" + "Stop the vehicle!" ], "kgv016": [ - "Tu sei sotto arresto!" + "Sei in arresto!" ], "kgv017": [ "Fermo!" ], "kgv018": [ - "Rallentare!" + "Slow down!" ], "kgv019": [ - "Spostati!" + "Move over!" ], "kgv020": [ "Fuori dal veicolo!" ], "kgv021": [ - "Chiama altri Hellcats!" + "Call in more Hellcats!" ], "kgv022": [ - "Richiedo backup!" + "Requesting backup!" ], "kgv023": [ - "Inseguimento ad alta velocità nel settore quattro!" + "High speed chase in sector four!" ], "kgv024": [ - "Sospetto nel veicolo!" + "Suspect in vehicle!" ], "kgv025": [ - "Il sospetto è fuggito nel settore cinque." + "Suspect fleeing into sector five." ], "kor001": [ - "Sono così orgoglioso di te Jak, e anche di te, Daxter!", - "Insieme avete causato un vero danno al Barone.", - "Potremmo anche vincere questa guerra!" + "I am so proud of you Jak, and you too, Daxter!", + "Together you have done real damage to the Baron.", + "We may win this war yet!" ], "kor002": [ - "Ottimo lavoro, ti stai dimostrando una vera risorsa.", - "Senza eco, il Barone presto cadrà,", - "e il futuro della città sarà nelle nostre mani." + "Excellent work, you are proving to be quite an asset.", + "Without eco, the Baron will soon topple,", + "and the city's future will be in our hands." ], "kor004": [ - "Un altro colpo al Barone, miei buoni amici!", - "Molto presto, le nostre fortune cambieranno!" + "Another blow to the Baron, my good friends!", + "Very soon, our fortunes will change!" ], "krew001": [ - "Jak, questo è Krew. Ho appena parlato con il mio cliente delle corse", - "e mi ha detto che eri abbastanza bravo con quel JET-Board", - "di lei. Le mie fonti dicono che si tratta di un carico di Krimzon Guard", - "le apparecchiature di ascolto sono appena arrivate al porto.", - "Nessuno di noi, compresa la metropolitana, vuole quei dispositivi", - "installato e funzionante. Non va bene per gli affari.", - "Sali sul JET-Board fino al porto", - "e distruggi tutte le casse della Guardia Krimzon che trovi.", - "Ci sarà sicuramente un perimetro di difesa,", - "quindi fai attenzione, ehi?" + "Jak, this is Krew. I just talked to my racing client", + "and she told me you were pretty good with that JET-Board", + "of hers. My sources say a shipment of Krimzon Guard", + "listening equipment just arrived in the Port.", + "None of us, including the Underground, want those devices", + "up and running. It's not good for business.", + "Ride the JET-Board out into the Port", + "and destroy every Krimzon Guard crate you find.", + "There's sure to be a defense perimeter,", + "so watch out, 'ey?" ], "krew002": [ - "Ottimo lavoro, Jak. Anche io sono impressionato.", - "Dovrei mantenere delle guardie Krimzon senza scrupoli", - "fuori dalla nostra attività.", - "A cosa va il mondo se non puoi riscattare?", - "qualche guardia con tangenti?" + "Excellent work, Jak. Even I am impressed.", + "I should keep unscrupulous Krimzon Guards", + "out of our business.", + "What's the world coming to when you can't buy off", + "a few guards with bribes?" ], "krew003": [ - "Ooooh... le favole della buonanotte erano vere!", - "Il leggendario Cuore di Mar era nascosto dentro quella brutta statua", - "del vecchio ragazzo.", - "Niente di rotto, niente di guadagnato! Questo è il mio motto. Hahaha...", - "Per la tua fedeltà troverai un eccellente potenziamento per la pistola", - "nascosto in una cassa nel porto." + "Ooooh... the bedtime stories were true!", + "The fabled Heart of Mar was hidden inside that ugly statue", + "of the old boy.", + "Nothing fractured, nothing gained! That's my motto. Hahaha...", + "For your loyalty, you'll find an excellent gun upgrade", + "stashed in a crate in the Port." ], "krew004": [ - "Quella è una torretta sotto. Continuare a cercare!" + "That's one turret down. Keep looking!" ], "krew005": [ - "Due torrette. Buon lavoro finora!" + "Two turrets. Good work so far!" ], "krew006": [ - "Tre torrette sparite. Bene! Continuate così!" + "Three turrets gone. Nice! Keep it up!" ], "krew007": [ - "Quattro torrette distrutte. Haha... Adorabile, ragazzi! Vai a prenderli!" + "Four turrets trashed. Haha... Lovely, boys! Go get 'em!" ], "krew008": [ - "Cinque torrette in malora! Continuare." + "Five turrets down the drain! Keep going." ], "krew009": [ - "Sei torrette fuori servizio.", - "Ah, mi piace il modo in cui lavori." + "Six turrets out of commission.", + "Hah, I like the way you work." ], "krew010": [ - "Lavori in ottone, ragazzi! Hai distrutto tutte le torrette, eh?", - "Ora torna all'Hip Hog." + "Brass work, boys! You destroyed all the turrets, eh?", + "Now, come back to the Hip Hog." ], "kwbf001": [ - "Lo sai che non posso giocare onestamente!", - "Ho un'arma segreta: il mio campo di duplicità!", - "Salutate i miei piccoli amici...", - "Ah, moltiplicami! Ahahahah... Che delizia." + "You know I can't play fair!", + "I have a secret weapon: my duplicity field!", + "Say hello to my little friends...", + "Ah, multiple me! Hahahaha... How delightful." ], "kwbf002": [ - "Vorrei presentarvi il mio... \"equipaggio\"." + "Let me introduce you to my... \"crew.\"" ], "kwbf003": [ - "Balliamo!" + "Let's dance!" ], "kwbf004": [ - "Morirai!" + "You will die!" ], "kwbf005": [ - "Arriviamo!" + "Here we come!" ], "kwbf006": [ - "Mamma mia, non sono stupendi i miei gemelli?" + "My, don't my twins look stunning?" ], "kwbf007": [ - "Non puoi fermarci tutti!" + "You can't stop us all!" ], "kwbf008": [ - "Sorpresa! Più di me di quanto tu possa gestire." + "Surprise! More of me than you can handle." ], "kwbf009": [ - "Ho alcuni bravi uomini che mi aiutano." + "I've a few good men to help me." ], "kwbf010": [ - "Prendilo!" + "Get him!" ], "kwbf011": [ - "UARGH! Prova a fermarmi adesso!" + "UARGH! Try stopping me now!" ], "kwbf012": [ - "Finora sei stato fortunato, eh?" + "You're getting lucky so far, 'ey?" ], "kwbf013": [ - "Mi sto stancando di tutto questo. La finiamo adesso." + "I grow weary of this. We end it now." ], "kwbf014": [ - "Hm-hm, mi muovo abbastanza velocemente per essere un omone, eh?" + "Hm-hm, I move pretty fast for a big man, 'ey?" ], "kwbf015": [ - "Galleggio come una farfalla e pungo come un wumpbee!" + "I float like a butterfly and sting like a wumpbee!" ], "kwbf016": [ - "Urgh!" + "Urghh!" ], "kwbf017": [ - "Argh!" + "Aurgh!" ], "kwbf018": [ "Arghh!" @@ -6506,300 +6506,300 @@ "Urgh, ow!" ], "kwbf021": [ - "Morire!" + "Die!" ], "kwbf022": [ - "Ora ho te!" + "Now I have you!" ], "kwbf023": [ - "Non puoi vincere, Jak!" + "You cannot win, Jak!" ], "kwbf024": [ - "Ecco un po' di dolore!" + "Here's some pain!" ], "kwbf025": [ - "NO!" + "No!" ], "kwbf026": [ - "Stai mettendo a dura prova la mia pazienza!" + "You're trying my patience!" ], "kwbf027": [ - "Stai fermo!" + "Stand still!" ], "kwbf028": [ - "Ahah, come ti sei sentito?" + "Haha, how did that feel?" ], "kwbf029": [ - "Avresti dovuto andartene quando ne avevi la possibilità." + "You should have walked away when you had a chance." ], "kwbf030": [ - "Pop questo!" + "Pop this!" ], "kwbf031": [ - "Non puoi fermare la bomba, Jak!" + "You can't stop the bomb, Jak!" ], "kwbf032": [ - "Ahahahah, è stato bello!" + "Hahahaha, that felt good!" ], "kwbf033": [ - "Sono il maestro d'armi!" + "I am the weapon master!" ], "kwbf034": [ - "Aveva abbastanza?" + "Had enough?" ], "kwbf035": [ - "Arriviamo!" + "Here we come!" ], "kwbf036": [ - "Balla per me, Jak!" + "Dance for me, Jak!" ], "kwbf037": [ - "Non puoi prenderci tutti!" + "You can't get us all!" ], "kwbf038": [ - "Etichetta! Lo sei." + "Tag! You're it." ], "kwbf039": [ - "Uff. Questo è un po' un allenamento..." + "Phew. This is a bit of a workout..." ], "kwbf040": [ - "Qual è il vero me, Jak?" + "Which is the real me, Jak?" ], "kwbf041": [ - "Finalmente... posso rimetterti al tuo posto!" + "Finally... I get to put you in your place!" ], "kwbf042": [ - "Arghh! Tu piccolo...!" + "Arghh! You little...!" ], "ora006": [ - "Portami altre 200 gemme di teschio di testa di metallo", - "e ti mostrerò un altro Potere Oscuro." + "Bring me 200 more Metal Head Skull Gems", + "and I will show you another Dark Power." ], "ora007": [ - "Portami altre 200 gemme del teschio", - "e un altro potere sarà tuo da controllare." + "Bring me 200 more Skull Gems", + "and another power will be yours to control." ], "ora008": [ - "Portami altre gemme del teschio per ricevere il controllo", - "sopra un potere oscuro." + "Bring me more Skull Gems to receive control", + "over a Dark Power." ], "ora009": [ - "Non hai abbastanza gemme del teschio.", - "Torna quando ne avrai raccolti di più." + "You do not have enough Skull Gems.", + "Come back when you have collected more." ], "ora010": [ - "Mi servono più gemme del teschio." + "I need more Skull Gems." ], "ora011": [ - "Non fidarti della tua dipendenza dalle armi." + "Trust not your reliance on weapons." ], "ora012": [ - "Usa solo il tuo corpo e il tuo cervello per questa sfida." + "Use only your body and brain for this challenge." ], "ora013": [ - "Le armi sono per i deboli." + "Weapons are for the weak." ], "ora014": [ - "Non devi usare armi in questa sfida." + "You must not use weapons in this challenge." ], "pek001": [ - "Groark! Non posso credere che tu abbia fatto davvero questa cosa!", - "Onin dice che cercherà risposte nelle sequenze temporali", - "su queste sacre reliquie. Ti troverò allora." + "Groark! I can't believe you actually did this thing!", + "Onin says she will search timelines for answers", + "about these sacred relics. I will find you then." ], "pek002": [ - "Groark! Whoa... beh sarò lo zio di Moncaw, la Torre della Luce", - "esiste davvero! Il raggio di luce splende da qualche parte", - "in città! La Tomba di Mar era proprio sotto il nostro naso", - "da sempre. E grazie a me l'hai trovato!" + "Groark! Whoa... well I'll be a moncaw's uncle, the Light Tower", + "actually does exist! The beam of light is shining somewhere", + "in the city! The Tomb of Mar was right under our noses", + "all along. And thanks to me, you found it!" ], "pek003": [ - "Oh! Mentre vivo e muoio, un passo più vicino alla Tomba.", - "Non avrei mai pensato che saremmo arrivati ​​a questo punto!" + "Wow! As I live and molt, one step closer to the Tomb.", + "I never thought we'd get this far!" ], "pek010": [ - "Questa è la ciotola magica di Onin.", - "Onin farà apparire dei simboli dalla sua ciotola.", - "Quando compaiono i simboli, devi farli scoppiare prima che", - "raggiungere il suolo. Devi farli scoppiare velocemente, solo scoppiarli", - "i simboli che vedi. Se provi a far apparire un simbolo, lo è", - "non c'è, Onin ti darà un rigore! Perdere qualsiasi simbolo", - "e sarai penalizzato! Ogni round diventerà più veloce.", - "Vediamo quanto lontano arrivi.", - "È necessario ottenere un punteggio sufficientemente alto per vincere." + "This is Onin's magic bowl.", + "Onin will make symbols appear from her bowl.", + "When the symbols appear, you must pop them before they", + "reach the ground. You must pop them quickly, pop only", + "the symbols you see. If you try to pop a symbol that is", + "not there, Onin will give you a penalty! Miss any symbols", + "and you will penalized! Each round will get faster.", + "Let's see how far you get.", + "You must get a high enough score to win." ], "pek011": [ - "Stai andando molto bene!" + "You are doing very well!" ], "pek012": [ - "Eh, non male." + "Huh, not bad." ], "pek013": [ - "Continua così, puoi farcela!" + "Keep going, you can do it!" ], "pek014": [ - "Fai scoppiare non più del numero reale di ciascun simbolo,", - "e sarai penalizzato! Groark!" + "Pop any more than the true number of each symbol,", + "and you will be penalized! Groark!" ], "pek015": [ - "Pronto? Andare!" + "Ready? Go!" ], "pek016": [ - "Quel simbolo non c'era, rigore!" + "That symbol wasn't there, penalty!" ], "pek017": [ - "Ah, Onin ti ha preso! Pop solo i simboli che vedi." + "Hah, Onin got you! Pop only symbols that you see." ], "pek018": [ - "Ecco un altro giro!", - "Dagli un'altra raffica, ragazza Onin!" + "Here comes another round!", + "Give him another burst, Onin girl!" ], "pek019": [ - "Ti ha preso di nuovo! Qual è il tuo problema?" + "She got you again! What is your problem?" ], "pek020": [ - "Non posso credere che tu sia arrivato fin qui!" + "I can't believe you've made it this far!" ], "pek021": [ - "Presto! Mancano dei simboli!" + "Quickly! You are missing symbols!" ], "pek022": [ - "Ne hai saltato qualcuno!" + "You missed some!" ], "pek023": [ - "Più veloce! Più veloce!" + "Faster! Faster!" ], "pek024": [ - "Dammelo, Onin! Di più, Onin, di più!", - "Vai, ragazza, scuoti quello che ti ha dato tua mamma!" + "Give it to him, Onin! More, Onin, more!", + "You go, girl, shake what your momma gave you!" ], "pek025": [ - "Mi diverto nel club." + "Rockin' in the club." ], "pek026": [ - "Non può farne così tanti!" + "He can't do that many!" ], "pek027": [ - "Che cosa? Ci va ancora?" + "What? He's still going?" ], "pek028": [ - "Vediamo se riesce a gestirlo." + "Let's see if he can handle it." ], "pek029": [ - "Forza! Forza!" + "Go! Come on!" ], "pek030": [ - "Ok, quindi sei a posto." + "Okay, so you're good." ], "pek031": [ - "Wow! Niente male." + "Wow! Not bad." ], "pek032": [ - "Ebbene, ho deposto un uovo." + "Well, I laid an egg." ], "pek033": [ - "Sorprendente! Hai vinto davvero!", - "Sono senza parole, e questo è raro." + "Amazing! You actually won!", + "I am without words, and that is rare." ], "pek034": [ - "Hai abbastanza punti, congratulazioni!" + "You got enough points, congratulations!" ], "pek035": [ - "Ultimo rigore! Perdi, perdente." + "Last penalty! You lose, loser." ], "pek036": [ - "Hai perso! Perché non sono sorpreso?" + "You lost! Why am I not surprised?" ], "pek037": [ - "Hai perso! Vuoi riprovare?" + "You lose! Would you like to try again?" ], "pek038": [ - "Ahh, hai deposto un uovo. Peccato, così triste." + "Ahh, you laid an egg. Too bad, so sad." ], "pek039": [ - "Oooh, così vicino... no! Eheheh..." + "Oooh, so close... not! Hehehe..." ], "pek040": [ - "Hai fatto uno sforzo coraggioso, ma fai schifo!" + "You made a valiant effort, but you suck!" ], "pek041": [ - "Game over, finito, fatto, è finita!" + "Game over, finito, done, se acabó!" ], "prop002": [ - "Come tutti sapete, sono stato ferito durante l'ultima volta", - "glorioso assalto contro il Metal Head Nest", - "molti anni fa. Ho sacrificato tutto", - "per questa città e pretendo solo lo stesso in cambio!", - "La fedeltà sarà premiata,", - "la morte attenderà tutti gli altri." + "As you all know, I was wounded during our last", + "glorious assault against the Metal Head Nest", + "many years ago. I have sacrificed everything", + "for this city and I demand only the same in return!", + "Loyalty will be rewarded,", + "death will await all others." ], "prop003": [ - "L'Eco Oscuro dentro di te alla fine ti ucciderà, Jak.", - "I suoi effetti distruttivi non possono essere fermati.", - "Una volta che sei nella sua presa caotica, non ti lascerà andare", - "finché non scivoli nella follia. Consegnati, e io", - "ucciderti misericordiosamente e senza dolore,", - "è la tua unica via d'uscita." + "The Dark Eco inside you will eventually kill you, Jak.", + "Its destructive effects cannot be stopped.", + "Once you are in its chaotic grip, it will not let you go", + "until you slide into insanity. Turn yourself in, and I will", + "kill you mercifully and painlessly,", + "it is your only way out." ], "prop004": [ - "Non cercare di prendermi in giro, Jak.", - "Solo perché non ti ho ancora ucciso, non è così", - "significa che non ti capisco. I cittadini di questa città", - "adorami perché offro loro sicurezza.", - "Tutto ciò che chiedo in cambio è per le loro vite.", - "Ti troverò e, quando lo farò, desidererai", - "sei morto in prigione." + "Don't try to make a fool out of me, Jak.", + "Just because I haven't killed you yet doesn't", + "mean I'm not onto you. The citizens of this city", + "worship me because I offer them safety.", + "All I ask in return is for their lives.", + "I'll find you, and when I do, you'll wish", + "you died in prison." ], "prop005": [ - "Attenzione, miei fedeli cittadini! Cerchiamo a", - "fuggitivo ribelle che ha causato notevoli danni alla città", - "danni di recente. Quest'uomo è armato ed estremamente", - "pericoloso e può in qualche modo trasformarsi in un mostruoso", - "creatura. Abbiamo rapporti che sta lavorando con", - "Metal Heads per sovvertire la tua città e la tua sicurezza.", - "Segnala immediatamente tutti gli avvistamenti!" + "Attention, my loyal citizens! We are looking for a", + "rebel fugitive who has caused the city considerable", + "damage of late. This man is armed and extremely", + "dangerous and can somehow change into a monstrous", + "creature. We have reports he is working with the", + "Metal Heads to subvert your city and your safety.", + "Report all sightings immediately!" ], "prop006": [ - "Cittadini coraggiosi, oggi è l'anniversario dei grandi", - "battaglia che ha rovinato la sezione della nostra città che ora chiamiamo", - "Città morta. Ricorda coloro che sono morti", - "quel giorno e quanto dobbiamo ai Metal Heads", - "per il loro tradimento! Ricorda quanto coraggiosamente ho combattuto", - "per salvare quelle povere anime della sezione invasa", - "e riflettete su quanto dovreste essere grati per questo", - "Krimzon Guard ti tiene al sicuro ogni giorno." + "Brave citizens, today is the anniversary of the great", + "battle that ruined our city section we now call", + "Dead Town. Remember those who died", + "that day and how much we owe the Metal Heads", + "for their treachery! Remember how bravely I fought", + "to save those poor souls of the overrun section", + "and reflect on how grateful you should all be that the", + "Krimzon Guard keeps you safe each day." ], "prop007": [ - "Questo è il tuo Barone. I resoconti di un Metal Head", - "invasione della città sono ampiamente esagerate.", - "Ti assicuro che questa non è che una piccola incursione e la faremo", - "sconfiggerlo in breve tempo. Restate nelle vostre case, niente panico,", - "o sarai punito!" + "This is your Baron. The reports of a Metal Head", + "invasion of the city are vastly overblown.", + "I assure you this is but a small incursion and we will", + "defeat it shortly. Stay in your homes, do not panic,", + "or you will be punished!" ], "prop008": [ - "Attenzione cittadini, qui è il vostro Barone.", - "Ci sono stati diversi usi non autorizzati di", - "le vecchie serrature delle porte della città. Fortunatamente, queste violazioni", - "non hanno provocato contaminazioni, ma lo sappiamo tutti", - "quanto è mortale la Zona Contaminata. A nessuno è permesso", - "fuori città senza autorizzazione, lasciamo stare", - "noto che eventuali trasgressori verranno catturati", - "ed eseguito." + "Attention citizens, this is your Baron speaking.", + "There have been several unauthorized uses of the", + "city's old gate locks. Fortunately, these breaches", + "have not resulted in contamination, but we all know", + "how deadly the Wasteland is. No one is allowed", + "outside the city without authorization, let it be", + "known that any violators will be caught", + "and executed." ], "prop009": [ - "Servi la tua città." + "Serve your city." ], "prop010": [ - "Sacrificatevi per la vostra città e tutto prospererà!" + "Sacrifice for your city, and all will prosper!" ], "prop011": [ - "Sei al sicuro, perché mi importa." + "You are safe, because I care." ], "prop012": [ - "Tutti i Metal Head devono morire!" + "All Metal Heads must die!" ], "prop013": [ - "Lavora duro e sii grato." + "Work hard, and be grateful." ], "prop014": [ "Denuncia i disonesti." @@ -6808,10 +6808,10 @@ "Ricorda, anche i tuoi amici possono essere i tuoi nemici." ], "prop016": [ - "Consegnate tutti coloro che sovvertono." + "Turn in all who subvert." ], "prop017": [ - "La forza è la nostra unica opzione!" + "Strength is our only option!" ], "prop018": [ "Obbedisci e sii felice." @@ -6842,8 +6842,8 @@ "Il movimento mondo sotterrano è morto!" ], "prop027": [ - "Unisciti alla Guardia Krimzon e alla tua famiglia", - "gli sarà permesso di restare." + "Join the Krimzon Guard and your family", + "will be allowed to stay." ], "prop028": [ "Una via: La mia via." @@ -6861,7 +6861,7 @@ "La città ha bisogno di un capo forte, non di un giovane folle." ], "prop033": [ - "Non accogliere il volto sconosciuto." + "Welcome not the unknown face." ], "prop034": [ "Evitate chi mi sfida!" @@ -6873,10 +6873,10 @@ "Senza la mia forza, non ci sarebbe nessuna città." ], "prop037": [ - "Seguitemi verso un futuro più sicuro!" + "Follow me to a safer future!" ], "prop038": [ - "Con me sei al sicuro tra le mura." + "You are safe inside the walls with me." ], "prop039": [ "Sfidami... e muori." @@ -6887,8 +6887,8 @@ "Obbeditemi e non sarete puniti." ], "prop041": [ - "La città è sicura. Non permetterò che ci siano danni", - "che ti accada, fidati di me." + "The city is safe. I will not allow harm", + "to befall you, trust me." ], "prop042": [ "State sicuri, distruggerò le Teste di Metallo.", @@ -6896,962 +6896,962 @@ ], "prop043": [ "A tutti i cittadini, questa piccola rivolta clandestina", - "sarà affrontato con tutti i mezzi aggressivi.", - "Noi schiacceremo questi arroganti arrivati, ma loro non lo faranno", - "non ti è permesso minacciare me o l'ordine di questa città!" + "will be dealt with by all aggressive means.", + "We will crush these arrogant upstarts, they will not", + "be allowed to threaten me or this city's order!" ], "prop044": [ - "Per tutti i cittadini di questa grande città, c'è un mostro", - "in mezzo a voi, mascherato da uomo!", - "È pericoloso e deve essere distrutto!", - "Offro una ricompensa in eco per la sua cattura, o, se tu", - "ho una persona cara in prigione, la scambierò con", - "questo rinnegato. Lo prometto." + "To all citizens of this great city, there is a monster", + "among you, masquerading as a man!", + "He is dangerous and must be destroyed!", + "I offer a reward of eco for his capture, or, if you", + "have a loved one in prison, I will exchange them for", + "this renegade. I promise." ], "prop045": [ - "A tutti coloro che mi sfidano! Ti sto guardando,", - "Sono ovunque, sono questa città!" + "To all who defy me! I am watching you,", + "I am everywhere, I am this city!" ], "prop046": [ - "Questo è il tuo Barone. Sono stato informato dal", - "ministero del lavoro estremo che è la produttività dei lavoratori", - "giù questo mese! Questo è inaccettabile!", - "Ti do sicurezza e tu mi ripaghi così?", - "Devi lavorare di più, non in modo più intelligente!", - "Libera la mente e il corpo farà come gli viene detto,", - "il lavoro forzato ti renderà libero!", - "E per aiutarti nella tua motivazione spirituale...", - "le quote saranno raddoppiate il prossimo mese!" + "This is your Baron. I have been informed by the", + "ministry of extreme labor that worker productivity is", + "down this month! That is unacceptable!", + "I give you safety and this is how you repay me?", + "You must work harder, not smarter!", + "Free the mind and the body will do as it's told,", + "forced labor will set you free!", + "And to help you in your spiritual motivation...", + "quotas are doubled next month!" ], "prop047": [ - "A causa delle recenti, ehm... difficoltà di \"attrito\",", - "questa città ha bisogno di nuove reclute della Guardia Krimzon!", - "A tutti è chiesto di offrire volontariato ai membri della propria famiglia!", - "Vieni nella tua amichevole struttura della Fortezza.", - "O altro!" + "Due to recent, uh... \"attrition\" difficulties,", + "this city needs fresh Krimzon Guard recruits!", + "Everyone is asked to volunteer members of their family!", + "Come down to your friendly Fortress facility.", + "Or else!" ], "prop048": [ - "Come vostro Barone, sto istituendo una regola \"niente hoverboard\".", - "nella città! Giovani delinquenti con niente di meglio", - "altro da fare che fluttuare e fare acrobazie! Eh!", - "Metterò tutti i trasgressori nella Guardia e insegnerò loro", - "un po' di disciplina. Niente pattinaggio, è la legge!" + "As your Baron, I am instituting a \"no hoverboard\" rule", + "in the city! Young delinquents with nothing better", + "to do than float around and do tricks! Huh!", + "I'll put all violators into the Guard and teach them", + "some discipline. No skating, it's the law!" ], "prop049": [ - "Sono deluso dalla mancanza di questa città", - "impegno e sacrificio. Lavora di più! Mangia meno!", - "Bevi solo quando te lo dico io! Il sonno è facoltativo.", - "Siamo in guerra con una minaccia esterna,", - "non costringermi a dichiarare guerra anche a te!" + "I am disappointed with this city's lack of", + "committment and sacrifice. Work harder! Eat less!", + "Drink only when I tell you! Sleep is optional.", + "We are at war with an outside threat,", + "don't make me declare war on you as well!" ], "prop050": [ - "Saluti, popolo di questa meravigliosa utopia. Quest'anno", - "La gara di campionato inizierà a breve. Tutti i cittadini", - "non agli arresti domiciliari sono invitati a recarsi", - "allo Stadio e guarda il tuo figlio preferito Erol", - "mostra ancora una volta come la Guardia Krimzon sia l'élite", - "guerrieri di questa città. Portate tutta la famiglia! Il primo", - "mille bambini avranno l'obbligatorietà", - "Pacchetto di reclutamento della Guardia Krimzon e diventa", - "\"ha chiesto\" di entrare nella Guardia a vita, che meraviglia!" + "Greetings, people of this wonderful utopia. This year's", + "championship race will begin shortly. All citizens", + "not under house arrest are invited to come down to", + "the Stadium and watch your favorite son Erol", + "once again show how the Krimzon Guard are the elite", + "warriors of this city. Bring the whole family! The first", + "one thousand children will get a mandatory", + "Krimzon Guard recruitment package and be", + "\"asked\" to join the Guard for life, what a treat!" ], "prop051": [ - "Questo è il tuo Barone, ho ancora il controllo!", - "E ti assicuro che non esistono assolutamente i Metal Head", - "nella città. Chiunque contraddica questo fatto...", - "verrà fucilato! La situazione attuale è semplicemente", - "un'elaborata bufala propagandistica, perpetrata da", - "la milizia clandestina fuorilegge ci sta provando", - "sovvertite le nostre leggi e screditate coloro che vi proteggono", - "Mentre dormi! Non prestare attenzione a questa stupida bufala,", - "non ci sono Metal Head nel raggio di 100 miglia da questa città!" + "This is your Baron, I am still in control!", + "And I assure you, there's absolutely no Metal Heads", + "in the city. Anyone who contradicts this fact...", + "will be shot! The current situation is merely", + "an elaborate propaganda hoax, perpetrated by", + "the outlawed Underground militia trying to", + "subvert our laws and discredit those who protect you", + "while you sleep! Pay no attention to this foolish hoax,", + "there are no Metal Heads within 100 miles of this city!" ], "prop052": [ - "Questo è il Barone Praxis. Ci siamo ripresi la città", - "e i Metal Heads ora stanno fuggendo davanti a noi!", - "La vittoria è a portata di mano! Continua a lottare per la libertà", - "Un giorno potrei dartelo. Continua a sfidarli", - "nemici della mia legge e del mio ordine...", - "e continua a morire per me." + "This is Baron Praxis. We have taken back the city", + "and the Metal Heads are now fleeing before us!", + "Victory is at hand! Continue to fight for the freedom", + "I may some day give you. Continue to defy these", + "enemies of my law and order...", + "and continue to die for me." ], "prop053": [ - "Non temere gli uomini in rosso. Certo, ce ne sono occasionali", - "denunce per la loro polizia eccessivamente aggressiva,", - "distruzione sfrenata delle proprietà delle persone durante le incursioni,", - "arresti di massa, persone care smarrite e quant'altro.", - "Ehi, siamo solo umani! Gestire una città può esserlo", - "più dura di quanto sembri, immagina quanto peggio", - "lo sarebbe se al comando ci fossero i Metal Heads!" + "Fear not the men in red. Sure, there are occasional", + "complaints about their over-aggressive policing,", + "wanton destruction of people's property during raids,", + "mass-arrests, misplaced loved ones and whatnot.", + "Hey, we're only human! Running a city can be", + "tougher than it looks, imagine how much worse", + "it would be if the Metal Heads were in charge!" ], "prop054": [ - "Abbiamo avuto alcuni incidenti con la manodopera delle classi inferiori", - "forza ultimamente. Se il tuo Lurker si comporta male, chiama Krimzon", - "Controllo degli animali. Il tuo Lurker è su un albero? Bloccato in a", - "griglia fognaria? Schiuma alla bocca? Chiamata", - "gli ufficiali amichevoli del K.A.C. e si occuperanno", - "con il tuo schiavo peloso. con tutto l'amore e la cura", - "merita... poi portatelo via per il ricondizionamento.", - "Ricorda, i Lurker possono essere pericolosi!" + "We've had a few incidents with our lower class labor", + "force lately. If your Lurker is acting up, call Krimzon", + "Animal Control. Is your Lurker in a tree? Stuck in a", + "sewer grate? Foaming at the mouth? Call", + "the friendly officers of the K.A.C. and they will deal", + "with your furry slave. with all the love and care it", + "deserves... then haul it away for reconditioning.", + "Remember, Lurkers can be dangerous!" ], "prop055": [ "Per favore donate generosamente al fondo eco del Barone.", - "La tua munifica donazione verrà utilizzata per una varietà di scopi", - "dei bisogni umanitari: bombe, armi da fuoco, armature, genetica", - "ricerca di alterazione, tutto in nome della preservazione di questo", - "la nostra meravigliosa città. Dona spesso, dona liberamente...", - "o ti sarà portato via!" + "Your munificent donation wil be used for a variety", + "of humanitarian needs: bombs, guns, armor, genetic", + "alteration research, all in the name of preserving this", + "wonderful city of ours. Give often, give freely...", + "or it will be taken from you!" ], "prop056": [ - "Può essere così solitario in cima e guardare dall'alto", - "quassù vedo che questa sporca città è disperata", - "bisogno di rivitalizzazione. Quindi, a tal fine, noi", - "demoliranno con i bulldozer molte zone della città nel", - "prossime settimane! Tutte le denunce contro questo", - "l'iniziativa di costruzione può essere portata,", - "di persona, alla prigione della Fortezza dove saranno", - "\"rivisto.\" Le sezioni della città condannate devono essere", - "essere evacuati prima che inizi la rasatura.", - "Chiunque sia ancora nelle proprie case verrà ignorato." + "It can be so lonely at the top and looking down from", + "up here I can see that this dirty city is in desperate", + "need of revitalization. So, to that end, we", + "will be bulldozing many sections of the city in the", + "coming weeks! All complaints against this", + "construction initiative can be brought,", + "in-person, to the Fortress Prison where they will be", + "\"reviewed.\" Condemned city sections are to", + "be evacuated before razing begins.", + "Anyone still in their homes will be ignored." ], "prop057": [ - "L'attacco di Metal Head non avrà successo!", - "Il vostro Barone ha preso alcune misure", - "per garantire che i Metal Head non reggeranno MAI", - "questa città per molto tempo. State tranquilli, conquisterò la vittoria", - "dalle fauci della sconfitta, costi quel che costi!", - "Ho giurato di non lasciare mai che questa città cadesse e intendo mantenerla", - "quella promessa. Ciò che deve accadere è per il bene di tutti!", - "Ricorda, morire vittoriosi è glorioso", - "distintivo d'onore!" + "The Metal Head attack will not succeed!", + "Your Baron has taken certain measures", + "to guarantee that the Metal Heads will NEVER hold", + "this city for long. Rest assured, I will snatch victory", + "from the jaws of defeat, whatever the cost!", + "I vowed never to let this city fall, and I intend to keep", + "that promise. What must happen is for the good of all!", + "Remember, to die in victory is a glorious", + "badge of honor!" ], "prop058": [ - "Questo è il Barone Praxis. Mentre la nostra città affronta la sua peggiore minaccia", - "in trecento anni mi trovo di fronte a cose serie", - "decisioni riguardanti il ​​nostro futuro. Mi dispiace di averlo fatto", - "restano poche scelte. Comando a tutti voi di ritornare al vostro", - "case e salutate le vostre famiglie.", - "Siate certi che, in un modo o nell'altro, non perderemo questa battaglia", - "oppure un'altra! È giunto il momento di mostrare queste creature", - "di cosa siamo capaci quando ogni speranza è perduta!", - "È stato un piacere governare su di te", - "all'estremità." + "This is Baron Praxis. As our city faces its worst threat", + "in three hundred years, I am faced with serious", + "decisions concerning our future. I regret that I have", + "few choices left. I command you all to return to your", + "homes and say goodbye to your families.", + "Be assured, we will not lose this fight, one way", + "or another! The time has come to show these creatures", + "what we're capable of when all hope is lost!", + "It has been a pleasure ruling over you", + "to the end." ], "sam001": [ - "Questa è Samo. Jak, ho bisogno che tu vada alle rovine", - "a Dead Town e visita la mia vecchia capanna. È ora di recuperare", - "qualcosa che ho nascosto lì tanto tempo fa, buona fortuna! E Daxter...", - "pulisci casa mia mentre sei là fuori!" + "This is Samos. Jak, I need you to go out to the ruins", + "in Dead Town and visit my old hut. It's now time to retrieve", + "something I hid there long ago, good luck! And Daxter...", + "clean up my place while you're out there!" ], "sam002": [ - "Questa è Samo. Ora che voi ragazzi siete qui", - "Voglio che tu vada alla mia vecchia capanna. C'è qualcosa lì", - "di cui abbiamo bisogno! Buona fortuna e tieni d'occhio il nostro Metal Heads." + "This is Samos. Now that you boys are here", + "I want you to get up to my old hut. There is something there", + "that we need! Good luck, and watch our for Metal Heads." ], "sam003": [ - "Questo è Samos, Jak. devono aver preso i Metal Heads", - "il gigantesco cancello che porta al loro Nido nella Terra Desolata.", - "Se mai useranno quell'anello per aprire una spaccatura", - "al nostro vecchio villaggio, dobbiamo entrare nel Nido e trovarlo." + "This is Samos, Jak. the Metal Heads must have taken", + "the giant gate ring to their Nest in the Wasteland.", + "If they're ever going to use that ring to open a rift back", + "to our old village, we need to get into the Nest and find it." ], "sam004": [ - "Hai fatto bene, Jak. Fortunatamente, la Pietra Precursore non c'era", - "bomba quando è esplosa, altrimenti nessuno di noi sarebbe stato qui", - "Proprio adesso. Torna al garage della gara", - "appena puoi." + "You did well, Jak. Luckily, the Precursor Stone wasn't in that", + "bomb when it went off or none of us would be here", + "right now. Come back to the race garage", + "as soon as you can." ], "sam005": [ - "Buon lavoro finora, ragazzi!", - "Trova il giovane Samos e dagli il seme della vita." + "Good work so far, boys!", + "Find Young Samos and give him the Life Seed." ], "sam006": [ - "Finalmente sei arrivato qui! Trova il Totem dell'Assaltatore", - "e recupera un pezzo del Sigillo di Mar sulla sua sommità." + "Finally, you got here! Find the Lurker Totem", + "and retrieve a piece of the Seal of Mar on its top." ], "sam007": [ - "Devi portare il ragazzo sano e salvo alla centrale elettrica, Jak!" + "You've got to get the boy safely to the Power Station, Jak!" ], "sam008": [ - "Grazie per averci protetto, Jak.", - "Ci vediamo al Nest." + "Thank you for protecting us, Jak.", + "We'll meet you at the Nest." ], "sigc001": [ - "Aspetta un attimo, dobbiamo insegnarti come usare questa meraviglia!" + "Hold on there, we need to teach you how to use this baby!" ], "sigc002": [ - "La Scatter Gun è una buona arma a corto raggio", - "con un ampio campo di fuoco." + "The Scatter Gun is a good short-range weapon", + "with a wide field of fire." ], "sigc003": [ - "Per sparare con l'arma, premi il grilletto." + "To fire the weapon, press the trigger." ], "sigc004": [ - "Bene! Qualche calcio, eh?" + "Good! Some kick, huh?" ], "sigc005": [ - "Tuttavia, non è l'arma che spara più velocemente al mondo." + "It's not the fastest firing weapon in the world, though." ], "sigc006": [ - "Puoi riporre l'arma o estrarla in qualsiasi momento." + "You can put your weapon away or pull it out at anytime." ], "sigc007": [ - "Prova a mettere via l'arma." + "Try putting the weapon away." ], "sigc008": [ - "Facile, eh?" + "Easy, huh?" ], "sigc009": [ - "Ora tira fuori l'arma." + "Now take the weapon back out." ], "sigc010": [ - "Bene!" + "Good!" ], "sigc011": [ - "Puoi trovare munizioni rosse all'interno delle casse della Guardia Krimzon." + "You can find red ammo inside Krimzon Guard crates." ], "sigc012": [ - "Spara alle casse." + "Shoot the crates." ], "sigc013": [ - "Ottimo, ora sei pronto!" + "Great, now you're ready!" ], "sigc014": [ - "Vuoi provare il corso Scatter Gun?" + "Want to try the Scatter Gun course?" ], "sigc015": [ - "Il blaster è una buona scelta a tutto tondo", - "con una buona cadenza di fuoco." + "The blaster is a good all-around choice", + "with a nice rate of fire." ], "sigc016": [ - "Quest'arma richiede una maggiore abilità di mira." + "This weapon requires more aiming ability." ], "sigc017": [ - "Puoi cambiare modalità arma in qualsiasi momento." + "You can switch weapon modes at anytime." ], "sigc018": [ - "Puoi trovare munizioni gialle nelle casse." + "You can find yellow ammo in crates." ], "sigc022": [ - "Ti piacerebbe mettere alla prova le tue abilità nel corso di armi?" + "Would you like to test your skills on the gun course?" ], "sigc023": [ - "A quale corso vuoi giocare?" + "Which course do you want to play?" ], "sigc024": [ - "Spara a ogni bersaglio. Più velocemente spari a ogni bersaglio", - "più punti otterrai." + "Shoot every target. The faster you shoot each target", + "the more points you'll get." ], "sigc025": [ - "Non sparate ai civili.", - "Colpisci un bersaglio amico e i punti verranno detratti." + "Hold your fire on civvies.", + "Hit a friendly target and points will be deducted." ], "sigc026": [ - "Buona fortuna." + "Good luck." ], "sigc027": [ - "Blocca e carica. Pronti via!" + "Lock and load. Ready, go!" ], "sigc028": [ - "Perfetto! Puoi essere il mio sostituto ogni giorno." + "Perfect! You can be my backup any day." ], "sigc029": [ - "Ce l'hai fatta, ottimo scatto!" + "You did it, excellent shooting!" ], "sigc030": [ - "Bello scatto! Hai del potenziale, ragazzo!" + "Nice shooting! You got potential, kid!" ], "sigc031": [ - "Non male, lo farai." + "Not bad, you'll do." ], "sigc032": [ - "Riprova, novellino. Sei ancora un po' arrugginito con quell'hardware." + "Try again, rookie. You're still a bit rusty with that hardware." ], "sigc033": [ - "Non male, ma non buono. Riprova?" + "Not bad, but not good. Try again?" ], "sigc034": [ - "Chiudi, ma nel profondo, la chiusura non basta. Riprova?" + "Close, but in the thick, close won't cut it. Try again?" ], "sigc035": [ - "Vuoi riprovare? O tua mamma sta chiamando?" + "Care to try again? Or is your momma calling?" ], "sigc036": [ - "Non sei ancora al passo con i tempi, riprovare?" + "You're not up to speed yet, try again?" ], "sigc037": [ - "Devi colpire quei bersagli più velocemente!" + "You gotta shoot those targets faster!" ], "sigc038": [ - "Sii la pistola, tesoro!" + "Be the gun, baby!" ], "sigc039": [ - "È tutta una questione di tempo di reazione." + "It's all about reaction time." ], "sigc040": [ - "Diverse modalità di pistola sono utili contro bersagli diversi." + "Different gun modes come in handy against different targets." ], "sigc041": [ - "Sii calmo e governerai." + "Be cool and you'll rule." ], "sigc043": [ - "Prova a passare alla pistola a dispersione." + "Try switching to the Scatter Gun." ], "sigc053": [ - "Più veloce sul grilletto, Cherry." + "Faster on the trigger, cherry." ], "sigc054": [ - "Quello era un civile!" + "That was a civilian!" ], "sigc055": [ - "Ho detto \"non sparare ai civili\", prurito alle dita!" + "I said \"don't shoot civvies,\" itchy finger!" ], "sigc056": [ - "Ottimo lavoro!" + "Great job!" ], "sigc057": [ - "Fantastico round, mi dispiace già per quei Metal Heads." + "Awesome round, I feel sorry for those Metal Heads already." ], "sigc058": [ - "È stato un giro carino, lo fai sembrare facile!" + "That was a sweet round, you make it look easy!" ], "sigc059": [ - "Hai fumato quella portata!" + "You smoked that course!" ], "sigc060": [ - "I Metal Head ti mangeranno vivo, novellino! Falla finita!" + "The Metal Heads will eat you alive, rookie! Do it over!" ], "sigc061": [ - "Hai bisogno di un po' di pratica." + "You need some practice." ], "sigc062": [ - "Ricordo i miei giorni da rookie, continuo a provarci." + "I remember my rookie days, keep trying." ], "sigc063": [ - "Giro perfetto! Tu sei l'uomo." + "Perfect round! You are the man." ], "sigc064": [ - "Scatto perfetto! Sono impressionato." + "Perfect shooting! I'm impressed." ], "sigc065": [ - "Whoa, rock'n'roll, tesoro! È stato un giro perfetto." + "Whoa, rock and roll, baby! That was a perfect round." ], "sigc066": [ - "Bel tiro!" + "Nice shot!" ], "sigc067": [ - "Li hai sprecati!" + "Wasted 'em!" ], "sigc068": [ - "Molto bello! Mi ricorda me stesso." + "Very nice! Reminds me of me." ], "sigc069": [ - "Fai in modo che ti temano." + "Make 'em fear you." ], "sigc070": [ - "Buona combinazione!" + "Good combo!" ], "sigc071": [ - "Adoro vederti lavorare!" + "I love seeing you work!" ], "sigc072": [ - "Ora torna al Blaster." + "Now switch back to the Blaster." ], "sigc073": [ - "Puoi combinare i tuoi attacchi calciando,", - "poi sparando con la tua arma." + "You can combo your attacks by kicking,", + "then firing your weapon." ], "sigc074": [ - "Prova una combinazione di colpi di calcio." + "Try a kick-shot combo." ], "sigc075": [ - "Calcia il primo bersaglio, poi spara mentre calci", - "per colpire automaticamente il secondo bersaglio." + "Kick the first target, then shoot while kicking", + "to automatically hit the second target." ], "sigc076": [ - "Ottima mossa!" + "Great move!" ], "sigc077": [ - "Non proprio, riprova. Calcia e poi tira, quasi contemporaneamente." + "Not quite, try again. Kick then shoot, almost at the same time." ], "sigc078": [ - "Assicurati di sparare mentre stai calciando per ottenere la combo." + "Make sure you shoot while you're kicking to get the combo." ], "sigc079": [ - "Provatelo ancora." + "Give it another shot." ], "sigc080": [ - "Questa è una mossa di Wastelander!", - "Non sapranno cosa li ha colpiti!" + "Now that's a Wastelander move!", + "They won't know what hit 'em!" ], "sigc081": [ - "Pensi di poter gestire il corso Blaster?" + "Think you can handle the Blaster course?" ], "sigf001": [ - "Li hai sprecati tutti! Non sono ancora sicuro del perché combattere i Metal Heads", - "stanno esplorando così vicino alla città. Ad essere onesti,", - "Non ero sicuro che saresti riuscito a gestire questo concerto, bel lavoro!" + "You wasted 'em all! I'm still not sure why combat Metal Heads", + "are scouting this close to the city. To be honest,", + "I wasn't sure you could handle this gig, nice work!" ], "sigt003": [ - "Eccoci qui!" + "Here we go!" ], "sigt004": [ - "Seguimi!" + "Follow me!" ], "sigt005": [ - "Stai dietro di me mentre brindo a quel serbatoio." + "Get behind me while I toast that tank." ], "sigt006": [ - "Sbrigati ragazzo, non ho tutto il giorno!" + "Hurry up kid, I don't have all day!" ], "sigt007": [ - "Da questa parte!" + "This way!" ], "sigt008": [ - "Brinda a quei cattivi ragazzi più avanti." + "Toast those bad boys up ahead." ], "sigt009": [ - "Presto! Abbassa il ponte!" + "Quick! Drop the bridge!" ], "sigt010": [ - "Saltate su e afferrate il ponte per abbatterlo." + "Jump up and grab the bridge to bring it down." ], "sigt011": [ - "Attraversiamo il ponte prima che tornino." + "Let's get across the bridge before they come back." ], "sigt012": [ - "Ecco il nostro primo obiettivo: tenere indietro le altre creature", - "mentre carico il Peacemaker." + "There's our first target, keep the other creatures back", + "while I charge up the Peacemaker." ], "sigt013": [ - "Quello è un Metal Head fritto." + "That's one fried Metal Head." ], "sigt014": [ - "Passiamo al prossimo obiettivo." + "Let's get to the next target." ], "sigt015": [ - "Con i Metal Heads dico prima di sparare, poi di fare domande." + "With Metal Heads I say shoot first, ask questions later." ], "sigt017": [ - "Resta con me!" + "Stay with me!" ], "sigt019": [ - "Sprechi i polloni!" + "Waste the suckers!" ], "sigt020": [ - "Fantastico, ragazzo, fantastico! Non essere arrogante." + "Great, kid, great! Don't get cocky." ], "sigt021": [ - "C'è il secondo pezzo di merda, seduto carino." + "There's the second scumbag, sittin' pretty." ], "sigt022": [ - "Coprimi!" + "Cover me!" ], "sigt023": [ - "Bum, tesoro! Un Metal Head in meno a cui pensare." + "Boom, baby! One less Metal Head to think about." ], "sigt024": [ - "Prossimo obiettivo." + "Next target." ], "sigt025": [ - "Guardami mentre brindo a questo cattivone.", - "Il trucco è non colpire i tubi." + "Watch my six, while I toast this bad boy.", + "The trick is to not hit the pipes." ], "sigt026": [ - "Ecco, questo è ciò che chiamo far impazzire qualcuno." + "Now that's what I call blowing someone's mind." ], "sigt027": [ - "Questa volta devo infilare l'ago." + "Gotta thread the needle this time." ], "sigt028": [ - "Hahaha, Metal Head in fiamme." + "Hahaha, Metal Head flambé." ], "sigt029": [ - "Attenti! Abbiamo compagnia!" + "Look out! We've got company!" ], "sigt030": [ - "Dannazione! La mia pistola è inceppata, prendi il comando!" + "Damn! My gun's jammed, take over!" ], "sigt031": [ - "Prendili mentre aggiusto la mia pistola!" + "Get 'em while I fix my gun!" ], "sigt032": [ - "Ok, il Peacemaker è di nuovo online. Muoviamoci!" + "Okay, the Peacemaker is back online. Let's move!" ], "sigt033": [ - "Ultimo obiettivo, poi torniamo a casa." + "Last target, then we go home." ], "sigt036": [ - "Arrivano i guai." + "Here comes trouble." ], "sigt037": [ - "Ti sono mancato?" + "Did ya miss me?" ], "sigt038": [ - "Di' \"buonanotte\", tesoro." + "Say \"good night,\" baby." ], "sigt039": [ - "Grazie per avermi coperto il sedere, ci sono andato vicino!" + "Thanks for covering my butt, that was close!" ], "sigt043": [ - "Resta con me!" + "Stay with me!" ], "sigt044": [ - "Stai vicino o moriremo entrambi!" + "Stay close or we'll both be dead!" ], "sigt045": [ - "Vieni qui e stai vicino!" + "Get over here and stay close!" ], "sigt046": [ - "Vuoi giocare, eh?" + "You wanna play, huh?" ], "sigt047": [ - "Oh, hai dei giochi?" + "Oh, you got games?" ], "sigt049": [ - "Voi ciliegie non potete gestire questa missione, abbiamo finito!" + "You cherries can't handle this mission, we're through!" ], "sigt052": [ - "Non lavoro con i dilettanti!" + "I don't work with amateurs!" ], "sigt053": [ - "Sei più un problema di quanto vali!" + "You're more trouble than you're worth!" ], "sigt054": [ - "Torna quando fai sul serio!" + "Come back when you're serious!" ], "sigt056": [ - "Vuoi un po 'di questo?!" + "You want some of this?!" ], "sigt057": [ - "Lascia cadere il cappuccio dell'ascensore mentre li tengo a bada." + "Drop that lift-cap while I hold them off." ], "sigt058": [ - "Tirateli fuori tutti!" + "Take 'em all out!" ], "sigt059": [ - "Ottimo, non c'è tempo per festeggiare." + "Great, no time to celebrate." ], "sigt060": [ - "Se non riesco a girarlo, è un problema di qualcun altro.", - "Fai qualcosa con quei blocchi." + "If I can't shoot it, it's someone else's problem.", + "You do something with those blocks." ], "sigt061": [ - "Devi capire come funzionano i blocchi, amico." + "You gotta figure out the blocks, man." ], "sigt062": [ - "Hai sentito qualcosa?" + "Did you hear something?" ], "sigt063": [ - "Quello è un grosso e brutto Metal Head." + "That's one big ugly Metal Head." ], "sigt064": [ - "Sparare a questo lo farà solo arrabbiare, corri!" + "Shootin' this one's only going to get it mad, run!" ], "sigt065": [ - "Ci vediamo dall'altra parte!" + "See ya on the flipside!" ], "sigt066": [ - "Via col vento." + "Gone with the wind." ], "sigt067": [ - "Più tardi alligatore." + "Later alligator." ], "sigt068": [ - "Penso che sarà l'ultima volta che lo vedremo." + "I think that's the last we'll see of him." ], "sigt069": [ - "Se risolvi questa cosa, ti coprirò il sedere." + "You figure this out, I'll cover your butt." ], "sigt070": [ - "Questo è il tuo concerto, tesoro. Risolvilo, così possiamo tornare a casa." + "This is your gig, baby. Solve it, so we can go home." ], "sigt071": [ - "Ottimo, ecco che arriva di nuovo quel cattivone. Muoviti!" + "Great, here comes that bad boy again. Move!" ], "sigt072": [ - "Correre!" + "Run!" ], "sigt073": [ - "Via! Via! Via!" + "Go, go, go!" ], "sigt074": [ - "Sta guadagnando!" + "He's gaining!" ], "sigt075": [ - "Continua a muoverti!" + "Keep moving!" ], "sigt076": [ - "Più veloce!" + "Faster!" ], "sigt077": [ - "Sarà vicino!" + "It's gonna be close!" ], "sigt078": [ - "Muovi il sedere!" + "Move your butts!" ], "sigt082": [ - "Amico, non vuoi farmi incazzare." + "Buddy, you don't wanna piss me off." ], "sigt083": [ - "Hai un desiderio di morte?!" + "You got a death wish?!" ], "sigt087": [ - "Senti un po' di dolore alla schiena!" + "Have a little pain right back!" ], "sigt089": [ - "Non fidarsi mai di un novellino." + "Never trust a rookie." ], "sigt090": [ - "Abbiamo finito finché voi ragazzi non fate sul serio." + "We're finished until you guys get serious." ], "sigt091": [ - "Questa missione è ovviamente fuori dalla tua portata." + "This mission is obviously out of your league." ], "sigt092": [ - "Mi stai facendo perdere tempo, questa missione è finita." + "You're wasting my time, this mission is over." ], "sigt093": [ - "Uhh... uff...." + "Uhh... ugh...." ], "sigt100": [ - "Prima la rabbia e poi la bellezza, amico." + "Rage before beauty, buddy." ], "sigt101": [ - "Muoviamoci!" + "Let's move!" ], "sigt102": [ - "Adoro l'odore del metallo che brucia!" + "I love the smell of burning metal!" ], "sigt103": [ - "Basta una passeggiata nel parco." + "Just a walk in the park." ], "sigt104": [ - "Seguimi!" + "Follow me!" ], "sigt105": [ - "Andiamo!" + "Let's go!" ], "sigt106": [ - "Da questa parte!" + "This way!" ], "sigt107": [ - "Qui!" + "Over here!" ], "sigt108": [ - "Rotolando, tesoro!" + "Rollin' baby!" ], "sigt109": [ - "Mandagli un bacio mortale." + "Blow 'em a kiss of death." ], "sigt110": [ - "Adoro i deadhead!" + "I love dead-heads!" ], "sigt111": [ - "Di' addio al tuo sedere lucente!" + "Kiss your shiny butt goodbye!" ], "sigt112": [ - "Nato per uccidere, tesoro!" + "Born to kill baby!" ], "sigt113": [ - "Due al petto, uno alla testa." + "Two to the chest, one to the head." ], "spot004": [ - "Vieni fuori e tifa per me mentre distruggo ancora una volta la concorrenza in pista.", - "La finale di gara di quest'anno sarà indimenticabile, garantisco più emozioni e più avventure.", - "Questa volta voglio sangue!...Porta i bambini." + "Come out and cheer for me as I destroy the competition once again on the track.", + "This year's racing final will be to die for, I guarantee more thrills and more spills.", + "This time I want blood!...Bring the kids." ], "tess001": [ - "Hey ragazzi! Questa è Tess. Prima che Krew se ne andasse, l'ho visto nascondersi", - "qualcosa nella macchina da gioco qui. Conoscendo Krew,", - "probabilmente è qualcosa di prezioso.", - "Potresti venire a dare un'occhiata." + "Hey, guys! This is Tess. Before Krew left, I saw him hide", + "something in the game machine here. Knowing Krew,", + "it's probably something valuable.", + "You might wanna come check it out." ], "tor001": [ - "L'operazione è stata un successo. Tutti i membri della metropolitana sono al sicuro.", - "Torna al nascondiglio, ho una nuova missione per te mentre aspettiamo che questo allarme finisca." + "The operation was a success. All Underground members are safe.", + "Come back to the hideout, I have a new mission for you while we wait for this alert to blow over." ], "tor002": [ - "Questo dovrebbe togliere un po' di calore dalle strade. Ottimo lavoro, non avrei potuto fare di meglio." + "That should take some heat off the streets. Good work, I couldn't have done it better myself." ], "tor003": [ - "Questo è tutto, Jak, sei pronto! Cerca di non far scattare alcun allarme, le guardie della guarnigione saranno tenaci.", - "Raggiungi il blocco delle celle della prigione e trova i prigionieri. Una volta lì, attiveremo il Portale Warp all'interno per riportarvi tutti fuori. Buona fortuna." + "That's it, Jak, you're up! Try not to trigger any alarms, the garrison guards will be tough.", + "Get to the prison cell block and find the prisoners. Once there, we'll turn on the Warp Gate inside to get you all back out. Good luck." ], "tor004": [ - "Ok, i miei vecchi codici di accesso dovrebbero aiutare Vin a disattivare il sigillo magnetico della porta della Fortezza." + "Ok, my old access codes should help Vin turn off the magnetic seal for the Fortress door." ], "tor005": [ - "Jak, qui Torn, la città è sotto attacco da parte dei Metal Head. C'è una grande forza che si muove verso le mura della città dall'oceano.", - "Abbiamo bisogno di persone che maneggino i gunpod della torre per fermare quell'assalto. Incontriamoci alla diga oceanica del porto, sbrigati!", - "Abbiamo bisogno di ogni uomo possibile!" + "Jak, this is Torn, the city is under Metal Head attack. There's a large force moving toward the city wall from the ocean.", + "We need people manning the tower gunpods to stop that assault. Meet me at the seaside ocean wall in the Port, hurry!", + "We need every man we can get!" ], "tor007": [ - "Jak, c'è un posto di blocco delle guardie, vattene da lì!" + "Jak, it's a guard roadblock, get out of there!" ], "tor008": [ - "Hanno creato un posto di blocco, ti stanno addosso!" + "They've set up a roadblock, they're onto you!" ], "torn024": [ - "Altri in arrivo!" + "More coming in!" ], "tswm001": [ - "Puoi farcela, Daxter!" + "You can do it, Daxter!" ], "tswm002": [ - "Continua così, Daxter." + "Keep going, Daxter." ], "tswm003": [ - "Via! Via! Via!" + "Go, go, go!" ], "tswm004": [ - "Oh! Che animale!" + "Wow! What an animal!" ], "tswm005": [ - "Avete capito bene!" + "You got it!" ], "tswm006": [ - "Bel colpo!" + "Nice slam!" ], "tswm007": [ - "Ooh oh oh, tesoro!" + "Ooh ho ho, baby!" ], "tswm008": [ - "Bellissimo scatto, Daxter!" + "Great shot, Daxter!" ], "tswm009": [ - "Ci sei quasi!" + "You're almost there!" ], "tswm010": [ - "Puoi vincere, tesoro!" + "You can win, baby!" ], "tswm011": [ - "Mio eroe!" + "My hero!" ], "tswm012": [ - "Guardalo, vai!" + "Look at him go!" ], "tswm013": [ - "Sei un Fulmine Arancione!" + "You ARE Orange Lightning!" ], "tswm014": [ - "Solo qualche altro!" + "Just a few more!" ], "tswm015": [ - "Colpiscilo ancora!" + "Hit him again!" ], "tswm016": [ - "SÌ!" + "Yes!" ], "tswm017": [ - "Questo è il mio ottsel birichino!" + "That's my naughty ottsel!" ], "tswm018": [ - "OH!" + "Oh!" ], "tswm019": [ - "Non andava bene." + "That wasn't good." ], "tswm020": [ - "Non colpire quelli rossi!" + "Don't hit the red ones!" ], "tswm021": [ - "Oh!" + "Ooh!" ], "tswm022": [ - "Ciò ha portato via punti!" + "That took points away!" ], "tswm023": [ - "Ce l'hai fatta!" + "You did it!" ], "tswm024": [ - "Daxter, hai vinto!" + "Daxter, you won!" ], "tswm025": [ - "Sì! Tu sei l'uomo! Voglio dire... l'animale." + "Yes! You're the man! I mean... the animal." ], "tswm026": [ - "Hai vinto il gioco, Daxter!" + "You beat the game, Daxter!" ], "tswm027": [ - "Dove hai imparato a battere in quel modo?" + "Where'd you learn to pound like that?" ], "tswm028": [ - "È stato fantastico!" + "That was amazing!" ], "tswm029": [ - "Abbastanza buono per una piccola palla di pelo." + "Pretty good for a little furball." ], "tswm030": [ - "Ooh... Punti insufficienti!" + "Ooh... Not enough points!" ], "tswm031": [ - "NO! Hai perso..." + "No! You lost..." ], "tswm032": [ - "Awww... Hai perso ancora!" + "Awww... You lost again!" ], "tswm033": [ - "Così vicino!" + "So close!" ], "tswm034": [ - "Un'altra volta." + "One more time." ], "tswm035": [ - "Puoi farlo!" + "You can do it!" ], "tswm036": [ - "Devi riprovare!" + "You have to try again!" ], "tswm037": [ - "Devi vincere il gioco, Daxter." + "You have to beat the game, Daxter." ], "tswm038": [ - "Riprova!" + "Try again!" ], "tswm039": [ - "Ah! Quella è stata una brutta cosa!" + "Ah! That was a bad one!" ], "tswm040": [ - "Non colpire quelli cattivi, Daxter." + "Don't hit the bad ones, Daxter." ], "tswm041": [ - "Hai colpito un brutto Metal Head." + "You hit a bad Metal Head." ], "tswm042": [ - "Non di nuovo!" + "Not again!" ], "tswm043": [ "Oh no!" ], "tswm044": [ - "Daxter...! Hai bisogno di più punti!" + "Daxter..! You need more points!" ], "tswm045": [ - "Continuare...!" + "Keep going...!" ], "tswm046": [ - "Oh, Daxter... ti sei bruciacchiato i baffi?" + "Oh, Daxter... did you get your whiskers singed?" ], "tswm047": [ - "Segnerai!" + "You're gonna score!" ], "tswm048": [ - "Ci sei quasi...!" + "You're almost there...!" ], "tswm049": [ - "Ancora un po'!" + "Just a few more!" ], "tswm050": [ - "Abbiamo un vincitore!" + "We have a winner!" ], "tswm051": [ - "OH! Quella è stata una brutta cosa." + "Oh! That was a bad one." ], "tswm052": [ - "Non colpire quelli cattivi, Daxter." + "Don't hit the bad ones, Daxter." ], "tswm053": [ - "Daxter, hai colpito un brutto Metal Head!" + "Daxter, you hit a bad Metal Head!" ], "tswm054": [ - "Daxter, hai vinto!!" + "Daxter, you won!!" ], "tswm055": [ - "Ce l'hai fatta, ragazzo peloso!" + "You did it, fur boy!" ], "tswm056": [ - "SÌ!! Hai battuto il gioco!" + "Yes!! You beat the game!" ], "tswm057": [ - "Sapevo che potevi farcela." + "I knew you could do it." ], "vin002": [ - "Ok, la rete elettrica della zona B è di nuovo online.", - "Divertiti a farti uccidere nel Palazzo." + "Okay, the B-Zone Power Grid is back online.", + "Have fun being killed in the Palace." ], "vin003": [ - "Hai distrutto l'ultima delle uova di Metal Head!", - "Questo dovrebbe darci un po’ più di eco per la città.", - "Buon lavoro!" + "You destroyed the last of the Metal Head eggs!", + "That should give us a little more eco for the city.", + "Good work!" ], "vin004": [ - "Non hai ancora preso tutte le uova di Metal Head!", - "Assicurati di prenderli tutti, altrimenti lo farò io", - "un esaurimento nervoso!" + "You still haven't gotten all the Metal Head eggs!", + "Make sure you get 'em all, or I'm gonna have", + "a nervous breakdown!" ], "vin011": [ - "Grazie a Dio hai fatto saltare in aria quei pozzi.", - "Di sicuro non voglio che altri Metal Head vengano da queste parti.", - "Buon lavoro, ragazzi! Te ne devo uno." + "Thank goodness you blew up those wells.", + "I sure don't want any more Metal Heads coming around here.", + "Good work, boys! I owe ya one." ], "vin012": [ - "Buon lavoro, ragazzi! Meno uova di Metal Head", - "permettiamo che si schiudano, il minor numero di quei mostri cattivi", - "dovremo combattere!" + "Good work, guys! The fewer Metal Head eggs", + "we allow to hatch, the fewer of those nasty monsters", + "we'll have to fight!" ], "vin013": [ - "Come... Kor...", - "Sito di costruzione...", - "..." + "Jak... Kor...", + "Construction... Site...", + "Ngh..." ], "vin014": [ - "Ancora una volta ragazzi, mi avete salvato il sedere!", - "Forse adesso avrò un aumento. O una lunga vacanza.", - "Dio sa che mi servirebbe uno. Grazie per l'aiuto!" + "Once again you guys have saved my butt!", + "Maybe now I'll get a raise. Or a long vacation.", + "God knows I could use one. Thanks for the help!" ], "vin015": [ - "Il muro di scudi è crollato! Ripeto: il muro di scudi è abbattuto!", - "Sabotaggio! Kor ce l'ha fatta!", - "Sapevo che i Metal Heads sarebbero stati la mia fine!", - "OH NO! I Metal Head sono alle porte!!", - "Stanno sfondando!!", - "Troppi!! Jak!!! AHHHH!!!" + "The shield wall is down! I repeat - the shield wall is down!", + "Sabotage! Kor did it!", + "I knew Metal Heads would be the end of me!", + "OH NO! Metal Heads are at the door!!", + "They're breaking through!!", + "Too many of them!! Jak!!! AHHHH!!!" ], "ys001": [ - "Ottimo lavoro, ragazzi! Torna al nascondiglio,", - "Ho un altro compito per te." + "Excellent work, boys! Come on back to the Hideout,", + "I have another task for you." ], "ys002": [ - "Bel tiro, ragazzo mio!", - "Buon lavoro, Jak!", - "Dormiremo tutti un po' più tranquilli stanotte." + "Nice shooting, my boy!", + "Good work, Jak!", + "We'll all sleep a little easier tonight." ] }, "speakers": { - "agent": "Agente", + "agent": "Agent", "ashelin": "Ashelin", - "baron": "Barone Praxis", - "brutter": "Rotto", - "citizen-female": "Cittadino", - "citizen-male": "Cittadino", + "baron": "Baron Praxis", + "brutter": "Brutter", + "citizen-female": "Citizen", + "citizen-male": "Citizen", "computer": "Computer", - "darkjak": "Jak oscuro", + "darkjak": "Dark Jak", "daxter": "Daxter", "errol": "Erol", - "grim": "Cupo", - "guard": "Guardia Krimzon", - "guard-a": "Guardia A", - "guard-b": "Guardia B", - "jak": "Come", + "grim": "Grim", + "guard": "Krimzon Guard", + "guard-a": "Guard A", + "guard-b": "Guard B", + "jak": "Jak", "jinx": "Jinx", "keira": "Keira", - "keira-before-class-3": "Meccanico", - "kid": "Ragazzo", + "keira-before-class-3": "Mechanic", + "kid": "Kid", "kor": "Kor", - "krew": "Sangue", - "metalkor": "Metallo Kor", - "metalkor-before-consite": "Leader della testa di metallo", + "krew": "Krew", + "metalkor": "Metal Kor", + "metalkor-before-consite": "Metal Head Leader", "metalkor-intro": "???", "mog": "Mog", - "onin": "Uno", - "oracle": "Oracolo", + "onin": "Onin", + "oracle": "Oracle", "pecker": "Pecker", - "precursor": "Precursore", - "samos": "Samo", - "sig": "Dire", + "precursor": "Precursor", + "samos": "Samos", + "sig": "Sig", "tess": "Tess", - "torn": "Strappato", + "torn": "Torn", "vin": "Vin", - "youngsamos": "Samos giovane", - "youngsamos-before-rescue": "Samo" + "youngsamos": "Young Samos", + "youngsamos-before-rescue": "Samos" } } diff --git a/game/assets/jak2/subtitle/subtitle_lines_ja-JP.json b/game/assets/jak2/subtitle/subtitle_lines_ja-JP.json index afcaf059c6..d58a25f4fa 100644 --- a/game/assets/jak2/subtitle/subtitle_lines_ja-JP.json +++ b/game/assets/jak2/subtitle/subtitle_lines_ja-JP.json @@ -5,14 +5,14 @@ "You sure seem angry, Jak." ], "DSbop002": [ - "Do you remember how to jump?" + "ジャンプできる?" ], "DSbop003": [ "Jump onto that crate to get over the barricade." ], "DSbop004": [ "Ooh, that's a high ledge!", - "Try jumping once, then jump again while in the air", + "デカイ段差!ジャンプして空中でもう一度ジャンプだよ!!", "to reach that one." ], "DSbop005": [ @@ -1705,7 +1705,7 @@ "This sector is closed." ], "cityv039": [ - "Alert: Prison escape in progress." + "警告:脱獄者が発生" ], "cityv040": [ "Alert: City under attack." @@ -2128,7 +2128,7 @@ "Break those tubes in the center." ], "ds020": [ - "Please tell me you remember how to roll..." + "なあ転がり方、覚えてる?" ], "ds023": [ "Let's rock!" diff --git a/game/assets/jak2/subtitle/subtitle_lines_pl-PL.json b/game/assets/jak2/subtitle/subtitle_lines_pl-PL.json index 28c6f524f8..6fcf8745cc 100644 --- a/game/assets/jak2/subtitle/subtitle_lines_pl-PL.json +++ b/game/assets/jak2/subtitle/subtitle_lines_pl-PL.json @@ -19,11 +19,11 @@ "Dobra robota, widzisz? Dalej to potrafisz!" ], "DSbop006": [ - "Nigdy nie znalazłem skóry ani włosów Keiry, ani Samos'a.", + "Nigdy nie znalazłem tropu ani Keiry, ani Samosa.", "Nie mam pojęcia, gdzie oni poszli." ], "DSbop007": [ - "Nie wiem, gdzie wziął nas ten szalony samochód, ale...", + "Nie wiem, gdzie wziął nas ten szalony pojazd szczelinowy, ale...", "To jakieś wielkie miasto!" ], "DSbop008": [ @@ -635,7 +635,7 @@ ], "asht006": [ "Myślę, że teraz nadszedł czas na działanie.", - "MetalHead'y skupiają się na atakowaniu miasta,", + "Metalowe Łby są tak skupione na atakowaniu miasta,", "Mogli pozostawić swoje gniazdo bezbronnie.", "Jak, musisz wyjść z Wasteland.", "I sforsuj barierę Gniazda, jeśli potrafisz.", @@ -692,7 +692,7 @@ "Źle, miałem nadzieję, że możesz to zrobić, próbuj dalej." ], "bb04int": [ - "Torn here. I don't even know why I'm lettin' you try this", + "Torn tutaj. Nie wiem w ogóle, dlaczego ci pozwalam spróbować", "Ring Challenge, sam nigdy go nie pokonałem. Chyba jestem chorobliwie", "ciekawy. Pokonaj go, a będziesz najlepszym kierowcą", "Podziemia kiedykolwiek miało." @@ -859,7 +859,7 @@ "Dobra robota." ], "bb18fail": [ - "I'm still not sure the JET-Board's that useful." + "Nadal nie jestem pewny czy Deska odrzutowa jest użyteczna." ], "bb18int": [ "Oto kolejne świetne miejsce do oceny wydajności.", @@ -993,7 +993,7 @@ "Nie za dobrze, Jak! Może powinieneś skalibrować tę tablicę." ], "bb38int": [ - "We're still evaluating the JET-Board.", + "Ciągle oceniamy Deskę Odrzutową.", "Zobaczmy, czy uda ci się zebrać wszystkie doładowania energetyczne", "w wyznaczonym czasie." ], @@ -1004,7 +1004,7 @@ "Tak blisko, ale w tym biznesie oznacza to śmierć." ], "bb39int": [ - "Take that JET-Board through its paces on a Ring Course.", + "Weź tę Deskę Odrzutową i przeprowadź testy na torze pierścieniowym.", "Pokonaj czas, a wytatuuję ci twarz jak moją." ], "bb39win": [ @@ -1222,13 +1222,13 @@ "Stój!" ], "bf067": [ - "You idiot, you're no match for me!" + "Ty głupcze, Nie możesz się ze mną równać !" ], "bf068": [ "Zginiesz wreszcie!?" ], "bf069": [ - "Give up and I'll make it painless!" + "Poddaj się, a sprawię, że nie będzie bolało!" ], "bf070": [ "Nie możesz wygrać!" @@ -1246,7 +1246,7 @@ "Urgh!" ], "bf075": [ - "You can do better than that!" + "Stać cię na więcej niż to!" ], "bf076": [ "Jesteś mój!" @@ -1270,10 +1270,10 @@ "Złaź z mojej wieży!" ], "bf083": [ - "We'll see about that!" + "Jeszcze zobaczymy!" ], "bf084": [ - "You really think you have a chance?" + "Naprawdę myślisz, że masz szanse?" ], "bf085": [ "Bój się mnie!" @@ -1291,22 +1291,22 @@ "Powinienem był cię zabić dawno temu!" ], "bf090": [ - "Never a dull moment, eh?" + "Nigdy nie ma chwili na nudę, co?" ], "bf091": [ - "Stand still!" + "Stój w miejscu!" ], "bf092": [ - "Go back to wherever you came from!" + "Wracaj tam, skądkolwiek przyszedłeś!" ], "bf093": [ - "You're both going to die by my hand!" + "Obaj umrzecie z mojej ręki!" ], "bf094": [ "Podejdź bliżej!" ], "bf095": [ - "To the end!" + "Do końca!" ], "bf096": [ "Nie możesz wygrać!" @@ -1324,7 +1324,7 @@ "Urgh!" ], "bf101": [ - "Oof!" + "Uff!" ], "bf102": [ "Nieeee!" @@ -1336,7 +1336,7 @@ "No nie, znowu!" ], "bf105": [ - "It can't be!" + "Niemożliwe!" ], "bf106": [ "Nie tym razem!" @@ -1354,7 +1354,7 @@ "Teraz sprawiłeś, że mnie zezłościłeś!" ], "bf111": [ - "Impressive, but let's try that again!" + "Imponujące, ale spróbujmy jeszcze raz!" ], "bf112": [ "Silniejszy zawsze zwycieża!" @@ -1384,10 +1384,10 @@ "Przepraszam, stary chłopcze, to tylko wojna!" ], "bf121": [ - "Too bad you don't have what it takes!" + "Szkoda, że nie masz tego, czego trzeba!" ], "bf122": [ - "The better man won!" + "Wygra lepszy!" ], "bf123": [ "Jesteśmy podobni, Jak... oh, poza tym, że jesteś martwy!" @@ -1399,19 +1399,19 @@ "Dzięki mocy Kamienia, jestem niepokonany!" ], "bf126": [ - "All will fear me now!" + "Wszyscy teraz będą się mnie bać!" ], "bf127": [ "Czas umierać!" ], "bf128": [ - "My little friends will take care of you!" + "Moi mali przyjaciele zaopiekują się tobą!" ], "bf129": [ "Nie możesz wiecznie uciekać, Jak!" ], "bf130": [ - "Now I've got you!" + "Teraz cię mam!" ], "bf131": [ "Niespodzianka!" @@ -1606,10 +1606,10 @@ "Dekontaminacja zakończona." ], "cityv006": [ - "Entering Haven City." + "Wchodzisz do Miasta Haven." ], "cityv007": [ - "Re-entering city." + "Powrót do miasta." ], "cityv008": [ "Witaj z powrotem." @@ -1663,25 +1663,25 @@ "Proszę wejść." ], "cityv025": [ - "Warp Gate online." + "Wrota teleportacyjne aktywne." ], "cityv026": [ "Ostrzeżenie: Niski poziom zapasów Eko." ], "cityv027": [ - "Awaria systemów kopii zapasowych." + "Awaria systemów zapasowych." ], "cityv028": [ "Ostrzeżenie: Magazyn Eko jest poniżej bezpiecznego minimum." ], "cityv029": [ - "Eco Grid unstable." + "Sieć energetyczna Eco jest nie stabilna." ], "cityv030": [ - "Wykryto MetalHeads w kopalni." + "Wykryto Metalowe Łby w kopalni." ], "cityv031": [ - "MetalHeads wykryte w miejscu wiercenia." + "Metalowe Łby wykryte w miejscu wiercenia." ], "cityv032": [ "Przygotuj się na odprawę." @@ -1717,25 +1717,25 @@ "Wszyscy obywatele udają się do bezpiecznych schronów." ], "cityv043": [ - "Eco Grid growing unstable." + "Sieć energetyczna Eco staję się niestabilna." ], "cityv044": [ - "The Eco Grid is down. Repeat: The Eco Grid is down." + "Sieć energetyczna Eco nie działa. Powtarzam. Sieć energetyczna Eco nie działa." ], "cityv045": [ "Czerwony alarm: Mur ochronny miasta naruszony." ], "cityv046": [ - "Unauthorized movement in sewer system." + "Nieautoryzowany ruch w systemie kanalizacyjnym." ], "cityv047": [ - "This is a restricted area. Defenses activated." + "Obszar zastrzeżony. Obrona aktywowana." ], "cityv048": [ "You are trespassing. Defenses coming online." ], "cityv049": [ - "I regret use of force. Systems arming." + "Żałuje użycia siły. Systemy uzbrajają się." ], "cityv050": [ "Intruz zneutralizowany." @@ -1744,7 +1744,7 @@ "Podejrzany zniszczony." ], "cityv052": [ - "I am authorized to use force." + "Jestem upoważniony do użycia siły." ], "cityv053": [ "Alert ogólny: Trwa zamieszanie. Krimzon Strażnicy na drodze." @@ -1783,10 +1783,10 @@ "Tworzenie kopii zapasowych jest łatwe." ], "cityv068": [ - "Możesz zawisnąć w jednej z dwóch stref: niskiej i wysokiej." + "Możesz wisieć w jednej z dwóch stref: niskiej i wysokiej." ], "cityv069": [ - "Try switching hover zones." + "Spróbuj zmienić strefę wiszenia." ], "cityv070": [ "Przełączanie stref zawisu może pomóc uniknąć ruchu lub", @@ -1808,7 +1808,7 @@ "Ostrzeżenie: Systemy chłodzenia pocisków uszkodzone." ], "cityv080": [ - "Alert: Awaria zapasowego systemu chłodzenia.", + "Alarm: Awaria zapasowego systemu chłodzenia.", "Rozpoczęto zastępowanie awaryjne." ], "cityv081": [ @@ -1816,7 +1816,7 @@ "Zabezpieczenie przed awarią nie odpowiada." ], "cityv082": [ - "Niebezpieczeństwo: Zbliża się detonacja głowicy.", + "Niebezpieczeństwo: Detonacja głowicy jest bliska.", "Natychmiastowa ewakuacja." ], "cityv087": [ @@ -1853,7 +1853,7 @@ ], "cityv107": [ "Nieautoryzowane użycie drzwi Fortecy.", - "Aktywacja zbiornika bezpieczeństwa." + "Aktywacja czołgu ochrony." ], "cityv108": [ "Broń w kapsule pistoletowej będzie dostępna online." @@ -1865,7 +1865,7 @@ "Broń nie działa. Poczekaj na schłodzenie." ], "cityv111": [ - "Broń z powrotem w sieci." + "Broń z powrotem działa." ], "cityv112": [ "Działo zostało poważnie uszkodzone." @@ -1878,7 +1878,7 @@ "aby dotrzeć do ważnych miejsc docelowych." ], "cityv134": [ - "Intruder alert." + "Alarm intruz" ], "cityv135": [ "Stań obok." @@ -1900,66 +1900,66 @@ "cityv149": [ "potrzebuję zasilania awaryjnego dla moich konwerterów Eko.", "Szybkie włączanie wszystkich dostępnych obwodów", - "to stabilize the Eco Grid." + "ustabilizować siatkę Eko." ], "cityv150": [ - "You didn't reach all the switches in time.", - "The Eco Grid is still unstable." + "Nie dotarłeś do wszystkich przełączników na czas.", + "Siatka Eko jest nadal niestabilna." ], "cityv151": [ - "You successfully switched on the circuits", - "to stabilize the Eco Grid.", - "You have earned a reward." + "Pomyślnie włączyłeś obwody", + "ustabilizować siatkę Eko.", + "Otrzymałeś nagrodę." ], "cityv152": [ - "I have detected a Dark Eco spill.", - "You must remove this hazard quickly", - "before the city is contaminated." + "Wykryłem wyciek ciemnego Eko.", + "Należy szybko usunąć to zagrożenie", + "zanim miasto zostanie skażone." ], "cityv153": [ - "You did not remove all the Dark Eco quickly enough." + "Nie usunąłeś wystarczająco szybko całe Mroczne Eco." ], "cityv154": [ - "You removed the Dark Eco hazard in time.", + "Na czas usunąłeś zagrożenie Mrocznym Eco.", "Miasto jest Ci wdzięczne." ], "cityv155": [ - "Sensors indicate a cluster of Blue Eco in the city.", - "Collect all eco before it dissipates", - "and you will be rewarded." + "Czujniki wskazują na skupisko Niebieskiego Eco w mieście.", + "Zbierz całe eko, zanim zniknie", + "a będziesz nagrodzony." ], "cityv156": [ - "You did not retrieve all of the eco." + "Nie zebrałeś całego eko." ], "cityv157": [ - "You successfully retrieved the eco.", + "Pomyślnie odzyskałeś eco.", "Oto twoja nagroda." ], "cityv158": [ "Emergency response needed.", "Runaway bomb bots detected and headed for", "populated areas. Neutralize all bomb bots", - "before it's too late." + "zanim będzie za późno." ], "cityv159": [ "You failed to neutralize the runaway bomb bots." ], "cityv160": [ "You destroyed the runaway bomb bots.", - "The city thanks you." + "Miasto ci dziękuje." ], "cityv161": [ - "Get to this point in the game quickly", - "and you will receive a prize." + "Dostań się szybko do tego punktu w grze.", + "i otrzymasz nagrodę." ], "cityv162": [ - "Try to find this spot." + "Spróbuj znaleźć to miejsce." ], "cityv163": [ - "Can you identify this place and get there?" + "Możesz zidentyfikować to miejsce i tam dotrzeć?" ], "cityv164": [ - "Make it here in the time allotted and a reward is yours." + "Dotrzyj tutaj w wyznaczonym czasie, a nagroda będzie twoja." ], "cityv165": [ "Znajdź to miejsce, aby otrzymać nagrodę." @@ -1968,26 +1968,26 @@ "Udaj się do tego miejsca, aby otrzymać nagrodę." ], "cityv167": [ - "Metal Heads have been detected in the gun course.", - "Neutralize them all immediately." + "Metalowe Łby zostały wykryte w kursie broni.", + "Zneutralizuj je wszystkie natychmiast." ], "cityv168": [ "Nie zabiłeś ich wszystkich." ], "cityv169": [ - "Excellent shooting. Threat eliminated." + "Świetne strzelanie. Zagrożenie wyeliminowane." ], "cityv170": [ - "Get a high score on the JET-Board and receive a prize." + "Zdobądź rekord na Desce odrzutowej i otrzymaj nagrodę." ], "cityv171": [ - "Try for a high score and receive a prize." + "Spróbuj zdobyć rekord i otrzymaj nagrodę." ], "cityv172": [ - "You did not achieve a high enough score." + "Nie uzyskałeś wystarczająco wysokiego wyniku." ], "cityv173": [ - "Congratulations, you achieved a high enough score." + "Gratulacje, udało ci się osiągnąć wystarczająco duży wynik." ], "cityv174": [ "Welcome to the Stadium Central Computer.", @@ -2006,7 +2006,7 @@ "Wyścig klasy 3 wkrótce się rozpocznie." ], "cityv178": [ - "Care to try for the course record?" + "Chcesz spróbować pobić rekord kursu?" ], "cityv179": [ "Gratulacje, udało Ci się osiągnąć złoty rekord." @@ -2036,7 +2036,7 @@ "Would you like to try for a course record?" ], "cityv188": [ - "Would you like to use Orbs to buy a secret?" + "Czy chciałbyś użyć Kul, aby kupić sekret?" ], "cityv189": [ "Nie masz wystarczającej ilości Kul dla tego sekretu." @@ -2051,28 +2051,28 @@ "Proszę opuścić Strój Tytana." ], "cityv193": [ - "You must exit the Titan Suit." + "Proszę opuścić Strój Tytana." ], "cityv194": [ - "Vehicles must remain within city limits." + "Pojazdy muszą pozostać w granicach miasta." ], "cityv195": [ - "Exit denied. Enemy targets still present." + "Odmowa wyjścia. Wrogie cele nadal są obecne." ], "cityv196": [ - "Exit denied. Metal Head eggs still detected." + "Odmowa wyjścia. Ciągle są obecne jaja Metalowych Łbów." ], "cityv197": [ - "Scanners show Metal Head eggs still active." + "Skanery wskazują, że ciągle występują jaja Metalowych Łbów." ], "daxm001": [ "Strzelaj w platformę, Jak." ], "daxm002": [ - "We need something to get through that gate!" + "Potrzebujemy coś, żeby przedostać się przez tę bramę!" ], "daxm003": [ - "Shoot the Metal Head when he moves his shield!" + "Strzelaj w Metalowego Łba, kiedy on opuści swoją tarczę!" ], "daxm004": [ "Hit him in his stomach!" @@ -2087,10 +2087,10 @@ "That's what I call a rocky road!" ], "daxm008": [ - "We gotta get to the top!" + "Musimy się dostać na górę!" ], "daxm009": [ - "We made it!!" + "Udało nam się!!" ], "daxm010": [ "Rock 'n roll!" @@ -2099,7 +2099,7 @@ "Musimy znaleźć Barona, Jak." ], "ds005": [ - "Jak, those are Metal Heads!" + "Jak, to są Metalowe Łby!" ], "ds006": [ "Wreszcie, teraz możemy spotkać się z Cieniem!", @@ -2119,7 +2119,7 @@ "Wróćmy z pieniędzmi do Krew." ], "ds017": [ - "To musi być amunicja i rakieta które Torn kazał nam wysadzić!" + "To musi być amunicja i pociski rakietowe, które Torn kazał nam wysadzić!" ], "ds018": [ "Get the tank to shoot the missile!" @@ -2140,7 +2140,7 @@ "All right!" ], "ds026": [ - "Yeah!" + "O tak!" ], "ds028": [ "O tak!" @@ -2172,8 +2172,8 @@ ], "ds047": [ "Ooh, that's a high one.", - "You'll need to jump,", - "then jump again in the air to get up there." + "Będziesz musiał skoczyć,", + "potem skocz jeszcze raz w powietrzu, żeby tam się dostać." ], "ds048": [ "Hit 'em again, Jak!" @@ -2185,10 +2185,10 @@ "Robotank, run!" ], "ds051": [ - "Hey, we should stay with Sig." + "Hej, powinniśmy zostać z Sigiem." ], "ds052": [ - "Hey, big guy, keep close, huh?" + "Hej, wielkoludzie, trzymaj się blisko, co?" ], "ds053": [ "Jesteśmy zbyt daleko od Siga." @@ -2203,13 +2203,13 @@ "Wow, co za wybuch!" ], "ds057": [ - "Sig's a good shot." + "Sig dobrze strzela." ], "ds058": [ "Idź pomóc Sigowi!" ], "ds059": [ - "Nice shootin', Sig!" + "Nieźle strzelasz, Sig!" ], "ds060": [ "Jesteś moim bohaterem!" @@ -2219,10 +2219,10 @@ ], "ds062": [ "There's another Metal Head going after our boy!", - "Shoot it, shoot it!" + "Zestrzel to, Zestrzel to!" ], "ds063": [ - "Keep Sig safe, Jak!" + "Pilnuj Siga, Jak!" ], "ds064": [ "Whoa, Sig's really getting roughed up!" @@ -2234,19 +2234,19 @@ "Sig zginie, to i my zginiemy." ], "ds067": [ - "Oof, we suck..." + "Uff, jesteśmy do bani..." ], "ds068": [ - "We have to keep 'em away from Sig." + "Musimy trzymać ich z dala od Siga." ], "ds069": [ - "We need to find the valve to turn the water back on." + "Musimy znaleźć zawór, żeby włączyć z powrotem wodę." ], "ds094": [ "Robotank, run!" ], "ds095": [ - "Here comes that tank again!" + "Znowu pojawił się ten czołg!" ], "ds096": [ "Get the tank to shoot the missile!" @@ -2273,13 +2273,13 @@ "Smashing work, Jak! Oh, that was funny." ], "ds116": [ - "Shoot the platform, Jak." + "Strzel w platformę, Jak." ], "ds117": [ - "We need something to get through that gate." + "Potrzebujemy coś, żeby przedostać się przez tę bramę." ], "ds118": [ - "Shoot the Metal Head when he moves his shield." + "Strzelaj w Metalowego Łba, kiedy on opuści swoją tarczę." ], "ds119": [ "Traf go w brzuch." @@ -2291,22 +2291,22 @@ "Smack the box, baby!" ], "ds128": [ - "Good, we're through." + "Dobrze, skończyliśmy." ], "ds129": [ "Shoot the gun, Jak!" ], "ds143": [ - "We're supposed to keep Krew's guys alive, Jak!" + "Powinniśmy utrzymać przy życiu ludzi Krew, Jak!" ], "ds144": [ - "Save 'em, Jak!" + "Ocal ich, Jak!" ], "ds145": [ "Nie podoba mi się to, Jak..." ], "ds146": [ - "Za nam, Jak!" + "Za nami, Jak!" ], "ds147": [ "Metalowe Łby! Są wszędzie!" @@ -2315,48 +2315,48 @@ "Ochroń nas, Jak! Ale najpierw mnie." ], "ds150": [ - "Take a vehicle, Jak! It's faster." + "Weź pojazd, Jak! Jest szybsze." ], "ds151": [ "Użyj swojej odrzutowej deski!" ], "ds152": [ - "We got company, Jak! Lots of guards!" + "Mamy towarzystwo, Jak! Dużo strażników!" ], "ds160": [ "That's right, we're bad! The Precursor Stone is ours!" ], "ds161": [ - "There's Mar's gun, Jak! Let's go check it out." + "Tam jest broń Mara, Jak! Chodźmy to sprawdzić." ], "ds162": [ - "These Precursor Orbs are worth a lot now.", - "We might find a few hidden around,", - "or get some doing difficult tasks.", - "We'll be able to buy stuff with 'em!" + "Te Kule Prekursorów są teraz warte o wiele więcej.", + "Możemy je znaleźć kilka po ukrywanych w pobliżu,", + "albo zdobyć za zrobienie jakiś ciężkich zadań.", + "Będziemy mogli za nie kupić rzeczy!" ], "ds163": [ - "Jak, now that we have the Palace Security Pass,", - "let's go have some fun in the big man's crib!" + "Jak, skoro już mamy Pałacową Przepustkę Bezpieczeństwa,", + "chodźmy się zabawić na chacie dużego mężczyzny!" ], "ds164": [ - "Back up to get out of the mech." + "Cofnij się, aby wydostać się z mecha." ], "ds165": [ "Jesteśmy wolni, Jak! Dzięki mnie.", "Miło odetchnąć świeżym powietrzem, co?", - "We'll get that Baron Praxis guy, alright!" + "Dorwiemy tego gościa Barona Praxisa, tak jest!" ], "ds166": [ - "I'm not getting out of this pod", - "'till you kill all those crazy flyin' Metal Heads!" + "Nie wyjdę z tej kapsuły", + "dopóki nie zabijesz wszystkich tych szalonych, latających Metalowych Łbów!" ], "ds167": [ - "I wonder why they wanted us to protect Samos' Hut.", - "Maybe now we'll get to meet the Shadow." + "Zastanawiam się, dlaczego chcieli, żebyśmy chronili Chatę Samosa.", + "Może teraz uda nam się spotkać z tym Cieniem." ], "ds168": [ - "There's the Rift Ring!" + "Oto Pierścień Szczeliny!" ], "ds173": [ "Ahhh!" @@ -2371,7 +2371,7 @@ "Łoł!" ], "ds177": [ - "Hey!" + "Hej!" ], "ds178": [ "Hey, watch that!" @@ -2380,10 +2380,10 @@ "Ooh!" ], "ds180": [ - "Oh, boy!" + "O, stary!" ], "ds181": [ - "Uooaaoh!" + "Uoooooo!" ], "ds182": [ "Wow, było blisko!" @@ -2416,13 +2416,13 @@ "Jesteś mój!" ], "ds192": [ - "There they are!" + "Tu oni są!" ], "ds193": [ "Hej! Patrz gdzie jedziesz!" ], "ds194": [ - "How do I drive this thing?" + "Jak mam jeździć tym czymś?" ], "ds195": [ "Yeah, that's right! I'm bad!" @@ -2437,16 +2437,16 @@ "Rusz się lub przegrywaj, stary!" ], "ds199": [ - "Mm... bye-bye!" + "Mm... Pa-pa!" ], "ds200": [ "Ostatnie okrążenie!" ], "ds201": [ - "Come on, come on!" + "Dalej, dalej!" ], "ds202": [ - "Come on, come on, come on!" + "Dalej, dalej, dalej!" ], "ds203": [ "Gaz do dechy!" @@ -2458,10 +2458,10 @@ "Turn and burn, baby!" ], "ds206": [ - "Oooh, it's gonna be close!" + "Ooo, to będzie bliskie!" ], "ds207": [ - "Eat my dust, buddy!" + "Żryj mój kurz, kolego!" ], "ds208": [ "Gotcha!" @@ -2470,13 +2470,13 @@ "This is my track, grandma!" ], "ds210": [ - "Learn to drive!" + "Naucz się jeździć!" ], "ds211": [ "Turn, turn!" ], "ds212": [ - "Step on it!" + "Gaz do dechy!" ], "ds213": [ "Oooh, I won, I won!" @@ -2498,7 +2498,7 @@ ], "ds219": [ "Hey, fang boy, hurry up and get in,", - "we'll take you to Brutter!" + "Zabierzemy cię do Bruttera!" ], "ds220": [ "Here's your boy, Brutter! We're off to get another animal!" @@ -2528,7 +2528,7 @@ "You recognize this monster?" ], "ds229": [ - "We did it! We saved them all!" + "Udało nam się! Ocaliliśmy ich wszystkich!" ], "ds230": [ "Catch the paddywagon, Jak!" @@ -2594,10 +2594,10 @@ "Yeah, now he's hurtin'!" ], "ds251": [ - "Good shot, Jak!" + "Dobry strzał, Jak!" ], "ds252": [ - "Incoming!" + "Nadchodzą!" ], "ds253": [ "Yeah, we got him!" @@ -2615,7 +2615,7 @@ "That one hit him!" ], "ds258": [ - "Look out!" + "Uważaj!" ], "ds259": [ "Jump the gap!" @@ -2633,7 +2633,7 @@ "There's the real Krew! Shoot him!" ], "ds264": [ - "You got him!" + "Masz go!" ], "ds265": [ "Watch your back, Jak!" @@ -2718,7 +2718,7 @@ ], "ds305": [ "Shoot the switch to change the coveyor belt's", - "direction!" + "kierunek!" ], "ds306": [ "You gotta shoot the switch, Jak!" @@ -2727,7 +2727,7 @@ "Find the switch to change the conveyor's direction!" ], "ds321": [ - "Take out the turrets!" + "Zdejmij te wieżyczki!" ], "ds322": [ "Strzelaj w działka, Jak!" @@ -2745,7 +2745,7 @@ "Yeah, that ship's feelin' it now!" ], "ds327": [ - "Ooh, direct hits." + "Oo, bezpośrednie trafienia." ], "ds328": [ "I think you hurt it that time!" @@ -2796,7 +2796,7 @@ "You have to get the blocks in the slots faster!" ], "ds408": [ - "Run, Jak!" + "Biegnij, Jak!" ], "ds409": [ "Keep moving!" @@ -2821,7 +2821,7 @@ ], "ds463": [ "You can grind to cross those pipes using your", - "hoverboard!" + "deska odrzutowa!" ], "ds464": [ "Ride the half-pipe to the end!" @@ -2869,7 +2869,7 @@ "Now he's vulnerable!" ], "ds480": [ - "Take him out!" + "Zdejmij go!" ], "ds481": [ "Get him while he's vulnerable!" @@ -2881,10 +2881,10 @@ "How's it feel to have your pants down, Baron?" ], "ds484": [ - "Shoot him, shoot him!" + "Zestrzel go, Zestrzel go!" ], "ds485": [ - "Look out!" + "Uważaj!" ], "ds487": [ "Easy, Jak, we gotta get this guy to safety!" @@ -2896,7 +2896,7 @@ "We're gettin' our butts kicked!" ], "ds490": [ - "Maybe I should drive..." + "Może powinienem prowadzić..." ], "ds491": [ "Let's go, wondergoon,", @@ -2951,7 +2951,7 @@ "Catch up to them, Jak!" ], "dsek003": [ - "Where'd they go?!" + "Gdzie oni poszli?!" ], "dsek004": [ "There they go again!" @@ -2972,10 +2972,10 @@ "There goes that crazy crocadog again...!" ], "dsek010": [ - "Chase after the Kid!" + "Goń dzieciaka!" ], "dsek011": [ - "Keep up with the Kid!" + "Nadążaj za dzieciakiem!" ], "dsek012": [ "Krokopies!" @@ -2984,13 +2984,13 @@ "Phew, finally... let's get these two to Kor!" ], "ero001": [ - "Out of my way!" + "Zejdź mi z drogi!" ], "ero002": [ "I own this track!" ], "ero003": [ - "Give it up, eco freak!" + "Poddaj się, Eco dziwolągu!" ], "ero004": [ "Czas zemsty." @@ -3026,7 +3026,7 @@ "You're making this too easy!" ], "ero015": [ - "Hahaha, bye bye!" + "Hahaha, na razie!" ], "ero016": [ "You want some?" @@ -3074,7 +3074,7 @@ "Crash and burn!" ], "ero031": [ - "To the end!" + "Do końca!" ], "ero032": [ "Last lap to live!" @@ -3095,19 +3095,19 @@ "Hahahaha!" ], "ero038": [ - "YEAH!" + "TAAAK!" ], "ero039": [ "HA!" ], "ero040": [ - "NO!" + "NIE!" ], "ero041": [ "NIEEEEE!" ], "ero042": [ - "AHHHHHH!" + "AHHHHHHH!" ], "ero043": [ "Here we go." @@ -3170,7 +3170,7 @@ "Getting a bit nervous?" ], "ero063": [ - "Come back here!" + "Wróć tutaj!" ], "ero064": [ "Move over, slowpoke!" @@ -3182,10 +3182,10 @@ "Final stretch!" ], "ero067": [ - "It's over!" + "To koniec!" ], "ero068": [ - "I own this city." + "To miasto należy do mnie." ], "ero069": [ "What? Where'd you come from?" @@ -3218,7 +3218,7 @@ "Ough!" ], "ero079": [ - "Oof!" + "Uff!" ], "ero080": [ "Beat it, freak!" @@ -3288,7 +3288,7 @@ "AUGHH!" ], "ero102": [ - "OW!" + "AŁ!" ], "ero103": [ "DAHHH!" @@ -3369,13 +3369,13 @@ "Uh oh, I think I wet myself." ], "hal023": [ - "No! Please!" + "Nie! Proszę!" ], "hal024": [ - "I wanna go home." + "Chce wrócić do domu." ], "hal025": [ - "Uhh, I'm hearing things." + "Uhh, słyszę rzeczy." ], "hal026": [ "Let's go back." @@ -3390,10 +3390,10 @@ "Ain't the smell of sulphur grand?" ], "hal030": [ - "Cover your ears!" + "Zakryj uszy!" ], "hal031": [ - "I love this job." + "Kocham tę robotę." ], "hal032": [ "Great, now we're trapped in this slime pit!" @@ -3463,7 +3463,7 @@ "Hehe, next time you'll listen to me. Okay, let's move." ], "hal054": [ - "Oof, that had to hurt.", + "O, to musiało boleć.", "I told you to keep back, but no one ever listens to Jinx." ], "hal055": [ @@ -3510,7 +3510,7 @@ "Jump the beams, Jak." ], "hal069": [ - "Nice moves." + "Niezłe ruchy." ], "hal070": [ "Yeah... you wish, tubby." @@ -3567,7 +3567,7 @@ "And on we go." ], "hal093": [ - "Please, allow me." + "Proszę, pozwól mi." ], "hal094": [ "One unclogged sewer, comin' up." @@ -3576,7 +3576,7 @@ "This is my boomshtick!" ], "hal096": [ - "Boom, baby!" + "Boom, dziecinko!" ], "hal097": [ "We're clear, let's move." @@ -3631,13 +3631,13 @@ ], "hal120": [ "I got 30 keys of high explosives strapped to my back...", - "Great..." + "Świetnie..." ], "hal121": [ "Just shut your whiny traps and keep moving." ], "hal122": [ - "Uh, do we have to?" + "Uh, Czy musimy?" ], "hal123": [ "Uhh, słyszeliście to?" @@ -3676,16 +3676,16 @@ "I think it wants me!" ], "hal135": [ - "Help me, Jak!" + "Pomóż mi, Jak!" ], "hal136": [ - "I'm gonna die!" + "Ja umrę!" ], "hal137": [ "It got me!" ], "hal138": [ - "Jak! Save me!" + "Jak! Ocal mnie!" ], "hal139": [ "Ughh! It got me!" @@ -3703,7 +3703,7 @@ "Ughh!" ], "hal144": [ - "Ughh! Help me!" + "Ughh! Pomóż mi!" ], "hal145": [ "Hey man, watch it!" @@ -3715,7 +3715,7 @@ "Nobody's my friend..." ], "hal148": [ - "Oof!" + "Uff!" ], "hal149": [ "Uh!" @@ -3727,7 +3727,7 @@ "He's got me!" ], "hal152": [ - "Gahh!! Not again!" + "Gahh!! Nie no znowu!" ], "hal153": [ "Umieram!" @@ -3763,7 +3763,7 @@ "Ah!" ], "hal165": [ - "Look out!" + "Uważaj!" ], "hal166": [ "We're not doing this with a rookie, I'm calling this off!" @@ -3784,7 +3784,7 @@ "Ahh! It got me!" ], "hal172": [ - "No no no! Help!" + "Nie nie nie! Pomocy!" ], "hal173": [ "They're getting too close, Jak!" @@ -3826,13 +3826,13 @@ "Let's go!" ], "hal186": [ - "Move it!" + "Ruszajcie się!" ], "hal187": [ "That's a lot of Metal Heads." ], "hal188": [ - "Oof!" + "Uff!" ], "hal189": [ "Daghh!" @@ -3847,7 +3847,7 @@ "Alright!" ], "jak002": [ - "Yeah!" + "O tak!" ], "jak003": [ "Wooo!" @@ -3856,7 +3856,7 @@ "Here we go!" ], "jak005": [ - "Nice!" + "Nieźle!" ], "jak006": [ "Rock 'n roll!" @@ -3865,13 +3865,13 @@ "Right on!" ], "jak008": [ - "Cool!" + "Spoko!" ], "jak009": [ - "Cool!" + "Spoko!" ], "jak010": [ - "Oh, yeah!" + "O tak!" ], "jak011": [ "Comin' through!" @@ -3880,16 +3880,16 @@ "Look out!" ], "jak013": [ - "Last lap!" + "Ostatnie okrążenie!" ], "jak014": [ - "Watch out!" + "Uważaj!" ], "jak015": [ - "Whoa!" + "Łoł!" ], "jak016": [ - "Whoa!" + "Łoł!" ], "jak017": [ "Hold on, Dax!" @@ -3937,16 +3937,16 @@ "Wooo!" ], "jak033": [ - "Last lap!" + "Ostatnie okrążenie!" ], "jak034": [ - "Later." + "Później." ], "jak035": [ "We gotta catch up!" ], "jak036": [ - "There he is!" + "Tu jest!" ], "jak037": [ "Come on, baby, show me what you got!" @@ -4018,7 +4018,7 @@ "Yeah, feel it!" ], "jak062": [ - "Die!" + "Giń!" ], "jak063": [ "Badass comin' through!" @@ -4094,13 +4094,13 @@ "Pick on someone your own size!" ], "jk006": [ - "Kid, look out!" + "Młody, uważaj!" ], "jk007": [ "How do YOU like it when somebody fights back?" ], "jk008": [ - "Leave the kid alone!" + "Zostaw dzieciaka w spokoju!" ], "jk009": [ "To tylko dziecko!" @@ -4139,7 +4139,7 @@ "You can get on and off the JET-Board at any time." ], "kei002": [ - "You can jump on your JET-Board!" + "Możesz skakać na swojej Desce Odrzutowej!" ], "kei003": [ "Jump up on that ledge." @@ -4148,7 +4148,7 @@ "Try jumping up on that crate." ], "kei005": [ - "Jump over that obstacle." + "Przeskocz nad tą przeszkodą." ], "kei006": [ "You can get a higher jump by ducking before you jump!" @@ -4170,7 +4170,7 @@ "Land a perfect 360 for a speed boost!" ], "kei012": [ - "Nice spin!" + "Niezły obrót!" ], "kei013": [ "You can land on a rail and grind across it." @@ -4213,30 +4213,30 @@ "you won't be able to catch those Metal Heads in the", "Forest on foot so I've left my JET-Board at the airlock", "near the city exit. Since you're helping the Underground,", - "I'll even let you keep it!" + "Pozwolę ci nawet to zatrzymać!" ], "kei027": [ - "Jak, this is Keira. Don't forget - I still need two artifacts", + "Jak, to Keira. Nie zapomnij - Nadal potrzebuję dwóch artefaktów", "to make the Rift Rider work! I need the Time Map and the", "Heart of Mar Energy Gem, or we're not going anywhere!" ], "kei028": [ "I still need those two artifacts or this pile of junk", "won't move one city block, much less through the Rift", - "and back to our own time!", - "You've got to find the Heart of Mar and the Time Map", - "or we're stuck!" + "i wróć do naszych czasów!", + "Musisz znaleźć Serce Mara i Mapę Czasu", + "albo utkniemy!" ], "kei029": [ - "This is Keira. Thanks for getting the artifacts, guys.", - "It's strange... the Time Map had a bunch of old coordinates", - "in it. Come see me at the Stadium." + "Tu Keira. Dziękuje za zdobycie tych artefaktów, chłopaki.", + "To dziwne... Mapa Czasu miała kilka starych współrzędnych", + "w niej. Przyjdźcie do mnie na stadion." ], "kg001": [ - "Call for backup!" + "Wezwać wsparcie!" ], "kg001a": [ - "Call for backup!" + "Wezwać wsparcie!" ], "kg002": [ "Stać!" @@ -4245,10 +4245,10 @@ "Stać!" ], "kg004": [ - "Halt!" + "Stój!" ], "kg004a": [ - "Halt!" + "Stój!" ], "kg005": [ "Get more cruisers in here!" @@ -4269,16 +4269,16 @@ "This is a no-hover zone!" ], "kg008": [ - "Pull over!" + "Zjedź na bok!" ], "kg008a": [ - "Pull over!" + "Zjedź na bok!" ], "kg009": [ - "Say good night!" + "Powiedz dobranoc!" ], "kg010": [ - "Seal off the area." + "Zamknąć obszar." ], "kg011": [ "Zatrzymaj pojazd!" @@ -4299,22 +4299,22 @@ "You want some?!" ], "kg015": [ - "This area is off-limits." + "Ten obszar jest niedostępny." ], "kg016": [ - "Stop!" + "Stój!" ], "kg018": [ - "Hey!" + "Hej!" ], "kg019": [ - "We do this the easy way, or the hard way." + "Możemy to zrobić w prosty sposób lub trudny." ], "kg020": [ - "Slow down!" + "Zwolnij!" ], "kg020a": [ - "Slow down!" + "Zwolnij!" ], "kg021": [ "Move over!" @@ -4326,103 +4326,103 @@ "Call in more Hellcats!" ], "kg023": [ - "Requesting backup!" + "Prosimy o wsparcie!" ], "kg023a": [ - "Requesting backup!" + "Prosimy o wsparcie!" ], "kg024": [ - "Suspect on foot!" + "Podejrzany ucieka pieszo!" ], "kg024a": [ - "Suspect on foot!" + "Podejrzany ucieka pieszo!" ], "kg025": [ - "Suspect in vehicle!" + "Podejrzany w pojeździe!" ], "kg025a": [ - "Suspect in vehicle!" + "Podejrzany w pojeździe!" ], "kg026": [ - "Suspect fleeing into sector five!" + "Podejrzany ucieka do sektora piątego!" ], "kg026a": [ - "Suspect fleeing into sector five!" + "Podejrzany ucieka do sektora piątego!" ], "kg027": [ - "Suspect moving to sector six!" + "Podejrzany ucieka do sektora szóstego!" ], "kg027a": [ - "Suspect moving into sector six!" + "Podejrzany ucieka do szóstego sektora!" ], "kg028": [ - "High-speed chase in sector four!" + "Szybki pościg w sektorze czwartym!" ], "kg028a": [ - "High-speed chase in sector four!" + "Szybki pościg w sektorze czwartym!" ], "kg029": [ - "Checking sector three." + "Sprawdzam sektor trzeci." ], "kg029a": [ - "Checking sector three." + "Sprawdzam sektor trzeci." ], "kg030": [ - "Patrolling sector nine." + "Patroluję sektor dziewiąty." ], "kg030a": [ - "Patrolling sector nine." + "Patroluję sektor dziewiąty." ], "kg031": [ - "Be advised, I'm on foot." + "Uwaga, idę pieszo." ], "kg031a": [ - "Be advised, I'm on foot." + "Uwaga, idę pieszo." ], "kg032": [ - "Moving to next sector." + "Przechodzę do następnego sektora." ], "kg032a": [ - "Moving to next sector." + "Przechodzę do następnego sektora." ], "kg033": [ - "I've got suspicious activity in this sector." + "Mam podejrzaną aktywność w tym sektorze." ], "kg033a": [ - "I've got suspicious activity in this sector." + "Mam podejrzaną aktywność w tym sektorze." ], "kg034": [ - "Sweeping for suspects." + "Poszukuje podejrzanych." ], "kg034a": [ - "Sweeping for suspects." + "Poszukuje podejrzanych." ], "kg035": [ - "Nothing so far." + "Jak dotąd nic." ], "kg035a": [ - "Nothing so far." + "Jak dotąd nic." ], "kg036": [ - "Roger that, still looking." + "Przyjąłem, ciągle szukam." ], "kg036a": [ - "Roger that, still looking." + "Przyjąłem, ciągle szukam." ], "kg037": [ - "Roger, we'll shoot on sight." + "Przyjąłem, będziemy strzelać bez ostrzeżenia." ], "kg037a": [ - "Roger, we'll shoot on sight." + "Przyjąłem, będziemy strzelać bez ostrzeżenia." ], "kg038": [ - "Please advise, suspect's description." + "Proszę o podanie, opisu podejrzanych." ], "kg039": [ - "Get out of the vehicle!" + "Wyjdź z pojazdu!" ], "kg039a": [ - "Get out of the vehicle!" + "Wyjdź z pojazdu!" ], "kg040": [ "Call in more Hellcats!" @@ -4437,16 +4437,16 @@ "The area is secure." ], "kg042": [ - "Nothing to report." + "Nie ma nic do zgłoszenia." ], "kg042a": [ - "Nothing to report." + "Nie ma nic do zgłoszenia." ], "kg043": [ - "Proceeding as planned." + "Postępować zgodnie z planem." ], "kg043a": [ - "Proceeding as planned." + "Postępować zgodnie z planem." ], "kg044": [ "Zgubiłem go." @@ -4455,10 +4455,10 @@ "Zgubiłem go." ], "kg045": [ - "Subject is not in sight." + "Nie ma poszukiwanego na widoku." ], "kg045a": [ - "Subject not in sight." + "Nie ma poszukiwanego na widoku." ], "kg046": [ "Zniknął." @@ -4467,10 +4467,10 @@ "On zniknął!" ], "kg047": [ - "Where'd he go?" + "Gdzie on poszedł?" ], "kg047a": [ - "Where'd he go?" + "Gdzie on poszedł?" ], "kg048": [ "Stracono kontakt wzrokowy." @@ -4542,49 +4542,49 @@ "No sign of the subject." ], "kg059a": [ - "No sign of the subject." + "Nie ma śladu po podejrzanych." ], "kg060": [ - "I don't see him anywhere." + "Nigdzie go nie widzę." ], "kg060a": [ - "I don't see him anywhere." + "Nigdzie go nie widzę." ], "kg061": [ - "Still searching." + "Nadal szukam." ], "kg061a": [ - "Still searching." + "Nadal szukam." ], "kg062": [ - "Searching for the target." + "Szukam celu" ], "kg062a": [ - "Searching for the target." + "Szukam celu" ], "kg063": [ - "He must be here." + "On musi tu być." ], "kg063a": [ - "He must be here." + "On musi tu być." ], "kg064": [ - "He was just here." + "On właśnie tu był." ], "kg064a": [ - "He was just here." + "On właśnie tu był." ], "kg065": [ - "We lost him." + "Zgubiliśmy go." ], "kg065a": [ - "We lost him." + "Zgubiliśmy go." ], "kg066": [ - "He got away." + "On się uciekł." ], "kg066a": [ - "He got away." + "On się uciekł." ], "kg067": [ "Uciekł." @@ -4635,10 +4635,10 @@ "Widzę go!" ], "kg075": [ - "He's over there, get him!" + "On tam jest, dorwij go!" ], "kg075a": [ - "He's over here!" + "On jest tutaj!" ], "kg076": [ "Dorwać go!" @@ -4647,10 +4647,10 @@ "Dorwać go!" ], "kg077": [ - "I've reacquired the target!" + "Namierzyłem ponownie cel!" ], "kg077a": [ - "I've reacquired the target!" + "Namierzyłem ponownie cel!" ], "kg078": [ "I'm closing in." @@ -4665,16 +4665,16 @@ "I'm on him!" ], "kg080": [ - "I'm in pursuit!" + "Jestem w pościgu!" ], "kg080a": [ - "I'm in pursuit!" + "Jestem w pościgu!" ], "kg081": [ - "Pursuing target." + "Ścigam cel." ], "kg081a": [ - "Pursuing target!" + "Ścigam cel!" ], "kg082": [ "Nie pozwolcie mu uciec!" @@ -4707,10 +4707,10 @@ "Widzimy go!" ], "kg087": [ - "Stop right there!" + "Zatrzymaj się!" ], "kg087a": [ - "Stop right there!" + "Zatrzymaj się!" ], "kg088": [ "I have a bead on him!" @@ -4725,10 +4725,10 @@ "Zostałem trafiony!" ], "kg090": [ - "Man down!" + "Mamy rannego!" ], "kg090a": [ - "Man down!" + "Mamy rannego!" ], "kg091": [ "Potrzebuję wsparcia!" @@ -4743,10 +4743,10 @@ "Zatrzymać go!" ], "kg093": [ - "Look out!" + "Uważaj!" ], "kg093a": [ - "Look out!" + "Uważaj!" ], "kg094": [ "Tam jest, strzelać do niego!" @@ -4761,16 +4761,16 @@ "Zdjąć go!" ], "kg096": [ - "Prisoner escape in progress, sound the alarm!" + "Trwa ucieczka więźnia, podnieś alarm!" ], "kg096a": [ - "Prison escape in progress, sound the alarm!" + "Trwa ucieczka więźnia, podnieś alarm!" ], "kg097": [ - "Prisoner on level two!" + "Więzień jest na poziomie drugim!" ], "kg097a": [ - "Prisoner on level two!" + "Więzień jest na poziomie drugim!" ], "kg098": [ "Prisoner moving to sub-level B!" @@ -4785,7 +4785,7 @@ "We think he's in the pipes!" ], "kg100": [ - "We're beginning our sweep." + "Zaczynamy nasze poszukiwania." ], "kg100a": [ "We're beginning our sweep." @@ -4821,10 +4821,10 @@ "Secure the cell block!" ], "kg106": [ - "Take no prisoners!" + "Nie brać więźniów!" ], "kg106a": [ - "Take no prisoners!" + "Nie brać więźniów!" ], "kg107": [ "Prisoner sighted, we got him!" @@ -4845,10 +4845,10 @@ "We think he's going for an exit!" ], "kg110": [ - "Searching rooms." + "Przeszukuje pomieszczenia." ], "kg110a": [ - "Searching rooms." + "Przeszukuje pomieszczenia." ], "kg111": [ "Prisoner loose in complex." @@ -4875,10 +4875,10 @@ "Searching the sub-basements." ], "kg115": [ - "Cell block is clear." + "Blok cel jest czysty." ], "kg115a": [ - "Cell block is clear." + "Blok cel jest czysty." ], "kg116": [ "Tank room is clear." @@ -4902,13 +4902,13 @@ "Intruder alert." ], "kg119a": [ - "Intruder alert!" + "Alarm intruz!" ], "kg120": [ - "Activating security defenses." + "Aktywacja zabezpieczeń ochrony." ], "kg120a": [ - "Activating security defenses." + "Aktywacja zabezpieczeń ochrony." ], "kg121": [ "Please advise, subject's description." @@ -4917,28 +4917,28 @@ "Please advise, subject's description." ], "kg122": [ - "I've got civvies in sight." + "Mamy cywili na widoku." ], "kg122a": [ - "I've got civvies in sight." + "Mamy cywili na widoku." ], "kg123": [ - "I've got suspects in sight." + "Mam podejrzanych na widoku." ], "kg123a": [ - "I've got suspects in sight." + "Mam podejrzanych na widoku." ], "kg124": [ - "I hate the smell of this part of the city." + "Nienawidzę zapachu tej części miasta." ], "kg124a": [ - "I hate the smell in this part of the city." + "Nienawidzę zapachu tej części miasta." ], "kg125": [ - "Right, we'll check it out." + "Jasne, sprawdzimy to." ], "kg125a": [ - "Right, we'll check it out." + "Jasne, sprawdzimy to." ], "kg126": [ "Confirmed, Underground suspect neutralized." @@ -4947,34 +4947,34 @@ "Confirmed, Underground suspect neutralized." ], "kg127": [ - "They're all guilty!" + "Wszyscy są winni!" ], "kg127a": [ - "They're all guilty!" + "Wszyscy są winni!" ], "kg128": [ - "This is Unit Alpha, we're en route." + "Tu Jednostka Alfa, jesteśmy w drodze." ], "kg128a": [ - "This is Unit Alpha, we're en route." + "Tu Jednostka Alfa, jesteśmy w drodze." ], "kg129": [ - "Roger, continuing our sweep." + "Przyjąłem, kontynuujemy nasze przeszukiwanie." ], "kg129a": [ - "Roger, continuing our sweep." + "Przyjąłem, kontynuujemy nasze przeszukiwanie." ], "kg130": [ - "Unit Zulu, moving in." + "Jednostka Zulu wkracza." ], "kg130a": [ - "Unit Zulu, moving in." + "Jednostka Zulu wkracza." ], "kg131": [ - "Roger that, we're making our sweep." + "Przyjąłem to, robimy przeszukanie." ], "kg131a": [ - "Roger that, we're making our sweep." + "Przyjąłem to, robimy przeszukanie." ], "kg132": [ "I say shoot 'em all and sort 'em out later." @@ -4989,34 +4989,34 @@ "Lock and load!" ], "kg135": [ - "Open fire!" + "Otworzyć ogień!" ], "kg136": [ - "Alert, alert!" + "Alarm, alarm!" ], "kg137": [ - "Don't move!" + "Nie ruszaj!" ], "kg138": [ - "Do it!" + "Zrób to!" ], "kg139": [ - "Go, go, go!" + "Jazda, jazda, jazda!" ], "kg140": [ - "Flank 'em!" + "Flankuj ich!" ], "kg141": [ "Move in!" ], "kg142": [ - "Take 'em out!" + "Zdejmij ich!" ], "kg143": [ - "Bust some heads!" + "Rozwalcie kilka głów!" ], "kg144": [ - "Arrest him!" + "Aresztować go!" ], "kg145": [ "Shoot 'em, shoot 'em!" @@ -5028,13 +5028,13 @@ "You're history!" ], "kg148": [ - "Eat this!" + "Żryj to!" ], "kg149": [ "Get some!" ], "kg150": [ - "Fire, fire!" + "Ognia, ognia!" ], "kg151": [ "Here's one for the Guard!" @@ -5052,19 +5052,19 @@ "Shoulda given up!" ], "kg156": [ - "I need cover fire!" + "Potrzebuję wsparcia ogniowego!" ], "kg157": [ - "Call in reinforcements!" + "Wezwijcie posiłki!" ], "kg158": [ - "I'll shoot!" + "Będę strzelał." ], "kg159": [ - "Die!" + "Giń!" ], "kg160": [ - "You're busted!" + "Jesteś aresztowany!" ], "kg161": [ "Riot in progress!" @@ -5097,22 +5097,22 @@ "Another notch for my gun." ], "kg167": [ - "This one was easy!" + "To było łatwe!" ], "kg167a": [ - "This one was easy!" + "To było łatwe!" ], "kg167b": [ - "This one was easy!" + "To było łatwe!" ], "kg168": [ - "Suspect neutralized." + "Podejrzany zneutralizowany." ], "kg168a": [ - "Suspect neutralized." + "Podejrzany zneutralizowany." ], "kg168b": [ - "Suspect neutralized." + "Podejrzany zneutralizowany." ], "kg169": [ "Didn't even work up a sweat." @@ -5184,67 +5184,67 @@ "Get moving!" ], "kg178a": [ - "He vanished!" + "On zniknął!" ], "kg179": [ - "You guys hear about the latest Metal Head attacks?" + "Czy słyszeliście coś na temat ostatniego ataku Metalowych Łbów?" ], "kg179b": [ - "Oh you guys hear about the latest Metal Head attacks?" + "Oh słyszeliście coś na temat ostatniego ataku Metalowych Łbów?" ], "kg180": [ - "We lost three squads last week." + "W zeszłym tygodniu straciliśmy trzy oddziały." ], "kg180a": [ - "We lost three squads last week." + "W zeszłym tygodniu straciliśmy trzy oddziały." ], "kg180b": [ - "We lost three squads last week." + "W zeszłym tygodniu straciliśmy trzy oddziały." ], "kg181": [ - "I hear the Underground are getting stronger." + "Słyszałem, że Podziemie staje się coraz silniejsze." ], "kg181a": [ - "I hear the Underground are getting stronger." + "Słyszałem, że Podziemie staje się coraz silniejsze." ], "kg181b": [ - "I hear the Underground are getting stronger." + "Słyszałem, że Podziemie staje się coraz silniejsze." ], "kg182": [ - "Just rumors, private, keep your mouth shut." + "To tylko plotki, szeregowy, zamknij się." ], "kg182a": [ - "Just rumors, private, keep your mouth shut." + "To tylko plotki, szeregowy, zamknij się." ], "kg182b": [ - "Just rumors, private, keep your mouth shut." + "To tylko plotki, szeregowy, zamknij się." ], "kg183": [ - "It's us or them, there's no in-between." + "Albo my albo oni, nie ma nic pomiędzy." ], "kg183a": [ - "It's us or them, there's no in-between." + "Albo my albo oni, nie ma nic pomiędzy." ], "kg183b": [ - "It's us or them, there's no in-between." + "Albo my albo oni, nie ma nic pomiędzy." ], "kg184": [ - "Don't worry, the Baron will save us." + "Nie martw się, Baron nas uratuje." ], "kg184a": [ - "Don't worry, the Baron will save us." + "Nie martw się, Baron nas uratuje." ], "kg184b": [ - "Don't worry, the Baron will save us." + "Nie martw się, Baron nas uratuje." ], "kg185": [ - "I got no faith in nobody." + "Nie mam wiary w nikogo." ], "kg185a": [ - "I ain't got no faith in nobody." + "Nie mam wiary w nikogo." ], "kg185b": [ - "I got no faith in nobody." + "Nie mam wiary w nikogo." ], "kg186": [ "Seen that new JX-7 racer? Sweet ride." @@ -5256,19 +5256,19 @@ "Seen that new JX-7 racer? It's a sweet ride." ], "kg187": [ - "You seen anything?" + "Widziałeś coś?" ], "kg187a": [ - "You seen anything?" + "Widziałeś coś?" ], "kg187b": [ - "You seen anything?" + "Widziałeś coś?" ], "kg188": [ - "No." + "Nie." ], "kg188a": [ - "No." + "Nie." ], "kg188b": [ "Nah." @@ -5292,31 +5292,31 @@ "I just got a radio alert, stay frosty." ], "kg191": [ - "Never trust a civilian." + "Nigdy nie ufaj cywilowi." ], "kg191a": [ - "Never trust a civilian." + "Nigdy nie ufaj cywilowi." ], "kg191b": [ - "Never trust a civilian." + "Nigdy nie ufaj cywilowi." ], "kg192": [ - "Never trust anyone." + "Nigdy nie ufaj nikomu." ], "kg192a": [ - "Never trust anyone." + "Nigdy nie ufaj nikomu." ], "kg192b": [ - "Never trust anyone." + "Nigdy nie ufaj nikomu." ], "kg193": [ - "Long live the KG!" + "Niech żyje KG!" ], "kg193a": [ - "Long live the KG!" + "Niech żyje KG!" ], "kg193b": [ - "Long live the KG!" + "Niech żyje KG!" ], "kg194": [ "We ain't had a food riot since we brought in them tanks." @@ -5337,24 +5337,24 @@ "I'm bored, I want to crunch heads." ], "kg196": [ - "I want to kick some ass." + "Chce skopać komuś tyłek." ], "kg196a": [ - "Ugh... I want to kick some butt." + "Ugh... Chce skopać komuś tyłek." ], "kg196b": [ - "I want to kick some butt." + "Chce skopać komuś tyłek." ], "kg197": [ "Did you hear the Underground got our ammo at HQ?" ], "kg197a": [ "Did you hear the Underground got to", - "our ammo at HQ?" + "naszej amunicji w kwaterze głównej?" ], "kg197b": [ - "Did you hear the Underground got to", - "our ammo at HQ?" + "Słyszałeś, że Podziemie dostało się do", + "naszej amunicji w kwaterze głównej?" ], "kg198": [ "Zemsta to suka!" @@ -5366,13 +5366,13 @@ "Zemsta to suka!" ], "kg199": [ - "Animals!" + "Zwierzęta!" ], "kg199a": [ - "Animals!" + "Zwierzęta!" ], "kg199b": [ - "Animals!" + "Zwierzęta!" ], "kg200": [ "I hear the Shadow's been dead for years." @@ -5405,22 +5405,22 @@ "Can I shoot someone now?" ], "kg203": [ - "I like the new armor." + "Podoba mi się nowy pancerz." ], "kg203a": [ - "I like the new armor." + "Podoba mi się nowy pancerz." ], "kg203b": [ - "I like the new armor." + "Podoba mi się nowy pancerz." ], "kg204": [ - "Yeah, me too. More comfort in the crotch." + "Ta, mi też. Wygodniejszy w kroczu." ], "kg204a": [ - "Yeah, me too. More comfort in the crotch." + "Ta, mi też. Wygodniejszy w kroczu." ], "kg204b": [ - "Yeah, me too. More comfort in the crotch." + "Ta, mi też. Wygodniejszy w kroczu." ], "kg205": [ "If something interesting doesn't happen soon,", @@ -5456,52 +5456,52 @@ "Shhh..." ], "kg209": [ - "Shh." + "Shhh." ], "kg209a": [ - "Shh." + "Shhh." ], "kg209b": [ - "Shh." + "Shhh." ], "kg210": [ - "I hear someone's been using the old wall airlocks.", - "Pfft, crazy bastard." + "Słyszałem, że ktoś używał śluz przy starym murze.", + "Pff, szalony skurwysyn." ], "kg210a": [ - "I hear someone's been using the old wall airlocks.", - "Crazy bastard." + "Słyszałem, że ktoś używał śluz przy starym murze.", + "Szalony skurwysyn." ], "kg210b": [ - "I hear someone's been using the old wall airlocks.", - "Crazy bastard." + "Słyszałem, że ktoś używał śluz przy starym murze.", + "Szalony skurwysyn." ], "kg211": [ - "I've been on duty for two days straight." + "Byłem na warcie przez ostatnie dwa dni z rzędu." ], "kg211a": [ - "I've been on duty for two days straight." + "Byłem na warcie przez ostatnie dwa dni z rzędu." ], "kg211b": [ - "I've been on duty for two days straight." + "Byłem na warcie przez ostatnie dwa dni z rzędu." ], "kg212": [ - "Pfft, don't complain. I've got sewer patrol next week." + "Pff. nie marudź. Mam patrol w kanałach w przyszłym tygodniu." ], "kg212a": [ - "Don't complain, I got sewer patrol next week." + "Nie marudź. Mam patrol w kanałach w przyszłym tygodniu." ], "kg212b": [ - "Don't complain. I got sewer patrol next week." + "Nie marudź. Mam patrol w kanałach w przyszłym tygodniu." ], "kg213": [ - "Ahh, you poor bastard. Which commander did you piss off?" + "Ahh, ty biedaku. Którego komandora wkurzyłeś? " ], "kg213a": [ - "Ahh, you poor bastard. Which commander did you piss off?" + "Ahh, ty biedaku. Którego komandora wkurzyłeś?" ], "kg213b": [ - "Hehe, poor bastard. Which commander did you piss off?" + "Hehe, ty biedaku. Którego komandora wkurzyłeś?" ], "kg214": [ "I say death to the Underground." @@ -5522,13 +5522,13 @@ "I want to kill that Shadow guy!" ], "kg216": [ - "And don't forget that traitor Torn." + "I nie zapomnij o tym zdrajcy Tornie." ], "kg216a": [ - "And don't forget that traitor Torn." + "I nie zapomnij o tym zdrajcy Tornie." ], "kg216b": [ - "Don't forget that traitor Torn!" + "Nie zapomnij o tym zdrajcy Tornie." ], "kg217": [ "Death's too good for him." @@ -5540,49 +5540,49 @@ "Death's too good for him." ], "kg218": [ - "Why are we looking for some kid?" + "Dlaczego my szukamy jakiegoś dzieciaka?" ], "kg218a": [ - "Why are we looking for some kid?" + "Dlaczego my szukamy jakiegoś dzieciaka?" ], "kg218b": [ - "Why are we looking for some kid?" + "Dlaczego my szukamy jakiegoś dzieciaka?" ], "kg219": [ - "I don't know, Baron's orders." + "Nie wiem, rozkazy Barona." ], "kg219a": [ - "I dunno, Baron's orders." + "Nie wiem, rozkazy Barona." ], "kg219b": [ - "I dunno, Baron's orders." + "Nie wiem, rozkazy Barona." ], "kg220": [ - "Hey, have they found Mar's Tomb yet?" + "Hej znaleźli już ten grobowiec Mara?" ], "kg220a": [ - "Have they found Mar's Tomb yet?" + "Hej znaleźli już ten grobowiec Mara?" ], "kg220b": [ - "Have they found Mar's Tomb yet?" + "Hej znaleźli już ten grobowiec Mara?" ], "kg221": [ - "They wouldn't tell us if they did." + "Nie powiedzieliby nam, jeśli by znaleźli." ], "kg221a": [ - "Nah, they wouldn't tell us if they did." + "Eh, nie powiedzieliby nam, jeśli by znaleźli." ], "kg221b": [ - "Nah, they wouldn't tell us if they did." + "Eh, nie powiedzieliby nam, jeśli by znaleźli." ], "kg222": [ - "I've got a big bet on the next city races." + "Postawiłem duży zakład na następnych wyścigach miejskich." ], "kg222a": [ - "I got a big bet on the next city races." + "Postawiłem duży zakład na następnych wyścigach miejskich." ], "kg222b": [ - "Got a big bet on the next city races." + "Postawiłem duży zakład na następnych wyścigach miejskich." ], "kg223": [ "Erol's my boy. He always wins." @@ -5594,22 +5594,22 @@ "Erol's my boy. He always wins." ], "kg224": [ - "You going to the city races this time?" + "Czy idziesz tym razem na wyścigi miejskie ?" ], "kg224a": [ - "You going to the city races this time?" + "Czy idziesz tym razem na wyścigi miejskie ?" ], "kg224b": [ "You going to the city races this time?" ], "kg225": [ - "I'll be there." + "Będę tam." ], "kg225a": [ - "I'll be there." + "Będę tam." ], "kg225b": [ - "I'll be there." + "Będę tam." ], "kg226": [ "There've been some serious guard casualties this week." @@ -5648,13 +5648,13 @@ "Let's get drinks later." ], "kg230": [ - "I got a bad feeling about this war." + "Mam złe przeczucia co do tej wojny." ], "kg230a": [ - "I got a bad feeling about this war." + "Mam złe przeczucia co do tej wojny." ], "kg230b": [ - "I got a bad feeling about this war." + "Mam złe przeczucia co do tej wojny." ], "kg231": [ "I hear there are more Metal Head attacks", @@ -5674,11 +5674,11 @@ ], "kg232a": [ "The reports I've seen aren't good.", - "I think the city's in trouble." + "Myślę, że miasto ma kłopoty." ], "kg232b": [ - "The reports I've seen aren't good.", - "I think the city's in trouble." + "Raporty, które widziałem, nie są dobre.", + "Myślę, że miasto ma kłopoty." ], "kg233": [ "I'm worried about this new guy", @@ -5774,10 +5774,10 @@ "We can't keep up!" ], "kg253a": [ - "He's in the port!" + "On jest w porcie!" ], "kg254a": [ - "He got away!" + "On się uciekł!" ], "kg255a": [ "Suspect has taken out pursuit!" @@ -5789,7 +5789,7 @@ "Nice work boys, he's down." ], "kg258a": [ - "Excellent pursuit." + "Świetny pościg." ], "kg259a": [ "Guard transport under attack, requesting support!" @@ -5825,10 +5825,10 @@ "He's taken out two of our transports already!" ], "kg270a": [ - "He's alone again." + "On jest znowu sam." ], "kg271a": [ - "Where's he heading?!" + "Gdzie on kieruje?!" ], "kg272a": [ "Terminate with extreme prejudice!" @@ -5843,7 +5843,7 @@ "We lost this passenger." ], "kg276a": [ - "We're losing him!" + "Tracimy go!" ], "kg277a": [ "We got 'em!" @@ -5882,10 +5882,10 @@ "That could be the kid the Baron wants." ], "kg289a": [ - "After them!" + "Za nimi!" ], "kg290a": [ - "Don't move, boy!" + "Nie ruszaj się, chłopcze!" ], "kg291a": [ "Take out that mutt!" @@ -5900,7 +5900,7 @@ "If you get a clear shot, take it!" ], "kg295a": [ - "Suspect is fleeing in vehicle!" + "Podejrzany ucieka pojazdem!" ], "kg296a": [ "Suspect's vehicle moving through section seven." @@ -5918,10 +5918,10 @@ "What is that thing?!" ], "kg301a": [ - "Shoot that thing, shoot it!" + "Strzelajcie w to coś, strzelajcie!" ], "kg302a": [ - "What's he doing?!" + "Co on robi?!" ], "kg303a": [ "It's that monster!" @@ -5961,7 +5961,7 @@ "He's wasting everybody!" ], "kg315a": [ - "We can't kill it!" + "Nie możemy tego zabić!" ], "kg316a": [ "Stand your ground men!" @@ -6004,7 +6004,7 @@ "Burn 'em down!" ], "kg329a": [ - "Stay together!" + "Trzymać się razem!" ], "kg330a": [ "We've got 'em cornered!" @@ -6025,7 +6025,7 @@ "We've cut 'em off!" ], "kg336a": [ - "He's trapped!" + "On jest uwięziony!" ], "kg337a": [ "We got 'em!" @@ -6034,22 +6034,22 @@ "We're taking heavy fire!" ], "kg339a": [ - "We're taking heavy casualties, send in backup!" + "Mamy wiele strat, przyślijcie wsparcie!" ], "kg340a": [ - "This guy knows how to fight!" + "Ten koleś wie jak walczyć!" ], "kg341a": [ - "Hold your ground!" + "Utrzymujcie swoje pozycje!" ], "kg342a": [ "Do not retreat!" ], "kg343a": [ - "We lost Beta squad!" + "Straciliśmy oddział Beta!" ], "kg344a": [ - "We need more men!" + "Potrzebujemy więcej ludzi!" ], "kg345a": [ "He's on the south path!" @@ -6082,7 +6082,7 @@ "Thanks for making this easy." ], "kg355a": [ - "We're taking heavy casualties." + "Mamy wiele strat." ], "kg356a": [ "He's getting in deep, stop him!" @@ -6109,7 +6109,7 @@ "I got 'em!" ], "kg364a": [ - "Finish him off!" + "Wykończ go!" ], "kg365a": [ "He's moving toward the ammo room!" @@ -6133,7 +6133,7 @@ "We lost the guy he dropped off!" ], "kg372a": [ - "He's got a passenger." + "Ma pasażera." ], "kg373a": [ "Driver is working with the Underground." @@ -6178,7 +6178,7 @@ "Ough!" ], "kg387a": [ - "Świetnie!" + "Huh!" ], "kg388a": [ "Arghh!" @@ -6187,7 +6187,7 @@ "Ugha!" ], "kg390a": [ - "Szczę!" + "Hugh!" ], "kg391a": [ "Augh!" @@ -6337,7 +6337,7 @@ "Seal off the area!" ], "kgv012": [ - "Call in reinforcements!" + "Wezwijcie posiłki!" ], "kgv013": [ "Riot in progress!" @@ -6370,13 +6370,13 @@ "Requesting backup!" ], "kgv023": [ - "High speed chase in sector four!" + "Szybki pościg w sektorze czwartym!" ], "kgv024": [ "Podejrzany w pojeździe!" ], "kgv025": [ - "Suspect fleeing into sector five." + "Podejrzany ucieka do piątego sektora!" ], "kor001": [ "I am so proud of you Jak, and you too, Daxter!", @@ -6455,7 +6455,7 @@ "Let's dance!" ], "kwbf004": [ - "You will die!" + "Zginiesz!" ], "kwbf005": [ "Here we come!" @@ -6506,19 +6506,19 @@ "Urgh, ow!" ], "kwbf021": [ - "Die!" + "Giń!" ], "kwbf022": [ - "Now I have you!" + "Teraz cię mam!" ], "kwbf023": [ - "You cannot win, Jak!" + "Nie możesz wygrać, Jak!" ], "kwbf024": [ "Here's some pain!" ], "kwbf025": [ - "No!" + "Nie!" ], "kwbf026": [ "You're trying my patience!" @@ -6692,7 +6692,7 @@ "Okay, so you're good." ], "pek031": [ - "Wow! Not bad." + "Wow! Nieźle." ], "pek032": [ "Well, I laid an egg." @@ -6734,7 +6734,7 @@ "death will await all others." ], "prop003": [ - "The Dark Eco inside you will eventually kill you, Jak.", + "Mroczne Eco wewnątrz Ciebie ostatecznie cię zabije, Jak.", "Its destructive effects cannot be stopped.", "Once you are in its chaotic grip, it will not let you go", "until you slide into insanity. Turn yourself in, and I will", @@ -6805,13 +6805,13 @@ "Report all wrongdoers." ], "prop015": [ - "Remember, even your friends could be enemies." + "Pamiętajcie, nawet twoi przyjaciele mogą być wrogami." ], "prop016": [ "Turn in all who subvert." ], "prop017": [ - "Strength is our only option!" + "Siła jest naszą jedyną opcją!" ], "prop018": [ "Obey and be happy." @@ -6824,7 +6824,7 @@ "Poświęć się dla swego miasta." ], "prop021": [ - "Remember, even friends might be enemies." + "Pamiętajcie, nawet przyjaciele mogą być wrogami." ], "prop022": [ "The city needs your sacrifice." @@ -6867,7 +6867,7 @@ "Shun those who would defy me!" ], "prop035": [ - "I am the face of Haven City." + "Jestem twarzą Miasta Haven." ], "prop036": [ "Without my strength, there would be no city." @@ -6879,10 +6879,10 @@ "You are safe inside the walls with me." ], "prop039": [ - "Defy... and die." + "Sprzeciw się... i zgiń." ], "prop040": [ - "Witaj w Haven City!", + "Witaj w Mieście Haven!", "All laws are enforced for your safety.", "Obey me and you will not be punished." ], @@ -6901,7 +6901,7 @@ "be allowed to threaten me or this city's order!" ], "prop044": [ - "To all citizens of this great city, there is a monster", + "Do wszystkich mieszkańców tego wspaniałego miasta, gdzieś jest potwór", "among you, masquerading as a man!", "On jest niebezpieczny i musi zostać zniszczony!", "I offer a reward of eco for his capture, or, if you", @@ -6909,26 +6909,26 @@ "this renegade. I promise." ], "prop045": [ - "To all who defy me! I am watching you,", + "Do wszystkich, którzy mi się sprzeciwiają! Obserwuję was,", "Jestem wszędzie, jestem tym miastem!" ], "prop046": [ - "This is your Baron. I have been informed by the", - "ministry of extreme labor that worker productivity is", - "down this month! That is unacceptable!", - "I give you safety and this is how you repay me?", - "You must work harder, not smarter!", - "Free the mind and the body will do as it's told,", - "forced labor will set you free!", - "And to help you in your spiritual motivation...", - "quotas are doubled next month!" + "Tutaj wasz Baron. Zostałem poinformowany przez", + "ministerstwo ekstremalnej siły roboczej, że produktywność pracowników jest", + "niższa w tym miesiącu! To jest niedopuszczalne!", + "Daję wam bezpieczeństwo i tak mi się odwdzięczacie?", + "Musicie pracować ciężej, a nie sprytnie!", + "Uwolnijcie umysł, a ciało zrobi, to co mu się powie,", + "praca przymusowa was uwolni!", + "I żeby pomóc wam w duchowej motywacji...", + "norma będzie podwójna w następnym miesiącu!" ], "prop047": [ - "Due to recent, uh... \"attrition\" difficulties,", - "this city needs fresh Krimzon Guard recruits!", - "Everyone is asked to volunteer members of their family!", - "Come down to your friendly Fortress facility.", - "Or else!" + "Przez ostatnie, uh... problemy z \"otarciami\"", + "to miasto potrzebuje świeżych rekrutów Strażników Krimzon!", + "Każdy jest poproszony, żeby zgłosić na ochotnika członka swojej rodziny!", + "Przyjdź do twojego przyjaznego obiektu Fortecy.", + "Bo jak nie!" ], "prop048": [ "As your Baron, I am instituting a \"no hoverboard\" rule", @@ -7015,32 +7015,32 @@ ], "prop057": [ "The Metal Head attack will not succeed!", - "Your Baron has taken certain measures", - "to guarantee that the Metal Heads will NEVER hold", - "this city for long. Rest assured, I will snatch victory", - "from the jaws of defeat, whatever the cost!", - "I vowed never to let this city fall, and I intend to keep", - "that promise. What must happen is for the good of all!", - "Remember, to die in victory is a glorious", - "badge of honor!" + "Twój Baron podjął pewne środki", + "aby zagwarantować, że metalowe łby NIGDY nie będą utrzymywać", + "te miasto przez długi czas. Zapewniam was, że zdobędę zwycięstwo", + "ze szczęk porażki, bez względu na cenę!", + "Przyrzekłem, że nigdy nie pozwolę upaść temu miastu i zamierzam tego dotrzymać", + "ta obietnica. To, co musi się wydarzyć, jest dla dobra wszystkich! ", + "Pamiętaj, że śmierć w zwycięstwie jest chwalebna", + "Odznaką honoru!" ], "prop058": [ - "This is Baron Praxis. As our city faces its worst threat", - "in three hundred years, I am faced with serious", - "decisions concerning our future. I regret that I have", - "few choices left. I command you all to return to your", - "homes and say goodbye to your families.", - "Be assured, we will not lose this fight, one way", - "or another! The time has come to show these creatures", - "what we're capable of when all hope is lost!", - "It has been a pleasure ruling over you", - "to the end." + "Tu mówi Baron Praxis. Nasze miasto stoi w obliczu największego zagrożenia", + "za trzysta lat, stanę przed poważnymi", + "decyzjami dotyczącymi naszej przyszłości. Żałuję, że ", + "pozostało mi niewiele wyborów. Nakazuję wam wszystkim wrócić do ", + "domów i pożegnać się z rodzinami.", + "Bądźcie pewni, że nie przegramy tej walki, w ten ", + "czy inny sposób! Nadszedł czas, aby pokazać tym stworzeniom", + "Do czego jesteśmy zdolni kiedy, gdy tracimy wszelką nadzieję!", + "To była przyjemność rządzić wam", + "do samego końca." ], "sam001": [ - "This is Samos. Jak, I need you to go out to the ruins", - "in Dead Town and visit my old hut. It's now time to retrieve", - "something I hid there long ago, good luck! And Daxter...", - "clean up my place while you're out there!" + "Tu Samos. Jak, musisz udać się do ruin", + "w Martwym Mieście i odwiedził moją starą chatę. Nadszedł czas, aby odzyskać ", + "coś, co tam ukryłem dawno temu, powodzenia! I Daxter...", + "posprzątaj moją chatę, kiedy tam będziesz!" ], "sam002": [ "This is Samos. Now that you boys are here", @@ -7057,21 +7057,21 @@ "You did well, Jak. Luckily, the Precursor Stone wasn't in that", "bomb when it went off or none of us would be here", "right now. Come back to the race garage", - "as soon as you can." + "tak szybko jak tylko możesz." ], "sam005": [ - "Good work so far, boys!", - "Find Young Samos and give him the Life Seed." + "Póki co dobra robota, chłopcy!", + "Znajdź młodego Samosa i daj mu Nasionko Życia." ], "sam006": [ "Finally, you got here! Find the Lurker Totem", - "and retrieve a piece of the Seal of Mar on its top." + "i odzyskałem część pieczęci Mara z jej wierzchołka." ], "sam007": [ "You've got to get the boy safely to the Power Station, Jak!" ], "sam008": [ - "Dziękuję za ochronę nas, Jak.", + "Dziękuję za ochranianie nas, Jak.", "Spotkamy się w Gnieździe." ], "sigc001": [ @@ -7088,19 +7088,19 @@ "Good! Some kick, huh?" ], "sigc005": [ - "It's not the fastest firing weapon in the world, though." + "Nie jest to jednak najszybciej strzelająca broń na świecie." ], "sigc006": [ - "You can put your weapon away or pull it out at anytime." + "Możesz odłożyć swoją broń lub wyciągnąć ją w każdej chwili." ], "sigc007": [ - "Try putting the weapon away." + "Spróbuj odłożyć broń." ], "sigc008": [ "Łatwizna, co?" ], "sigc009": [ - "Now take the weapon back out." + "Teraz wyciągnij broń z powrotem." ], "sigc010": [ "Dobrze!" @@ -7128,7 +7128,7 @@ "You can switch weapon modes at anytime." ], "sigc018": [ - "You can find yellow ammo in crates." + "Możesz znaleźć żółtą amunicję w skrzyniach." ], "sigc022": [ "Would you like to test your skills on the gun course?" @@ -7141,11 +7141,11 @@ "the more points you'll get." ], "sigc025": [ - "Hold your fire on civvies.", + "Wstrzymaj ogień przed cywilami.", "Hit a friendly target and points will be deducted." ], "sigc026": [ - "Good luck." + "Powodzenia." ], "sigc027": [ "Lock and load. Ready, go!" @@ -7199,7 +7199,7 @@ "Faster on the trigger, cherry." ], "sigc054": [ - "That was a civilian!" + "To był cywil!" ], "sigc055": [ "I said \"don't shoot civvies,\" itchy finger!" @@ -7220,7 +7220,7 @@ "The Metal Heads will eat you alive, rookie! Do it over!" ], "sigc061": [ - "You need some practice." + "Potrzebujesz trochę praktyki." ], "sigc062": [ "I remember my rookie days, keep trying." @@ -7247,7 +7247,7 @@ "Make 'em fear you." ], "sigc070": [ - "Good combo!" + "Dobry kombinacja!" ], "sigc071": [ "I love seeing you work!" @@ -7267,7 +7267,7 @@ "aby automatycznie trafić drugi cel." ], "sigc076": [ - "Great move!" + "Świetny ruch!" ], "sigc077": [ "Not quite, try again. Kick then shoot, almost at the same time." @@ -7276,11 +7276,11 @@ "Make sure you shoot while you're kicking to get the combo." ], "sigc079": [ - "Give it another shot." + "Spróbuj jeszcze raz." ], "sigc080": [ "Now that's a Wastelander move!", - "They won't know what hit 'em!" + "Nie będą wiedzieli skąd dostali!" ], "sigc081": [ "Think you can handle the Blaster course?" @@ -7343,13 +7343,13 @@ "There's the second scumbag, sittin' pretty." ], "sigt022": [ - "Cover me!" + "Osłaniaj mnie!" ], "sigt023": [ "Boom, baby! One less Metal Head to think about." ], "sigt024": [ - "Next target." + "Następny cel." ], "sigt025": [ "Watch my six, while I toast this bad boy.", @@ -7383,13 +7383,13 @@ "Here comes trouble." ], "sigt037": [ - "Did ya miss me?" + "Tęskniłeś za mną?" ], "sigt038": [ - "Say \"good night,\" baby." + "Powiedz \"dobra noc\", dziecinko." ], "sigt039": [ - "Thanks for covering my butt, that was close!" + "Dzięki za osłanianie mojego tyłka to było blisko!" ], "sigt043": [ "Stay with me!" @@ -7398,7 +7398,7 @@ "Stay close or we'll both be dead!" ], "sigt045": [ - "Get over here and stay close!" + "Podejdź, że tu i trzymaj się blisko!" ], "sigt046": [ "You wanna play, huh?" @@ -7410,7 +7410,7 @@ "You cherries can't handle this mission, we're through!" ], "sigt052": [ - "I don't work with amateurs!" + "Nie pracuję z amatorami!" ], "sigt053": [ "You're more trouble than you're worth!" @@ -7425,10 +7425,10 @@ "Drop that lift-cap while I hold them off." ], "sigt058": [ - "Take 'em all out!" + "Zdejmij ich wszystkich!" ], "sigt059": [ - "Great, no time to celebrate." + "Świetnie, nie ma czasu na świętowanie." ], "sigt060": [ "If I can't shoot it, it's someone else's problem.", @@ -7438,10 +7438,10 @@ "You gotta figure out the blocks, man." ], "sigt062": [ - "Did you hear something?" + "Słyszałeś coś?" ], "sigt063": [ - "That's one big ugly Metal Head." + "To jest jeden wielki brzydki metalowy łeb." ], "sigt064": [ "Shootin' this one's only going to get it mad, run!" @@ -7465,13 +7465,13 @@ "This is your gig, baby. Solve it, so we can go home." ], "sigt071": [ - "Great, here comes that bad boy again. Move!" + "Świetnie, znowu ten drań. Ruchy!" ], "sigt072": [ "Uciekać!" ], "sigt073": [ - "Go, go, go!" + "Jazda, jazda, jazda!" ], "sigt074": [ "He's gaining!" @@ -7498,7 +7498,7 @@ "Have a little pain right back!" ], "sigt089": [ - "Never trust a rookie." + "Nigdy nie ufaj żółtodziobowi." ], "sigt090": [ "We're finished until you guys get serious." @@ -7516,7 +7516,7 @@ "Rage before beauty, buddy." ], "sigt101": [ - "Let's move!" + "Ruszajmy!" ], "sigt102": [ "I love the smell of burning metal!" @@ -7531,10 +7531,10 @@ "Let's go!" ], "sigt106": [ - "This way!" + "Tędy!" ], "sigt107": [ - "Over here!" + "Tutaj!" ], "sigt108": [ "Rollin' baby!" @@ -7594,10 +7594,10 @@ "More coming in!" ], "tswm001": [ - "You can do it, Daxter!" + "Możesz to zrobić, Daxter!" ], "tswm002": [ - "Keep going, Daxter." + "Dawaj dalej, Daxter." ], "tswm003": [ "Go, go, go!" @@ -7636,7 +7636,7 @@ "Just a few more!" ], "tswm015": [ - "Hit him again!" + "Uderz go jeszcze raz!" ], "tswm016": [ "Tak!" @@ -7645,13 +7645,13 @@ "Oto mój niegrzeczny ottsel! " ], "tswm018": [ - "Oh!" + "Oh!\n" ], "tswm019": [ - "That wasn't good." + "To nie było dobre." ], "tswm020": [ - "Don't hit the red ones!" + "Nie uderzaj w czerwone!" ], "tswm021": [ "Ooh!" @@ -7678,7 +7678,7 @@ "To było niesamowite!" ], "tswm029": [ - "Pretty good for a little furball." + "Całkiem nieźle jak na małego futrzaka." ], "tswm030": [ "Ooh... Za mało punktów!" @@ -7687,7 +7687,7 @@ "Nie! Przegrałeś..." ], "tswm032": [ - "Awww... You lost again!" + "Awww.. Znowu przegrałeś!" ], "tswm033": [ "Tak blisko!" @@ -7708,25 +7708,25 @@ "Spróbuj ponownie!" ], "tswm039": [ - "Ah! That was a bad one!" + "ah! To właśnie był ten zły!" ], "tswm040": [ - "Don't hit the bad ones, Daxter." + "Nie uderzaj w złe, Daxter." ], "tswm041": [ - "You hit a bad Metal Head." + "Uderzyłeś złego metalowego łba." ], "tswm042": [ - "Not again!" + "No nie, znowu!" ], "tswm043": [ "O nie!" ], "tswm044": [ - "Daxter..! You need more points!" + "Daxter..! Potrzebujesz więcej punktów!" ], "tswm045": [ - "Keep going...!" + "Dawaj dalej...!" ], "tswm046": [ "Oh, Daxter... did you get your whiskers singed?" @@ -7735,7 +7735,7 @@ "You're gonna score!" ], "tswm048": [ - "You're almost there...!" + "Już prawie tam jesteś...!" ], "tswm049": [ "Jeszcze kilka!" @@ -7762,7 +7762,7 @@ "Tak!! Ukończyłeś grę!" ], "tswm057": [ - "I knew you could do it." + "Wiedziałem, że możesz to zrobić" ], "vin002": [ "Okay, the B-Zone Power Grid is back online.", @@ -7770,13 +7770,13 @@ ], "vin003": [ "Zniszczyłeś ostatnie z jaj Metalowych Łbów!", - "That should give us a little more eco for the city.", + "To powinno dać nam odrobinę więcej eco dla miasta", "Dobra robota!" ], "vin004": [ "You still haven't gotten all the Metal Head eggs!", "Make sure you get 'em all, or I'm gonna have", - "a nervous breakdown!" + "załamanie nerwowe!" ], "vin011": [ "Thank goodness you blew up those wells.", @@ -7799,21 +7799,21 @@ "God knows I could use one. Thanks for the help!" ], "vin015": [ - "The shield wall is down! I repeat - the shield wall is down!", + "Tarcza muru padłą! Powtarzam - tarcza muru padła!", "Sabotaż! Kor to zrobił!", - "I knew Metal Heads would be the end of me!", - "OH NO! Metal Heads are at the door!!", + "Wiedziałem, że metalowe łby będą przyczyną mojego końca", + "O NIE! Metalowe łby są przy drzwiach!!", "Przebijają się!", "Jest ich zbyt wiele!! Jak!! AHHHH!!!" ], "ys001": [ - "Excellent work, boys! Come on back to the Hideout,", - "Mam dla ciebie inne zadanie." + "Świetna robota, chłopacy! Wracajcie do kryjówki, ", + "Mam dla ciebie kolejne zadanie." ], "ys002": [ "Ładnie strzelasz, chłopcze!", "Dobra robota, Jak!", - "We'll all sleep a little easier tonight." + "Dzisiejszej nocy wszyscy będziemy spać odrobinę spokojniej." ] }, "speakers": { @@ -7839,7 +7839,7 @@ "kor": "Kor", "krew": "Krew", "metalkor": "Metalowy Kor", - "metalkor-before-consite": "Metal Head Leader", + "metalkor-before-consite": "Przywódca metalowych łbów", "metalkor-intro": "???", "mog": "Mog", "onin": "Onin", diff --git a/game/assets/jak2/subtitle/subtitle_meta_fr-FR.json b/game/assets/jak2/subtitle/subtitle_meta_fr-FR.json index d5c4793786..bae57b2bf5 100644 --- a/game/assets/jak2/subtitle/subtitle_meta_fr-FR.json +++ b/game/assets/jak2/subtitle/subtitle_meta_fr-FR.json @@ -65,50 +65,6 @@ } ] }, - "mtn-plat-buried-rocks-a": { - "lines": [ - { - "frame_end": 168, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "mtn-step-plat-rocks-a": { - "lines": [ - { - "frame_end": 88, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "mtn-step-plat-rocks-b": { - "lines": [ - { - "frame_end": 92, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "mtn-step-plat-rocks-c": { - "lines": [ - { - "frame_end": 80, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, "sam001": { "lines": [ { @@ -170,50 +126,6 @@ } ] }, - "tombplta": { - "lines": [ - { - "frame_end": 129, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "tombpltb": { - "lines": [ - { - "frame_end": 350, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "wtrdrain": { - "lines": [ - { - "frame_end": 163, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, - "wtrfill": { - "lines": [ - { - "frame_end": 165, - "frame_start": 0, - "merge": false, - "offscreen": true, - "speaker": "none" - } - ] - }, "ys002": { "lines": [ { diff --git a/game/assets/jak2/text/game_custom_text_de-DE.json b/game/assets/jak2/text/game_custom_text_de-DE.json index 6f6d87e915..41f31eaa9c 100644 --- a/game/assets/jak2/text/game_custom_text_de-DE.json +++ b/game/assets/jak2/text/game_custom_text_de-DE.json @@ -1,16 +1,16 @@ { - "1a3": "Bitte entferne oder verbinde kein Zubehör und schalte nicht das System oder Spiel aus", + "1a3": "Bitte entferne oder verbinde kein Zubehör und schalte weder das System noch das Spiel aus", "1b5": "Während dieses Symbol angezeigt wird, entferne oder verbinde kein Zubehör und schalte nicht das System oder das Spiel aus", - "1100": "Nicht in einer Mission", + "1100": "Keine Mission", "1101": "Spielt eine Bonusmission", - "1102": "Blaster-Trainingskurs", + "1102": "Scatter Waffen-Training", "1103": "Blaster-Trainingskurs", "1104": "Vulcan-Fury-Trainingskurs", "1105": "Friedensstifter-Trainingskurs", "1106": "Onins Spiel", "1107": "Metal Head Matsch", "1200": "Anzeigemodus", - "1201": "Fenster", + "1201": "Fenstermodus", "1202": "Vollbild", "1203": "Randlos", "1204": "Automatisch", @@ -28,7 +28,7 @@ "1210": "Breite", "1211": "Höhe", "1212": "??????????", - "1213": "Jetzt spielt...", + "1213": "Wird gerade gespielt...", "1214": "Kein Titel", "1215": "Standard", "1216": "Morph-Waffe", diff --git a/game/assets/jak2/text/game_custom_text_fr-FR.json b/game/assets/jak2/text/game_custom_text_fr-FR.json index eecaa4a210..c8b453b235 100644 --- a/game/assets/jak2/text/game_custom_text_fr-FR.json +++ b/game/assets/jak2/text/game_custom_text_fr-FR.json @@ -1,12 +1,12 @@ { - "1a3": "Sauvegarde en cours. Veuillez à ne retirer ou n'insérer aucun périphérique, ni éteindre votre système ou arrêter le jeu.", - "1b5": "Lorsque cette icône est à l'écran, ne retirez ou n'insérez aucun périphérique, ni éteindre votre système ou arrêter le jeu.", - "1100": "Pas dans une mission", + "1a3": "Sauvegarde en cours. Veillez à ne retirer ou n'insérer aucun périphérique, ni éteindre votre système ou arrêter le jeu.", + "1b5": "Lorsque cette icône apparait, ne retirez ou n'insérez aucun périphérique, ni éteindre votre système ou arrêter le jeu.", + "1100": "Pas en mission", "1101": "Jouer une mission bonus", - "1102": "Pulvérisator (Entrainement)", - "1103": "Blaster (Entrainement)", - "1104": "Vulcanobarillet (Entrainement)", - "1105": "Pacificateur (Entrainement)", + "1102": "Pulvérisator (Entraînement)", + "1103": "Blaster (Entraînement)", + "1104": "Vulcanobarillet (Entraînement)", + "1105": "Pacificateur (Entraînement)", "1106": "Le jeu d'Onin", "1107": "Chasse-taupe", "1200": "Mode d'affichage", @@ -113,7 +113,7 @@ "1266": "Réduire la population d'Abriville de ~D", "1267": "Réduire le nombre de véhicules d'Abriville de ~D", "1268": "Chassez toutes les espèces de Metal Head", - "1269": "Use the JET-Board to break open containers", + "1269": "Utilisez le JET-Board pour casser les caisses", "126a": "Transport the Rift Rider while leaving Samos and Young Samos unscathed", "1280": "Options de caméra", "1281": "Horizontal (1ère Personne)", @@ -155,24 +155,24 @@ "12a5": "Bestiaire", "12a6": "Autres statistiques", "12a7": "Total Tué", - "12a8": "Killed by Jak", - "12a9": "Killed by Dark Jak", - "12aa": "Killed by Daxter", - "12ab": "Killed by Others", + "12a8": "Tué par Jak", + "12a9": "Tué par Dark Jak", + "12aa": "Tué par Daxter", + "12ab": "Tué par d'autres", "12ac": "Blaster", - "12ad": "Scatter Gun", - "12ae": "Vulcan Fury", - "12af": "Peacemaker", + "12ad": "Pulvérisator", + "12ae": "Vulcanobarillet", + "12af": "Pacificateur", "12b0": "JET-Board", - "12b1": "JET-Board Trick", - "12b2": "Titan Suit Punch", - "12b3": "Titan Suit Body", + "12b1": "Figure de JET-Board", + "12b2": "Coup de poing de la Combinaison Titan", + "12b3": "Combinaison Titan", "12b4": "Gunpod", - "12b5": "Punch", + "12b5": "Coup de poing", "12b6": "Flop", "12b7": "Uppercut", "12b8": "Spin", - "12b9": "Roll", + "12b9": "Rouler", "12bf": "Dark Bomb", "12c0": "Dark Blast", "12c3": "Grenagarde", @@ -230,7 +230,7 @@ "1334": "Actor Culling", "1335": "Force Environment Mapping", "1336": "Menu de pause rapide", - "1337": "PS2 LOD Distance", - "1338": "Off", + "1337": "Distance du niveau de détail PS2", + "1338": "Non", "1339": "Écran" } diff --git a/game/assets/jak2/text/game_custom_text_ja-JP.json b/game/assets/jak2/text/game_custom_text_ja-JP.json index 6e1aac7eb7..cb492cc6c1 100644 --- a/game/assets/jak2/text/game_custom_text_ja-JP.json +++ b/game/assets/jak2/text/game_custom_text_ja-JP.json @@ -1,46 +1,46 @@ { - "1a3": "しゅうへんききをぬいたり, さしたり, でんげんを きったりは しないでください", - "1b5": "このアイコンが あらわれているあいだ、しゅうへんききをぬいたり, さしたり, でんげんを きったりは しないでください", - "1100": "Not in a mission", - "1101": "Playing a bonus mission", - "1102": "Scatter Gun Training Course", - "1103": "Blaster Training Course", - "1104": "Vulcan Fury Training Course", - "1105": "Peace Maker Training Course", - "1106": "Onin Game", - "1107": "Metal Head Mash", - "1200": "スクリーンモード", + "1a3": "??機器をぬいたり, さしたり, 電源を切ったりは しないでください", + "1b5": "このアイコンが あらわれている間、??機器をぬいたり, さしたり, 電源を切ったりは しないでください", + "1100": "ミッションがありません", + "1101": "ボーナスミッションをプレイする", + "1102": "レッドバースト・ガン トレーニングコース", + "1103": "イエローブラスター・ガン トレーニングコース", + "1104": "ブルーバルカン・ガン トレーニングコース", + "1105": "ピースメーカー トレーニングコース", + "1106": "オニンゲーム", + "1107": "メタルたたき", + "1200": "ディスプレイモード", "1201": "ウィンドウ", "1202": "フルスクリーン", "1203": "ボーダレス", - "1204": "Automatic", - "1205": "Custom", + "1204": "自動", + "1205": "カスタム", "1206": "4x3 (PS2)", "1207": "16x9 (PS2)", - "1208": "Choose width and height ratio", - "1209": "Press to confirm and exit.", - "120a": "Press to confirm and exit.", - "120b": "Ratio must not be lower than 4x3!", - "120c": "BGMプレイヤー", - "120d": "すいちょくどうき", + "1208": "?と高さの??を選?", + "1209": " を押して??して終了します", + "120a": " を押して??して終了します", + "120b": "??は4x3より低くてはなりません!", + "120c": "ミュージックプレイヤー", + "120d": "????", "120e": "テキストの言語", - "120f": "OpenGOAL Secrets", - "1210": "Width", - "1211": "Height", + "120f": "OpenGOALシークレット", + "1210": "??", + "1211": "高さ", "1212": "??????????", "1213": "Now playing...", - "1214": "No Track", + "1214": "トラックなし", "1215": "デフォルト", "1216": "モーフィング・ガン", "1217": "ジェットボード", "1218": "タイタンスーツ", "1219": "ダークジャック", "121a": "乗り物", - "121b": "Danger", + "121b": "??", "121c": "None", - "121d": "Low", - "121e": "Medium", - "121f": "High", + "121d": "低", + "121e": "中", + "121f": "高", "1220": "Haven Exploration", "1221": "Guard Pursuit", "1222": "Ram Head Battle (Alt)", @@ -65,172 +65,172 @@ "1235": "Weapons Factory", "1236": "Arena Race", "1237": "Dead Town", - "1238": "Window Size", - "1239": "Select Window Size", - "123a": "かいぞうど", - "123b": "Select Game Resolution", - "123c": "Level Of Detail (はいけい)", - "123d": "Level Of Detail (ぜんけい)", - "123f": "じまくではなしてをひょうじする", + "1238": "ウィンドウサイズ", + "1239": "ウィンドウサイズを選?", + "123a": "解像?", + "123b": "ゲーム解像?を選?", + "123c": "???(バックグラウンド)", + "123d": "???(フォアグラウンド)", + "123f": "字幕にスピーカーを表示", "1240": "いつもしなく", - "1241": "Off-Screen", - "1242": "イツモ", - "1243": "ゲームのこくど", + "1241": "オフスクリーン", + "1242": "?時", + "1243": "ゲーム地?", "1244": "アメリカ(SCEA)", "1245": "ヨーロッパ(SCEE)", "1246": "にほん(SCEI)", "1247": "かんこく(SCEK)", "1248": "MSAA", "1249": "~DX", - "124a": "Controller LED Options", - "124b": "Show Player State", - "124c": "Show Amount of Health", + "124a": "コントローラーLEDオプション", + "124b": "プレイヤーステータスを表示", + "124c": "?力を表示", "124d": "オートセーブを無?にする", "124e": "オートセーブ オフ", "124f": "オートセーブをきっても よろしいでしょうか?", - "1250": "Turbo JET-Board in Haven City", - "1251": "Enemy Health Bars", - "1252": "Vehicle Health Bars", - "1253": "Vehicle Invulnerability", - "1254": "Statistics", - "1255": "Automatically Grab Collectables", - "1256": "Music Player", - "1257": "No Textures Mode", - "1258": "Fast Movies", - "1259": "Slow Movies", - "125a": "Fast Gameplay", - "125b": "Slow Gameplay", - "125c": "Instant Travel in Haven City", - "125d": "Precursor Orb Tracker", + "1250": "ヘイブンシティのターボジェットボード", + "1251": "敵の?力バー", + "1252": "??の?力バー", + "1253": "??の無敵", + "1254": "????", + "1255": "コレクションを自動?に??する", + "1256": "ミュージックプレイヤー", + "1257": "テクスチャなしモード", + "1258": "?いムービー", + "1259": "?いムービー", + "125a": "高?ゲームプレイ", + "125b": "低?ゲームプレイ", + "125c": "ヘイブンシティの???行", + "125d": "プリカーソルオーブトラッカー", "125e": "リアルタイムオブデイ", - "125f": "Pacified Haven City", - "1260": "JET-Board Trick Display", - "1261": "Bad Weather", - "1262": "Nice Weather", - "1263": "Vehicle Hijack Voice Lines", - "1264": "Locked", - "1265": "Hit all 3 valves and find Mar's Statue in \"~S\" in under ~D seconds", - "1266": "Reduce Haven City's population count by ~D", - "1267": "Reduce Haven City's vehicle count by ~D", - "1268": "Hunt every species of Metal Head", - "1269": "Use the JET-Board to break open containers", - "126a": "Transport the Rift Rider while leaving Samos and Young Samos unscathed", + "125f": "??なヘブンシティ", + "1260": "ジェットボードトリックディスプレイ", + "1261": "?い天?", + "1262": "?い天?", + "1263": "??ハイジャック??ライン", + "1264": "ロック中", + "1265": "3つのバルブをすべてヒットさせ、~D秒以内に?~S?のマールの像を見つける", + "1266": "ヘブンシティの??を~D人?らす", + "1267": "ヘブンシティの??を~D台?らす", + "1268": "??な種?のメタルヘッドを?る", + "1269": "ジェットボードを使って開いているコンテナを破壊する", + "126a": "セイジィと?いセイジィを無?のままリフト・ライダーまで輸送する", "1280": "カメラ オプション", - "1281": "Left/Right (1st Person)", - "1282": "Up/Down (1st Person)", - "1283": "Left/Right (3rd Person)", - "1284": "Up/Down (3rd Person)", - "1285": "Reset to Default", + "1281": "左/右 (1人?)", + "1282": "上/下(1人?)", + "1283": "左/右 (3人?)", + "1284": "上/下(3人?)", + "1285": "デフォルトに戻す", "1286": "ノーマル", "1287": "リバース", "1288": "パーティクル カリング", "1289": "Discordリッチプレゼンス", - "128a": "Default", - "128b": "Low", - "128c": "High", - "128d": "Credits", + "128a": "デフォルト", + "128b": "低", + "128c": "高", + "128d": "クレジット", "128e": "フレームレート", - "128f": "そのほか", + "128f": "その?", "1290": "スピードラン モード", - "1291": "Input Options", - "1292": "リセット デフォルト", - "1293": "コントローラオプション", - "1294": "コントローラをせんたくする", - "1295": "Analog Deadzone", - "1296": "Ignore If Window Unfocused", - "1297": "コントローラのLedでたい力をひょうじする", - "1298": "Use LED for Other States", - "1299": "Enable Keyboard", - "129a": "Enable Mouse", + "1291": "入力??", + "1292": "????に戻す", + "1293": "コントローラーオプション", + "1294": "コントローラーを選?する", + "1295": "アナログデッドゾーン", + "1296": "ウィンドウのフォーカスが外れているときは無?する", + "1297": "コントローラーのLEDで?力を表示する", + "1298": "LEDを?の??で使用", + "1299": "キーボードを??にする", + "129a": "マウスを??にする", "129b": "マウスオプション", - "129c": "Track Camera", - "129d": "Horizontal Sensitivity", - "129e": "Vertical Sensitivity", - "129f": "Player Movement", - "12a0": "Object Shadows", - "12a1": "Normal", - "12a2": "Extended", - "12a3": "No valid resolutions found.", - "12a4": "Automatic", - "12a5": "Bestiary", - "12a6": "Other Statistics", - "12a7": "Total Killed", - "12a8": "Killed by Jak", - "12a9": "Killed by Dark Jak", - "12aa": "Killed by Daxter", - "12ab": "Killed by Others", - "12ac": "Blaster", - "12ad": "Scatter Gun", - "12ae": "Vulcan Fury", - "12af": "Peacemaker", - "12b0": "JET-Board", - "12b1": "JET-Board Trick", - "12b2": "Titan Suit Punch", - "12b3": "Titan Suit Body", - "12b4": "Gunpod", - "12b5": "Punch", - "12b6": "Flop", - "12b7": "Uppercut", - "12b8": "Spin", - "12b9": "Roll", - "12bf": "Dark Bomb", - "12c0": "Dark Blast", - "12c3": "Krimzon Guard", - "12c4": "Sig", - "12c5": "Ashelin", - "12c6": "Jinx", - "12c7": "Grim", - "12c8": "Mog", - "12c9": "Metal Heads", - "12ca": "Other Friends", - "12cb": "Other Enemies", - "1300": "Auto Hide Cursor", - "1301": "Reassign Binds", + "129c": "?跡カメラ", + "129d": "水?感?", + "129e": "??感?", + "129f": "プレイヤーの?動", + "12a0": "オブジェクトの?", + "12a1": "ノーマル", + "12a2": "??", + "12a3": "??な解像?が見つかりませんでした", + "12a4": "自動", + "12a5": "ベスティアリー", + "12a6": "その?の????", + "12a7": "?キル数", + "12a8": "ジャックに倒された", + "12a9": "ダークジャックに倒された", + "12aa": "ダクスターに倒された", + "12ab": "?者に倒された", + "12ac": "イエローブラスター", + "12ad": "レッドバースト", + "12ae": "ブルーバルカン", + "12af": "ピースメーカー", + "12b0": "ジェットボード", + "12b1": "ジェットボードトリック", + "12b2": "タイタンスーツのパンチ", + "12b3": "タイタンスーツのボディ", + "12b4": "砲撃台", + "12b5": "パンチ", + "12b6": "フロップ", + "12b7": "アッパーカット", + "12b8": "スピン", + "12b9": "ロール", + "12bf": "ダークボム", + "12c0": "ダークブラスト", + "12c3": "クリムゾンガード", + "12c4": "ジーグ", + "12c5": "アシュリン", + "12c6": "ジンクス", + "12c7": "グリム", + "12c8": "モグ", + "12c9": "メタルヘッド", + "12ca": "?の友?", + "12cb": "?の敵", + "1300": "自動でカーソルを?す", + "1301": "バインドの??り?て", "1302": "コントローラのバインド", "1303": "キーボードのバインド", "1304": "マウスのバインド", - "1305": "No Options", - "1306": "Waiting", - "1307": "みけってい", - "1308": "?られていない", - "1309": "High-Resolution Sky", - "130a": "Fast Airlocks and Doors", - "130b": "Fast Elevators", - "130c": "Speedrun", + "1305": "オプションなし", + "1306": "?機中", + "1307": "???", + "1308": "??", + "1309": "高解像?の空", + "130a": "高?エアロックとドア", + "130b": "高?エレベーター", + "130c": "スピードラン", "130d": "Any%", "130e": "Any% - Hoverless", "130f": "All Missions", "1310": "100%", "1311": "Any% - All Orbs", "1312": "Any% - Hero Mode", - "1313": "Local Time", - "1314": "Warning!", - "1315": "This setting is highly experimental. When not played at 60 frames per second, visual and gameplay issues may arise as a result.", - "1316": "Local Score", + "1313": "ローカルタイム", + "1314": "警告!", + "1315": "この??は??に???なものです.?秒60フレームで??されていない場合、???な??やゲームプレイの??が発?する?能性があります.", + "1316": "ローカルスコア", "1320": "なし", "1321": "スピン", "1322": "ブースト", "1323": "フリップ", "1324": "レールグラインド", "1325": "レールジャンプ", - "1326": "Nosegrab", - "1327": "Method", + "1326": "ノーズグラブ", + "1327": "メソッド", "1328": "ボードスピン", "1329": "ボードフリップ", - "132a": "Noseflip", + "132a": "ノーズフリップ", "132b": "キックフリップ", "132c": "ジャンプ", - "132d": "Duck Jump", - "132e": "Quick Jump", + "132d": "ダックジャンプ", + "132e": "クイックジャンプ", "132f": "ダークジャック", - "1330": "Dark Bomb", - "1331": "Dark Blast", - "1332": "Dark Giant", - "1333": "PS2 Options", - "1334": "Actor Culling", - "1335": "Force Environment Mapping", - "1336": "Fast Progress Menu", - "1337": "PS2 LOD Distance", - "1338": "Off", - "1339": "Display" + "1330": "ダークボム", + "1331": "ダークブラスト", + "1332": "ダークジャイアント", + "1333": "PS2オプション", + "1334": "アクターカリング", + "1335": "?制?に??マッピング", + "1336": "高?進行??メニュー", + "1337": "PS2 LOD ??", + "1338": "オフ", + "1339": "ディスプレイ" } diff --git a/game/assets/sdl_controller_db.txt b/game/assets/sdl_controller_db.txt index 595f8ace79..092bd293a3 100644 --- a/game/assets/sdl_controller_db.txt +++ b/game/assets/sdl_controller_db.txt @@ -484,7 +484,7 @@ 03000000f0250000c183000000000000,PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d9040000160f000000000000,PlayStation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000004c0500003713000000000000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, -03000000d620000011a7000000000000,PowerA Core Plus GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, +03000000d620000011a7000000000000,PowerA Core Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000dd62000015a7000000000000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d620000012a7000000000000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000dd62000016a7000000000000,PowerA Fusion Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, @@ -1081,7 +1081,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X, -030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, +030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b10,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Mac OS X, 030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, @@ -1468,7 +1468,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 030000004c0500003713000011010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000c62400000053000000010000,PowerA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c62400003a54000001010000,PowerA 1428124-01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, -03000000d620000011a7000011010000,PowerA Core Plus Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, +03000000d620000011a7000011010000,PowerA Core Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000dd62000015a7000011010000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000012a7000011010000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d62000000140000001010000,PowerA Fusion Pro 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, diff --git a/game/common/dgo_rpc_types.h b/game/common/dgo_rpc_types.h index 14e7523e33..3879bc7689 100644 --- a/game/common/dgo_rpc_types.h +++ b/game/common/dgo_rpc_types.h @@ -31,19 +31,3 @@ struct RPC_Dgo_Cmd { // a buffer. uint8_t pad[32]; }; - -namespace jak3 { -struct RPC_Dgo_Cmd { - uint16_t rsvd; - uint16_t result; - uint32_t buffer1; - uint32_t buffer2; - uint32_t buffer_heap_top; - char name[16]; - uint16_t cgo_id; - uint8_t pad[30]; -}; -static_assert(sizeof(RPC_Dgo_Cmd) == 0x40); -} // namespace jak3 - -static_assert(sizeof(RPC_Dgo_Cmd) == sizeof(jak3::RPC_Dgo_Cmd)); diff --git a/game/graphics/opengl_renderer/BucketRenderer.cpp b/game/graphics/opengl_renderer/BucketRenderer.cpp index b6f92a3075..db4a2c0d44 100644 --- a/game/graphics/opengl_renderer/BucketRenderer.cpp +++ b/game/graphics/opengl_renderer/BucketRenderer.cpp @@ -3,6 +3,10 @@ #include "fmt/core.h" #include "third-party/imgui/imgui.h" +std::string BucketRenderer::name() const { + return m_name; +} + std::string BucketRenderer::name_and_id() const { return fmt::format("[{:2d}] {}", (int)m_my_id, m_name); } diff --git a/game/graphics/opengl_renderer/BucketRenderer.h b/game/graphics/opengl_renderer/BucketRenderer.h index 05ec7cf726..207f003180 100644 --- a/game/graphics/opengl_renderer/BucketRenderer.h +++ b/game/graphics/opengl_renderer/BucketRenderer.h @@ -26,8 +26,8 @@ class EyeRenderer; struct SharedRenderState { explicit SharedRenderState(std::shared_ptr _texture_pool, std::shared_ptr _loader, - GameVersion version) - : shaders(version), texture_pool(_texture_pool), loader(_loader) {} + GameVersion _version) + : shaders(_version), texture_pool(_texture_pool), loader(_loader), version(_version) {} ShaderLibrary shaders; std::shared_ptr texture_pool; std::shared_ptr loader; @@ -98,6 +98,7 @@ class BucketRenderer { virtual void render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) = 0; + std::string name() const; std::string name_and_id() const; virtual ~BucketRenderer() = default; bool& enabled() { return m_enabled; } @@ -158,4 +159,4 @@ class PrintRenderer : public BucketRenderer { void render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) override; bool empty() const override { return true; } void draw_debug_window() override {} -}; \ No newline at end of file +}; diff --git a/game/graphics/opengl_renderer/DirectRenderer.cpp b/game/graphics/opengl_renderer/DirectRenderer.cpp index e8e4ae290f..d92e5a81ad 100644 --- a/game/graphics/opengl_renderer/DirectRenderer.cpp +++ b/game/graphics/opengl_renderer/DirectRenderer.cpp @@ -579,6 +579,7 @@ u32 get_direct_qwc_or_nop(const VifCode& code) { return code.immediate; } default: + printf("expected direct, got %s\n", code.print().c_str()); ASSERT(false); } } diff --git a/game/graphics/opengl_renderer/EyeRenderer.cpp b/game/graphics/opengl_renderer/EyeRenderer.cpp index 10d74cd9ab..c4cca5c2e7 100644 --- a/game/graphics/opengl_renderer/EyeRenderer.cpp +++ b/game/graphics/opengl_renderer/EyeRenderer.cpp @@ -186,7 +186,7 @@ EyeRenderer::SpriteInfo decode_sprite(const DmaTransfer& dma) { memcpy(&result.a, dma.data + 16 + 12, 1); // a // uv0 - memcpy(&result.uv0[0], &dma.data[32], 8); + memcpy(&result.uv0, &dma.data[32], 8); // xyz0 memcpy(&result.xyz0[0], &dma.data[48], 12); @@ -236,8 +236,11 @@ std::vector EyeRenderer::get_draws(DmaFollower& dma bool using_64 = false; { auto draw0 = read_eye_draw(dma); - ASSERT(draw0.sprite.uv0[0] == 0); - ASSERT(draw0.sprite.uv0[1] == 0); + // ASSERT(draw0.sprite.uv0[0] == 0); + // ASSERT(draw0.sprite.uv0[1] == 0); + // printf("hashed name is 0x%x 0x%x\n", draw0.sprite.uv0[0], draw0.sprite.uv0[1]); + l_draw.fnv_name_hash = draw0.sprite.uv0; + r_draw.fnv_name_hash = draw0.sprite.uv0; ASSERT(draw0.sprite.uv1[0] == 0); ASSERT(draw0.sprite.uv1[1] == 0); if (draw0.scissor.y1 - draw0.scissor.y0 == 63) { @@ -509,7 +512,9 @@ void EyeRenderer::run_gpu(const std::vector& draws, buffer_idx = 0; for (size_t draw_idx = 0; draw_idx < draws.size(); draw_idx++) { const auto& draw = draws[draw_idx]; - const auto& out_tex = m_gpu_eye_textures[draw.tex_slot()]; + auto& out_tex = m_gpu_eye_textures[draw.tex_slot()]; + out_tex.fnv_name_hash = draw.fnv_name_hash; + out_tex.lr = draw.lr; // first, the clear float clear[4] = {0, 0, 0, 0}; @@ -574,15 +579,30 @@ std::optional EyeRenderer::lookup_eye_texture(u8 eye_id) { } } +std::optional EyeRenderer::lookup_eye_texture_hash(u64 hash, bool lr) { + for (auto& slot : m_gpu_eye_textures) { + if (slot.fnv_name_hash == hash && slot.lr == lr) { + auto* gpu_tex = slot.gpu_tex; + if (gpu_tex) { + return gpu_tex->gpu_textures.at(0).gl; + } else { + fmt::print("lookup eye failed for {} (1)\n", hash); + return {}; + } + } + } + fmt::print("lookup eye failed for {} (2)\n", hash); + return {}; +} + ////////////////////// // DMA Decode ////////////////////// std::string EyeRenderer::SpriteInfo::print() const { std::string result; - result += - fmt::format("a: {:x} uv: ({}, {}), ({}, {}) xyz: ({}, {}, {}), ({}, {}, {})", a, uv0[0], - uv0[1], uv1[0], uv1[1], xyz0[0], xyz0[1], xyz0[2], xyz1[0], xyz1[1], xyz1[2]); + result += fmt::format("a: {:x} uv: ({}), ({}, {}) xyz: ({}, {}, {}), ({}, {}, {})", a, uv0, + uv1[0], uv1[1], xyz0[0], xyz0[1], xyz0[2], xyz1[0], xyz1[1], xyz1[2]); return result; } diff --git a/game/graphics/opengl_renderer/EyeRenderer.h b/game/graphics/opengl_renderer/EyeRenderer.h index b9c24c504d..9a1d151826 100644 --- a/game/graphics/opengl_renderer/EyeRenderer.h +++ b/game/graphics/opengl_renderer/EyeRenderer.h @@ -22,10 +22,11 @@ class EyeRenderer : public BucketRenderer { void handle_eye_dma2(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof); std::optional lookup_eye_texture(u8 eye_id); + std::optional lookup_eye_texture_hash(u64 hash, bool lr); struct SpriteInfo { u8 a; - u32 uv0[2]; + u64 uv0; // stores hashed name of merc-ctrl that reads this eye. u32 uv1[2]; u32 xyz0[3]; u32 xyz1[3]; @@ -53,6 +54,8 @@ class EyeRenderer : public BucketRenderer { GpuTexture* gpu_tex = nullptr; u32 tbp; FramebufferTexturePair fb; + u64 fnv_name_hash = 0; + bool lr = false; // note: eye texture increased to 128x128 (originally 32x32) here. GpuEyeTex() : fb(128, 128, GL_UNSIGNED_INT_8_8_8_8_REV) {} @@ -65,6 +68,7 @@ class EyeRenderer : public BucketRenderer { GLuint m_gl_vertex_buffer; struct SingleEyeDraws { + u64 fnv_name_hash = 0; int lr; int pair; bool using_64 = false; diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.cpp b/game/graphics/opengl_renderer/OpenGLRenderer.cpp index 51b477b714..7d88d9c2ce 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.cpp +++ b/game/graphics/opengl_renderer/OpenGLRenderer.cpp @@ -28,6 +28,7 @@ #include "game/graphics/pipelines/opengl.h" #include "third-party/imgui/imgui.h" +#include "third-party/imgui/imgui_stdlib.h" // for the vif callback #include "game/kernel/common/kmachine.h" @@ -36,6 +37,7 @@ #ifdef _WIN32 #include #endif +#include "common/util/string_util.h" namespace { std::string g_current_renderer; @@ -267,6 +269,11 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS, BucketId::GMERC_L1_PRIS, i), m_generic2, Generic2::Mode::NORMAL); + init_bucket_renderer( + fmt::format("gmerc2-l{}-pris", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC2_L0_PRIS, BucketId::GMERC2_L1_PRIS, i), m_generic2, + Generic2::Mode::PRIM); + init_bucket_renderer( fmt::format("merc-l{}-pris2", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS2, BucketId::MERC_L1_PRIS2, i), m_merc2); @@ -274,6 +281,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { fmt::format("gmerc-l{}-pris2", i), BucketCategory::GENERIC, GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS2, BucketId::GMERC_L1_PRIS2, i), m_generic2, Generic2::Mode::NORMAL); + init_bucket_renderer( + fmt::format("gmerc2-l{}-pris2", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC2_L0_PRIS2, BucketId::GMERC2_L1_PRIS2, i), + m_generic2, Generic2::Mode::PRIM); } // 401 @@ -285,6 +296,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { BucketId::GMERC_LCOM_PRIS, m_generic2, Generic2::Mode::NORMAL); + init_bucket_renderer("gmerc2-lcom-pris", BucketCategory::GENERIC, + BucketId::GMERC2_LCOM_PRIS, m_generic2, + Generic2::Mode::PRIM); + // 461 init_bucket_renderer("tex-lcom-sky-post", BucketCategory::TEX, BucketId::TEX_LCOM_SKY_POST, m_texture_animator); @@ -310,6 +325,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { fmt::format("tfrag-l{}-water", i), BucketCategory::TFRAG, GET_BUCKET_ID_FOR_LIST(BucketId::TFRAG_L0_WATER, BucketId::TFRAG_L1_WATER, i), std::vector{tfrag3::TFragmentTreeKind::WATER}, false, i, anim_slot_array()); + init_bucket_renderer( + fmt::format("gmerc2-l{}-water", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC2_L0_WATER, BucketId::GMERC2_L1_WATER, i), + m_generic2, Generic2::Mode::PRIM); } // 563 @@ -317,11 +336,20 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { BucketId::TEX_LCOM_WATER, m_texture_animator); init_bucket_renderer("merc-lcom-water", BucketCategory::MERC, BucketId::MERC_LCOM_WATER, m_merc2); + init_bucket_renderer("generic2-lcom-water", BucketCategory::GENERIC, + BucketId::GMERC2_LCOM_WATER, m_generic2, + Generic2::Mode::PRIM); // 568 init_bucket_renderer("tex-sprite", BucketCategory::TEX, BucketId::TEX_SPRITE, m_texture_animator); + init_bucket_renderer("generic-sprite-1", BucketCategory::GENERIC, + BucketId::GENERIC_SPRITE_1, m_generic2, + Generic2::Mode::PRIM); init_bucket_renderer("particles", BucketCategory::SPRITE, BucketId::PARTICLES); + init_bucket_renderer("generic-sprite-2", BucketCategory::GENERIC, + BucketId::GENERIC_SPRITE_2, m_generic2, + Generic2::Mode::PRIM); init_bucket_renderer("generic-sprite-3", BucketCategory::OTHER, BucketId::GENERIC_SPRITE_3, m_generic2, Generic2::Mode::LIGHTNING); @@ -1082,8 +1110,13 @@ void OpenGLRenderer::draw_renderer_selection_window() { ImGui::TreePop(); } + ImGui::InputText("Renderer Filter", &m_renderer_filter); + for (size_t i = 0; i < m_bucket_renderers.size(); i++) { auto renderer = m_bucket_renderers[i].get(); + if (!m_renderer_filter.empty() && !str_util::contains(renderer->name(), m_renderer_filter)) { + continue; + } if (renderer && !renderer->empty()) { ImGui::PushID(i); if (ImGui::TreeNode(renderer->name_and_id().c_str())) { diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.h b/game/graphics/opengl_renderer/OpenGLRenderer.h index bf2e165db4..9f0faad591 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.h +++ b/game/graphics/opengl_renderer/OpenGLRenderer.h @@ -123,6 +123,7 @@ class OpenGLRenderer { float m_last_pmode_alp = 1.; bool m_enable_fast_blackout_loads = true; + std::string m_renderer_filter = ""; struct FboState { struct { diff --git a/game/graphics/opengl_renderer/TextureAnimator.cpp b/game/graphics/opengl_renderer/TextureAnimator.cpp index 355391bfc7..9025a6daae 100644 --- a/game/graphics/opengl_renderer/TextureAnimator.cpp +++ b/game/graphics/opengl_renderer/TextureAnimator.cpp @@ -782,6 +782,7 @@ enum class PcTextureAnimCodesJak3 : u16 { SET_SHADER = 17, DRAW = 18, DARKJAK = 22, + DARKJAK_HIGHRES = 23, SKULL_GEM = 27, DEFAULT_WATER = 28, DEFAULT_WARP = 29, @@ -1218,6 +1219,10 @@ void TextureAnimator::handle_texture_anim_data(DmaFollower& dma, auto p = scoped_prof("darkjak"); run_clut_blender_group(tf, m_darkjak_clut_blender_idx, frame_idx); } break; + case PcTextureAnimCodesJak3::DARKJAK_HIGHRES: { + auto p = scoped_prof("darkjak-highres"); + run_clut_blender_group(tf, m_darkjak_highres_clut_blender_idx, frame_idx); + } break; case PcTextureAnimCodesJak3::SKULL_GEM: case PcTextureAnimCodesJak3::DEFAULT_WATER: case PcTextureAnimCodesJak3::DEFAULT_WARP: diff --git a/game/graphics/opengl_renderer/TextureAnimator.h b/game/graphics/opengl_renderer/TextureAnimator.h index 1171d88033..114b85a32a 100644 --- a/game/graphics/opengl_renderer/TextureAnimator.h +++ b/game/graphics/opengl_renderer/TextureAnimator.h @@ -484,6 +484,7 @@ class TextureAnimator { int m_templex_water_anim_array_idx = -1; int m_volcanoa_anim_array_idx = -1; int m_deshover_anim_array_idx = -1; + int m_darkjak_highres_clut_blender_idx = -1; std::vector m_fixed_anim_arrays; diff --git a/game/graphics/opengl_renderer/TextureAnimatorDefs.cpp b/game/graphics/opengl_renderer/TextureAnimatorDefs.cpp index 9117eb7aa0..26f2c91a04 100644 --- a/game/graphics/opengl_renderer/TextureAnimatorDefs.cpp +++ b/game/graphics/opengl_renderer/TextureAnimatorDefs.cpp @@ -2,7 +2,26 @@ void TextureAnimator::setup_texture_anims_jak3() { m_darkjak_clut_blender_idx = create_clut_blender_group( - {"jakc-arm", "jakc-eyebrow", "jakc-face", "jakc-finger", "jakc-hair"}, "-norm", "-dark", {}); + { + "jakc-arm", + "jakc-eyebrow", + "jakc-face", + "jakc-finger", + "jakc-hair", + }, + "-norm", "-dark", {}); + + m_darkjak_highres_clut_blender_idx = create_clut_blender_group( + { + "jakchires-arm", + "jakchires-eye", + "jakchires-eyebrow", + "jakchires-eyelid", + "jakchires-facelft", + "jakchires-facert", + "jakchires-hair", + }, + "-norm", "-dark", "MHCTYCST.DGO"); // default-water { diff --git a/game/graphics/opengl_renderer/TextureUploadHandler.cpp b/game/graphics/opengl_renderer/TextureUploadHandler.cpp index 07101b757e..2b619709bf 100644 --- a/game/graphics/opengl_renderer/TextureUploadHandler.cpp +++ b/game/graphics/opengl_renderer/TextureUploadHandler.cpp @@ -119,3 +119,7 @@ void TextureUploadHandler::draw_debug_window() { m_direct->draw_debug_window(); } } + +bool TextureUploadHandler::empty() const { + return m_upload_count == 0; +} \ No newline at end of file diff --git a/game/graphics/opengl_renderer/TextureUploadHandler.h b/game/graphics/opengl_renderer/TextureUploadHandler.h index 7c64206e83..67aa854d99 100644 --- a/game/graphics/opengl_renderer/TextureUploadHandler.h +++ b/game/graphics/opengl_renderer/TextureUploadHandler.h @@ -18,6 +18,7 @@ class TextureUploadHandler : public BucketRenderer { bool add_direct = false); void render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) override; void draw_debug_window() override; + bool empty() const override; private: struct TextureUpload { diff --git a/game/graphics/opengl_renderer/background/Hfrag.cpp b/game/graphics/opengl_renderer/background/Hfrag.cpp index cd3cc68625..3fb68a2931 100644 --- a/game/graphics/opengl_renderer/background/Hfrag.cpp +++ b/game/graphics/opengl_renderer/background/Hfrag.cpp @@ -129,8 +129,8 @@ Hfrag::HfragLevel* Hfrag::get_hfrag_level(const std::string& name, // first, see if this level is loaded. If not, there's nothing we can do. auto lev_data = render_state->loader->get_tfrag3_level(name); if (!lev_data) { - printf("[hfrag] can't display %s because it's not loaded.\n", name.c_str()); - render_state->loader->debug_print_loaded_levels(); + // printf("[hfrag] can't display %s because it's not loaded.\n", name.c_str()); + // render_state->loader->debug_print_loaded_levels(); return nullptr; } diff --git a/game/graphics/opengl_renderer/foreground/Generic2.cpp b/game/graphics/opengl_renderer/foreground/Generic2.cpp index 2146b43c5c..6f0a67412a 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2.cpp @@ -70,11 +70,16 @@ void Generic2::render_in_mode(DmaFollower& dma, case Mode::LIGHTNING: process_dma_lightning(dma, render_state->next_bucket); break; + case Mode::PRIM: + process_dma_prim(dma, render_state->next_bucket); + break; default: ASSERT_NOT_REACHED(); } } + m_empty = m_next_free_vert == 0; + { // the next pass is to look at all of that data, and figure out the best order to draw it // using OpenGL @@ -84,6 +89,7 @@ void Generic2::render_in_mode(DmaFollower& dma, setup_draws(true, true); break; case Mode::LIGHTNING: + case Mode::PRIM: setup_draws(false, true); break; case Mode::WARP: diff --git a/game/graphics/opengl_renderer/foreground/Generic2.h b/game/graphics/opengl_renderer/foreground/Generic2.h index fe3a06abe0..510abb0ed2 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2.h +++ b/game/graphics/opengl_renderer/foreground/Generic2.h @@ -11,7 +11,7 @@ class Generic2 { u32 num_buckets = 800); ~Generic2(); - enum class Mode { NORMAL, LIGHTNING, WARP }; + enum class Mode { NORMAL, LIGHTNING, WARP, PRIM }; void render_in_mode(DmaFollower& dma, SharedRenderState* render_state, @@ -19,6 +19,7 @@ class Generic2 { Mode mode); void draw_debug_window(); + bool empty() { return m_empty; } struct Vertex { math::Vector xyz; @@ -42,6 +43,7 @@ class Generic2 { void process_dma_jak1(DmaFollower& dma, u32 next_bucket); void process_dma_lightning(DmaFollower& dma, u32 next_bucket); void process_dma_jak2(DmaFollower& dma, u32 next_bucket); + void process_dma_prim(DmaFollower& dma, u32 next_bucket); void setup_draws(bool enable_at, bool default_fog); void do_draws(SharedRenderState* render_state, ScopedProfilerNode& prof); void do_draws_for_alpha(SharedRenderState* render_state, @@ -84,6 +86,8 @@ class Generic2 { float hud_mat_23, hud_mat_32, hud_mat_33; bool uses_hud = false; + bool uses_full_matrix = false; + math::Vector4f full_matrix[4]; } m_drawing_config; struct GsState { @@ -198,8 +202,10 @@ class Generic2 { GLuint vertex_buffer; GLuint index_buffer; GLuint alpha_reject, color_mult, fog_color, scale, mat_23, mat_32, mat_33, fog_consts, - hvdf_offset; + hvdf_offset, use_full_matrix, full_matrix; GLuint gfx_hack_no_tex; GLuint warp_sample_mode; } m_ogl; + + bool m_empty = false; }; diff --git a/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.cpp b/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.cpp index 57ceae2af5..ded07113c7 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.cpp @@ -22,4 +22,9 @@ void Generic2BucketRenderer::render(DmaFollower& dma, return; } m_generic->render_in_mode(dma, render_state, prof, m_mode); + m_empty = m_generic->empty(); +} + +bool Generic2BucketRenderer::empty() const { + return m_empty; } diff --git a/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.h b/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.h index 839111ec82..e9c9038d91 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.h +++ b/game/graphics/opengl_renderer/foreground/Generic2BucketRenderer.h @@ -11,8 +11,10 @@ class Generic2BucketRenderer : public BucketRenderer { Generic2::Mode mode); void render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) override; void draw_debug_window() override; + bool empty() const override; private: std::shared_ptr m_generic; Generic2::Mode m_mode; + bool m_empty = false; }; diff --git a/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp b/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp index d4f52eed5e..b4ae86df2e 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp @@ -190,6 +190,16 @@ void Generic2::determine_draw_modes(bool enable_at, bool default_fog) { current_mode.set_alpha_fail(reg.afail()); current_mode.set_zt(reg.zte()); current_mode.set_depth_test(reg.ztest()); + + // detect a strange way of disabling z writes by light-trail. + // we don't actually handle alpha_fail later on in Direct - it doesn't map well to modern + // graphics and would require a draw call per primitive. + if (current_mode.get_alpha_fail() == GsTest::AlphaFail::FB_ONLY && + current_mode.get_aref() == 0x80 && + current_mode.get_alpha_test() == DrawMode::AlphaTest::GEQUAL) { + current_mode.set_alpha_test(DrawMode::AlphaTest::ALWAYS); + current_mode.disable_depth_write(); + } } m_adgifs[i].mode = current_mode; @@ -271,6 +281,10 @@ void Generic2::process_matrices() { bool found_proj_matrix = false; std::array projection_matrix, hud_matrix; for (u32 i = 0; i < m_next_free_frag; i++) { + if (m_drawing_config.uses_full_matrix) { + memcpy(&m_drawing_config.full_matrix, m_fragments[i].header, 64); + break; + } float mat_33; memcpy(&mat_33, m_fragments[i].header + 15 * sizeof(float), sizeof(float)); if (mat_33 == 0) { diff --git a/game/graphics/opengl_renderer/foreground/Generic2_DMA.cpp b/game/graphics/opengl_renderer/foreground/Generic2_DMA.cpp index 02d7d59277..45f8b662e3 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2_DMA.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2_DMA.cpp @@ -550,6 +550,83 @@ void unpack_vertex(Generic2::Vertex* out, const u8* in, int count) { } } +void Generic2::process_dma_prim(DmaFollower& dma, u32 next_bucket) { + reset_buffers(); + auto first_data = dma.read_and_advance(); + + // handle the stuff at the beginning. + // if the engine didn't run the generic renderer setup function, this bucket will end here. + if (is_nop_zero(first_data) && next_bucket == dma.current_tag_offset()) { + return; + } + + // MARK NOP (for profiling) + auto v0k = first_data.vifcode0().kind; + ASSERT((v0k == VifCode::Kind::MARK || v0k == VifCode::Kind::NOP) && + first_data.vifcode1().kind == VifCode::Kind::NOP); + + // NOP DIRECT (set up GS, from generic setup) + auto direct_setup = dma.read_and_advance(); + ASSERT(direct_setup.size_bytes == 32 && direct_setup.vifcode0().kind == VifCode::Kind::NOP && + direct_setup.vifcode1().kind == VifCode::Kind::DIRECT); + m_drawing_config.zmsk = false; + m_drawing_config.uses_full_matrix = true; + + // STYCYCL to set up generic VU1 constants + auto constants = dma.read_and_advance(); + ASSERT(constants.size_bytes == 128); + ASSERT(constants.vifcode0().kind == VifCode::Kind::STCYCL); + ASSERT(constants.vifcode1().kind == VifCode::Kind::UNPACK_V4_32); + memcpy(&m_drawing_config.pfog0, constants.data + 0, 4); + memcpy(&m_drawing_config.fog_min, constants.data + 4, 4); + memcpy(&m_drawing_config.fog_max, constants.data + 8, 4); + memcpy(m_drawing_config.hvdf_offset.data(), constants.data + 32, 16); + + // 32: MSCALF 0x0 STMOD 0b0 init generic VU1 + auto mscalf = dma.read_and_advance(); + ASSERT(mscalf.vifcode0().kind == VifCode::Kind::MSCALF && + mscalf.vifcode1().kind == VifCode::Kind::STMOD); + + // 0: NOP NOP + // auto another_nop = dma.read_and_advance(); + // ASSERT(is_nop_zero(another_nop)); + + while (dma.current_tag_offset() != next_bucket) { + auto up1 = dma.read_and_advance(); + while (up1.vifcode0().kind == VifCode::Kind::NOP && up1.vifcode1().kind == VifCode::Kind::NOP) { + up1 = dma.read_and_advance(); + } + if (up1.vifcode0().kind == VifCode::Kind::FLUSHA) { + while (dma.current_tag_offset() != next_bucket) { + auto it = dma.read_and_advance(); + } + break; + } + auto up2 = dma.read_and_advance(); + auto call = dma.read_and_advance(); + + // up1 is a 12 qw upload for control: + // up2 is vertex upload. + + auto* frag = &next_frag(); + ASSERT(up1.size_bytes == Generic2::FRAG_HEADER_SIZE + 5 * 16); // header + adgif + memcpy(frag->header, up1.data, Generic2::FRAG_HEADER_SIZE); + frag->adgif_idx = m_next_free_adgif; + frag->adgif_count = 1; + frag->mscal_addr = 6; + frag->uses_hud = false; + auto* adgif = &next_adgif(); + memcpy(&adgif->data, up1.data + Generic2::FRAG_HEADER_SIZE, sizeof(AdGifData)); + // (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 + // (gif-reg-id xyzf2)) + int num_vtx = up2.size_bytes / (16 * 3); + frag->vtx_count = num_vtx; + frag->vtx_idx = m_next_free_vert; + alloc_vtx(num_vtx); + unpack_vertex(&m_verts[frag->vtx_idx], up2.data, num_vtx); + } +} + void Generic2::process_dma_lightning(DmaFollower& dma, u32 next_bucket) { reset_buffers(); auto first_data = dma.read_and_advance(); diff --git a/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp b/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp index c90f0dd3c8..434ee92f50 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp @@ -74,6 +74,8 @@ void Generic2::opengl_setup(ShaderLibrary& shaders) { m_ogl.hvdf_offset = glGetUniformLocation(id, "hvdf_offset"); m_ogl.gfx_hack_no_tex = glGetUniformLocation(id, "gfx_hack_no_tex"); m_ogl.warp_sample_mode = glGetUniformLocation(id, "warp_sample_mode"); + m_ogl.use_full_matrix = glGetUniformLocation(id, "use_full_matrix"); + m_ogl.full_matrix = glGetUniformLocation(id, "full_matrix"); } void Generic2::opengl_cleanup() { @@ -307,6 +309,12 @@ void Generic2::do_draws(SharedRenderState* render_state, ScopedProfilerNode& pro glPrimitiveRestartIndex(UINT32_MAX); opengl_bind_and_setup_proj(render_state); + if (m_drawing_config.uses_full_matrix) { + glUniform1i(m_ogl.use_full_matrix, 1); + glUniformMatrix4fv(m_ogl.full_matrix, 1, GL_FALSE, m_drawing_config.full_matrix[0].data()); + } else { + glUniform1i(m_ogl.use_full_matrix, 0); + } constexpr DrawMode::AlphaBlend alpha_order[ALPHA_MODE_COUNT] = { DrawMode::AlphaBlend::SRC_0_FIX_DST, DrawMode::AlphaBlend::SRC_SRC_SRC_SRC, DrawMode::AlphaBlend::SRC_DST_SRC_DST, DrawMode::AlphaBlend::SRC_0_SRC_DST, diff --git a/game/graphics/opengl_renderer/foreground/Merc2.cpp b/game/graphics/opengl_renderer/foreground/Merc2.cpp index 896c3203f6..dd8bee66e8 100644 --- a/game/graphics/opengl_renderer/foreground/Merc2.cpp +++ b/game/graphics/opengl_renderer/foreground/Merc2.cpp @@ -7,6 +7,7 @@ #endif #include "common/global_profiler/GlobalProfiler.h" +#include "common/util/fnv.h" #include "game/graphics/opengl_renderer/EyeRenderer.h" #include "game/graphics/opengl_renderer/background/background_common.h" @@ -54,6 +55,8 @@ std::mutex g_merc_data_mutex; Merc2::Merc2(ShaderLibrary& shaders, const std::vector* anim_slot_array) : m_anim_slot_array(anim_slot_array) { + ASSERT(fnv64("the quick brown fox jumps over the lazy dog") == 0x7404cea13ff89bb0); + // Set up main vertex array. This will point to the data stored in the .FR3 level file, and will // be uploaded to the GPU by the Loader. glGenVertexArrays(1, &m_vao); @@ -612,6 +615,8 @@ void Merc2::handle_pc_model(const DmaTransfer& setup, u32 lights = alloc_lights(current_lights); stats->num_lights++; + u64 hash = fnv64(model->name); + // loop over effects, creating draws for each for (size_t ei = 0; ei < model->effects.size(); ei++) { // game has disabled it? @@ -636,7 +641,7 @@ void Merc2::handle_pc_model(const DmaTransfer& setup, // do fixed draws: for (auto& fdraw : effect.mod.fix_draw) { alloc_normal_draw(fdraw, ignore_alpha, lev_bucket, first_bone, lights, uses_water, - model_disables_fog); + model_disables_fog, hash); if (should_envmap) { try_alloc_envmap_draw(fdraw, effect.envmap_mode, effect.envmap_texture, lev_bucket, fade_buffer + 4 * ei, first_bone, lights, uses_water); @@ -646,7 +651,7 @@ void Merc2::handle_pc_model(const DmaTransfer& setup, // do mod draws for (auto& mdraw : effect.mod.mod_draw) { auto n = alloc_normal_draw(mdraw, ignore_alpha, lev_bucket, first_bone, lights, uses_water, - model_disables_fog); + model_disables_fog, hash); // modify the draw, set the mod flag and point it to the opengl buffer n->flags |= MOD_VTX; n->mod_vtx_buffer = mod_opengl_buffers[ei]; @@ -668,7 +673,7 @@ void Merc2::handle_pc_model(const DmaTransfer& setup, fade_buffer + 4 * ei, first_bone, lights, uses_water); } alloc_normal_draw(draw, ignore_alpha, lev_bucket, first_bone, lights, uses_water, - model_disables_fog); + model_disables_fog, hash); } } } @@ -764,7 +769,9 @@ void Merc2::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof, MercDebugStats* stats) { + bool hack = stats->collect_debug_model_list; *stats = {}; + stats->collect_debug_model_list = hack; if (stats->collect_debug_model_list) { stats->model_list.clear(); } @@ -1056,6 +1063,7 @@ Merc2::Draw* Merc2::try_alloc_envmap_draw(const tfrag3::MercDraw& mdraw, draw->first_index = mdraw.first_index; draw->index_count = mdraw.index_count; draw->mode = envmap_mode; + draw->hash = 0; if (jak1_water_mode) { draw->mode.enable_ab(); draw->mode.disable_depth_write(); @@ -1076,12 +1084,14 @@ Merc2::Draw* Merc2::alloc_normal_draw(const tfrag3::MercDraw& mdraw, u32 first_bone, u32 lights, bool jak1_water_mode, - bool disable_fog) { + bool disable_fog, + u64 hash) { Draw* draw = &lev_bucket->draws[lev_bucket->next_free_draw++]; draw->flags = 0; draw->first_index = mdraw.first_index; draw->index_count = mdraw.index_count; draw->mode = mdraw.mode; + draw->hash = hash; if (jak1_water_mode) { draw->mode.set_ab(true); draw->mode.disable_depth_write(); @@ -1208,7 +1218,7 @@ void Merc2::do_draws(const Draw* draw_array, bool set_fade, SharedRenderState* render_state) { glBindVertexArray(m_vao); - int last_tex = -1; + s32 last_tex = INT32_MIN; int last_light = -1; bool normal_vtx_buffer_bound = true; @@ -1247,10 +1257,19 @@ void Merc2::do_draws(const Draw* draw_array, if (draw.texture < (int)lev->textures.size() && draw.texture >= 0) { glBindTexture(GL_TEXTURE_2D, lev->textures.at(draw.texture)); } else if ((draw.texture & 0xffffff00) == 0xefffff00) { - auto maybe_eye = render_state->eye_renderer->lookup_eye_texture(draw.texture & 0xff); - if (maybe_eye) { - glBindTexture(GL_TEXTURE_2D, *maybe_eye); + if (render_state->version >= GameVersion::Jak3) { + auto maybe_eye = + render_state->eye_renderer->lookup_eye_texture_hash(draw.hash, (draw.texture & 1)); + if (maybe_eye) { + glBindTexture(GL_TEXTURE_2D, *maybe_eye); + } + } else { + auto maybe_eye = render_state->eye_renderer->lookup_eye_texture(draw.texture & 0xff); + if (maybe_eye) { + glBindTexture(GL_TEXTURE_2D, *maybe_eye); + } } + use_mipmaps_for_filtering = false; } else if (draw.texture < 0) { int slot = -(draw.texture + 1); diff --git a/game/graphics/opengl_renderer/foreground/Merc2.h b/game/graphics/opengl_renderer/foreground/Merc2.h index 166d7d05af..9705907b66 100644 --- a/game/graphics/opengl_renderer/foreground/Merc2.h +++ b/game/graphics/opengl_renderer/foreground/Merc2.h @@ -192,6 +192,7 @@ class Merc2 { u8 fade[4]; // no strip hack for custom models u8 no_strip; + u64 hash; }; struct LevelDrawBucket { @@ -213,7 +214,8 @@ class Merc2 { u32 first_bone, u32 lights, bool jak1_water_mode, - bool disable_fog); + bool disable_fog, + u64 hash); Draw* try_alloc_envmap_draw(const tfrag3::MercDraw& mdraw, const DrawMode& envmap_mode, diff --git a/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.cpp b/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.cpp index eb8a9844fb..58157a99b8 100644 --- a/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.cpp +++ b/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.cpp @@ -17,8 +17,14 @@ void Merc2BucketRenderer::render(DmaFollower& dma, } m_renderer->render(dma, render_state, prof, &m_debug_stats); + + m_empty = m_debug_stats.num_predicted_draws == 0; } void Merc2BucketRenderer::draw_debug_window() { m_renderer->draw_debug_window(&m_debug_stats); +} + +bool Merc2BucketRenderer::empty() const { + return m_empty; } \ No newline at end of file diff --git a/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.h b/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.h index 5dddd665a7..95e6b0e379 100644 --- a/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.h +++ b/game/graphics/opengl_renderer/foreground/Merc2BucketRenderer.h @@ -8,8 +8,10 @@ class Merc2BucketRenderer : public BucketRenderer { Merc2BucketRenderer(const std::string& name, int my_id, std::shared_ptr merc); void draw_debug_window() override; void render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) override; + bool empty() const override; private: + bool m_empty = false; std::shared_ptr m_renderer; MercDebugStats m_debug_stats; }; diff --git a/game/graphics/opengl_renderer/shaders/generic.vert b/game/graphics/opengl_renderer/shaders/generic.vert index fa465f9544..e2e1905e46 100644 --- a/game/graphics/opengl_renderer/shaders/generic.vert +++ b/game/graphics/opengl_renderer/shaders/generic.vert @@ -10,6 +10,8 @@ uniform vec3 fog_constants; uniform vec4 scale; uniform float mat_23; uniform float mat_33; +uniform bool use_full_matrix; +uniform mat4 full_matrix; uniform vec4 hvdf_offset; uniform uint warp_sample_mode; @@ -38,11 +40,17 @@ void main() { // maddax.xyzw ACC, vf08, vf16 matrix multiply X // vu.acc.madda(Mask::xyzw, gen.mat0, gen.vtx_load0.x()); - transformed.xyz = position_in * scale.xyz; - transformed.z += mat_32; - transformed.w = mat_23 * position_in.z + mat_33; - - transformed *= -1; // todo? + if (use_full_matrix) { + transformed = -full_matrix[3]; + transformed -= full_matrix[0] * position_in.x ; + transformed -= full_matrix[1] * position_in.y; + transformed -= full_matrix[2] * position_in.z ; + } else { + transformed.xyz = position_in * scale.xyz; + transformed.z += mat_32; + transformed.w = mat_23 * position_in.z + mat_33; + transformed *= -1; + } // div Q, vf01.x, vf12.w perspective divide diff --git a/game/kernel/common/klink.h b/game/kernel/common/klink.h index b97ed1603a..a2fb9610a6 100644 --- a/game/kernel/common/klink.h +++ b/game/kernel/common/klink.h @@ -125,7 +125,6 @@ struct link_control { } }; -void klink_init_globals(); Ptr c_symlink2(Ptr objData, Ptr linkObj, Ptr relocTable); extern link_control saved_link_control; diff --git a/game/kernel/common/kmachine.cpp b/game/kernel/common/kmachine.cpp index 9c794092f4..d732e6c2b3 100644 --- a/game/kernel/common/kmachine.cpp +++ b/game/kernel/common/kmachine.cpp @@ -581,6 +581,19 @@ u64 pc_get_mips2c(u32 name) { return Mips2C::gLinkedFunctionTable.get(n); } +u64 pc_get_display_id() { + if (Display::GetMainDisplay()) { + return Display::GetMainDisplay()->get_display_manager()->get_active_display_id(); + } + return 0; +} + +void pc_set_display_id(u64 display_id) { + if (Display::GetMainDisplay()) { + Display::GetMainDisplay()->get_display_manager()->enqueue_set_display_id(display_id); + } +} + u64 pc_get_display_name(u32 id, u32 str_dest_ptr) { std::string name = ""; if (Display::GetMainDisplay()) { @@ -602,17 +615,16 @@ u64 pc_get_display_name(u32 id, u32 str_dest_ptr) { } u32 pc_get_display_mode() { - auto display_mode = WindowDisplayMode::Windowed; + auto display_mode = game_settings::DisplaySettings::DisplayMode::Windowed; if (Display::GetMainDisplay()) { - display_mode = Display::GetMainDisplay()->get_display_manager()->get_window_display_mode(); + display_mode = Display::GetMainDisplay()->get_display_manager()->get_display_mode(); } switch (display_mode) { - case WindowDisplayMode::Borderless: + case game_settings::DisplaySettings::DisplayMode::Borderless: return g_pc_port_funcs.intern_from_c("borderless").offset; - case WindowDisplayMode::Fullscreen: + case game_settings::DisplaySettings::DisplayMode::Fullscreen: return g_pc_port_funcs.intern_from_c("fullscreen").offset; default: - case WindowDisplayMode::Windowed: return g_pc_port_funcs.intern_from_c("windowed").offset; } } @@ -623,13 +635,13 @@ void pc_set_display_mode(u32 symptr) { } if (symptr == g_pc_port_funcs.intern_from_c("windowed").offset || symptr == s7.offset) { Display::GetMainDisplay()->get_display_manager()->enqueue_set_window_display_mode( - WindowDisplayMode::Windowed); + game_settings::DisplaySettings::DisplayMode::Windowed); } else if (symptr == g_pc_port_funcs.intern_from_c("borderless").offset) { Display::GetMainDisplay()->get_display_manager()->enqueue_set_window_display_mode( - WindowDisplayMode::Borderless); + game_settings::DisplaySettings::DisplayMode::Borderless); } else if (symptr == g_pc_port_funcs.intern_from_c("fullscreen").offset) { Display::GetMainDisplay()->get_display_manager()->enqueue_set_window_display_mode( - WindowDisplayMode::Fullscreen); + game_settings::DisplaySettings::DisplayMode::Fullscreen); } } @@ -701,12 +713,6 @@ void pc_get_window_scale(u32 x_ptr, u32 y_ptr) { } } -void pc_get_fullscreen_display(u64 display_id) { - if (Display::GetMainDisplay()) { - Display::GetMainDisplay()->get_display_manager()->enqueue_set_fullscreen_display_id(display_id); - } -} - void pc_set_window_size(u64 width, u64 height) { if (Display::GetMainDisplay()) { Display::GetMainDisplay()->get_display_manager()->enqueue_set_window_size(width, height); @@ -734,6 +740,14 @@ void pc_get_resolution(u32 id, u32 w_ptr, u32 h_ptr) { } } +u64 pc_is_supported_resolution(u64 width, u64 height) { + if (Display::GetMainDisplay()) { + return bool_to_symbol( + Display::GetMainDisplay()->get_display_manager()->is_supported_resolution(width, height)); + } + return bool_to_symbol(false); +} + u64 pc_get_controller_name(u32 id, u32 str_dest_ptr) { std::string name = ""; if (Display::GetMainDisplay()) { @@ -1045,9 +1059,11 @@ void init_common_pc_port_functions( // -- DISPLAY RELATED -- // Returns the name of the display with the given id or #f if not found / empty + make_func_symbol_func("pc-get-display-id", (void*)pc_get_display_id); + make_func_symbol_func("pc-set-display-id!", (void*)pc_set_display_id); make_func_symbol_func("pc-get-display-name", (void*)pc_get_display_name); make_func_symbol_func("pc-get-display-mode", (void*)pc_get_display_mode); - make_func_symbol_func("pc-set-display-mode", (void*)pc_set_display_mode); + make_func_symbol_func("pc-set-display-mode!", (void*)pc_set_display_mode); make_func_symbol_func("pc-get-display-count", (void*)pc_get_display_count); // Returns resolution of the monitor's current display mode make_func_symbol_func("pc-get-active-display-size", (void*)pc_get_active_display_size); @@ -1058,10 +1074,10 @@ void init_common_pc_port_functions( make_func_symbol_func("pc-get-window-size", (void*)pc_get_window_size); // Returns scale of window. This is for DPI stuff. make_func_symbol_func("pc-get-window-scale", (void*)pc_get_window_scale); - make_func_symbol_func("pc-set-fullscreen-display", (void*)pc_get_fullscreen_display); - make_func_symbol_func("pc-set-window-size", (void*)pc_set_window_size); + make_func_symbol_func("pc-set-window-size!", (void*)pc_set_window_size); make_func_symbol_func("pc-get-num-resolutions", (void*)pc_get_num_resolutions); make_func_symbol_func("pc-get-resolution", (void*)pc_get_resolution); + make_func_symbol_func("pc-is-supported-resolution?", (void*)pc_is_supported_resolution); // -- INPUT RELATED -- // Returns the name of the display with the given id or #f if not found / empty diff --git a/game/kernel/jak2/kdgo.h b/game/kernel/jak2/kdgo.h index 54904a1c46..44a77d6b8e 100644 --- a/game/kernel/jak2/kdgo.h +++ b/game/kernel/jak2/kdgo.h @@ -16,7 +16,6 @@ void load_and_link_dgo_from_c_fast(const char* name, Ptr heap, u32 linkFlag, s32 bufferSize); -void load_and_link_dgo(u64 name_gstr, u64 heap_info, u64 flag, u64 buffer_size); void kdgo_init_globals(); extern RPC_Dgo_Cmd sMsg[2]; extern RPC_Dgo_Cmd* sLastMsg; diff --git a/game/kernel/jak3/kdgo.cpp b/game/kernel/jak3/kdgo.cpp index 23711ac74a..793f68da53 100644 --- a/game/kernel/jak3/kdgo.cpp +++ b/game/kernel/jak3/kdgo.cpp @@ -8,6 +8,7 @@ #include "game/kernel/common/kdgo.h" #include "game/kernel/common/kmalloc.h" #include "game/kernel/jak3/klink.h" +#include "game/overlord/jak3/rpc_interface.h" namespace jak3 { @@ -39,7 +40,7 @@ void BeginLoadingDGO(const char* name, Ptr buffer1, Ptr buffer2, Ptr RpcSync(DGO_RPC_CHANNEL); // make sure old RPC is finished // put a dummy value here just to make sure the IOP overwrites it. - sMsg[msgID].result = DGO_RPC_RESULT_INIT; // !! this is 666 + sMsg[msgID].status = DGO_RPC_RESULT_INIT; // !! this is 666 // inform IOP of buffers sMsg[msgID].buffer1 = buffer1.offset; @@ -78,13 +79,13 @@ Ptr GetNextDGO(u32* lastObjectFlag) { Ptr buffer(0); if (sLastMsg) { // if we got a good result, get pointer to object - if ((sLastMsg->result == DGO_RPC_RESULT_MORE) || (sLastMsg->result == DGO_RPC_RESULT_DONE)) { + if ((sLastMsg->status == DGO_RPC_RESULT_MORE) || (sLastMsg->status == DGO_RPC_RESULT_DONE)) { buffer.offset = sLastMsg->buffer1; // buffer 1 always contains location of most recently loaded object. } // not the last one, so don't set the flag. - if (sLastMsg->result == DGO_RPC_RESULT_MORE) { + if (sLastMsg->status == DGO_RPC_RESULT_MORE) { *lastObjectFlag = 0; } @@ -111,7 +112,7 @@ void ContinueLoadingDGO(Ptr b1, Ptr b2, Ptr heapPtr) { u32 msgID = sMsgNum; jak3::RPC_Dgo_Cmd* sendBuff = sMsg + sMsgNum; sMsgNum = sMsgNum ^ 1; - sendBuff->result = DGO_RPC_RESULT_INIT; + sendBuff->status = DGO_RPC_RESULT_INIT; sMsg[msgID].buffer1 = b1.offset; sMsg[msgID].buffer2 = b2.offset; sMsg[msgID].buffer_heap_top = heapPtr.offset; diff --git a/game/mips2c/jak3_functions/cloth.cpp b/game/mips2c/jak3_functions/cloth.cpp new file mode 100644 index 0000000000..b9a33cb3a9 --- /dev/null +++ b/game/mips2c/jak3_functions/cloth.cpp @@ -0,0 +1,220 @@ +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace method_21_cloth_system { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -80); // daddiu sp, sp, -80 + c->daddiu(a3, sp, 16); // daddiu a3, sp, 16 + c->daddiu(t0, sp, 32); // daddiu t0, sp, 32 + c->lwu(v1, 68, a0); // lwu v1, 68(a0) + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->lw(a1, 96, a0); // lw a1, 96(a0) + c->daddiu(a1, a1, -1); // daddiu a1, a1, -1 + c->lw(a2, 100, a0); // lw a2, 100(a0) + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->addiu(t1, r0, 0); // addiu t1, r0, 0 + c->addiu(t1, r0, 0); // addiu t1, r0, 0 + c->mov64(t1, a3); // or t1, a3, r0 + c->lui(t2, 16000); // lui t2, 16000 + c->mtc1(f0, t2); // mtc1 f0, t2 + c->swc1(f0, 0, t1); // swc1 f0, 0(t1) + c->lui(t2, 16000); // lui t2, 16000 + c->mtc1(f0, t2); // mtc1 f0, t2 + c->swc1(f0, 4, t1); // swc1 f0, 4(t1) + c->lui(t2, 16000); // lui t2, 16000 + c->mtc1(f0, t2); // mtc1 f0, t2 + c->swc1(f0, 8, t1); // swc1 f0, 8(t1) + c->lui(t2, 16000); // lui t2, 16000 + c->mtc1(f0, t2); // mtc1 f0, t2 + c->swc1(f0, 12, t1); // swc1 f0, 12(t1) + c->mov64(t1, t0); // or t1, t0, r0 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 0, t1); // swc1 f0, 0(t1) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 4, t1); // swc1 f0, 4(t1) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 8, t1); // swc1 f0, 8(t1) + c->lwc1(f0, 144, a0); // lwc1 f0, 144(a0) + c->swc1(f0, 12, t1); // swc1 f0, 12(t1) + c->vmax_bc(DEST::xyzw, BC::w, vf1, vf0, vf0); // vmaxw.xyzw vf1, vf0, vf0 + c->lqc2(vf10, 0, a3); // lqc2 vf10, 0(a3) + c->lqc2(vf15, 0, t0); // lqc2 vf15, 0(t0) + c->sd(r0, 48, sp); // sd r0, 48(sp) + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + //beq r0, r0, L187 // beq r0, r0, L187 + // nop // sll r0, r0, 0 + goto block_10; // branch always + + +block_1: + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + //beq r0, r0, L186 // beq r0, r0, L186 + // nop // sll r0, r0, 0 + goto block_8; // branch always + + +block_2: + c->addiu(t1, r0, 48); // addiu t1, r0, 48 + c->ld(t2, 48, sp); // ld t2, 48(sp) + c->mult3(t1, t1, t2); // mult3 t1, t1, t2 + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->lwu(t2, 0, a0); // lwu t2, 0(a0) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t1, 56, sp); // sw t1, 56(sp) + c->addiu(t1, r0, 48); // addiu t1, r0, 48 + c->ld(t2, 48, sp); // ld t2, 48(sp) + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->mult3(t1, t1, t2); // mult3 t1, t1, t2 + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->lwu(t2, 0, a0); // lwu t2, 0(a0) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t1, 60, sp); // sw t1, 60(sp) + c->addiu(t1, r0, 48); // addiu t1, r0, 48 + c->ld(t2, 48, sp); // ld t2, 48(sp) + c->lw(t3, 96, a0); // lw t3, 96(a0) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->mult3(t1, t1, t2); // mult3 t1, t1, t2 + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->lwu(t2, 0, a0); // lwu t2, 0(a0) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t1, 64, sp); // sw t1, 64(sp) + c->addiu(t1, r0, 48); // addiu t1, r0, 48 + c->lw(t2, 96, a0); // lw t2, 96(a0) + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->ld(t3, 48, sp); // ld t3, 48(sp) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->mult3(t1, t1, t2); // mult3 t1, t1, t2 + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->lwu(t2, 0, a0); // lwu t2, 0(a0) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t1, 68, sp); // sw t1, 68(sp) + c->lwu(t1, 56, sp); // lwu t1, 56(sp) + c->lqc2(vf2, 0, t1); // lqc2 vf2, 0(t1) + c->lwu(t1, 68, sp); // lwu t1, 68(sp) + c->lqc2(vf5, 0, t1); // lqc2 vf5, 0(t1) + c->lwu(t1, 60, sp); // lwu t1, 60(sp) + c->lqc2(vf3, 0, t1); // lqc2 vf3, 0(t1) + c->lwu(t1, 64, sp); // lwu t1, 64(sp) + c->lqc2(vf4, 0, t1); // lqc2 vf4, 0(t1) + c->lwu(t1, 56, sp); // lwu t1, 56(sp) + c->lqc2(vf20, 32, t1); // lqc2 vf20, 32(t1) + c->lwu(t1, 68, sp); // lwu t1, 68(sp) + c->lqc2(vf23, 32, t1); // lqc2 vf23, 32(t1) + c->lwu(t1, 60, sp); // lwu t1, 60(sp) + c->lqc2(vf21, 32, t1); // lqc2 vf21, 32(t1) + c->lwu(t1, 64, sp); // lwu t1, 64(sp) + c->lqc2(vf22, 32, t1); // lqc2 vf22, 32(t1) + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf20); // vmulax.xyzw acc, vf2, vf20 + c->vmadda_bc(DEST::xyzw, BC::x, vf3, vf21); // vmaddax.xyzw acc, vf3, vf21 + c->vmadda_bc(DEST::xyzw, BC::x, vf5, vf23); // vmaddax.xyzw acc, vf5, vf23 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf4, vf22); // vmaddx.xyzw vf8, vf4, vf22 + c->vmul_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmulx.xyzw vf8, vf8, vf10 + c->lwu(t1, 68, a0); // lwu t1, 68(a0) + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->addiu(t2, r0, 0); // addiu t2, r0, 0 + //beq r0, r0, L185 // beq r0, r0, L185 + // nop // sll r0, r0, 0 + goto block_6; // branch always + + +block_3: + c->lqc2(vf11, 0, t1); // lqc2 vf11, 0(t1) + c->vsub(DEST::xyzw, vf13, vf8, vf11); // vsub.xyzw vf13, vf8, vf11 + c->vmul(DEST::xyzw, vf9, vf13, vf13); // vmul.xyzw vf9, vf13, vf13 + c->vmula_bc(DEST::xyzw, BC::x, vf1, vf9); // vmulax.xyzw acc, vf1, vf9 + c->vmadda_bc(DEST::xyzw, BC::y, vf1, vf9); // vmadday.xyzw acc, vf1, vf9 + c->vmadd_bc(DEST::xyzw, BC::z, vf14, vf1, vf9); // vmaddz.xyzw vf14, vf1, vf9 + c->vadd_bc(DEST::w, BC::w, vf11, vf11, vf15); // vaddw.w vf11, vf11, vf15 + c->vmul(DEST::xyzw, vf12, vf11, vf11); // vmul.xyzw vf12, vf11, vf11 + c->vsub_bc(DEST::xyzw, BC::w, vf9, vf14, vf12); // vsubw.xyzw vf9, vf14, vf12 + c->mov128_gpr_vf(t3, vf9); // qmfc2.i t3, vf9 + bc = ((s64)c->sgpr64(t3)) >= 0; // bgez t3, L184 + // nop // sll r0, r0, 0 + if (bc) {goto block_5;} // branch non-likely + + c->vrsqrt(vf11, BC::w, vf14, BC::x); // vrsqrt Q, vf11.w, vf14.x + c->vmax_bc(DEST::xyz, BC::x, vf20, vf0, vf20); // vmaxx.xyz vf20, vf0, vf20 + c->vmax_bc(DEST::xyz, BC::x, vf21, vf0, vf21); // vmaxx.xyz vf21, vf0, vf21 + c->vmax_bc(DEST::xyz, BC::x, vf22, vf0, vf22); // vmaxx.xyz vf22, vf0, vf22 + c->vmax_bc(DEST::xyz, BC::x, vf23, vf0, vf23); // vmaxx.xyz vf23, vf0, vf23 + c->vwaitq(); // vwaitq + // Unknown instr: vmulaq.xyzw acc, vf13, Q + c->vmula_q(DEST::xyzw, vf13); + c->vmsuba(DEST::xyzw, vf1, vf13); // vmsuba.xyzw acc, vf1, vf13 + c->vmadd(DEST::xyzw, vf2, vf1, vf2); // vmadd.xyzw vf2, vf1, vf2 + c->vmadd(DEST::xyzw, vf3, vf1, vf3); // vmadd.xyzw vf3, vf1, vf3 + c->vmadd(DEST::xyzw, vf5, vf1, vf5); // vmadd.xyzw vf5, vf1, vf5 + c->vmadd(DEST::xyzw, vf4, vf1, vf4); // vmadd.xyzw vf4, vf1, vf4 + c->vmadd(DEST::xyzw, vf8, vf1, vf8); // vmadd.xyzw vf8, vf1, vf8 + +block_5: + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + +block_6: + c->slt(t3, t2, v1); // slt t3, t2, v1 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L183 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + c->mov64(t1, s7); // or t1, s7, r0 + c->lwu(t1, 56, sp); // lwu t1, 56(sp) + c->sqc2(vf2, 0, t1); // sqc2 vf2, 0(t1) + c->lwu(t1, 68, sp); // lwu t1, 68(sp) + c->sqc2(vf5, 0, t1); // sqc2 vf5, 0(t1) + c->lwu(t1, 60, sp); // lwu t1, 60(sp) + c->sqc2(vf3, 0, t1); // sqc2 vf3, 0(t1) + c->lwu(t1, 64, sp); // lwu t1, 64(sp) + c->sqc2(vf4, 0, t1); // sqc2 vf4, 0(t1) + c->mov128_gpr_vf(t1, vf4); // qmfc2.i t1, vf4 + c->ld(t1, 48, sp); // ld t1, 48(sp) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->sd(t1, 48, sp); // sd t1, 48(sp) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + +block_8: + c->slt(t1, t0, a1); // slt t1, t0, a1 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L182 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->mov64(t0, s7); // or t0, s7, r0 + c->mov64(t0, s7); // or t0, s7, r0 + c->ld(t0, 48, sp); // ld t0, 48(sp) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->sd(t0, 48, sp); // sd t0, 48(sp) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + +block_10: + c->slt(t0, a3, a2); // slt t0, a3, a2 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L181 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v0, s7); // or v0, s7, r0 + //jr ra // jr ra + c->daddiu(sp, sp, 80); // daddiu sp, sp, 80 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("(method 21 cloth-system)", execute, 256); +} + +} // namespace method_21_cloth_system +} // namespace Mips2C + diff --git a/game/mips2c/mips2c_private.h b/game/mips2c/mips2c_private.h index 4c9f1e6471..552d85a5ab 100644 --- a/game/mips2c/mips2c_private.h +++ b/game/mips2c/mips2c_private.h @@ -905,6 +905,16 @@ struct ExecutionContext { } } + void vmula_q(DEST mask, int src0) { + auto s0 = vf_src(src0); + + for (int i = 0; i < 4; i++) { + if ((u64)mask & (1 << i)) { + acc.f[i] = s0.f[i] * Q; + } + } + } + void vadda_bc(DEST mask, BC bc, int src0, int src1) { auto s0 = vf_src(src0); auto s1 = vf_src(src1); diff --git a/game/mips2c/mips2c_table.cpp b/game/mips2c/mips2c_table.cpp index 74c461c712..8865ef75e8 100644 --- a/game/mips2c/mips2c_table.cpp +++ b/game/mips2c/mips2c_table.cpp @@ -393,6 +393,7 @@ namespace shadow_add_double_edges { extern void link(); } namespace shadow_add_single_tris { extern void link(); } namespace shadow_add_double_tris { extern void link(); } namespace shadow_execute { extern void link(); } +namespace method_21_cloth_system { extern void link(); } } // clang-format on @@ -654,7 +655,8 @@ PerGameVersion>> gMips2C jak3::shadow_find_single_edges::link, jak3::shadow_find_double_edges::link, jak3::shadow_add_verts::link, jak3::shadow_add_facing_single_tris::link, jak3::shadow_add_single_edges::link, jak3::shadow_add_double_edges::link, - jak3::shadow_add_single_tris::link, jak3::shadow_add_double_tris::link}}}}; + jak3::shadow_add_single_tris::link, jak3::shadow_add_double_tris::link}}, + {"cloth", {jak3::method_21_cloth_system::link}}}}; void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) { const auto& it = m_executes.insert({name, {exec, Ptr()}}); diff --git a/game/overlord/jak2/srpc.cpp b/game/overlord/jak2/srpc.cpp index 077c06f60f..5991b511a1 100644 --- a/game/overlord/jak2/srpc.cpp +++ b/game/overlord/jak2/srpc.cpp @@ -460,6 +460,9 @@ void* RPC_Loader(unsigned int /*fno*/, void* data, int size) { snd_SetPlayBackMode(0); } } break; + case Jak2SoundCommand::mirror_mode: { + gMirrorMode = cmd->mirror.value; + } break; default: ASSERT_MSG(false, fmt::format("Unhandled RPC Loader command {}", int(cmd->j2command))); } diff --git a/game/overlord/jak2/srpc.h b/game/overlord/jak2/srpc.h index fa03388871..cd2338fe2b 100644 --- a/game/overlord/jak2/srpc.h +++ b/game/overlord/jak2/srpc.h @@ -58,6 +58,7 @@ enum class Jak2SoundCommand : u16 { iop_mem = 48, cancel_dgo = 49, set_stereo_mode = 50, + mirror_mode = 201, }; struct SoundRpcCommand { diff --git a/game/overlord/jak2/vag.cpp b/game/overlord/jak2/vag.cpp index 6bc1532f6f..3aed62539b 100644 --- a/game/overlord/jak2/vag.cpp +++ b/game/overlord/jak2/vag.cpp @@ -30,7 +30,7 @@ void StopVAG(VagCmd* cmd, int /*param_2*/); enum VolumeCategory { DIALOGUE = 2, // VAG streams. Copied "dialogue" name from jak 1. }; -int MasterVolume[17]; +int MasterVolume[32]; void vag_init_globals() { memset(VagCmds, 0, sizeof(VagCmds)); diff --git a/game/overlord/jak2/vag.h b/game/overlord/jak2/vag.h index 47b5ae61e1..4c41283457 100644 --- a/game/overlord/jak2/vag.h +++ b/game/overlord/jak2/vag.h @@ -113,7 +113,7 @@ extern int TrapSRAM[N_VAG_CMDS]; extern int StreamVoice[N_VAG_CMDS]; extern int ActiveVagStreams; -extern int MasterVolume[17]; +extern int MasterVolume[32]; void vag_init_globals(); diff --git a/game/overlord/jak3/basefile.cpp b/game/overlord/jak3/basefile.cpp new file mode 100644 index 0000000000..9caa2e7f79 --- /dev/null +++ b/game/overlord/jak3/basefile.cpp @@ -0,0 +1,333 @@ +#include "basefile.h" + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/pagemanager.h" +#include "game/overlord/jak3/vag.h" + +namespace jak3 { +void jak3_overlord_init_globals_basefile() {} + +/*! + * Construct a CBaseFile in an unused state. + */ +CBaseFile::CBaseFile() { + m_Buffer.m_pCurrentData = nullptr; + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_nMinNumPages = 1; + m_Buffer.m_nMaxNumPages = kDefaultBufferPageCount; + m_Buffer.m_nDataLength = 0; + m_Buffer.m_pPageList = nullptr; + m_Buffer.m_pIsoCmd = nullptr; + m_Buffer.m_eBufferType = CBuffer::BufferType::EBT_FREE; + + m_ProcessDataSemaphore = -1; + m_FileDef = nullptr; + m_FileKind = Kind::UNKNOWN; + m_Status = EIsoStatus::NONE_0; + m_ReadRate = 0; + m_LengthPages = 0; + m_PageOffset = 0; + m_nNumPages = kDefaultBufferPageCount; +} + +/*! + * Construct a CBaseFile for a given file, but keep it in the "idle" state, with no buffer + * allocated. + */ +CBaseFile::CBaseFile(const jak3::ISOFileDef* file, int semaphore) { + m_Buffer.m_pCurrentData = nullptr; + m_Buffer.m_nMaxNumPages = kDefaultBufferPageCount; + m_Buffer.m_nDataLength = 0; + m_Buffer.m_nMinNumPages = 1; + m_Buffer.m_pPageList = nullptr; + m_Buffer.m_pIsoCmd = nullptr; + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_eBufferType = CBuffer::BufferType::EBT_FREE; + + m_nNumPages = kDefaultBufferPageCount; + m_FileDef = file; + m_ProcessDataSemaphore = semaphore; + m_FileKind = Kind::UNKNOWN; + m_Status = EIsoStatus::IDLE_1; + m_ReadRate = 0; + m_LengthPages = 0; + m_PageOffset = 0; +} + +/*! + * Update our buffer to handle crossing page boundaries, return pointer to next data. + */ +uint8_t* CBaseFile::CheckPageBoundary() { + // Can't check page boundary if the buffer is not allocated. + ASSERT(m_Buffer.m_eBufferType != CBuffer::BufferType::EBT_FREE); + + // Can't check page boundary if there is no manager + ASSERT(m_Buffer.m_pPageList); + + CPageList* page_list = m_Buffer.m_pPageList; + CPage* page = page_list->m_pCurrentActivePage; + + // can only return data if there's an active page + if (!page || page_list->m_nNumActivePages <= 0) { + return nullptr; + } + + // buffer doesn't know the current page, just reset it to the start of the active page. + if (m_Buffer.m_pCurrentPageStart == nullptr) { + m_Buffer.m_pCurrentData = page->m_pPageMemStart; + m_Buffer.m_pCurrentPageStart = page->m_pPageMemStart; + } else { + uint8_t* end_ptr = page->m_pPageMemEnd; + // check if our data pointer crossed the page boundary + if (end_ptr <= m_Buffer.m_pCurrentData) { + // it did! + uint8_t* past_boundary_ptr = m_Buffer.m_pCurrentData; + + // get the next active page + CPage* next_page = page_list->StepActivePage(); + if (!next_page) { + // no more active pages, no data to process + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_pCurrentData = nullptr; + ovrld_log(LogCategory::PAGING, "File {} ran out of pages in CheckPageBoundary", + m_FileDef->name.data); + } else { + // this is a little weird, but if we went past the end of the previous page, we actually + // start at an offset into the next page - perhaps the user could know that pages are + // consecutive in memory? + uint8_t* new_page_mem = next_page->m_pPageMemStart; + m_Buffer.m_pCurrentData = new_page_mem + (end_ptr + 1 - past_boundary_ptr); + m_Buffer.m_pCurrentPageStart = new_page_mem; + ovrld_log(LogCategory::PAGING, "File {} advanced to next page (wrapped {} bytes)", + m_FileDef->name.data, (end_ptr + 1 - past_boundary_ptr)); + } + } + } + return m_Buffer.m_pCurrentData; +} + +/*! + * Allocate pages and set up the CBuffer for the given ISO Msg and type. + */ +int CBaseFile::InitBuffer(CBuffer::BufferType type, jak3::ISO_Hdr* msg) { + ASSERT(msg); + m_Buffer.m_pCurrentData = nullptr; + m_Buffer.m_pPageList = nullptr; + m_Buffer.m_pIsoCmd = msg; + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_nDataLength = 0; + m_Buffer.m_eBufferType = CBuffer::BufferType::EBT_FREE; + m_Buffer.m_nMinNumPages = 1; + m_Buffer.m_nMaxNumPages = kDefaultBufferPageCount; + m_nNumPages = 4; + + // adjust size based on the request buffer type + switch (type) { + case CBuffer::BufferType::REQUEST_NORMAL: { // 3 + m_Buffer.m_pCurrentData = nullptr; + m_Buffer.m_nMinNumPages = 1; + m_Buffer.m_nMaxNumPages = 4; + m_nNumPages = 4; + m_Buffer.m_nDataLength = 0; + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_eBufferType = CBuffer::BufferType::NORMAL; // 1 + + // and the iso msg request. + switch (msg->msg_type) { + case ISO_Hdr::MsgType::LOAD_EE: + case ISO_Hdr::MsgType::LOAD_IOP: + case ISO_Hdr::MsgType::LOAD_EE_CHUNK: + m_Buffer.m_nMinNumPages = 1; + m_nNumPages = 4; + m_Buffer.m_nMaxNumPages = 4; + break; + case ISO_Hdr::MsgType::LOAD_SOUNDBANK: + m_Buffer.m_nMinNumPages = 1; + m_Buffer.m_nMaxNumPages = 2; + break; + default: + break; + } + + } break; + case CBuffer::BufferType::REQUEST_VAG: { + m_Buffer.m_pCurrentData = nullptr; + m_Buffer.m_eBufferType = CBuffer::BufferType::VAG; + m_Buffer.m_nMinNumPages = 1; + m_nNumPages = 0x10; + m_Buffer.m_nDataLength = 0; + m_Buffer.m_pCurrentPageStart = nullptr; + m_Buffer.m_nMaxNumPages = 0x10; + } break; + default: + ASSERT_NOT_REACHED(); // bad buffer type + } + + ovrld_log(LogCategory::PAGING, "File {} initializing buffer ({} pages {} min {} max)", + m_FileDef->name.data, m_nNumPages, m_Buffer.m_nMinNumPages, m_Buffer.m_nMaxNumPages); + + // Actual allocation of page data + CPageList* page_list = AllocPages(); + if (page_list) { + // set up the current pointers of the buffer. + m_Buffer.m_pCurrentPageStart = page_list->m_pFirstPage->m_pPageMemStart; + m_Buffer.m_pCurrentData = m_Buffer.m_pCurrentPageStart; + return 1; + } else { + ovrld_log(LogCategory::WARN, "File {} failed to allocate a page list.", m_FileDef->name.data); + // if it failed, terminate the buffer + TerminateBuffer(); + return 0; + } +} + +/*! + * Free page memory, clear event flags for cpages. + */ +void CBaseFile::TerminateBuffer() { + ovrld_log(LogCategory::PAGING, "File {} terminating buffer.", m_FileDef->name.data); + + auto buffer_type = m_Buffer.m_eBufferType; + if (buffer_type != CBuffer::BufferType::EBT_FREE) { + // clean up our pages + auto* page_list = m_Buffer.m_pPageList; + if (page_list) { + // stop try to load + page_list->CancelActivePages(); + } + + switch (buffer_type) { + case CBuffer::BufferType::EBT_FREE: + case CBuffer::BufferType::NORMAL: + case CBuffer::BufferType::VAG: + case CBuffer::BufferType::REQUEST_NORMAL: + case CBuffer::BufferType::REQUEST_VAG: + // return memory + FreePages(); + + // reset our buffer + m_Buffer.m_nDataLength = 0; + m_Buffer.m_pCurrentPageStart = 0; + m_Buffer.m_eBufferType = CBuffer::BufferType::EBT_FREE; + + // reset our command + if (buffer_type != CBuffer::BufferType::EBT_FREE) { + ASSERT(m_Buffer.m_pIsoCmd); + m_Buffer.m_pIsoCmd = nullptr; + } + break; + default: + ASSERT_NOT_REACHED(); // Invalid buffer type + } + } else { + ASSERT_NOT_REACHED(); // Buffer already terminated, shouldn't happen again. + } +} + +/*! + * Allocate CPage and CPageList as needed to reach the target number of pages. + */ +CPageList* CBaseFile::AllocPages() { + // should have picked a buffer type + ASSERT(m_Buffer.m_eBufferType != CBuffer::BufferType::EBT_FREE); + + if (m_Buffer.m_eBufferType == CBuffer::BufferType::EBT_FREE) { + return nullptr; + } + + // We might have a PageList or not + auto* old_plist = m_Buffer.m_pPageList; + int old_unstepped_pages = 0; + bool have_plist = old_plist != nullptr; + CPageList* ret_plist = nullptr; + + // if we do have a pagelist, we'll reuse it and any unstepped pages. + if (have_plist) { + old_unstepped_pages = old_plist->m_nNumUnsteppedPages; + ret_plist = old_plist; + } + + int page_alloc_count = 0; + + // to increase unstepped pages to the target m_nNumPages, we need to allocate this many more. + page_alloc_count = m_nNumPages - old_unstepped_pages; + // lg::warn("page counts in AllocPages: {} {}", m_nNumPages, old_unstepped_pages); + if (old_plist) { + // lg::warn(" {} {}", old_plist->m_nNumPages, old_plist->m_nNumActivePages); + } + + if (old_unstepped_pages < (int)m_nNumPages) { + // alloc count will be positive. + + // reduce allocation count to at most the number of free pages + if (get_page_manager()->m_CCache.m_nNumFreePages < page_alloc_count) { + page_alloc_count = get_page_manager()->m_CCache.m_nNumFreePages; + } + + } else { + // alloc count would be negative, don't allocate + page_alloc_count = 0; + } + + switch (m_Buffer.m_eBufferType) { + case CBuffer::BufferType::NORMAL: + case CBuffer::BufferType::REQUEST_NORMAL: { + // don't do anything special + } break; + case CBuffer::BufferType::VAG: + case CBuffer::BufferType::REQUEST_VAG: { + // for VAG commands, we don't bother buffering more than the DMA transfer size + int dma_xfer_size = ((ISO_VAGCommand*)m_Buffer.m_pIsoCmd)->xfer_size; + if (dma_xfer_size) { + ASSERT(dma_xfer_size > 0); + int limit = (dma_xfer_size + 0x7fff) >> 0xf; + if (page_alloc_count > limit) { + ovrld_log(LogCategory::WARN, "File {} wants {} pages, but VAG DMA sizes limit us to ", + m_FileDef->name.data, page_alloc_count, limit); + lg::info("page count dma limit {} -> {}\n", page_alloc_count, limit); + page_alloc_count = limit; + } + } + } break; + default: + ASSERT_NOT_REACHED(); // bad buffer type. + } + + if (page_alloc_count == 0) { + return ret_plist; + } + + ovrld_log(LogCategory::PAGING, "File {} wants {} more pages in AllocPages.", m_FileDef->name.data, + page_alloc_count); + if (have_plist) { + ret_plist = get_page_manager()->GrowPageList(m_Buffer.m_pPageList, page_alloc_count); + } else { + ret_plist = get_page_manager()->AllocPageList(page_alloc_count, 0); + } + + if (ret_plist) { + m_Buffer.m_pPageList = ret_plist; + if (!have_plist) { + m_Buffer.m_pCurrentData = ret_plist->m_pFirstPage->m_pPageMemStart; + } + } else { + ASSERT_NOT_REACHED(); // might be ok. + } + return ret_plist; +} + +/*! + * Free all pages and the page list. + */ +void CBaseFile::FreePages() { + ASSERT(m_Buffer.m_eBufferType != CBuffer::BufferType::EBT_FREE); + if (m_Buffer.m_pPageList) { + get_page_manager()->FreePageList(m_Buffer.m_pPageList); + } + m_Buffer.m_pPageList = nullptr; +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/basefile.h b/game/overlord/jak3/basefile.h new file mode 100644 index 0000000000..268b90dd96 --- /dev/null +++ b/game/overlord/jak3/basefile.h @@ -0,0 +1,76 @@ +#pragma once + +#include "common/common_types.h" + +#include "game/overlord/jak3/isocommon.h" +#include "game/overlord/jak3/pagemanager.h" + +namespace jak3 { +void jak3_overlord_init_globals_basefile(); + +struct CPageList; +struct ISOFileDef; +struct ISO_Hdr; + +constexpr int kDefaultBufferPageCount = 4; + +/*! + * Base class for a file that the ISO system is processing. + * This represents an "open" file, and contains references to the buffer holding this file's data + */ +struct CBaseFile { + CBaseFile(); + CBaseFile(const ISOFileDef* file, int semaphore); + virtual ~CBaseFile() = default; + + uint8_t* CheckPageBoundary(); + int InitBuffer(CBuffer::BufferType type, ISO_Hdr* msg); + CPageList* AllocPages(); + void TerminateBuffer(); + void FreePages(); + + // buffer that stores some contents of this file + CBuffer m_Buffer; + + // the number of pages that were allocated for reading this file. + u32 m_nNumPages; + + // Metadata about the file + const ISOFileDef* m_FileDef; + + // The compression format used on the file + enum class Kind { + UNKNOWN = 0, + NORMAL = 1, + LZO_COMPRESSED = 2, + } m_FileKind = Kind::UNKNOWN; + + EIsoStatus m_Status = EIsoStatus::NONE_0; + + // The expected read rate for streaming, used to prioritize CD reads. Can be 0 if unknown/not + // applicable. + int m_ReadRate = 0; + + // Number of sectors that we should read in total, decided based on the file size and request from + // user when they opened this file. + int m_LengthPages = 0; // really, in pages... + + // The current offset. (todo: is this for data we read, processed?) + int m_PageOffset = 0; + + // Semaphore that we should wait on before handing new data to the process callback. + // Set to -1 if there is no semaphore. + // (this is a bit of hack, only used for VAG streaming). + int m_ProcessDataSemaphore = 0; + + // virtual methods + virtual EIsoStatus BeginRead() = 0; + virtual EIsoStatus SyncRead() = 0; + virtual void Close() = 0; + virtual int RecoverPages(int num_pages) = 0; + virtual int GetSector() = 0; + // ?? + // ?? + // ?? +}; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/basefilesystem.cpp b/game/overlord/jak3/basefilesystem.cpp new file mode 100644 index 0000000000..baef60dcfe --- /dev/null +++ b/game/overlord/jak3/basefilesystem.cpp @@ -0,0 +1,26 @@ +#include "basefilesystem.h" + +#include "common/util/Assert.h" + +#include "game/sce/iop.h" + +using namespace iop; +namespace jak3 { +void jak3_overlord_init_globals_basefilesystem() {} + +CBaseFileSystem::CBaseFileSystem() { + for (auto& sema : m_Sema) { + sema = -1; + + SemaParam param; + param.max_count = 1; + param.attr = 0; + param.init_count = 1; + param.option = 0; + sema = CreateSema(¶m); + if (sema < 0) { + ASSERT_NOT_REACHED(); + } + } +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/basefilesystem.h b/game/overlord/jak3/basefilesystem.h new file mode 100644 index 0000000000..b0d76b19d2 --- /dev/null +++ b/game/overlord/jak3/basefilesystem.h @@ -0,0 +1,33 @@ +#pragma once + +namespace jak3 { +void jak3_overlord_init_globals_basefilesystem(); + +struct ISOFileDef; +struct ISOName; +struct CBaseFile; +struct VagDirEntry; + +constexpr int kMaxOpenFiles = 16; + +/*! + * Base class for "FileSystem", which supports finding and opening files. + * The only implementation we have is CISOCDFileSystem + */ +struct CBaseFileSystem { + CBaseFileSystem(); + virtual ~CBaseFileSystem() = default; + + // semaphores for processing open files + int m_Sema[kMaxOpenFiles]; + + virtual int Init() = 0; + // polldrive + virtual ISOFileDef* Find(const char* name) = 0; + virtual ISOFileDef* FindIN(const ISOName* name) = 0; + virtual int GetLength(const ISOFileDef* file) = 0; + virtual CBaseFile* Open(const ISOFileDef* file_def, int sector_offset, int file_kind) = 0; + virtual CBaseFile* OpenWAD(const ISOFileDef* file_def, int page_offset) = 0; + virtual VagDirEntry* FindVAGFile(const char* name) = 0; +}; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/dma.cpp b/game/overlord/jak3/dma.cpp new file mode 100644 index 0000000000..e194d01aa7 --- /dev/null +++ b/game/overlord/jak3/dma.cpp @@ -0,0 +1,526 @@ +#include "dma.h" + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" +#include "game/sound/sdshim.h" +#include "game/sound/sndshim.h" + +#define VOICE_BIT(voice) (1 << ((voice) >> 1)) + +namespace jak3 { +using namespace iop; +namespace { + +// most recent call to voice_trans_wrapper's arguments +u32 g_voiceTransMode = 0; +u32 g_voiceTransSize = 0; +s16 g_voiceTransChannel = 0; +const void* g_voiceTransAddr = nullptr; +u32 g_voiceTransSpuAddr = 0; + +// if we've started a transfer recently +bool g_voiceTransRunning = false; +// when that transfer was started +u32 g_voiceTransTime = 0; + +// despite the name, this is really an indicator that the SPU streaming system is waiting +// for a SPU interrupt on completion. +bool g_bSpuDmaBusy = false; +int g_nSpuDmaChannel = 0; + +ISO_VAGCommand* g_pDmaVagCmd = nullptr; +ISO_VAGCommand* g_pDmaStereoVagCmd = nullptr; + +int g_nSpuDmaChunks = 0; + +std::array g_aSpuDmaQueue; +int g_nSpuDmaQueueHead = 0; +int g_nSpuDmaQueueTail = 0; +int g_nSpuDmaQueueCount = 0; + +struct DmaInterruptHandlerHack { + s32 chan = 0; + sceSdTransIntrHandler cb = nullptr; + void* data; + int countdown = 0; +} g_DmaInterruptHack; + +} // namespace + +void jak3_overlord_init_globals_dma() { + g_voiceTransMode = 0; + g_voiceTransSize = 0; + g_voiceTransChannel = 0; + g_voiceTransAddr = nullptr; + g_voiceTransSpuAddr = 0; + g_voiceTransRunning = false; + g_voiceTransTime = 0; + g_bSpuDmaBusy = false; + g_nSpuDmaChannel = 0; + g_pDmaVagCmd = nullptr; + g_pDmaStereoVagCmd = nullptr; + g_nSpuDmaChunks = 0; + g_aSpuDmaQueue = {}; + g_nSpuDmaQueueHead = 0; + g_nSpuDmaQueueCount = 0; + g_nSpuDmaQueueTail = 0; + g_DmaInterruptHack = {}; +} + +// The DMA callback hack below is used to defer dma completion "interrupts" until the next run +// of the ISO Thread. This avoids re-entry type problems where the original design would set off +// a dma transfer in the completion handler of the previous transfer, and expect a few instructions +// to run after. + +void uninstall_dma_intr() { + g_DmaInterruptHack = {}; +} + +void set_dma_intr_handler_hack(s32 chan, sceSdTransIntrHandler cb, void* data) { + ASSERT(!g_DmaInterruptHack.cb); + g_DmaInterruptHack.chan = chan; + g_DmaInterruptHack.cb = cb; + g_DmaInterruptHack.data = data; + g_DmaInterruptHack.countdown = 10; +} + +int SPUDmaIntr(int channel, void* userdata); + +void dma_intr_hack() { + if (g_DmaInterruptHack.countdown) { + g_DmaInterruptHack.countdown--; + if (g_DmaInterruptHack.countdown == 0) { + int chan = g_DmaInterruptHack.chan; + void* data = g_DmaInterruptHack.data; + g_DmaInterruptHack = {}; + SPUDmaIntr(chan, data); + } + } +} + +/*! + * This function is used to set up a DMA transfer to SPU DMA. + * + * This wrapper was added very close to the end of Jak 3's development. + * + * I believe it basically checks for dma transfers that are somehow "dropped", and retries them. + * Since I don't think our IOP framework will ever do this, we have an assert if the dropped logic + * ever goes off. + */ +int voice_trans_wrapper(s16 chan, u32 mode, const void* iop_addr, u32 spu_addr, u32 size) { + // remember the transfer settings. If there's a transfer in progress, so we can't start here, + // we'll use these to start the transfer later. + g_voiceTransMode = mode; + g_voiceTransSize = size; + g_voiceTransChannel = chan; + g_voiceTransAddr = iop_addr; + g_voiceTransSpuAddr = spu_addr; + + if (g_voiceTransRunning) { + // I claim this should never happen, and this is their workaround for a bug. + ASSERT_NOT_REACHED(); + return -0xd2; // busy + } else { + g_voiceTransRunning = true; + g_voiceTransTime = GetSystemTimeLow(); + return sceSdVoiceTrans(chan, mode, iop_addr, spu_addr, size); + } +} + +u32 read_rate_calc(u32 pitch) { + u64 pitch1 = (pitch >> 3); + u64 mult_result = pitch1 * 0x2492'4925ull; + return mult_result >> 32; +} + +/*! + * The worst function of all time - the SPU DMA completion interrupt. + */ +int SPUDmaIntr(int channel, void* userdata) { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr enter! {} 0x{:x}", channel, (u64)userdata); + + if (!g_bSpuDmaBusy) { + // we got an interrupt, but weren't expecting it, or no longer have the need for the data. + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr exit - not busy"); + return 0; + } + + if (channel != g_nSpuDmaChannel) { + // interrupt was for the wrong channel, somehow. + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr exit - not our channel ??"); + return 0; + } + + // since we're in the completion handler, we know that there is no voice trans (SPU DMA) running. + g_voiceTransRunning = false; + + // This next block will handle updating the playback command that triggered this dma: + if (g_pDmaVagCmd) { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDma for cmd {}", g_pDmaVagCmd->name); + if (!g_pDmaStereoVagCmd) { + // non-stereo audio + + // set a flag to indicate even/odd number of chunks have been dma'd + if ((g_nSpuDmaChunks & 1) == 0) { + g_pDmaVagCmd->flags.dma_complete_even_chunk_count = 1; + } else { + g_pDmaVagCmd->flags.dma_complete_odd_chunk_count = 1; + } + } else { + // stereo audio. This requires two uploads, one for left/right audio. If we've finished the + // first, start the second one here: + if (g_pDmaStereoVagCmd->xfer_size) { + // parameters for second upload + int chan = g_pDmaVagCmd->dma_chan; + const u8* iop_addr = g_pDmaStereoVagCmd->dma_iop_mem_ptr; + int size = g_pDmaStereoVagCmd->xfer_size; + + // SPU addr - toggle the buffer based on stereo side: + // TODO: better explanation of why this picks the correct buffer. + int spu_addr; + if ((g_nSpuDmaChunks & 1) == 0) { + spu_addr = g_pDmaStereoVagCmd->stream_sram; + } else { + spu_addr = g_pDmaStereoVagCmd->stream_sram + 0x2000; + } + + // these lines reordered to possibly support immediate dma completion callback?? + + // clear flag so we know not to transfer the next part + g_pDmaStereoVagCmd->xfer_size = 0; + g_pDmaStereoVagCmd->dma_iop_mem_ptr = nullptr; + + // start next transfer + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr starting stereo sibling transfer"); + set_dma_intr_handler_hack(g_nSpuDmaChannel, SPUDmaIntr, userdata); + voice_trans_wrapper(chan, 0, iop_addr, spu_addr, size); + return 0; + } + + // second stereo upload completed - update double-buffering flags + if ((g_nSpuDmaChunks & 1) == 0) { + g_pDmaVagCmd->flags.dma_complete_even_chunk_count = 1; + g_pDmaStereoVagCmd->flags.dma_complete_even_chunk_count = 1; + } else { + g_pDmaVagCmd->flags.dma_complete_odd_chunk_count = 1; + g_pDmaStereoVagCmd->flags.dma_complete_odd_chunk_count = 1; + } + } + + // if this is the first chunk, we'll start the actual audio here: + // lg::warn("----------> interrupt with chunks {}\n", g_nSpuDmaChunks); + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr chunks count {}", g_nSpuDmaChunks); + + if (g_nSpuDmaChunks == 0) { + // compute pitch/playback rate + int pitch = CalculateVAGPitch(g_pDmaVagCmd->pitch1, g_pDmaVagCmd->pitch_cmd); + ASSERT(pitch == (pitch & 0xffff)); + + // inform the ISO system how fast we're reading + if (g_pDmaVagCmd->m_pBaseFile) { + // unlike actual playback, this is done with the pitch1 value from the file itself - so if + // we speed up/slow down stuff in debug, it won't change streaming modes + const int pitch_from_file = + CalculateVAGPitch(g_pDmaVagCmd->pitch1_file, g_pDmaVagCmd->pitch_cmd); + int rate = g_pDmaStereoVagCmd ? pitch_from_file * 0x2ee : pitch_from_file * 0x177; + g_pDmaVagCmd->m_pBaseFile->m_ReadRate = read_rate_calc(rate); + } + + // start! + u32 voice_mask = 0; + if (!g_pDmaStereoVagCmd) { + // forget any previous spu address + g_pDmaVagCmd->current_spu_address = 0; + + static_assert(SD_VA_SSA == 0x2040); + static_assert(SD_S_KOFF == 0x1600); + static_assert(SD_S_KON == 0x1500); + + static_assert(SD_VP_ADSR1 == 0x300); + static_assert(SD_VP_ADSR2 == 0x400); + static_assert(SD_VP_PITCH == 0x200); + + // before touching SPU2 hardware, wait for voice safety: + BlockUntilVoiceSafe(g_pDmaVagCmd->voice, 0x900); + + // set address and ADSR settings + sceSdSetAddr(g_pDmaVagCmd->voice | SD_VA_SSA, g_pDmaVagCmd->stream_sram + 0x30); + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_ADSR1, 0xff); + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_ADSR2, 0x1fc0); + if (g_pDmaVagCmd->flags.paused) { + pitch = 0; + } + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_PITCH, pitch); + voice_mask = VOICE_BIT(g_pDmaVagCmd->voice); + } else { + // forget any previous spu address + g_pDmaVagCmd->current_spu_address = 0; + g_pDmaStereoVagCmd->current_spu_address = 0; + + // wait for voices to be safe to adjust + BlockUntilVoiceSafe(g_pDmaVagCmd->voice, 0x900); + BlockUntilVoiceSafe(g_pDmaStereoVagCmd->voice, 0x900); + + // set voice params + sceSdSetAddr(g_pDmaVagCmd->voice | SD_VA_SSA, g_pDmaVagCmd->stream_sram + 0x30); + sceSdSetAddr(g_pDmaStereoVagCmd->voice | SD_VA_SSA, g_pDmaStereoVagCmd->stream_sram + 0x30); + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_ADSR1, 0xff); + sceSdSetParam(g_pDmaStereoVagCmd->voice | SD_VP_ADSR1, 0xff); + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_ADSR2, 0x1fc0); + sceSdSetParam(g_pDmaStereoVagCmd->voice | SD_VP_ADSR2, 0x1fc0); + if (g_pDmaVagCmd->flags.paused) { + pitch = 0; + } + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_PITCH, pitch); + sceSdSetParam(g_pDmaStereoVagCmd->voice | SD_VP_PITCH, pitch); + voice_mask = VOICE_BIT(g_pDmaVagCmd->voice) | VOICE_BIT(g_pDmaStereoVagCmd->voice); + } + + // do key-on or key-off + if (g_pDmaVagCmd->flags.paused) { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr chunks 0, key off"); + BlockUntilAllVoicesSafe(); + sceSdSetSwitch(SD_S_KOFF | (g_pDmaVagCmd->voice & 1), voice_mask); + } else { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr chunks 0, key on"); + BlockUntilAllVoicesSafe(); + sceSdSetSwitch(SD_S_KON | (g_pDmaVagCmd->voice & 1), voice_mask); + } + + // remember the time of the key-on/off. This is used to avoid sending voice commands + // quickly, which somehow confuses the sound hardware. + auto sys_time = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(g_pDmaVagCmd->voice, sys_time); + if (g_pDmaStereoVagCmd) { + MarkVoiceKeyedOnOff(g_pDmaStereoVagCmd->voice, sys_time); + } + } else if (g_nSpuDmaChunks == 1) { + g_pDmaVagCmd->flags.saw_chunks1 = 1; + if (g_pDmaStereoVagCmd) { + g_pDmaStereoVagCmd->flags.saw_chunks1 = 1; + } + + if (g_pDmaVagCmd->flags.paused) { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr chunks 1, pausing"); + u32 voice_mask = 0; + if (!g_pDmaStereoVagCmd) { + // pause by setting pitches to 0 + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_PITCH, 0); + BlockUntilVoiceSafe(VOICE_BIT(g_pDmaVagCmd->voice), 0x900); + voice_mask = VOICE_BIT(g_pDmaVagCmd->voice); + } else { + sceSdSetParam(g_pDmaStereoVagCmd->voice | SD_VP_PITCH, 0); + sceSdSetParam(g_pDmaVagCmd->voice | SD_VP_PITCH, 0); + BlockUntilVoiceSafe(VOICE_BIT(g_pDmaVagCmd->voice), 0x900); + BlockUntilVoiceSafe(VOICE_BIT(g_pDmaStereoVagCmd->voice), 0x900); + voice_mask = VOICE_BIT(g_pDmaVagCmd->voice) | VOICE_BIT(g_pDmaStereoVagCmd->voice); + } + + // switch off + BlockUntilAllVoicesSafe(); + sceSdSetSwitch(SD_S_KOFF | (g_pDmaVagCmd->voice & 1), voice_mask); + auto sys_time = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(g_pDmaVagCmd->voice, sys_time); + if (g_pDmaStereoVagCmd) { + MarkVoiceKeyedOnOff(g_pDmaStereoVagCmd->voice, sys_time); + } + } else { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr chunks 1, unpausing by call to UnPauseVAG"); + g_pDmaVagCmd->flags.paused = 1; + UnPauseVAG(g_pDmaVagCmd); + } + } + + // now that we've processed the command from this interrupt, mark it as safe to modify + g_pDmaVagCmd->safe_to_modify_dma = 1; + if (g_pDmaStereoVagCmd) { + g_pDmaStereoVagCmd->safe_to_modify_dma = 1; + } + // and forget it! + g_pDmaVagCmd = nullptr; + g_pDmaStereoVagCmd = nullptr; + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr dma handling of VAG cmd is complete"); + } + + // release ref on this page. (interestingly, not a dma ref...) + if (userdata) { + CPage* page = (CPage*)userdata; + int ret = page->ReleaseRef(); + ASSERT(ret >= 0); + } + + // now - see if we have another queued dma transfer + ASSERT(g_nSpuDmaQueueCount >= 0); + if (g_nSpuDmaQueueCount == 0) { + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr dma queue is empty, disabling interrupt"); + // we're done! + // set_dma_intr_handler_hack(channel, nullptr, nullptr); + uninstall_dma_intr(); + // if (-1 < channel) { + // snd_FreeSPUDMA(channel); + // } + g_bSpuDmaBusy = false; + } else { + ovrld_log(LogCategory::SPU_DMA_STR, + "SPUDmaIntr dma queue is not empty, preparing to run {} ({} pending)", + g_nSpuDmaQueueHead, g_nSpuDmaQueueCount); + // nope, more dma to run + auto* next_xfer = &g_aSpuDmaQueue[g_nSpuDmaQueueHead]; + + // set up the next interrupt handler + set_dma_intr_handler_hack(channel, SPUDmaIntr, next_xfer->user_data); + + // args for the dma transfer + int next_chan = channel; + int next_mode = 0; + const void* next_iop = next_xfer->iop_mem; + u32 next_spu = next_xfer->spu_addr; + u32 next_length = next_xfer->length; + + // load up the commands to handle + g_pDmaVagCmd = next_xfer->command; + g_pDmaStereoVagCmd = nullptr; + if (g_pDmaVagCmd) { + g_pDmaStereoVagCmd = g_pDmaVagCmd->stereo_sibling; + } + g_nSpuDmaChunks = next_xfer->num_isobuffered_chunks; + + // advance the queue! + g_nSpuDmaQueueCount = g_nSpuDmaQueueCount + -1; + g_nSpuDmaQueueHead = g_nSpuDmaQueueHead + 1; + if (0xf < g_nSpuDmaQueueHead) { + g_nSpuDmaQueueHead = 0; + } + + // start the next one! + // set_dma_intr_handler_hack(g_nSpuDmaChannel, SPUDmaIntr, userdata); + voice_trans_wrapper(next_chan, next_mode, next_iop, next_spu, next_length); + } + + ovrld_log(LogCategory::SPU_DMA_STR, "SPUDmaIntr exit - end of function"); + return 0; +} + +/*! + * Start DMA to EE. + */ +void DMA_SendToEE(void* ee_dest, + const void* iop_src, + u32 length, + void callback(void*), + void* callback_arg) { + ASSERT(iop_src); + ASSERT(ee_dest); + ASSERT(((uintptr_t)iop_src & 3) == 0); + ASSERT(((uintptr_t)ee_dest & 0xf) == 0); + ASSERT(length < 0xffff0); + sceSifDmaData cmd; // DMA settings + + // setup command + cmd.mode = 0; + cmd.data = iop_src; + cmd.addr = ee_dest; + cmd.size = length; + + // instant DMA + // ovrld_log(LogCategory::EE_DMA, "DMA_SendToEE: 0x{:x}, size {}", (u64)ee_dest, length); + sceSifSetDma(&cmd, 1); + + // for now, we'll do the callback here, but I bet it will cause problems + if (callback) { + callback(callback_arg); + } +} + +/*! + * Start DMA transfer to SPU. Despite the name, this does not actually "sync" - the transfer will + * be ongoing. If there is an ongoing transfer when this is called, the transfer will be queued. + */ +int DMA_SendToSPUAndSync(const u8* iop_mem, + int length, + int spu_addr, + ISO_VAGCommand* cmd, + void* user_data) { + // CpuSuspendIntr(local_28); + int ret = 1; + bool defer = false; + + ovrld_log(LogCategory::SPU_DMA_STR, + "DMA to SPU requested for {}, {} bytes to 0x{:x}, currently busy? {}", + cmd ? cmd->name : "NO-CMD", length, spu_addr, g_bSpuDmaBusy); + if (g_bSpuDmaBusy == 0) { + // not busy, we can actually start dma now. + g_nSpuDmaChannel = snd_GetFreeSPUDMA(); + if (g_nSpuDmaChannel == -1) { + return 0; + } + // set globals for DMA processing + if (cmd) { + g_nSpuDmaChunks = cmd->num_isobuffered_chunks; + g_pDmaStereoVagCmd = cmd->stereo_sibling; + g_pDmaVagCmd = cmd; + } + + } else { + // busy, need to queue the dma + ASSERT(g_nSpuDmaQueueCount <= (int)g_aSpuDmaQueue.size()); + + // set values: + g_aSpuDmaQueue[g_nSpuDmaQueueTail].length = length; + g_aSpuDmaQueue[g_nSpuDmaQueueTail].spu_addr = spu_addr; + g_aSpuDmaQueue[g_nSpuDmaQueueTail].user_data = user_data; + g_aSpuDmaQueue[g_nSpuDmaQueueTail].num_isobuffered_chunks = + cmd ? cmd->num_isobuffered_chunks : 0; + g_aSpuDmaQueue[g_nSpuDmaQueueTail].command = cmd; + g_aSpuDmaQueue[g_nSpuDmaQueueTail].iop_mem = iop_mem; + g_nSpuDmaQueueCount = g_nSpuDmaQueueCount + 1; + g_nSpuDmaQueueTail = g_nSpuDmaQueueTail + 1; + if (0xf < g_nSpuDmaQueueTail) { + g_nSpuDmaQueueTail = 0; + } + defer = true; + } + + // set up the stereo command + if (cmd) { + cmd->safe_to_modify_dma = 0; + auto* stereo = cmd->stereo_sibling; + if (stereo) { + stereo->num_isobuffered_chunks = cmd->num_isobuffered_chunks; + stereo->dma_iop_mem_ptr = iop_mem + length; + cmd->dma_chan = g_nSpuDmaChannel; + stereo->xfer_size = length; + } + } + + // kick off dma, if we decided not to queue. + if (!defer) { + g_bSpuDmaBusy = true; + set_dma_intr_handler_hack(g_nSpuDmaChannel, SPUDmaIntr, user_data); + voice_trans_wrapper(g_nSpuDmaChannel, 0, iop_mem, spu_addr, length); + } + return ret; +} + +/*! + * Run a dma transfer that was delayed or dropped. + */ +void RunDeferredVoiceTrans() { + // only if there's a currently happening transfer. + if (g_voiceTransRunning) { + if (GetSystemTimeLow() - g_voiceTransTime > 0x384000) { + ovrld_log(LogCategory::WARN, "DeferredVoiceTrans has detected hung dma... expect problems."); + // original game also check sceSdVoiceTransStatus here, we'll possibly need to mess with this + // if we delay dma completion interrupts... + g_voiceTransRunning = false; + voice_trans_wrapper(g_voiceTransChannel, g_voiceTransMode, g_voiceTransAddr, + g_voiceTransSpuAddr, g_voiceTransSize); + } + } +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/dma.h b/game/overlord/jak3/dma.h new file mode 100644 index 0000000000..f8e689d6ab --- /dev/null +++ b/game/overlord/jak3/dma.h @@ -0,0 +1,32 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_dma(); +struct ISO_VAGCommand; + +int voice_trans_wrapper(s16 chan, u32 mode, const void* iop_addr, u32 spu_addr, u32 size); +void DMA_SendToEE(void* ee_dest, + const void* iop_src, + u32 length, + void callback(void*), + void* callback_arg); +int DMA_SendToSPUAndSync(const u8* iop_mem, + int length, + int spu_addr, + ISO_VAGCommand* cmd, + void* user_data); +void RunDeferredVoiceTrans(); +struct ISO_VAGCommand; + +struct DmaQueueEntry { + ISO_VAGCommand* command = nullptr; + const void* iop_mem = nullptr; + u32 spu_addr = 0; + u32 length = 0; + void* user_data = nullptr; + u32 num_isobuffered_chunks = 0; +}; +void dma_intr_hack(); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/dvd_driver.cpp b/game/overlord/jak3/dvd_driver.cpp new file mode 100644 index 0000000000..4cc1cc7f1b --- /dev/null +++ b/game/overlord/jak3/dvd_driver.cpp @@ -0,0 +1,583 @@ +#include "dvd_driver.h" + +#include +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" +#include "common/util/FileUtil.h" + +#include "game/overlord/jak3/isocommon.h" +#include "game/overlord/jak3/overlord.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; +std::unique_ptr g_DvdDriver; +s32 g_nDvdDriverThread = -1; + +void jak3_overlord_init_globals_dvd_driver() { + g_DvdDriver = std::make_unique(); + g_nDvdDriverThread = -1; +} + +CDvdDriver* get_driver() { + return g_DvdDriver.get(); +} + +CMsg::CMsg(jak3::CMsg::MsgKind msg) : m_msg(msg) { + m_ret = 1; + m_thread = GetThreadId(); +} + +int CMsg::send() { + // note: changed from passing data + // and removed corresponding -4 to skip back past the vtable in DVD thread + // (what were they thinking?) + s32 ret = SendMbx(get_driver()->msgbox, this); + if (ret == 0) { + get_driver()->KickDvdThread(); + SleepThread(); + return m_ret; + } + return ret; +} + +// CMsgLock::CMsgLock() : CMsg(CMsg::MsgKind::LOCK) {} +// +// void CMsgLock::handler() { +// get_driver()->Lock(); +// m_ret = 0; +// } + +// CMsgReadRaw::CMsgReadRaw(jak3::BlockParams* params) : CMsg(CMsg::MsgKind::READ_RAW) { +// m_block_params = *params; +// } +// +// void CMsgReadRaw::handler() { +// m_ret = get_driver()->ReadDirect(&m_block_params); +// } + +CMsgCancelRead::CMsgCancelRead(jak3::CDescriptor* desc) : CMsg(CMsg::MsgKind::CANCEL_READ) { + m_desc = desc; +} + +void CMsgCancelRead::handler() { + get_driver()->CancelRead(m_desc); + m_ret = 0; +} + +u32 DvdThread(); + +CDvdDriver::CDvdDriver() { + fifo_entry_sema = -1; + current_thread_priority = 0x13; + disk_type = 5; + tray_flag = 1; + // m_nLockCount = 0; + event_flag = -1; + fifo_access_sema = -1; + tray_flag2 = 1; + initialized = 0; + m_nNumFifoEntries = 0; + ring_head = 0; + ring_tail = 0; + read_in_progress = 0; + callback = nullptr; + // locked = false; + trayflag3 = 0; + m_nDvdThreadAccessSemaCount = 0; + memset(ring, 0, sizeof(Block) * 16); +} + +void CDvdDriver::Initialize() { + if (!initialized) { + *this = {}; + ThreadParam thread_param; + thread_param.attr = 0x2000000; + // mbox_param.option = gDvdDriverThreadOptions; // ??? + thread_param.entry = DvdThread; + thread_param.stackSize = 0x800; + thread_param.initPriority = 0x13; + thread_param.option = 0; + strcpy(thread_param.name, "dvd"); + // mbox_param.attr = (int)PTR_DvdThread_00015c98; // ??? + g_nDvdDriverThread = CreateThread(&thread_param); + ASSERT(g_nDvdDriverThread >= 0); + + SemaParam sema_param; + sema_param.attr = 0; + sema_param.init_count = 1; + sema_param.max_count = 1; + sema_param.option = 0; + fifo_access_sema = CreateSema(&sema_param); + ASSERT(fifo_access_sema >= 0); + sema_param.max_count = 0x10; + sema_param.attr = 0; + sema_param.init_count = 0x10; + sema_param.option = 0; + fifo_entry_sema = CreateSema(&sema_param); + ASSERT(fifo_entry_sema >= 0); + MbxParam mbox_param; + mbox_param.attr = 0; + mbox_param.option = 0; + msgbox = CreateMbx(&mbox_param); + ASSERT(msgbox >= 0); + + EventFlagParam param; + param.attr = 0; + param.option = 0; + param.init_pattern = 0; + event_flag = CreateEventFlag(¶m); + ASSERT(event_flag >= 0); + StartThread(g_nDvdDriverThread, 0); // this... + } + initialized = 1; +} + +void CDvdDriver::SetDriverCallback(std::function f) { + callback = f; +} + +// GetDriveCallback + +// Poll - would kick the thread... + +// void CDvdDriver::Lock() { +// ASSERT_NOT_REACHED(); +// if (GetThreadId() == g_nDvdDriverThread) { +// m_nLockCount++; +// locked = true; +// // needs break HACK +// needs_break = false; +// } else { +// CMsgLock lock; +// lock.send(); +// } +// } + +// Read + +int CDvdDriver::ReadMultiple(CDescriptor* descriptor, + int* pages_read_out, + BlockParams* params, + int num_blocks, + bool block_if_queue_full) { + *pages_read_out = 0; + s32 ret = 1; + + // check block parameters are reasonable + if (ValidateBlockParams(params, num_blocks) != 0) { + bool from_dvd_thread = GetThreadId() == g_nDvdDriverThread; + if (from_dvd_thread) { + // there is a setting to control if this function should block if there are too many + // queued reads. If the is called from the DVD thread, then this would deadlock. + // the original game ignored the block argument, but I'm asserting + block_if_queue_full = 0; + ASSERT_NOT_REACHED(); + } + + ovrld_log(LogCategory::DRIVER, "[driver] ReadMultiple (from our thread? {}) num_blocks {}", + from_dvd_thread, num_blocks); + + ret = 0; + if (0 < num_blocks) { + // loop, until we've done all the requested reads. + do { + s32 acquired_slots = 0; + if (0 < num_blocks) { + // loop to try to get up to num_blocks slots in the fifo + // but, if we get less, we'll take that too + do { + if (PollSema(this->fifo_entry_sema) == -0x1a3) + break; + acquired_slots = acquired_slots + 1; + } while (acquired_slots < num_blocks); + } + ovrld_log(LogCategory::DRIVER, "[driver] ReadMultiple acquired {} slots in ring", + acquired_slots); + + // if we are blocking, and we acquired no slots, then we'll wait here until we get one slot. + if ((block_if_queue_full != 0) && (acquired_slots < 1)) { + ovrld_log(LogCategory::DRIVER, "[driver] ring is full, blocking!"); + acquired_slots = 1; // the one we'll get from the WaitSema below + do { + } while (WaitSema(fifo_entry_sema) != 0); + } + + // lock, now that we've gotten the slots + AcquireFIFOSema(from_dvd_thread); + num_blocks = num_blocks - acquired_slots; + + // if we didn't get any slots, bail. + if (acquired_slots < 1) { + ovrld_log(LogCategory::DRIVER, "[driver] ring is full, bailing!"); + ReleaseFIFOSema(from_dvd_thread); + if (0 < *pages_read_out) { + KickDvdThread(); + } + return 2; + } + + // loop, updating the ring for each slot we aquired + do { + auto* slot = ring + ring_tail; + ovrld_log(LogCategory::DRIVER, "[driver] inserting in ring slot {}", ring_tail); + + ring_tail++; + if (0xf < ring_tail) { + ring_tail = 0; + } + m_nNumFifoEntries++; + + auto* tail = descriptor->m_pTail; + slot->descriptor = descriptor; + slot->params = params[*pages_read_out]; + *pages_read_out = (*pages_read_out) + 1; + if (!tail) { + descriptor->m_pHead = slot; + } else { + tail->next = slot; + } + acquired_slots = acquired_slots + -1; + descriptor->m_pTail = slot; + slot->next = nullptr; + } while (acquired_slots != 0); + ReleaseFIFOSema(from_dvd_thread); + KickDvdThread(); + ret = 0; + } while (0 < num_blocks); + } + } else { + ASSERT_NOT_REACHED(); + } + return ret; +} + +void CDvdDriver::CancelRead(jak3::CDescriptor* desc) { + if (GetThreadId() == g_nDvdDriverThread) { + AcquireFIFOSema(true); + if ((read_in_progress != 0) && (ring[ring_head].descriptor == desc)) { + // while (iVar1 = sceCdBreak(), iVar1 == 0) { + // DelayThread(8000); + // sceCdSync(0); + // } + // sceCdSync(0); + read_in_progress = 0; + } + + Block* iter = desc->m_pHead; + Block* tail = desc->m_pTail; + while (iter) { + if (iter->descriptor) { + CompletionHandler(iter, 6); + } + iter->descriptor = nullptr; + iter->next = nullptr; + if (iter == tail) + break; + iter = desc->m_pHead; + } + + if (desc->m_pTail == tail) { + desc->m_pTail = nullptr; + } + ReleaseFIFOSema(true); + } else { + CMsgCancelRead msg(desc); + msg.send(); + } +} + +s32 CDvdDriver::ValidateBlockParams(jak3::BlockParams* params, int num_params) { + if (!params) { + lg::die("Invalid BlockParams: nullptr"); + return 0; + } + if (num_params < 1) { + lg::die("Invalid BlockParams: size == 0"); + return 0; + } + + for (int i = 0; i < num_params; i++) { + auto& p = params[i]; + if (p.destination == nullptr) { + lg::die("Invalid BlockParams: {} had nullptr dest", i); + return 0; + } + int kMaxSector = 1000000; + if (p.sector_num > kMaxSector) { + // this is just a sanity check - if we ever have larger files this is okay to increase. + lg::die("Invalid BlockParams: {} had sector num {}", i, p.sector_num); + return 0; + } + if (p.num_sectors > 0x1d0) { + lg::die("Invalid BlockParams: {} had sector count {}", i, p.num_sectors); + return 0; + } + if (!p.file_def) { + lg::die("Invalid BlockParams: {} had no file", i); + return 0; + } + } + return 1; +} + +void CDvdDriver::KickDvdThread() { + while (SetEventFlag(event_flag, 1)) { + ; + } +} + +int CDvdDriver::AcquireFIFOSema(bool from_dvd_thread) { + int iVar1; + int iVar2; + + if ((from_dvd_thread != 0) && + (iVar2 = m_nDvdThreadAccessSemaCount, m_nDvdThreadAccessSemaCount = iVar2 + 1, 0 < iVar2)) { + return 0; + } + iVar1 = WaitSema(this->fifo_access_sema); + iVar2 = 0; + if ((iVar1 != 0) && (iVar2 = iVar1, from_dvd_thread != 0)) { + m_nDvdThreadAccessSemaCount = m_nDvdThreadAccessSemaCount + -1; + iVar2 = iVar1; + } + return iVar2; +} + +int CDvdDriver::ReleaseFIFOSema(bool from_dvd_thread) { + int iVar1; + int iVar2; + + if (from_dvd_thread != 0) { + iVar2 = m_nDvdThreadAccessSemaCount + -1; + if (m_nDvdThreadAccessSemaCount < 1) { + return -0x1a4; + } + m_nDvdThreadAccessSemaCount = iVar2; + if (0 < iVar2) { + return 0; + } + } + iVar1 = SignalSema(fifo_access_sema); + iVar2 = 0; + if ((iVar1 != 0) && (iVar2 = iVar1, from_dvd_thread != 0)) { + m_nDvdThreadAccessSemaCount = m_nDvdThreadAccessSemaCount + 1; + iVar2 = iVar1; + } + return iVar2; +} + +/*! + * PC port added function to actually do a read of a block. + */ +void CDvdDriver::read_from_file(const jak3::Block* block) { + const auto* fd = block->params.file_def; + ASSERT(fd); + FileCacheEntry* selected_entry = nullptr; + + // get a cache entry + for (auto& entry : m_file_cache) { + // if we already opened this file, use that + if (entry.def == fd) { + selected_entry = &entry; + break; + } + + // otherwise pick the least recently used + if (!selected_entry) { + selected_entry = &entry; + } else { + if (selected_entry->last_use_count > entry.last_use_count) { + selected_entry = &entry; + } + } + } + + // open a new file if needed + if (selected_entry->def != fd) { + lg::debug("CDvdDriver swapping files {} - > {}", + selected_entry->def ? selected_entry->def->name.data : "NONE", fd->name.data); + if (selected_entry->def) { + fclose(selected_entry->fp); + } + + selected_entry->def = fd; + selected_entry->fp = file_util::open_file(fd->full_path, "rb"); + if (!selected_entry->fp) { + lg::die("Failed to open {} {}", fd->full_path, strerror(errno)); + } + selected_entry->offset_in_file = 0; + } + + // increment use counter + selected_entry->last_use_count = m_file_cache_counter++; + + const u64 desired_offset = block->params.sector_num * 0x800; + + // see if we're reading entirely past the end of the file + if (desired_offset >= fd->length) { + return; + } + + if (selected_entry->offset_in_file != desired_offset) { + lg::debug("CDvdDriver jumping in file {}: {} -> {}", fd->name.data, + selected_entry->offset_in_file, desired_offset); + if (fseek(selected_entry->fp, desired_offset, SEEK_SET)) { + ASSERT_NOT_REACHED_MSG("Failed to fseek"); + } + selected_entry->offset_in_file = desired_offset; + } + + // read + s64 read_length = block->params.num_sectors * 0x800; + s64 extra_length = read_length + desired_offset - fd->length; + if (extra_length > 0) { + read_length -= extra_length; + } + auto ret = fread(block->params.destination, read_length, 1, selected_entry->fp); + if (ret != 1) { + lg::die("Failed to read {} {}, size {} of {} (ret {})", fd->full_path, strerror(errno), + read_length, fd->length, ret); + } + selected_entry->offset_in_file += read_length; +} + +u32 DvdThread() { + auto* driver = get_driver(); + + while (true) { + // Poll for messages + CMsg* msg = nullptr; + while (true) { + int poll_status = PollMbx((MsgPacket**)&msg, driver->msgbox); + if (poll_status || !msg) { + break; + } + // run message code + msg->handler(); + // wake the waiting thread. + WakeupThread(msg->m_thread); + } + + bool completed = false; + + // if a read is in progress, wait for it to finish. + if (driver->read_in_progress) { + // TODO: if we switch to async reads, this is where we'd want to sync. + // sceCdSync(0); + completed = true; + // error checking + } + + driver->AcquireFIFOSema(true); + // error handling + + // handle ring book-keeping. + // note that these are somewhat double-buffered - we'll sync on read i-1, start read i, then + // run the completion handler for read i - 1. + // the completion is what actually removes stuff from the ring. + + s32 fifo_slots_freed = completed ? 1 : 0; + s32 ring_entry = driver->ring_head + (completed ? 1 : 0); + if (ring_entry > 15) { + ring_entry = 0; + } + Block* block = driver->ring + ring_entry; + s32 fifo_entries = driver->m_nNumFifoEntries - fifo_slots_freed; + + if (fifo_entries) { + // start a new read. + driver->read_in_progress = 1; + ovrld_log(LogCategory::DRIVER, "[driver thread] Reading for slot {}", block - driver->ring); + driver->read_from_file(block); + + } else { + driver->read_in_progress = 0; + } + + // run completion handler for the previous read - not the one we just started! + Block sblock; + if (completed) { + auto* last_block = &driver->ring[driver->ring_head]; + ovrld_log(LogCategory::DRIVER, "[driver thread] Completion handler for {}", + driver->ring_head); + sblock = *last_block; + + if (sblock.descriptor && sblock.descriptor->m_pHead) { + ASSERT(sblock.descriptor->m_pHead == last_block); + } + if (((sblock.descriptor)->m_pHead == last_block) && + ((sblock.descriptor)->m_pHead = &sblock, (sblock.descriptor)->m_pTail == last_block)) { + (sblock.descriptor)->m_pTail = &sblock; + } + } + driver->ring_head = ring_entry; + driver->m_nNumFifoEntries = fifo_entries; + while (0 < fifo_slots_freed) { + fifo_slots_freed = fifo_slots_freed + -1; + SignalSema(driver->fifo_entry_sema); + } + if (completed != 0) { + driver->CompletionHandler(&sblock, 0); + } + driver->ReleaseFIFOSema(true); + + // this logic here was modified - we go to waiting if we have no more reads. + if (driver->m_nNumFifoEntries == 0) { + ovrld_log(LogCategory::DRIVER, "[driver thread] No work, waiting."); + WaitEventFlag(driver->event_flag, 1, 0x11); + ovrld_log(LogCategory::DRIVER, "[driver thread] Woken up!"); + } + + // s32 status; + // if ((((driver->locked != false)) || + // ((driver->needs_break == 0 && (driver->m_nNumFifoEntries == 0)))) && + // ((status = WaitEventFlag(driver->event_flag, 1, 0x11), + // status != 0 && (status != -0x1a2)))) { + // if (status == -0x1a9) { + // do { + // SleepThread(); + // } while (true); + // } + // DelayThread(8000); + // } + } +} + +void CDvdDriver::CompletionHandler(jak3::Block* block, int code) { + // there is some janky thread priority changes here, + // but they do not seem to be needed with the changes to the ISO thread. + + // PushPri(this,local_20,0x35); + auto* desc = block->descriptor; + if (desc && desc->m_pHead) { + desc->m_status = code; + int thread = desc->m_ThreadID; + if (desc->m_Callback) { + (desc->m_Callback)(desc->m_File, block, code); + } + if (0 < thread) { + WakeupThread(thread); + } + + Block* next; + if ((desc->m_pHead == block) && (next = block->next, desc->m_pHead = next, next == nullptr)) { + desc->m_pTail = nullptr; + } + } + block->next = nullptr; + block->descriptor = nullptr; + // PopPri(this, local_20[0]); +} + +CDvdDriver::~CDvdDriver() { + for (auto& entry : m_file_cache) { + if (entry.fp) { + fclose(entry.fp); + } + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/dvd_driver.h b/game/overlord/jak3/dvd_driver.h new file mode 100644 index 0000000000..fc3f91c60f --- /dev/null +++ b/game/overlord/jak3/dvd_driver.h @@ -0,0 +1,144 @@ +#pragma once + +#include + +#include "common/common_types.h" + +#include "game/overlord/jak3/isocommon.h" + +namespace jak3 { +void jak3_overlord_init_globals_dvd_driver(); + +/*! + * The DVD Driver is what actually called the Sony CD library functions. + * It also had many special cases for handling errors, open trays, retries, etc that are not + * recreated in this port. + * + * The original DVD driver thread didn't run the actual reads - the Sony CD library had its own + * threads for async reads. However, they would call sceCdSync() to wait until a read finished. + * It's not clear if sceCdSync would allow other threads to run while waiting on the read to finish. + * but if it did, this is a bit of a difference in the blocking behavior. + * + * This is something that could be revisited, as freads will now essentially block the entire + * overlord, including refilling sound RAM. + */ + +struct CDescriptor; +struct BlockParams; +struct CPage; +struct ISOFileDef; + +// The CMSG system is used to pass messages from external threads to the driver. It's mostly used +// internally by the driver, when functions are called on it from outside threads. In these cases +// the Cmsg will get send to the driver thread and handler will run on it here. + +struct CMsg { + enum class MsgKind { + // LOCK = 0, + READ_RAW = 1, + CANCEL_READ = 2, + }; + CMsg(MsgKind msg); + virtual int send(); + virtual void handler() = 0; + + u8 data[8]; + MsgKind m_msg; + int m_thread; + int m_ret; +}; + +// struct CMsgLock : public CMsg { +// CMsgLock(); +// void handler() override; +// }; + +// struct CMsgReadRaw : public CMsg { +// explicit CMsgReadRaw(BlockParams* params); +// void handler() override; +// BlockParams m_block_params; +// }; + +struct CMsgCancelRead : public CMsg { + explicit CMsgCancelRead(CDescriptor* desc); + void handler() override; + CDescriptor* m_desc; +}; + +struct CISOCDFile; + +/*! + * Reference to an ongoing or requested read at the driver level, possibly made up of multiple + * blocks. In this case, the head/tail pointers point to Blocks stored inside the CDvdDriver's + * internal FIFO. + */ +struct CDescriptor { + CDescriptor() = default; + int m_unk0 = 0; + void (*m_Callback)(CISOCDFile*, Block*, s32) = nullptr; + int m_ThreadID = 0; + int m_status = 0; + CISOCDFile* m_File = nullptr; + Block* m_pHead = nullptr; + Block* m_pTail = nullptr; +}; + +class CDvdDriver { + public: + CDvdDriver(); + ~CDvdDriver(); + void Initialize(); + void CancelRead(CDescriptor* descriptor); + int ReadMultiple(CDescriptor* descriptor, + int* pages_read_out, + BlockParams* params, + int num_pages, + bool block_if_queue_full); + void SetDriverCallback(std::function f); + // int ReadDirect(BlockParams* params); + void KickDvdThread(); + // void Lock(); + int GetDiskType() const { return disk_type; } + s32 ValidateBlockParams(BlockParams* params, int num_params); + int ReleaseFIFOSema(bool from_dvd_thread); + int AcquireFIFOSema(bool from_dvd_thread); + void read_from_file(const Block* block); + void CompletionHandler(Block* block, int code); + + u8 initialized = 0; + s32 event_flag = -1; + s32 fifo_access_sema = -1; + s32 fifo_entry_sema = -1; + s32 msgbox = -1; + s32 m_nNumFifoEntries = 0; + s32 ring_head = 0; + s32 ring_tail = 0; + Block ring[16]; + u8 read_in_progress; // more likely: read in progress + std::function callback; + s32 current_thread_priority = 0; + // s32 m_nLockCount = 0; + // bool locked = false; + // + s32 disk_type; + u8 tray_flag2; + u8 trayflag3; + u8 tray_flag; + s32 m_nDvdThreadAccessSemaCount = 0; + + private: + struct FileCacheEntry { + const ISOFileDef* def = nullptr; + FILE* fp = nullptr; + u32 last_use_count = 0; + u64 offset_in_file = 0; + }; + u32 m_file_cache_counter = 0; + static constexpr int kNumFileCacheEntries = 6; + FileCacheEntry m_file_cache[kNumFileCacheEntries]; +}; + +// replacement for g_DvdDriver +CDvdDriver* get_driver(); + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/init.cpp b/game/overlord/jak3/init.cpp new file mode 100644 index 0000000000..7bbc073990 --- /dev/null +++ b/game/overlord/jak3/init.cpp @@ -0,0 +1,50 @@ + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/basefilesystem.h" +#include "game/overlord/jak3/dma.h" +#include "game/overlord/jak3/dvd_driver.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_api.h" +#include "game/overlord/jak3/iso_cd.h" +#include "game/overlord/jak3/iso_queue.h" +#include "game/overlord/jak3/isocommon.h" +#include "game/overlord/jak3/list.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/pagemanager.h" +#include "game/overlord/jak3/ramdisk.h" +#include "game/overlord/jak3/sbank.h" +#include "game/overlord/jak3/soundcommon.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/stream.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/overlord/jak3/vblank_handler.h" + +namespace jak3 { +void jak3_overlord_init_globals_all() { + jak3_overlord_init_globals_overlord(); + jak3_overlord_init_globals_pagemanager(); + jak3_overlord_init_globals_iso_cd(); + jak3_overlord_init_globals_dma(); + jak3_overlord_init_globals_iso(); + jak3_overlord_init_globals_iso_queue(); + jak3_overlord_init_globals_srpc(); + jak3_overlord_init_globals_vag(); + jak3_overlord_init_globals_ssound(); + jak3_overlord_init_globals_iso_api(); + jak3_overlord_init_globals_spustreams(); + jak3_overlord_init_globals_list(); + jak3_overlord_init_globals_vblank_handler(); + jak3_overlord_init_globals_dvd_driver(); + jak3_overlord_init_globals_basefile(); + jak3_overlord_init_globals_basefilesystem(); + jak3_overlord_init_globals_ramdisk(); + jak3_overlord_init_globals_isocommon(); + jak3_overlord_init_globals_stream(); + jak3_overlord_init_globals_sbank(); + jak3_overlord_init_globals_soundcommon(); + jak3_overlord_init_globals_streamlist(); +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/init.h b/game/overlord/jak3/init.h new file mode 100644 index 0000000000..ceecc1b396 --- /dev/null +++ b/game/overlord/jak3/init.h @@ -0,0 +1,5 @@ +#pragma once + +namespace jak3 { +void jak3_overlord_init_globals_all(); +} \ No newline at end of file diff --git a/game/overlord/jak3/iso.cpp b/game/overlord/jak3/iso.cpp new file mode 100644 index 0000000000..6ba18eb2f4 --- /dev/null +++ b/game/overlord/jak3/iso.cpp @@ -0,0 +1,1796 @@ +#include "iso.h" + +#include + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/dma.h" +#include "game/overlord/jak3/iso_api.h" +#include "game/overlord/jak3/iso_cd.h" +#include "game/overlord/jak3/iso_queue.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/rpc_interface.h" +#include "game/overlord/jak3/sbank.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/stream.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" +#include "game/sound/sndshim.h" + +using namespace iop; + +namespace jak3 { +int g_nISOInitFlag = 0; +u32 s_MsgPacket_NotOnStackSync = 0; +int g_nSyncMbx = -1; +int g_nISOMbx = -1; +int g_nDGOMbx = -1; +int g_nDGOThread = -1; +int g_nSTRThreadID = -1; +int g_nISOThreadID = -1; +int g_nPlayThreadID = -1; +int g_nMusicFadeDir = 0; +int g_nMusicFade = 0; +int g_nMusicTweak = 0; +int g_nMusicSemaphore = 0; +bool g_bMusicIsPaused = false; +bool g_bMusicPause = false; +bool g_bAnotherMusicPauseFlag = false; +char g_szCurrentMusicName[0x30]; +char g_szTargetMusicName[0x30]; +int g_nActiveMusicStreams = 0; +bool g_bVagCmdsInitialized = false; +u32 time_of_last_unknown_rate_drive_op = 0; +ISO_DGOCommand sLoadDGO; +RPC_Dgo_Cmd sRPCBuff[1]; +constexpr int kRpcBuffSize = sizeof(RPC_Dgo_Cmd); + +void jak3_overlord_init_globals_iso() { + g_nISOInitFlag = 0; + s_MsgPacket_NotOnStackSync = 0; + g_nSyncMbx = -1; + g_nISOMbx = -1; + g_nDGOMbx = -1; + g_nDGOThread = -1; + g_nSTRThreadID = -1; + g_nISOThreadID = -1; + g_nPlayThreadID = -1; + g_nMusicFadeDir = 0; + g_nMusicFade = 0; + g_nMusicTweak = 0; + g_nMusicSemaphore = 0; + g_bMusicIsPaused = false; + g_bMusicPause = false; + g_szCurrentMusicName[0] = 0; + g_szTargetMusicName[0] = 0; + sLoadDGO = {}; + g_nActiveMusicStreams = 0; + g_bVagCmdsInitialized = false; + time_of_last_unknown_rate_drive_op = 0; + sRPCBuff[0] = {}; +} + +/*! + * Initialize the filesystem driver, then send a message to the sync messagebox + */ +void InitDriver() { + // init the filesystem + if (get_file_system()->Init() == 0) { + g_nISOInitFlag = 0; + } + lg::info("sending mbox for init driver"); + SendMbx(g_nSyncMbx, &s_MsgPacket_NotOnStackSync); +} + +/*! + * Check if there is anything in the sync mbox of the iso thread. + */ +u32 LookSyncMbx() { + MsgPacket* msg_packet; + auto poll_result = PollMbx(&msg_packet, g_nSyncMbx); + if (poll_result != KE_MBOX_NOMSG) { + sLoadDGO.sync_mbox_wait_count++; + } + return poll_result != KE_MBOX_NOMSG; +} + +/*! + * Wait on the message box to have a message. Unlike older versions, they finally figured out + * how to call ReceiveMbx instead of polling in a loop! + */ +u32 WaitMbx(s32 box) { + MsgPacket* msg_packet; + return ReceiveMbx(&msg_packet, box); +} + +u32 ISOThread(); +u32 DGOThread(); + +/*! + * Initialize the Filesystem and ISO Thread. + */ +void InitISOFS() { + // memset(&sLoadDGO,0,0x110); + sLoadDGO = {}; + sLoadDGO.last_id = -1; + g_nISOInitFlag = 1; + sLoadDGO.acked_cancel_id = -1; + sLoadDGO.selected_id = -1; + sLoadDGO.nosync_cancel_pending_flag = 0; + // g_pFileSystem = &g_ISOCDFileSystem; + sLoadDGO.request_cancel_id = -1; + sLoadDGO.nosync_cancel_ack = 0; + sLoadDGO.sync_sent_count = 0; + sLoadDGO.sync_mbox_wait_count = 0; + sLoadDGO.sync_ret_count = 0; + + MbxParam mbx_param; + mbx_param.option = 0; + mbx_param.attr = 0; + + g_nISOMbx = CreateMbx(&mbx_param); + ASSERT(g_nISOMbx >= 0); + g_nDGOMbx = CreateMbx(&mbx_param); + ASSERT(g_nDGOMbx >= 0); + g_nSyncMbx = CreateMbx(&mbx_param); + ASSERT(g_nSyncMbx >= 0); + + ThreadParam thread_param; + + thread_param.stackSize = 0x1100; + thread_param.entry = ISOThread; + thread_param.initPriority = 0x80; // changed to be lower priority + thread_param.attr = TH_C; + thread_param.option = 0; + strcpy(thread_param.name, "ISO"); + g_nISOThreadID = CreateThread(&thread_param); + ASSERT(g_nISOThreadID >= 0); + + thread_param.entry = DGOThread; + thread_param.initPriority = 0x38; + thread_param.attr = TH_C; + thread_param.stackSize = 0x900; + thread_param.option = 0; + strcpy(thread_param.name, "DGO"); + g_nDGOThread = CreateThread(&thread_param); + ASSERT(g_nDGOThread >= 0); + + thread_param.entry = STRThread; + thread_param.initPriority = 0x39; + thread_param.attr = TH_C; + thread_param.stackSize = 0x900; + thread_param.option = 0; + strcpy(thread_param.name, "STR"); + g_nSTRThreadID = CreateThread(&thread_param); + ASSERT(g_nSTRThreadID >= 0); + + thread_param.attr = TH_C; + thread_param.entry = PLAYThread; + thread_param.initPriority = 0x35; + thread_param.stackSize = 0x900; + thread_param.option = 0; + strcpy(thread_param.name, "Play"); + g_nPlayThreadID = CreateThread(&thread_param); + ASSERT(g_nPlayThreadID >= 0); + + StartThread(g_nISOThreadID, 0); + StartThread(g_nDGOThread, 0); + StartThread(g_nSTRThreadID, 0); + StartThread(g_nPlayThreadID, 0); + WaitMbx(g_nSyncMbx); + + const ISOFileDef* vagdir_file = FindISOFile("VAGDIR.AYB"); + if (vagdir_file) { + int load_status = LoadISOFileToIOP(vagdir_file, &g_VagDir, sizeof(g_VagDir)); + if (load_status) { + ASSERT(g_VagDir.vag_magic_1 == 0x41574756); + ASSERT(g_VagDir.vag_magic_2 == 0x52494444); + } else { + lg::warn("Failed to load vagdir file"); + g_VagDir.num_entries = 0; + } + } else { + lg::warn("Failed to find vagdir file"); + g_VagDir.num_entries = 0; + } + + // splash screen load was here... + ASSERT(g_nISOInitFlag == 0); +} + +const ISOFileDef* FindISOFile(const char* name) { + return get_file_system()->Find(name); +} + +s32 GetISOFileLength(const ISOFileDef* def) { + return get_file_system()->GetLength(def); +} + +void SetVagClock(ISO_VAGCommand* cmd) { + cmd->clockc = 0; + cmd->clocka = 0; + cmd->clockb = 0; + cmd->clockd = 0; + if (!cmd->m_pBaseFile) { + cmd->flags.file_disappeared = 1; + } else { + cmd->flags.clocks_set = 1; + if (cmd->stereo_sibling) { + cmd->stereo_sibling->flags.clocks_set = 1; + } + } +} + +/*! + * Start playing music, from an "external" command (from the ISO system). + */ +void IsoPlayMusicStream(ISO_VAGCommand* user_cmd) { + // must be flagged as music in the request. + ASSERT(user_cmd->music_flag); + + const char* name = user_cmd->name; + + // first, let's try to find an existing internal command that's streaming this music + ISO_VAGCommand* internal_cmd = FindMusicStreamName(name); + ISO_VAGCommand* stereo_internal_cmd = nullptr; + + if (!internal_cmd) { + // no existing command, so allocate one. + internal_cmd = SmartAllocMusicVagCommand(user_cmd, 0); + + if (!internal_cmd) { + ASSERT_NOT_REACHED(); // was only a warning + return; + } + + // set the active flags to false: + set_active_a(internal_cmd, 0); + set_active_b(internal_cmd, 0); + set_active_c(internal_cmd, 0); + set_active_a(user_cmd, 0); + set_active_b(user_cmd, 0); + set_active_c(user_cmd, 0); + + // clear flags related to actual streaming, since we're starting (or restarting) the stream + // from nothing. + user_cmd->flags.saw_chunks1 = 0; + user_cmd->flags.running = 0; + + // if we're reusing an already started stream, need to stop that one first. + // if ((*(uint*)&internal_cmd->bit_running & 0xffff00) != 0) { + if (internal_cmd->flags.clocks_set || internal_cmd->flags.file_disappeared) { + IsoStopVagStream(internal_cmd); + } + + // copy entire header + internal_cmd->unka = user_cmd->unka; + internal_cmd->unkb = user_cmd->unkb; + internal_cmd->status = user_cmd->status; + internal_cmd->active_a = user_cmd->active_a; + internal_cmd->active_b = user_cmd->active_b; + internal_cmd->active_c = user_cmd->active_c; + internal_cmd->pad = user_cmd->pad; + + internal_cmd->msg_type = user_cmd->msg_type; + internal_cmd->mbox_reply = user_cmd->mbox_reply; + internal_cmd->thread_to_wake = user_cmd->thread_to_wake; + internal_cmd->callback = user_cmd->callback; + + internal_cmd->m_pBaseFile = user_cmd->m_pBaseFile; + internal_cmd->priority = user_cmd->priority; + internal_cmd->file_def = user_cmd->file_def; + + // copy part of the command set by the user + internal_cmd->vag_file_def = user_cmd->vag_file_def; + internal_cmd->vag_dir_entry = user_cmd->vag_dir_entry; + ASSERT(strlen(name) < 0x30); + strncpy(internal_cmd->name, name, 0x30); + internal_cmd->play_volume = user_cmd->play_volume; + internal_cmd->id = user_cmd->id; + internal_cmd->plugin_id = user_cmd->plugin_id; + internal_cmd->maybe_sound_handler = user_cmd->maybe_sound_handler; + internal_cmd->oog = user_cmd->oog; + internal_cmd->dolby_pan_angle = user_cmd->dolby_pan_angle; + internal_cmd->art_flag = user_cmd->art_flag; + internal_cmd->movie_flag = user_cmd->movie_flag; + + // + InitVAGCmd(internal_cmd, 1); + + // check for stereo bit: + if ((internal_cmd->vag_dir_entry->words[1] & 0x400U) != 0) { + // allocate stereo command + stereo_internal_cmd = SmartAllocMusicVagCommand(user_cmd, 1); + if (!stereo_internal_cmd) { + // it failed - give up on this message! + ReleaseMessage(internal_cmd); + FreeVagCmd(internal_cmd); + internal_cmd = nullptr; + ASSERT_NOT_REACHED(); + } else { + // stop existing stereo command + // if ((*(uint*)&stereo_internal_cmd->bit_running & 0xffff00) != 0) { + if (stereo_internal_cmd->flags.clocks_set || stereo_internal_cmd->flags.file_disappeared) { + IsoStopVagStream(stereo_internal_cmd); + } + + // set up as a stereo secondary + stereo_internal_cmd->flags.stereo_secondary = 1; + internal_cmd->stereo_sibling = stereo_internal_cmd; + stereo_internal_cmd->stereo_sibling = internal_cmd; + + auto name_len = strlen(internal_cmd->name); + strncpyz(stereo_internal_cmd->name, internal_cmd->name, 0x31); + if (name_len < 0x30) { + strncpyz(stereo_internal_cmd->name + name_len, " (stereo)", 0x31 - name_len); + } + stereo_internal_cmd->id = ~internal_cmd->id; + stereo_internal_cmd->vag_dir_entry = internal_cmd->vag_dir_entry; + } + } + + // abort if no command + if (!internal_cmd) { + return; + } + + // start us out as paused + internal_cmd->flags.paused = 1; + if (stereo_internal_cmd) { + stereo_internal_cmd->flags.paused = 1; + } + + if (QueueMessage(internal_cmd, 5) == 0) { + // failed to queue, clear our commands and release the message. + FreeVagCmd(internal_cmd); + if ((internal_cmd->vag_dir_entry->words[1] & 0x400U) != 0) { + FreeVagCmd(stereo_internal_cmd); + } + ReleaseMessage(internal_cmd); + } else { + auto* vag_dir_entry = internal_cmd->vag_dir_entry; + if (!vag_dir_entry) { + // not really sure how this can happen... + internal_cmd->m_pBaseFile = nullptr; + ASSERT_NOT_REACHED(); // just so I can learn when this happens. + } else { + // need to understand this better, but it seems like we can pick between two different files + // to actually load from... + const ISOFileDef* filedef = nullptr; + if (((u32)vag_dir_entry->words[1] >> 0xb & 1) == 0) { + filedef = internal_cmd->file_def; + } else { + filedef = internal_cmd->vag_file_def; + } + + // open the file!! + ovrld_log(LogCategory::VAG_SETUP, "vag dir entry offset is {}", + vag_dir_entry->words[1] >> 16); + auto* base_file = get_file_system()->OpenWAD(filedef, vag_dir_entry->words[1] >> 16); + internal_cmd->m_pBaseFile = base_file; + + // determine the reading rate of the music + if (base_file) { + u32 rate_idx = 0x3c & (internal_cmd->vag_dir_entry->words[1] >> 10); + ASSERT((rate_idx % 4) == 0); + constexpr int rates[16] = {0xFA00, 0x1F40, 0x3E80, 0x5DC0, 0x7D00, 0x9C40, + 0xBB80, 0xDAC0, 0xAC44, 0x1589, 0x2B11, 0x409A, + 0x5622, 0x6BAB, 0x8133, 0x96BC}; + + int rate = rates[rate_idx]; + if (((internal_cmd->vag_dir_entry->words[1] >> 10) & 1) == 0) { + rate = rate << 2; + } else { + rate = rate << 3; + } + base_file->m_ReadRate = rate / 7; + } + } + + SetVagStreamName(internal_cmd, 0x30); + if (stereo_internal_cmd) { + SetVagStreamName(stereo_internal_cmd, 0x30); + } + + internal_cmd->callback = ProcessVAGData; + internal_cmd->status = EIsoStatus::OK_2; + internal_cmd->flags.paused = 0; + + if (stereo_internal_cmd) { + stereo_internal_cmd->flags.paused = 0; + } + internal_cmd->flags.running = 1; + if (stereo_internal_cmd) { + stereo_internal_cmd->flags.running = 1; + } + internal_cmd->status = EIsoStatus::OK_2; + set_active_a(internal_cmd, 1); + set_active_b(internal_cmd, 1); + + // load tweak value + g_nMusicFadeDir = 0; + g_nMusicFade = 0x10000; + g_nMusicTweak = 0x80; + for (u32 i = 0; i < gMusicTweakInfo.TweakCount; i++) { + if (strcmp(gMusicTweakInfo.MusicTweak[i].MusicName, name) == 0) { + g_nMusicTweak = gMusicTweakInfo.MusicTweak[i].VolumeAdjust; + } + } + } + + if (!internal_cmd) { + return; + } + } + SetVagClock(internal_cmd); +} + +/*! + * Get a VAG command ready for playback, but don't actually start the audio yet. + */ +void IsoQueueVagStream(ISO_VAGCommand* user_cmd) { + ASSERT(user_cmd); + ASSERT(!user_cmd->music_flag); // can't use music commands with this function + ASSERT(user_cmd->id); + ISO_VAGCommand* internal_stereo_cmd = nullptr; + + // mysterious case to reject a command + if (user_cmd->vag_dir_entry && (user_cmd->vag_dir_entry->words[1] & 0x400U) != 0 && + HowManyBelowThisPriority(user_cmd->priority_pq) < 2) { + ovrld_log(LogCategory::WARN, "mysterious rejection of a queued vag stream"); + return; + } + + // see if we already have a command for this + ISO_VAGCommand* internal_cmd = FindThisVagStream(user_cmd->name, user_cmd->id); + if (!internal_cmd) { + // try allocating one + internal_cmd = SmartAllocVagCmd(user_cmd); + if (!internal_cmd) { + // no more commands! + return; + } + + ovrld_log(LogCategory::VAG_SETUP, "IsoQueueVagStream allocating for {} {}", user_cmd->name, + user_cmd->id); + // clear active flags + set_active_a(internal_cmd, 0); + set_active_b(internal_cmd, 0); + set_active_c(internal_cmd, 0); + set_active_a(user_cmd, 0); + set_active_b(user_cmd, 0); + set_active_c(user_cmd, 0); + user_cmd->flags.saw_chunks1 = 0; + user_cmd->flags.running = 0; + // if ((*(uint*)&internal_cmd->bit_running & 0xffff00) != 0) { + // if we're playing it, stop it. + if (internal_cmd->flags.clocks_set || internal_cmd->flags.file_disappeared) { + IsoStopVagStream(internal_cmd); + } + + // copy entire header + internal_cmd->unka = user_cmd->unka; + internal_cmd->unkb = user_cmd->unkb; + internal_cmd->status = user_cmd->status; + internal_cmd->active_a = user_cmd->active_a; + internal_cmd->active_b = user_cmd->active_b; + internal_cmd->active_c = user_cmd->active_c; + internal_cmd->pad = user_cmd->pad; + + internal_cmd->msg_type = user_cmd->msg_type; + internal_cmd->mbox_reply = user_cmd->mbox_reply; + internal_cmd->thread_to_wake = user_cmd->thread_to_wake; + internal_cmd->callback = user_cmd->callback; + + internal_cmd->m_pBaseFile = user_cmd->m_pBaseFile; + internal_cmd->priority = user_cmd->priority; + internal_cmd->file_def = user_cmd->file_def; + + internal_cmd->vag_file_def = user_cmd->vag_file_def; + internal_cmd->vag_dir_entry = user_cmd->vag_dir_entry; + strncpy(internal_cmd->name, user_cmd->name, 0x30); + internal_cmd->id = user_cmd->id; + internal_cmd->play_volume = user_cmd->play_volume; + internal_cmd->plugin_id = user_cmd->plugin_id; + internal_cmd->maybe_sound_handler = user_cmd->maybe_sound_handler; + internal_cmd->oog = user_cmd->oog; + internal_cmd->dolby_pan_angle = user_cmd->dolby_pan_angle; + internal_cmd->art_flag = user_cmd->art_flag; + internal_cmd->movie_flag = user_cmd->movie_flag; + + InitVAGCmd(internal_cmd, 1); + + internal_cmd->flags.scanned = 1; + + // check if we're a stereo command + if ((internal_cmd->vag_dir_entry) && ((internal_cmd->vag_dir_entry->words[1] & 0x400U) != 0)) { + internal_stereo_cmd = SmartAllocVagCmd(user_cmd); + if (!internal_stereo_cmd) { + // allocating stereo failed, give up. + internal_cmd->flags.scanned = 0; + ASSERT_NOT_REACHED(); + ReleaseMessage(internal_cmd); + RemoveVagCmd(internal_cmd); + FreeVagCmd(internal_cmd); + internal_cmd = nullptr; + } else { + // if ((*(uint*)&internal_stereo_cmd->bit_running & 0xffff00) != 0) { + if (internal_stereo_cmd->flags.clocks_set || internal_stereo_cmd->flags.file_disappeared) { + IsoStopVagStream(internal_stereo_cmd); + } + internal_cmd->stereo_sibling = internal_stereo_cmd; + internal_stereo_cmd->flags.stereo_secondary = 1; + internal_stereo_cmd->stereo_sibling = internal_cmd; + auto name_len = strlen(internal_cmd->name); + strncpyz(internal_stereo_cmd->name, internal_cmd->name, 0x31); + if (name_len < 0x30) { + strncpyz(internal_stereo_cmd->name + name_len, " (stereo)", 0x31 - name_len); + } + internal_stereo_cmd->id = ~internal_cmd->id; + internal_stereo_cmd->vag_dir_entry = internal_cmd->vag_dir_entry; + internal_stereo_cmd->flags.scanned = 1; + } + } + + // return if alloc failed + if (!internal_cmd) { + return; + } + + if (QueueMessage(internal_cmd, 5) == 0) { + // queueing failed. + internal_cmd->flags.scanned = 0; + ASSERT_NOT_REACHED(); + RemoveVagCmd(internal_cmd); + FreeVagCmd(internal_cmd); + if ((internal_cmd->vag_dir_entry->words[1] & 0x400U) != 0) { + internal_stereo_cmd->flags.scanned = 0; + RemoveVagCmd(internal_stereo_cmd); + FreeVagCmd(internal_stereo_cmd); + } + ReleaseMessage(internal_cmd); + } else { + auto* vag_dir_entry = internal_cmd->vag_dir_entry; + if (!vag_dir_entry) { + // not really sure how this can happen... + internal_cmd->m_pBaseFile = nullptr; + // ASSERT_NOT_REACHED(); // just so I can learn when this happens. + } else { + // need to understand this better, but it seems like we can pick between two different files + // to actually load from... + const ISOFileDef* filedef = nullptr; + if (((u32)vag_dir_entry->words[1] >> 0xb & 1) == 0) { + filedef = internal_cmd->file_def; + } else { + filedef = internal_cmd->vag_file_def; + } + auto* base_file = get_file_system()->OpenWAD(filedef, vag_dir_entry->words[1] >> 16); + internal_cmd->m_pBaseFile = base_file; + if (!base_file) { + u32 rate_idx = 0x3c & (internal_cmd->vag_dir_entry->words[1] >> 10); + ASSERT((rate_idx % 4) == 0); + constexpr int rates[16] = {0xFA00, 0x1F40, 0x3E80, 0x5DC0, 0x7D00, 0x9C40, + 0xBB80, 0xDAC0, 0xAC44, 0x1589, 0x2B11, 0x409A, + 0x5622, 0x6BAB, 0x8133, 0x96BC}; + + int rate = rates[rate_idx]; + if (((internal_cmd->vag_dir_entry->words[1] >> 10) & 1) == 0) { + rate = rate << 2; + } else { + rate = rate << 3; + } + base_file->m_ReadRate = rate / 7; + } + } + if (user_cmd->art_flag != 0) { + internal_cmd->flags.art = 1; + } + if (user_cmd->movie_flag != 0) { + internal_cmd->flags.movie = 1; + } + + internal_cmd->flags.paused = 1; + SetNewVagCmdPri(internal_cmd, user_cmd->priority_pq); + if (internal_stereo_cmd) { + internal_stereo_cmd->flags.paused = 1; + internal_stereo_cmd->flags.scanned = 1; + SetNewVagCmdPri(internal_stereo_cmd, 10); + } + SetVagStreamName(internal_cmd, 0x30); + if (internal_stereo_cmd) { + SetVagStreamName(internal_stereo_cmd, 0x30); + } + internal_cmd->status = EIsoStatus::OK_2; + internal_cmd->callback = ProcessVAGData; + } + if (!internal_cmd) { + return; + } + } + SetVagClock(internal_cmd); +} + +/*! + * Actually start playback of audio, requested from ISO thread functions. + */ +void IsoPlayVagStream(ISO_VAGCommand* user_cmd) { + ASSERT(user_cmd); + ASSERT(!user_cmd->music_flag); + ISO_VAGCommand* stereo_cmd = user_cmd->stereo_sibling; + ISO_VAGCommand* internal_cmd = FindThisVagStream(user_cmd->name, user_cmd->id); + + // update to running only if we aren't already. + if (internal_cmd && (internal_cmd->flags.running == 0)) { + internal_cmd->play_volume = user_cmd->play_volume; + if (internal_cmd->flags.paused != 0) { + if (g_bExtPause) { + g_bExtResume = true; + } + if (internal_cmd->flags.saw_chunks1 == 0) { + internal_cmd->flags.paused = 0; + if (stereo_cmd) { + stereo_cmd->flags.paused = 0; + } + } else { + ovrld_log(LogCategory::VAG_SETUP, "IsoPlayVagStream is unpausing {}", internal_cmd->name); + UnPauseVAG(internal_cmd); + } + if (user_cmd->priority_pq < 3) { + // this printed a "ruins fix" message, seems like this is a total hack!! + SetNewVagCmdPri(user_cmd, 7); + } + } + internal_cmd->flags.running = 1; + if (stereo_cmd) { + stereo_cmd->flags.running = 1; + } + if (internal_cmd) { + SetVagClock(internal_cmd); + } + } +} + +void IsoStopVagStream(ISO_VAGCommand* cmd) { + auto id = cmd->id; + ISO_VAGCommand* internal_cmd; + + // handle music/audio separately here + if (cmd->music_flag != 0) { + if (id == 0) { // no id, must use name + if (cmd->name[0] == 0) { + ASSERT_NOT_REACHED(); // shouldn't happen + return; + } + + // terminate all with this name. + while (internal_cmd = FindMusicStreamName(cmd->name), internal_cmd) { + ovrld_log(LogCategory::VAG_SETUP, "IsoStopVagStream is terminating {} (1)", + internal_cmd->name); + TerminateVAG(internal_cmd); + } + return; + } + + // we have an id, just terminate that. + internal_cmd = FindThisMusicStream(cmd->name, id); + if (!internal_cmd) { + return; + } + ovrld_log(LogCategory::VAG_SETUP, "IsoStopVagStream is terminating {} (2)", internal_cmd->name); + TerminateVAG(internal_cmd); + return; + } + + // flag - this controls if we do the AnyVagRunning check or not. + // not really sure why... + bool flag = false; + + if (id == 0) { + if (cmd->name[0] == 0) { + return; + } + while (internal_cmd = FindVagStreamName(cmd->name), internal_cmd) { + flag = true; + ovrld_log(LogCategory::VAG_SETUP, "IsoStopVagStream is terminating {} (3)", + internal_cmd->name); + TerminateVAG(internal_cmd); + } + + if (!flag) { + return; + } + } else { + internal_cmd = FindThisVagStream(cmd->name, id); + if (!internal_cmd) { + return; + } + ovrld_log(LogCategory::VAG_SETUP, "IsoStopVagStream is terminating {} (4)", internal_cmd->name); + TerminateVAG(internal_cmd); + } + + if (AnyVagRunning() == 0) { + g_bExtPause = false; + g_bExtResume = false; + } +} + +void ProcessMusic() { + ISO_VAGCommand* cmd = nullptr; + WaitSema(g_nMusicSemaphore); + + // handle unpausing request + if (g_bMusicIsPaused && !g_bMusicPause && !g_bAnotherMusicPauseFlag) { + cmd = FindMusicStreamName(g_szCurrentMusicName); + if (cmd && cmd->id && !cmd->flags.stop) { // can't unpause if stopped. + UnPauseVAG(cmd); + } + g_bMusicIsPaused = false; + } + + // handle pausing request. + if (!g_bMusicIsPaused && g_bMusicPause) { + cmd = FindMusicStreamName(g_szCurrentMusicName); + if (cmd && cmd->id & !cmd->flags.stop) { + PauseVAG(cmd); + } + g_bMusicIsPaused = true; + } + + // handle playing music updates. + if (g_bMusicIsPaused == 0) { + // first, see if we're even playing the right music: + if (strncmp(g_szCurrentMusicName, g_szTargetMusicName, 0xf) == 0) { + // we are! fade in the music, if it's active: + if (0 < g_nActiveMusicStreams && g_nMusicFadeDir < 0) { + g_nMusicFadeDir = 1; + } + + if ((g_szCurrentMusicName[0] == 0) || (g_nActiveMusicStreams != 0)) { + SignalSema(g_nMusicSemaphore); + return; + } + + } else { + // we aren't. fade out music if the target is null, or we're currently playing music. + if ((g_szTargetMusicName[0] == 0) || (g_szCurrentMusicName[0] != 0)) { + if (g_nMusicFade < 1) { + cmd = g_aVagCmds + 4; + int i = 1; + do { + i--; + // stop any non-stereo, but real music. + if (cmd->music_flag && !cmd->flags.stereo_secondary && cmd->id) { + IsoStopVagStream(cmd); + } + cmd = cmd + 1; + } while (-1 < i); + } else { + g_nMusicFadeDir = -1; + } + } + if (g_nMusicFade != 0) { + SignalSema(g_nMusicSemaphore); + return; + } + + // if we made it through that, we're done playing old stuff. + strncpyz(g_szCurrentMusicName, g_szTargetMusicName, 0x10); + } + + if (g_szCurrentMusicName[0] != 0) { + VagStreamData vsd; + strncpy(vsd.name, g_szCurrentMusicName, 0x30); + vsd.id = 0x29a; + vsd.priority = 9; + vsd.art_load = 0; + vsd.movie_art_load = 0; + vsd.sound_handler = 0; + ovrld_log(LogCategory::VAG_SETUP, "ProcessMusic is changing the music to {}", vsd.name); + PlayMusicStream(&vsd); + } + } + + SignalSema(g_nMusicSemaphore); +} + +u32 ISOThread() { + int priority = -1; + g_szCurrentMusicName[0] = 0; + g_szTargetMusicName[0] = 0; + g_bMusicIsPaused = false; + + lg::info("top of ISO Thread"); + + // file = (CISOCDFile*)0x0; + InitBuffers(); + // bVar1 = false; + InitVagCmds(); + g_bVagCmdsInitialized = true; + InitDriver(); + + ISO_Hdr* mbx_cmd = nullptr; + ISO_LoadSoundbank* load_sbk_cmd = nullptr; + ISO_LoadCommon* load_cmd = nullptr; + char local_name[32]; + ISO_VAGCommand* vag_cmd = nullptr; + ISO_VAGCommand* internal_vag_cmd = nullptr; + + // ISOFileDef* file_def = nullptr; + + while (true) { + dma_intr_hack(); + // Part 1: Handle incoming messages from the user: + + int poll_result = PollMbx((MsgPacket**)&mbx_cmd, g_nISOMbx); + if (poll_result == KE_OK) { + if (mbx_cmd->msg_type == ISO_Hdr::MsgType::ABADBABE) { + // what is this garbage + ASSERT_NOT_REACHED(); + ReleaseMessage(mbx_cmd); + } else { + set_active_a(mbx_cmd, 0); + set_active_b(mbx_cmd, 0); + set_active_c(mbx_cmd, 0); + + // iVar3 = (cmd->header).kind; + mbx_cmd->callback = NullCallback; + mbx_cmd->m_pBaseFile = nullptr; + auto msg_kind = mbx_cmd->msg_type; + + ovrld_log(LogCategory::ISO_QUEUE, "Incoming message to the ISO Queue with type 0x{:x}", + (int)msg_kind); + + // if we're a simple file loading command: + if (msg_kind == ISO_Hdr::MsgType::LOAD_EE || msg_kind == ISO_Hdr::MsgType::LOAD_EE_CHUNK || + msg_kind == ISO_Hdr::MsgType::LOAD_IOP || + msg_kind == ISO_Hdr::MsgType::LOAD_SOUNDBANK) { + priority = 3; // default priority for file loads is 3... unless we're loading a soundbank + // in which case there's a bizarre special case here: + load_cmd = (ISO_LoadCommon*)mbx_cmd; + + if (msg_kind == ISO_Hdr::MsgType::LOAD_SOUNDBANK) { + load_sbk_cmd = (ISO_LoadSoundbank*)mbx_cmd; + priority = 0; + if (load_sbk_cmd->priority == 2) { + priority = 2; + } else { + if (load_sbk_cmd->priority == 10) { + priority = 4; + } + } + } + + if (QueueMessage(mbx_cmd, priority) == 0) { + ovrld_log(LogCategory::WARN, "Failed to queue incoming iso message"); + goto LAB_00006b18; + } + + // iVar3 = (cmd->header).kind; + // handle opening the file: + switch (msg_kind) { + case ISO_Hdr::MsgType::LOAD_EE_CHUNK: { + ovrld_log(LogCategory::ISO_QUEUE, "Opening File {} for EE Chunk Load offset {}", + mbx_cmd->file_def->name.data, ((ISO_LoadSingle*)mbx_cmd)->sector_offset); + mbx_cmd->m_pBaseFile = get_file_system()->Open( + mbx_cmd->file_def, ((ISO_LoadSingle*)mbx_cmd)->sector_offset, 1); + } break; + case ISO_Hdr::MsgType::LOAD_IOP: + case ISO_Hdr::MsgType::LOAD_EE: + ovrld_log(LogCategory::ISO_QUEUE, "Opening File {} for Load {}", + msg_kind == ISO_Hdr::MsgType::LOAD_EE ? "EE" : "IOP", + mbx_cmd->file_def->name.data); + mbx_cmd->m_pBaseFile = get_file_system()->Open(mbx_cmd->file_def, -1, 1); + break; + case ISO_Hdr::MsgType::LOAD_SOUNDBANK: { + ovrld_log(LogCategory::ISO_QUEUE, "Opening for LOAD_SOUNDBANK {} ", + load_sbk_cmd->name); + // build name + ASSERT(load_sbk_cmd->name); + strncpy(local_name, load_sbk_cmd->name, 0xc); + local_name[8] = 0; + strcat(local_name, ".sbk"); + mbx_cmd->file_def = get_file_system()->Find(local_name); + ASSERT(mbx_cmd->file_def); + mbx_cmd->m_pBaseFile = get_file_system()->Open(mbx_cmd->file_def, -1, 1); + ASSERT(mbx_cmd->m_pBaseFile); + } break; + default: + ASSERT_NOT_REACHED(); + } + + // if we failed to open, bail + if (!mbx_cmd->m_pBaseFile) { + ASSERT_NOT_REACHED(); + mbx_cmd->status = EIsoStatus::ERROR_OPENING_FILE_8; + UnqueueMessage(mbx_cmd); + ReturnMessage(mbx_cmd); + // this goes somewhere else... + } + + // set up lengths based on the actual file length on disc. + load_cmd->dest_ptr = load_cmd->addr; + load_cmd->progress_bytes = 0; + load_cmd->length_to_copy = get_file_system()->GetLength(mbx_cmd->file_def); + // pIVar5 = length + if (msg_kind == ISO_Hdr::MsgType::LOAD_SOUNDBANK) { + load_cmd->maxlen = load_cmd->length_to_copy; + } else { + ASSERT(load_cmd->length_to_copy); + // trim copy size to the max buffer length given. + if (load_cmd->length_to_copy > load_cmd->maxlen) { + load_cmd->length_to_copy = load_cmd->maxlen; + } + } + + // set up callback + switch (msg_kind) { + case ISO_Hdr::MsgType::LOAD_IOP: + mbx_cmd->callback = CopyDataToIOP; + break; + case ISO_Hdr::MsgType::LOAD_SOUNDBANK: + mbx_cmd->callback = CopyDataSbkLoad; + break; + case ISO_Hdr::MsgType::LOAD_EE: + case ISO_Hdr::MsgType::LOAD_EE_CHUNK: + mbx_cmd->callback = CopyDataToEE; + break; + default: + ASSERT_NOT_REACHED(); + } + + mbx_cmd->status = EIsoStatus::OK_2; + set_active_a(mbx_cmd, 1); + } else { + switch (msg_kind) { + case ISO_Hdr::MsgType::DGO_LOAD: + if (QueueMessage(mbx_cmd, 1) != 0) { + // modified for non compressed dgos + ovrld_log(LogCategory::ISO_QUEUE, "Opening {} for DGO Load", + mbx_cmd->file_def->name.data); + mbx_cmd->m_pBaseFile = get_file_system()->Open(mbx_cmd->file_def, -1, 1); + if (mbx_cmd->m_pBaseFile) { + mbx_cmd->callback = RunDGOStateMachine; + mbx_cmd->status = EIsoStatus::OK_2; + ((ISO_DGOCommand*)mbx_cmd)->state = ISO_DGOCommand::State::INIT; + set_active_a(mbx_cmd, 1); + } else { + ASSERT_NOT_REACHED(); + UnqueueMessage(mbx_cmd); + ASSERT(sLoadDGO.msg_type != ISO_Hdr::MsgType::MSG_0); + SendMbx(g_nISOMbx, &sLoadDGO); + } + } + break; + case ISO_Hdr::MsgType::VAG_PAUSE: + ovrld_log(LogCategory::ISO_QUEUE, "VagPause (all of them)"); + if (g_bExtPause == 0) { + SetVagStreamsNoStart(1); + int iVar3 = AnyVagRunning(); + if (iVar3 != 0) { + PauseVagStreams(0); + } + g_bExtPause = true; + g_bExtResume = iVar3 != 0; + } + ReturnMessage(mbx_cmd); + break; + case ISO_Hdr::MsgType::VAG_UNPAUSE: + ovrld_log(LogCategory::ISO_QUEUE, "VagUnPause (all of them)"); + if (g_bExtPause != 0) { + if (g_bExtResume != false) { + UnPauseVagStreams(0); + } + g_bExtPause = false; + g_bExtResume = false; + } + SetVagStreamsNoStart(0); + ReturnMessage(mbx_cmd); + break; + case ISO_Hdr::MsgType::VAG_SET_PITCH_VOL: + vag_cmd = (ISO_VAGCommand*)mbx_cmd; + ovrld_log(LogCategory::ISO_QUEUE, "VAG_SET_PITCH_VOL (id {})", vag_cmd->id); + internal_vag_cmd = FindVagStreamId(vag_cmd->id); + if (internal_vag_cmd) { + ovrld_log(LogCategory::ISO_QUEUE, "VAG_SET_PITCH_VOL lookup ok, got {}", + internal_vag_cmd->name); + internal_vag_cmd->pitch_cmd = vag_cmd->pitch_cmd; + SetVAGVol(internal_vag_cmd); + } + ReturnMessage(vag_cmd); + break; + case ISO_Hdr::MsgType::ADEADBEE: + ReturnMessage(vag_cmd); + ExitThread(); + goto LAB_00006b18; + break; + default: + ASSERT_NOT_REACHED(); + } + } + } + } else { + if (poll_result == -0x1a9) { + // messagebox was deleted - this means we're shutting down + return 0; + } + if (poll_result != -0x1a8) { + // unknown messagebox error + ASSERT_NOT_REACHED(); + } + } + LAB_00006b18: + // Part 2: music update + // Poll is called here... but we don't use it. + // (**(code**)(*g_pFileSystem + 4))(); + ProcessMusic(); + + // Part 3: service in-progress messages + // get the top priority message + bool buffer_ok = false; + auto* cmd = GetMessage(); + CBaseFile* file = nullptr; + bool known_read_rate = false; + + if (cmd) { + // handle the buffering + // ovrld_log(LogCategory::ISO_QUEUE, "Processing Command 0x{:x} - allocating buffer\n", + // (int)cmd->msg_type); + + // check if we need to initialize a buffer, or if we just need to realloc pages + file = cmd->m_pBaseFile; + bool needs_buffer_init = false; + if (!file) { + needs_buffer_init = true; + // we'd need to set buffer_ok = false later on if this is the case, + // but I dont think this can happen. + ASSERT_NOT_REACHED(); + } else { + if (file->m_Buffer.m_eBufferType == CBuffer::BufferType::EBT_FREE) { + needs_buffer_init = true; + } + } + + // set up buffer + if (needs_buffer_init) { + buffer_ok = + file->InitBuffer(cmd->callback == ProcessVAGData ? CBuffer::BufferType::REQUEST_VAG + : CBuffer::BufferType::REQUEST_NORMAL, + cmd); + } else { + file->AllocPages(); + buffer_ok = true; + } + + file = nullptr; + if (buffer_ok == 0) { + cmd = nullptr; + known_read_rate = false; + } else { + file = cmd->m_pBaseFile; + known_read_rate = false; + if (file && file->m_ReadRate) { + known_read_rate = true; + } + // iVar3 = (**(code**)(file->base).vtable)(file); + // ovrld_log(LogCategory::ISO_QUEUE, "Processing Command 0x{:x} - starting read!\n", + // (int)cmd->msg_type); + + // lg::info("ISO - BeginRead"); + cmd->status = file->BeginRead(); + if (cmd->status != EIsoStatus::OK_2) { + buffer_ok = false; + if (cmd->m_pBaseFile) { + cmd->m_pBaseFile->TerminateBuffer(); + } + cmd = nullptr; + file = nullptr; + } + if (!known_read_rate) { + time_of_last_unknown_rate_drive_op = GetSystemTimeLow(); + } + } + } + + // ovrld_log(LogCategory::ISO_QUEUE, "Processing Command 0x{:x} - handling message data\n", + // (int)cmd->msg_type); + + if (ProcessMessageData(cmd) == 0) { + cmd = nullptr; + } + + if (buffer_ok && cmd) { + EIsoStatus status = EIsoStatus::ERROR_b; + if (file) { + status = file->SyncRead(); + } + if (!known_read_rate) { + time_of_last_unknown_rate_drive_op = GetSystemTimeLow(); + } + if (status == EIsoStatus::ERROR_b) { + if (cmd->m_pBaseFile && cmd->m_pBaseFile->m_Status != EIsoStatus::NONE_0) { + cmd->status = EIsoStatus::OK_2; + } + } else { + cmd->status = status; + if (!cmd->active_c) { + set_active_c(cmd, 1); + } + } + } + + WaitSema(g_RequestedStreamsList.sema); + if (g_RequestedStreamsList.pending_data == 1) { + QueueNewStreamsFromList(&g_RequestedStreamsList); + auto* vag_info = g_NewStreamsList.next; + for (int i = 0; i < 4; i++) { + if (vag_info->id) { + ovrld_log(LogCategory::ISO_QUEUE, "ISO thread: queueing VAG {}", vag_info->name); + QueueVAGStream(vag_info); + } + vag_info = vag_info->next; + } + } + + for (int i = 0; i < 4; i++) { + ISO_VAGCommand* vc = &g_aVagCmds[i]; + if (!vc->music_flag && !vc->flags.stereo_secondary && !vc->flags.scanned && vc->id) { + ovrld_log(LogCategory::ISO_QUEUE, "ISO thread: stopping {} since it is no longer requested", + vc->name); + IsoStopVagStream(vc); + } + } + + SignalSema(g_RequestedStreamsList.sema); + g_RequestedStreamsList.pending_data = 0; + + for (int i = 4; i < 6; i++) { + ISO_VAGCommand* vc = &g_aVagCmds[i]; + if (vc->music_flag && !vc->flags.stereo_secondary && vc->flags.stop && vc->id) { + ovrld_log(LogCategory::ISO_QUEUE, "ISO thread: stopping music {}", vc->name); + IsoStopVagStream(vc); + } + } + + // this logic was changed so that the iso thread doesn't sleep when loading a DGO: otherwise + // we'd spent most of our time letting the thread sleep. + // instead, if there's an in progress DGO command, we yield. + // this yield allows DGO RPCs to run. Additionally, the priority of the ISO thread was lowered + // to allow the RPCs to run during this time. + bool sleep = !DgoCmdWaiting(); + if (sleep) { + if (buffer_ok) { + DelayThread(4000); + } else { + // DelayThread(200); + DelayThread(2000); + } + } else { + YieldThread(); + } + } +} + +/*! + * This function runs the state machine for the double-buffered DGO loading system. + * There are a few tricks here: + * - Each DGO file contains a number of objects. + * - The object loading is double buffered - this state machine toggles between loading to two + * different buffers. While one buffer is being written, the GOAL linker is processing the other. + * - The final object is not double buffered. Instead, it is loaded directly to the top of the heap. + * - New! for jak 2, there is an option to not use the double buffering. + * - New! for jak 3, there is a very complicated load cancel system + */ +EIsoStatus RunDGOStateMachine(ISO_Hdr* m) { + auto* cmd = (ISO_DGOCommand*)m; + // lg::info("ISO - DGO state machine"); + int send_count, receive_count; + + CBaseFile* file = cmd->m_pBaseFile; + EIsoStatus ret_status = EIsoStatus::OK_2; + if (!file) { + return EIsoStatus::OK_2; + } + ASSERT(file->m_Buffer.m_pPageList); + + // handle page boundary crossings - after this call, our CBuffer will be set up properly for + // processing. + file->CheckPageBoundary(); + CBuffer* buffer = &file->m_Buffer; + + int buffer_len = (file->m_Buffer).m_nDataLength; + ASSERT(buffer_len >= 0); + + if (cmd->state == ISO_DGOCommand::State::INIT) { + // these counters are used for debugging the DGO sync stuff. + cmd->sync_mbox_wait_count = 1; + cmd->sync_ret_count = 0; + } + // CpuSuspendIntr(local_30); + + // process this DGO as normal, unless we've been asked to cancel this. + if (cmd->nosync_cancel_pending_flag == 0 || cmd->selected_id != cmd->request_cancel_id) { + // CpuResumeIntr(); + if (buffer_len == 0) { + // nothing we can do with no data... + goto out_of_data; + } + do { + switch (cmd->state) { + case ISO_DGOCommand::State::INIT: + ovrld_log(LogCategory::DGO, "DGO: Starting state machine"); + cmd->state = ISO_DGOCommand::State::READ_DGO_HEADER; + cmd->bytes_processed = 0; + cmd->finished_first_object = 0; + cmd->want_abort = 0; + break; + case ISO_DGOCommand::State::READ_DGO_HEADER: { + // here, we work on reading the DGO file's header into our command. + // first, compute how many bytes we want to read right now, as the max of + // the remaining header size, and what's buffered + int bytes_needed = sizeof(DgoHeader) - cmd->bytes_processed; + if (buffer_len < bytes_needed) { + bytes_needed = buffer_len; + } + + // loop over pages - the header may span multiple pages that aren't adjacent in memory. + while (bytes_needed) { + // determine how many bytes to copy from this page + int bytes_from_this_page = buffer->m_pPageList->m_pCurrentActivePage->m_pPageMemEnd - + file->m_Buffer.m_pCurrentData + 1; + if (bytes_needed <= bytes_from_this_page) { + bytes_from_this_page = bytes_needed; + } + ovrld_log(LogCategory::DGO, "DGO: reading {} bytes of dgo header", + bytes_from_this_page); + // copy data from buffer into command + memcpy(((u8*)&cmd->dgo_header) + cmd->bytes_processed, file->m_Buffer.m_pCurrentData, + bytes_from_this_page); + + // advance buffer and page + buffer->AdvanceCurrentData(bytes_from_this_page); + file->CheckPageBoundary(); + + // advance progress + cmd->bytes_processed = bytes_from_this_page + cmd->bytes_processed; + buffer_len = buffer_len - bytes_from_this_page; + bytes_needed = bytes_needed - bytes_from_this_page; + } + + // check if we got the whole header + if (cmd->bytes_processed == sizeof(DgoHeader)) { + ovrld_log(LogCategory::DGO, "DGO: got dgo header: {} with {} objects", + cmd->dgo_header.name, cmd->dgo_header.object_count); + cmd->bytes_processed = 0; + cmd->objects_loaded = 0; + if (cmd->dgo_header.object_count == 1) { + // if we have only 1 object, go directly to loading to the top buffer + cmd->ee_dest_buffer = cmd->buffer_top; + cmd->state = ISO_DGOCommand::State::READ_OBJ_HEADER; + cmd->buffer_toggle = 0; + } else { + // otherwise, start with buffer! + cmd->buffer_toggle = 1; + cmd->ee_dest_buffer = cmd->buffer1; + cmd->state = ISO_DGOCommand::State::READ_OBJ_HEADER; + } + } + } break; + case ISO_DGOCommand::State::FINISH_OBJ: + + // sync with EE - if we're loading double-buffered, wait on the EE + // note that we don't wait on the first object, since both buffers start empty, + // and we can safely fill both with no syncs. + // the order of synchronization is a little bit strange. The EE must tell us that it's + // finished processing buffer A before we tell the EE the location of buffer B. + // This is needed to get the sync right for the last object - we want the EE to run + // through all the buffers, then we load the final object, then we notify it. If the EE + // wouldn't tell us it was done until it got the next object, we'd be unable to do this. + if (cmd->finished_first_object != 0 && cmd->buffer1 != cmd->buffer2) { + if (LookSyncMbx() == 0) + goto exit_no_sync; + + ovrld_log(LogCategory::DGO, + "DGO: finished object (2buffer), and got sync message from EE or cancel"); + // iVar3 = 6; + if (cmd->want_abort != 0) { + ovrld_log(LogCategory::DGO, "DGO: cancel!! (1)"); + cmd->state = ISO_DGOCommand::State::FINISH_DGO; + break; + } + } + + // for double buffer, notify the EE that we've finished loading. + if (cmd->buffer1 != cmd->buffer2) { + cmd->status = EIsoStatus::OK_2; + cmd->selected_buffer = cmd->buffer_toggle != 1 ? cmd->buffer2 : cmd->buffer1; + ovrld_log(LogCategory::DGO, + "DGO: finished object (2buffer) - notifying EE of location"); + ReturnMessage(cmd); + sLoadDGO.sync_ret_count = sLoadDGO.sync_ret_count + 1; + } + + // for single buffer, sync with EE so we know the next location to load. + // note that we've already returned the message for the single buffer case + if ((cmd->buffer1 == cmd->buffer2) && + (cmd->objects_loaded + 1 < (s32)cmd->dgo_header.object_count)) { + if (LookSyncMbx() == 0) + goto exit_no_sync; + ovrld_log(LogCategory::DGO, + "DGO: finished object (1buffer), and got sync message from EE or cancel"); + if (cmd->want_abort != 0) { + ovrld_log(LogCategory::DGO, "DGO: cancel!! (2)"); + cmd->state = ISO_DGOCommand::State::FINISH_DGO; + break; + } + } + cmd->finished_first_object = 1; + if (cmd->buffer_toggle == 1) { + cmd->ee_dest_buffer = cmd->buffer2; + cmd->buffer_toggle = 2; + } else { + cmd->buffer_toggle = 1; + cmd->ee_dest_buffer = cmd->buffer1; + } + + if (cmd->objects_loaded + 1 == (int)cmd->dgo_header.object_count) { + cmd->state = ISO_DGOCommand::State::READ_LAST_OBJ; + } else { + cmd->state = ISO_DGOCommand::State::READ_OBJ_HEADER; + } + // LAB_000073f8: + // cmd->state = iVar3; + break; + case ISO_DGOCommand::State::READ_LAST_OBJ: + // do an extra sync here to wait for the EE to finish processing both temporary buffers. + // the next load will be to the heap top, which may overlap the temp buffers. + // lg::warn("in read last obj!"); + if (LookSyncMbx() == 0) + goto exit_no_sync; + ovrld_log(LogCategory::DGO, + "DGO: got final object sync message - can start running that now"); + if (cmd->want_abort != 0) { + cmd->state = ISO_DGOCommand::State::FINISH_DGO; + ovrld_log(LogCategory::DGO, "DGO: cancel!! (3)"); + } else { + cmd->ee_dest_buffer = cmd->buffer_top; + cmd->state = ISO_DGOCommand::State::READ_OBJ_HEADER; + cmd->buffer_toggle = 0; + } + + break; + case ISO_DGOCommand::State::READ_OBJ_HEADER: { + int bytes_needed = sizeof(ObjectHeader) - cmd->bytes_processed; + if (buffer_len < bytes_needed) { + bytes_needed = buffer_len; + } + while (bytes_needed) { + int bytes_from_this_page = buffer->m_pPageList->m_pCurrentActivePage->m_pPageMemEnd - + file->m_Buffer.m_pCurrentData + 1; + if (bytes_needed <= bytes_from_this_page) { + bytes_from_this_page = bytes_needed; + } + ASSERT(bytes_from_this_page >= 0); + ovrld_log(LogCategory::DGO, "DGO: reading {} bytes of object header", + bytes_from_this_page); + memcpy(((u8*)&cmd->obj_header) + cmd->bytes_processed, (file->m_Buffer).m_pCurrentData, + bytes_from_this_page); + buffer->AdvanceCurrentData(bytes_from_this_page); + file->CheckPageBoundary(); + cmd->bytes_processed = bytes_from_this_page + cmd->bytes_processed; + buffer_len = buffer_len - bytes_from_this_page; + bytes_needed = bytes_needed - bytes_from_this_page; + } + if (cmd->bytes_processed == sizeof(ObjectHeader)) { + ovrld_log(LogCategory::DGO, "DGO: got object header {} {}", cmd->obj_header.name, + cmd->obj_header.size); + cmd->obj_header.size = (cmd->obj_header.size + 0xf) & 0xfffffff0; + DMA_SendToEE(cmd->ee_dest_buffer, &cmd->obj_header, sizeof(ObjectHeader), nullptr, + nullptr); + cmd->ee_dest_buffer = cmd->ee_dest_buffer + sizeof(ObjectHeader); + cmd->state = ISO_DGOCommand::State::READ_OBJ_DATA; + cmd->bytes_processed = 0; + } + } break; + case ISO_DGOCommand::State::READ_OBJ_DATA: { + int bytes_needed = cmd->obj_header.size - cmd->bytes_processed; + if (buffer_len < bytes_needed) { + bytes_needed = buffer_len; + } + + while (bytes_needed) { + auto* page = buffer->m_pPageList->m_pCurrentActivePage; + int bytes_from_this_page = page->m_pPageMemEnd - file->m_Buffer.m_pCurrentData + 1; + if (bytes_needed <= bytes_from_this_page) { + bytes_from_this_page = bytes_needed; + } + int ret = page->AddDmaRef(); + ASSERT(ret >= 0); + + DMA_SendToEE(cmd->ee_dest_buffer, (file->m_Buffer).m_pCurrentData, bytes_from_this_page, + CopyDataDmaCallback, page); + buffer->AdvanceCurrentData(bytes_from_this_page); + file->CheckPageBoundary(); + cmd->ee_dest_buffer = bytes_from_this_page + cmd->ee_dest_buffer; + cmd->bytes_processed = bytes_from_this_page + cmd->bytes_processed; + buffer_len = buffer_len - bytes_from_this_page; + bytes_needed = bytes_needed - bytes_from_this_page; + + if (!file->m_Buffer.m_pCurrentData) { + buffer_len = 0; + break; + } + } + + if (cmd->bytes_processed == (int)cmd->obj_header.size) { + cmd->objects_loaded = cmd->objects_loaded + 1; + if (cmd->objects_loaded < (int)cmd->dgo_header.object_count) { + if (cmd->buffer1 == cmd->buffer2) { + cmd->state = ISO_DGOCommand::State::FINISH_OBJ_SINGLE_BUFFER; + } else { + cmd->state = ISO_DGOCommand::State::FINISH_OBJ; + } + cmd->bytes_processed = 0; + } else { + ret_status = EIsoStatus::NONE_0; + cmd->state = ISO_DGOCommand::State::FINISH_DGO; + } + } + } break; + case ISO_DGOCommand::State::FINISH_DGO: + ret_status = EIsoStatus::NONE_0; + file->m_Buffer.m_pCurrentData = nullptr; + file->m_Buffer.m_pCurrentPageStart = nullptr; + goto out_of_data; + case ISO_DGOCommand::State::FINISH_OBJ_SINGLE_BUFFER: + cmd->status = EIsoStatus::OK_2; + if (cmd->buffer_toggle == 1) { + cmd->selected_buffer = cmd->buffer1; + } else { + cmd->selected_buffer = cmd->buffer2; + } + ReturnMessage((ISO_VAGCommand*)cmd); + sLoadDGO.sync_ret_count = sLoadDGO.sync_ret_count + 1; + cmd->state = ISO_DGOCommand::State::FINISH_OBJ; + } + } while (buffer_len); + exit_no_sync: + if (ret_status != EIsoStatus::NONE_0) + goto LAB_0000743c; + } else { + cmd->nosync_cancel_ack = 1; + cmd->nosync_cancel_pending_flag = 0; + cmd->acked_cancel_id = cmd->request_cancel_id; + send_count = sLoadDGO.sync_sent_count - sLoadDGO.sync_mbox_wait_count; + receive_count = sLoadDGO.sync_ret_count - sLoadDGO.sync_mbox_wait_count; + // CpuResumeIntr(local_30[0]); + if (0 < send_count) { + receive_count = receive_count + -1; + WaitMbx(g_nSyncMbx); + sLoadDGO.sync_mbox_wait_count = sLoadDGO.sync_mbox_wait_count + 1; + } + ret_status = EIsoStatus::IDLE_1; + if (-1 < receive_count) { + LAB_0000743c: + if (buffer_len) { + file->m_Buffer.m_nDataLength = buffer_len; + return ret_status; + } + goto out_of_data; + } + ret_status = EIsoStatus::NONE_0; + } + (file->m_Buffer).m_pCurrentData = nullptr; + (file->m_Buffer).m_pCurrentPageStart = nullptr; +out_of_data: + (file->m_Buffer).m_nDataLength = 0; + return ret_status; +} + +u32 DGOThread() { + sceSifQueueData dq; + sceSifServeData serve; + + // setup RPC. + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::DGO, RPC_DGO, sRPCBuff, kRpcBuffSize, nullptr, nullptr, &dq); + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} + +void* RPC_DGO(unsigned int fno, void* msg_ptr, int) { + RPC_Dgo_Cmd* cmd = (RPC_Dgo_Cmd*)msg_ptr; + switch (fno) { + case DgoFno::LOAD: + LoadDGO(cmd); + break; + case DgoFno::LOAD_NEXT: + LoadNextDGO(cmd); + break; + case DgoFno::CANCEL: + CancelDGO(cmd); + break; + default: + cmd->status = 1; + ASSERT_NOT_REACHED(); + } + return msg_ptr; +} + +void* foo = 0; + +/*! + * Send a sync message to unblock the DGO thread when doing an async cancel. + */ +bool NotifyDGO() { + // CpuSuspendIntr(local_10); + bool pending_cancel = sLoadDGO.nosync_cancel_ack == 0; + if (pending_cancel) { + sLoadDGO.sync_sent_count = sLoadDGO.sync_sent_count + 1; + } + // CpuResumeIntr(local_10[0]); + if (pending_cancel) { + SendMbx(g_nSyncMbx, &foo); + } + return pending_cancel; +} + +void LoadDGO(RPC_Dgo_Cmd* cmd) { + ISOFileDef* file = get_file_system()->Find(cmd->name); + + if (!file) { + ovrld_log(LogCategory::WARN, "DGO RPC: LoadDGO {} file not found\n", cmd->name); + cmd->status = 1; + return; + } + if (sLoadDGO.last_id < cmd->cgo_id) { + ovrld_log(LogCategory::RPC, "DGO RPC: new command ID, starting a load for {}\n", cmd->name); + CancelDGO(nullptr); + sLoadDGO.msg_type = ISO_Hdr::MsgType::DGO_LOAD; + sLoadDGO.selected_id = cmd->cgo_id; + sLoadDGO.mbox_reply = g_nDGOMbx; + sLoadDGO.thread_to_wake = 0; + sLoadDGO.buffer1 = (u8*)(u64)cmd->buffer1; + sLoadDGO.buffer2 = (u8*)(u64)cmd->buffer2; + sLoadDGO.buffer_top = (u8*)(u64)cmd->buffer_heap_top; + sLoadDGO.file_def = file; + // CpuSuspendIntr(local_18); + if (0 < cmd->cgo_id - sLoadDGO.last_id) { + sLoadDGO.last_id = cmd->cgo_id; + } + sLoadDGO.sync_sent_count = 1; + sLoadDGO.nosync_cancel_ack = 0; + // CpuResumeIntr(local_18[0]); + ASSERT(sLoadDGO.msg_type != ISO_Hdr::MsgType::MSG_0); + ovrld_log(LogCategory::RPC, "------------------DGO: RPC sending mbox (reply size is {})", + MbxSize(g_nDGOMbx)); + SendMbx(g_nISOMbx, &sLoadDGO); + ovrld_log(LogCategory::RPC, "DGO: RPC waiting mbox (now has {})", MbxSize(g_nDGOMbx)); + WaitMbx(g_nDGOMbx); + ovrld_log(LogCategory::RPC, "DGO: RPC recv mbox: {}", int(sLoadDGO.status)); + if (sLoadDGO.status == EIsoStatus::OK_2) { + cmd->status = 2; + return; + } + if (sLoadDGO.status != EIsoStatus::NONE_0) { + cmd->status = 1; + sLoadDGO.msg_type = ISO_Hdr::MsgType::MSG_0; + sLoadDGO.selected_id = -1; + return; + } + } else { + ovrld_log(LogCategory::WARN, "DGO RPC: old command ID seen for {} (got {}, saw {}), ignoring\n", + cmd->name, cmd->cgo_id, sLoadDGO.last_id); + } + cmd->buffer1 = cmd->buffer_heap_top; + cmd->status = 0; + sLoadDGO.msg_type = ISO_Hdr::MsgType::MSG_0; + sLoadDGO.selected_id = -1; +} + +void LoadNextDGO(RPC_Dgo_Cmd* cmd) { + if (sLoadDGO.msg_type == ISO_Hdr::MsgType::MSG_0) { + ovrld_log(LogCategory::WARN, "DGO RPC: LoadNextDGO {} load not running! Ignoring\n", cmd->name); + cmd->status = 1; + return; + } + + sLoadDGO.buffer_top = (u8*)(u64)cmd->buffer_heap_top; + sLoadDGO.buffer1 = (u8*)(u64)cmd->buffer1; + sLoadDGO.buffer2 = (u8*)(u64)cmd->buffer2; + bool unblocked = NotifyDGO(); // tell dgo state machine to run + int status = 3; + if (unblocked != 0) { + WaitMbx(g_nDGOMbx); // wait for it to finish, and return to EE + if (sLoadDGO.status == EIsoStatus::OK_2) { + cmd->status = 2; + cmd->buffer1 = (u32)(u64)sLoadDGO.selected_buffer; + return; + } + status = 11; + if (sLoadDGO.status == EIsoStatus::NONE_0) { + cmd->status = 0; + cmd->buffer1 = cmd->buffer_heap_top; + sLoadDGO.msg_type = ISO_Hdr::MsgType::MSG_0; + sLoadDGO.selected_id = -1; + return; + } + } else { + ovrld_log(LogCategory::WARN, "DGO RPC: LoadNextDGO {} already cancelled! Ignoring\n", + cmd->name); + } + cmd->status = status; + sLoadDGO.msg_type = ISO_Hdr::MsgType::MSG_0; + sLoadDGO.selected_id = -1; +} + +void CancelDGO(RPC_Dgo_Cmd* param_1) { + ovrld_log(LogCategory::WARN, "DGO RPC: CancelDGO {}\n", param_1 ? param_1->name : "NO CMD"); + if (sLoadDGO.msg_type != ISO_Hdr::MsgType::MSG_0) { + sLoadDGO.want_abort = 1; + if (NotifyDGO()) { + WaitMbx(g_nDGOMbx); + } + if (param_1) { + param_1->status = 3; + } + sLoadDGO.selected_id = -1; + sLoadDGO.msg_type = ISO_Hdr::MsgType::MSG_0; + } +} + +void CancelDGONoSync(int id) { + ovrld_log(LogCategory::WARN, "DGO RPC: CancelDGONoSync {}\n", id); + // CpuSuspendIntr(local_10); + sLoadDGO.nosync_cancel_pending_flag = 1; + if (0 < id - sLoadDGO.last_id) { + sLoadDGO.last_id = id; + } + sLoadDGO.request_cancel_id = id; + // CpuResumeIntr(local_10[0]); +} + +EIsoStatus CopyDataToEE(ISO_Hdr* msg) { + return CopyData((ISO_LoadSingle*)msg, CopyKind::EE); +} + +EIsoStatus CopyDataToIOP(ISO_Hdr* msg) { + return CopyData((ISO_LoadSingle*)msg, CopyKind::IOP); +} + +EIsoStatus CopyDataSbkLoad(ISO_Hdr* msg) { + return CopyData((ISO_LoadSingle*)msg, CopyKind::SBK); +} + +void CopyDataDmaCallback(void* in) { + ((CPage*)in)->ReleaseDmaRef(); +} + +EIsoStatus CopyData(ISO_LoadCommon* cmd, CopyKind kind) { + ASSERT(cmd); + auto* file = cmd->m_pBaseFile; + if (file == (CISOCDFile*)0x0) { + return EIsoStatus::ERROR_NO_FILE; + } + + EIsoStatus status = EIsoStatus::OK_2; + if (file->m_Buffer.m_eBufferType != CBuffer::BufferType::NORMAL) { + CBuffer* buffer = &file->m_Buffer; + CPage* page = nullptr; + if (buffer->m_pPageList && buffer->m_nDataLength) { + if (file->CheckPageBoundary()) { + page = file->m_Buffer.m_pPageList->m_pCurrentActivePage; + } + if (page && cmd->progress_bytes < cmd->length_to_copy) { + int len; + do { + // length we want + len = cmd->length_to_copy - cmd->progress_bytes; + + // trim to buffered + if (buffer->m_nDataLength < len) { + len = buffer->m_nDataLength; + } + + // trim to page + if (page->m_pPageMemEnd - buffer->m_pCurrentData + 1 < len) { + len = page->m_pPageMemEnd - buffer->m_pCurrentData + 1; + } + + if (0 < len) { + switch (kind) { + case CopyKind::IOP: { + if (page->AddRef() < 1) { + ASSERT_NOT_REACHED(); + } + memcpy(cmd->dest_ptr, buffer->m_pCurrentData, len); + if (page->ReleaseRef() < 0) + ASSERT_NOT_REACHED(); + } break; + case CopyKind::EE: { + if (page->AddDmaRef() < 1) { + ASSERT_NOT_REACHED(); + } + DMA_SendToEE(cmd->dest_ptr, buffer->m_pCurrentData, len, CopyDataDmaCallback, page); + } break; + case CopyKind::SBK: { + WaitSema(g_n989Semaphore); + if (g_bSoundEnable == 0) { + SignalSema(g_n989Semaphore); + return EIsoStatus::ERROR_NO_SOUND; + } + if (page->AddRef() < 1) { + ASSERT_NOT_REACHED(); + SignalSema(g_n989Semaphore); + return EIsoStatus::OK_2; + } + auto* bank_info = ((ISO_LoadSoundbank*)cmd)->bank_info; + + // hack: added + if (cmd->progress_bytes == 0) { + snd_BankLoadFromIOPPartialEx_Start(); + } + snd_BankLoadFromIOPPartialEx(buffer->m_pCurrentData, len, bank_info->m_nSpuMemLoc, + bank_info->m_nSpuMemSize); + if (cmd->progress_bytes + len == cmd->length_to_copy) { + snd_BankLoadFromIOPPartialEx_Completion(); + snd_ResolveBankXREFS(); + // TODO: this also set field_0x28... is that needed?? + } + + if (page->ReleaseRef() < 0) { + ASSERT_NOT_REACHED(); + } + SignalSema(g_n989Semaphore); + } break; + default: + ASSERT_NOT_REACHED(); + } + + cmd->dest_ptr = cmd->dest_ptr + len; + cmd->progress_bytes = len + cmd->progress_bytes; + buffer->AdvanceCurrentData(len); + if (!file->CheckPageBoundary()) + break; + page = buffer->m_pPageList->m_pCurrentActivePage; + } + + if (!page || len < 1) + break; + } while (true); + } + } + if ((u32)cmd->progress_bytes < (u32)cmd->length_to_copy) { + return status; + } + buffer->m_pPageList->CancelActivePages(); + if (status != EIsoStatus::OK_2) { + return status; + } + return EIsoStatus::NONE_0; + } + return EIsoStatus::ERROR_NO_FILE; +} + +EIsoStatus NullCallback(ISO_Hdr*) { + return EIsoStatus::NULL_CALLBACK; +} + +void set_active_a(ISO_Hdr* cmd, int val) { + cmd->active_a = val; +} + +void set_active_b(ISO_Hdr* cmd, int val) { + cmd->active_b = val; +} + +void set_active_c(ISO_Hdr* cmd, int val) { + cmd->active_c = val; +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso.h b/game/overlord/jak3/iso.h new file mode 100644 index 0000000000..72ef8eef31 --- /dev/null +++ b/game/overlord/jak3/iso.h @@ -0,0 +1,92 @@ +#pragma once +#include "common/link_types.h" + +#include "game/overlord/jak3/isocommon.h" + +namespace jak3 { +struct ISOFileDef; +void jak3_overlord_init_globals_iso(); +void InitISOFS(); + +const ISOFileDef* FindISOFile(const char*); +struct ISO_VAGCommand; +struct VagStreamData; +struct RPC_Dgo_Cmd; + +struct ISO_DGOCommand : public ISO_Hdr { + u8* buffer1 = nullptr; + u8* buffer2 = nullptr; + u8* buffer_top = nullptr; + DgoHeader dgo_header; // + ObjectHeader obj_header; // + u8* ee_dest_buffer = nullptr; // 192 + int bytes_processed = 0; // 196 + int objects_loaded = 0; // 200 + enum class State { + INIT = 0, + READ_DGO_HEADER = 1, + FINISH_OBJ = 2, + READ_LAST_OBJ = 3, + READ_OBJ_HEADER = 4, + READ_OBJ_DATA = 5, + FINISH_DGO = 6, + FINISH_OBJ_SINGLE_BUFFER = 7, + } state = State::INIT; // 204 + int finished_first_object = 0; // 208 + int buffer_toggle = 0; // 212 + u8* selected_buffer = nullptr; // 216 + int selected_id = 0; // 220 + int last_id = 0; // 224 + int acked_cancel_id = 0; // 228 + u8 nosync_cancel_pending_flag = 0; // 232 + int request_cancel_id = 0; // 236 + u8 nosync_cancel_ack = 0; // 240 + int sync_sent_count = 0; // 244 + + // the number of times we looked in the iso thread's sync mbox + // I think just used for debugging/asserts. + int sync_mbox_wait_count = 0; // 248 + + int sync_ret_count = 0; // 252 + int want_abort = 0; // 256 +}; + +enum class CopyKind { + EE = 0, + IOP = 1, + SBK = 2, +}; + +void set_active_a(ISO_Hdr* cmd, int val); +void set_active_b(ISO_Hdr* cmd, int val); +void set_active_c(ISO_Hdr* cmd, int val); +void IsoStopVagStream(ISO_VAGCommand* cmd); +void IsoPlayVagStream(ISO_VAGCommand* user_cmd); +EIsoStatus NullCallback(ISO_Hdr* msg); +EIsoStatus CopyDataToIOP(ISO_Hdr* msg); +EIsoStatus CopyDataSbkLoad(ISO_Hdr* msg); +EIsoStatus CopyDataToEE(ISO_Hdr* msg); +EIsoStatus RunDGOStateMachine(ISO_Hdr* msg); +void QueueVAGStream(VagStreamData* cmd); +void CopyDataDmaCallback(void*); +void* RPC_DGO(unsigned int fno, void* msg_ptr, int); +void LoadDGO(RPC_Dgo_Cmd* cmd); +void CancelDGO(RPC_Dgo_Cmd* cmd); +void LoadNextDGO(RPC_Dgo_Cmd* cmd); +EIsoStatus CopyData(ISO_LoadCommon* msg, CopyKind kind); +void CancelDGONoSync(int id); +void IsoPlayMusicStream(ISO_VAGCommand* user_cmd); +void IsoQueueVagStream(ISO_VAGCommand* user_cmd); +extern int g_nISOThreadID; +extern int g_nISOMbx; +extern bool g_bMusicPause; +extern int g_nMusicSemaphore; +extern char g_szTargetMusicName[0x30]; +extern int g_nActiveMusicStreams; +extern bool g_bVagCmdsInitialized; +extern bool g_bMusicIsPaused; +extern bool g_bAnotherMusicPauseFlag; +extern int g_nMusicFade; +extern int g_nMusicTweak; +extern int g_nMusicFadeDir; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_api.cpp b/game/overlord/jak3/iso_api.cpp new file mode 100644 index 0000000000..acadbdf62a --- /dev/null +++ b/game/overlord/jak3/iso_api.cpp @@ -0,0 +1,229 @@ +#include "iso_api.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" +#include "common/util/FileUtil.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_cd.h" +#include "game/overlord/jak3/iso_queue.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; +void jak3_overlord_init_globals_iso_api() {} + +/*! + * This file is the "API" that implementations of RPCs or other code can use to submit things to the + * ISO thread. Note that not all RPCs use this API - for example the DGO RPC just manually submits + * messages. Generally, these functions will not return until the actual action is complete, like a + * file is loaded. + * - except for messages to pause/play audio, those functions will return immediately, but there may + * be a delay until they are actually processed. + */ + +// PluginVagAndVagWad not ported. + +u32 EEVagAndVagWad(ISO_VAGCommand* cmd, char* name) { + ISOName name_buff; + if (*name == '$' || strlen(name) < 9) { + if (*name == '$') { + name++; + } + MakeISOName(&name_buff, name); + } else { + file_util::ISONameFromAnimationName(name_buff.data, name); + } + + cmd->vag_dir_entry = get_file_system()->FindVAGFile(name_buff.data); + if (cmd->vag_dir_entry) { + memcpy(name_buff.data, "VAGWAD ", 8); + strncpy(name_buff.data + 8, g_pszLanguage, 4); + auto* file_def = get_file_system()->FindIN(&name_buff); + // piVar1 = g_pFileSystem; + cmd->file_def = file_def; + + strncpy(name_buff.data + 8, "INT", 4); + + cmd->vag_file_def = get_file_system()->FindIN(&name_buff); + if (cmd->vag_dir_entry && cmd->file_def && cmd->vag_file_def) { + return 1; + } + } + + cmd->vag_dir_entry = nullptr; + cmd->file_def = nullptr; + cmd->vag_file_def = nullptr; + return 0; +} + +int LoadISOFileToIOP(const ISOFileDef* file_def, void* addr, int length) { + ISO_LoadSingle cmd; + cmd.msg_type = ISO_Hdr::MsgType::LOAD_IOP; + cmd.mbox_reply = 0; + cmd.thread_to_wake = GetThreadId(); + cmd.file_def = file_def; + cmd.addr = (u8*)addr; + cmd.maxlen = length; + lg::warn("--------------- LoadISOFileToIOP START"); + SendMbx(g_nISOMbx, &cmd); + SleepThread(); + lg::warn("--------------- LoadISOFileToIOP END"); + if (cmd.status == EIsoStatus::NONE_0) { + return cmd.length_to_copy; + } else { + return 0; + } +} + +int LoadISOFileToEE(const ISOFileDef* file_def, u32 addr, int length) { + ISO_LoadSingle cmd; + cmd.msg_type = ISO_Hdr::MsgType::LOAD_EE; + cmd.mbox_reply = 0; + cmd.thread_to_wake = GetThreadId(); + cmd.file_def = file_def; + cmd.addr = (u8*)(u64)addr; + cmd.maxlen = length; + lg::warn("--------------- LoadISOFileToEE START"); + SendMbx(g_nISOMbx, &cmd); + SleepThread(); + lg::warn("--------------- LoadISOFileToEE END"); + if (cmd.status == EIsoStatus::NONE_0) { + return cmd.length_to_copy; + } + return 0; +} + +int LoadISOFileChunkToEE(const ISOFileDef* file_def, u32 addr, int max_len, int sector_offset) { + ISO_LoadSingle cmd; + cmd.msg_type = ISO_Hdr::MsgType::LOAD_EE_CHUNK; + cmd.mbox_reply = 0; + cmd.thread_to_wake = GetThreadId(); + cmd.file_def = file_def; + cmd.addr = (u8*)(u64)addr; + cmd.maxlen = max_len; + cmd.sector_offset = sector_offset; + lg::warn("--------------- LoadISOFileChunkToEE START"); + SendMbx(g_nISOMbx, &cmd); + SleepThread(); + lg::warn("--------------- LoadISOFileChunkToEE END"); + if (cmd.status == EIsoStatus::NONE_0) { + return cmd.length_to_copy; + } + return 0; +} + +u32 LoadSoundBankToIOP(const char* name, SoundBankInfo* bank, u32 mode) { + ISO_LoadSoundbank cmd; + cmd.msg_type = ISO_Hdr::MsgType::LOAD_SOUNDBANK; + cmd.mbox_reply = 0; + cmd.thread_to_wake = GetThreadId(); + cmd.bank_info = bank; + cmd.name = name; + cmd.priority = mode; + lg::warn("--------------- LoadSoundBankToIOP START"); + SendMbx(g_nISOMbx, &cmd); + SleepThread(); + lg::warn("--------------- LoadSoundBankToIOP END"); + + return (u32)cmd.status; +} + +void PlayMusicStream(VagStreamData* stream) { + int iVar1; + ISO_VAGCommand cmd; + + cmd.msg_type = ISO_Hdr::MsgType::PLAY_MUSIC_STREAM; + cmd.mbox_reply = 0; + cmd.thread_to_wake = 0; + iVar1 = EEVagAndVagWad(&cmd, stream->name); + if (iVar1 == 0) { + // if (bWarn == 0) { + // bWarn = 1; + // } + } else { + cmd.play_volume = 0x400; + // bWarn = 0; + strncpy(cmd.name, stream->name, 0x30); + cmd.id = stream->id; + cmd.priority_pq = 9; + cmd.music_flag = 1; + cmd.maybe_sound_handler = 0; + cmd.plugin_id = 0; + cmd.art_flag = 0; + cmd.movie_flag = 0; + cmd.updated_trans = 0; + IsoPlayMusicStream(&cmd); + } +} + +void QueueVAGStream(VagStreamData* stream) { + bool bVar1; + bool bVar2; + ISO_VAGCommand cmd; + + cmd.msg_type = ISO_Hdr::MsgType::VAG_QUEUE; + cmd.mbox_reply = 0; + cmd.thread_to_wake = 0; + if (stream->sound_handler == 0) { + EEVagAndVagWad(&cmd, stream->name); + cmd.play_volume = 0x400; + cmd.play_group = 2; + } else { + ASSERT_NOT_REACHED(); + // PluginVagAndVagWad(&cmd,stream); + // cmd.play_volume = stream->maybe_volume2; + // cmd.oog = stream->maybe_volume_3; + // cmd.play_group = stream->group; + } + strncpy(cmd.name, stream->name, 0x30); + cmd.id = stream->id; + cmd.plugin_id = stream->plugin_id; + cmd.priority_pq = stream->priority; + cmd.maybe_sound_handler = stream->sound_handler; + bVar1 = stream->movie_art_load != 0; + cmd.movie_flag = bVar1; + bVar2 = stream->art_load != 0; + cmd.art_flag = bVar2; + cmd.music_flag = 0; + if (bVar2) { + cmd.flags.art = 1; + } + if (bVar1) { + cmd.flags.movie = 1; + } + cmd.updated_trans = 0; + IsoQueueVagStream(&cmd); +} + +void PauseVAGStreams() { + auto* cmd = GetVAGCommand(); + cmd->msg_type = ISO_Hdr::MsgType::VAG_PAUSE; + cmd->mbox_reply = 0; + cmd->thread_to_wake = 0; + SendMbx(g_nISOMbx, cmd); +} + +void UnpauseVAGStreams() { + auto* cmd = GetVAGCommand(); + cmd->msg_type = ISO_Hdr::MsgType::VAG_UNPAUSE; + cmd->mbox_reply = 0; + cmd->thread_to_wake = 0; + SendMbx(g_nISOMbx, cmd); +} + +void SetVAGStreamPitch(int id, int pitch) { + auto* cmd = GetVAGCommand(); + cmd->msg_type = ISO_Hdr::MsgType::VAG_SET_PITCH_VOL; + cmd->id = id; + cmd->pitch_cmd = pitch; + cmd->mbox_reply = 0; + cmd->thread_to_wake = 0; + SendMbx(g_nISOMbx, cmd); +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_api.h b/game/overlord/jak3/iso_api.h new file mode 100644 index 0000000000..ca92d5f981 --- /dev/null +++ b/game/overlord/jak3/iso_api.h @@ -0,0 +1,19 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_iso_api(); + +struct ISOFileDef; +struct VagStreamData; +struct SoundBankInfo; + +int LoadISOFileToEE(const ISOFileDef* file_def, u32 addr, int length); +int LoadISOFileToIOP(const ISOFileDef* file_def, void* addr, int length); +void PlayMusicStream(VagStreamData* data); +int LoadISOFileChunkToEE(const ISOFileDef* file_def, u32 addr, int max_len, int sector_offset); +void SetVAGStreamPitch(s32 id, s32 pitch); +void UnpauseVAGStreams(); +u32 LoadSoundBankToIOP(const char* name, SoundBankInfo* bank, u32 mode); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_cd.cpp b/game/overlord/jak3/iso_cd.cpp new file mode 100644 index 0000000000..4d731df8ab --- /dev/null +++ b/game/overlord/jak3/iso_cd.cpp @@ -0,0 +1,529 @@ +#include "iso_cd.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" +#include "common/util/FileUtil.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/isocommon.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/sce/iop.h" + +using namespace iop; + +namespace jak3 { +VagDir g_VagDir; +MusicTweaks gMusicTweakInfo; +CISOCDFile g_CISOCDFiles[kMaxOpenFiles]; + +namespace { +CISOCDFile* g_pReadInfo = nullptr; +std::vector g_FileDefs; +std::unique_ptr g_ISOCDFileSystem; +} // namespace + +void jak3_overlord_init_globals_iso_cd() { + g_pReadInfo = nullptr; + for (auto& f : g_CISOCDFiles) { + f = CISOCDFile(); + } + g_FileDefs.clear(); + g_VagDir = {}; + g_ISOCDFileSystem = std::make_unique(); + gMusicTweakInfo = {}; +} + +CBaseFileSystem* get_file_system() { + return g_ISOCDFileSystem.get(); +} + +CISOCDFile::CISOCDFile() { + m_nSector = -1; + m_nLoaded = 0; + m_nLength = 0; +} + +namespace { +void ReadPagesCallbackF(CISOCDFile* file, Block* block, s32 error) { + file->ReadPagesCallback(block, error); +} +} // namespace + +CISOCDFile::CISOCDFile(const jak3::ISOFileDef* filedef, s32 process_data_semaphore) + : CBaseFile(filedef, process_data_semaphore) { + m_nSector = -1; + m_nLoaded = 0; + m_nLength = 0; + m_Descriptor.m_File = this; + m_Descriptor.m_Callback = ReadPagesCallbackF; +} + +/*! + * Call ReadPages to read data from this file into its PageList. I believe that the read + * is finished after this function returns. Note that this returns COMPLETE enum in many cases, both + * if the read succeeds, or if the read is not attempted for some reasons. + */ +EIsoStatus CISOCDFile::BeginRead() { + ASSERT(m_Buffer.m_pPageList); + ASSERT(m_Buffer.m_eBufferType != CBuffer::BufferType::EBT_FREE); + + if (m_Status == EIsoStatus::NONE_0) { + return EIsoStatus::ERROR_b; + } + + if (m_Status == EIsoStatus::OK_2) { + return EIsoStatus::OK_2; + } + + ASSERT(m_Status == EIsoStatus::IDLE_1); + + auto* plist = m_Buffer.m_pPageList; + + // how many pages are in our list, but not filled? + int num_pages_desired = plist->m_nNumPages - plist->m_nNumActivePages; + + if (!num_pages_desired) { + // no space to read + return EIsoStatus::OK_2; + } + + // convert pages to active, indicating that a read will attempt to fill them: + auto* first_page = plist->AddActivePages(num_pages_desired); + if (!first_page) { + lg::warn("Failed to add {} active pages", num_pages_desired); + } + + // convert buffer type - ?? + switch (m_Buffer.m_eBufferType) { + case CBuffer::BufferType::EBT_FREE: + ASSERT_NOT_REACHED(); + case CBuffer::BufferType::NORMAL: + m_Buffer.m_eBufferType = CBuffer::BufferType::REQUEST_NORMAL; + break; + case CBuffer::BufferType::VAG: + m_Buffer.m_eBufferType = CBuffer::BufferType::REQUEST_VAG; + break; + case CBuffer::BufferType::REQUEST_NORMAL: + case CBuffer::BufferType::REQUEST_VAG: + break; + } + + m_Status = EIsoStatus::OK_2; + + // remember this as our currently reading file + g_pReadInfo = this; + if (m_FileKind != CBaseFile::Kind::LZO_COMPRESSED) { + if (m_nLength == 0 || m_nLoaded < m_nLength) { + ovrld_log(LogCategory::PAGING, "Calling ReadPages: sector {}, pages {}", m_nSector, + num_pages_desired); + ReadPages(m_nSector, first_page, num_pages_desired, nullptr, true); + int bytes = 0x8000 * num_pages_desired; + m_nLoaded += bytes; + m_Buffer.AddData(bytes); + m_nSector += bytes >> 0xb; + } + } else { + ASSERT_NOT_REACHED(); + } + + return EIsoStatus::OK_2; +} + +/*! + * Called by ?? to indicate that the read is done. + */ +EIsoStatus CISOCDFile::SyncRead() { + if (m_Status != EIsoStatus::IDLE_1 && g_pReadInfo) { + if (m_Status == EIsoStatus::OK_2) { + m_Status = EIsoStatus::IDLE_1; + } + g_pReadInfo = nullptr; + return EIsoStatus::OK_2; + } + return EIsoStatus::ERROR_b; +} + +/*! + * As soon as possible, stop ongoing reads and free buffers. + */ +void CISOCDFile::Close() { + // cancel ongoing reading in the driver + get_driver()->CancelRead(&m_Descriptor); + + ASSERT(m_FileKind != CBaseFile::Kind::LZO_COMPRESSED); // unsupported in pc + if (this == g_pReadInfo) { + g_pReadInfo = nullptr; + } + + if (m_Buffer.m_eBufferType != CBuffer::BufferType::EBT_FREE) { + TerminateBuffer(); + } + + // reset self + *this = CISOCDFile(); +} + +/*! + * In the case where we have run out of page memory, take pages that we have loaded, but aren't yet + * using, and discard them back to the pool. + */ +int CISOCDFile::RecoverPages(int num_pages_desired) { + // we only allow ourselves to recover pages for VAG streaming. + if (!m_Buffer.m_pIsoCmd || m_Buffer.m_pIsoCmd->callback != ProcessVAGData) { + return 0; + } + + // lock semaphore for processing + ASSERT(m_ProcessDataSemaphore != -1); + WaitSema(m_ProcessDataSemaphore); + auto* plist = m_Buffer.m_pPageList; + int num_removed = 0; + if (plist) { + int pages_to_ask_for = plist->m_nNumUnsteppedPages; + if (pages_to_ask_for > 1) { + // don't ask for more than user asked for + if (pages_to_ask_for > num_pages_desired) { + pages_to_ask_for = num_pages_desired; + } + num_removed = plist->RemoveActivePages(pages_to_ask_for); + if (num_removed) { + m_nSector -= 0x10 * num_removed; + m_nLoaded -= 0x8000 * num_removed; + // suspend intr + ASSERT(m_Buffer.m_nDataLength >= 0); + if (m_Buffer.m_nDataLength > 0) { + m_Buffer.AddData(-num_removed * 0x8000); + } + // resume intr + ASSERT(m_nLoaded >= 0); + } + } + } + + // move our reading pointer back. + m_PageOffset -= num_removed; + // unlock processing + SignalSema(m_ProcessDataSemaphore); + return num_removed; +} + +/*! + * Get the next sector to read. + */ +int CISOCDFile::GetSector() { + return m_nSector; +} + +// WaitForLZOPages - not ported. + +void CISOCDFile::ReadPages(int sector, + jak3::CPage* destination_page, + int num_pages, + char* done_flag_ptr, + bool sleep_until_done) { + ASSERT(destination_page); + ASSERT(num_pages >= 1); + + constexpr int kMaxPages = 24; + // I _think_ this might have been an alloca... + BlockParams params_array[kMaxPages]; + ASSERT(num_pages <= kMaxPages); + + // iVar2 = -((num_pages + -1) * 0x14 + 0x1bU & 0xfffffff8); + // params = (BlockParams*)((int)local_30 + iVar2); + BlockParams* params = params_array; + + // increment our progress in the file - the distributed update of the various progress integers + // is somewhat confusing, especially since failures here don't seem to reset it properly. + m_PageOffset += num_pages; + + // Set up block params for each page to read + CPage* page = destination_page; + int pg_remaining = num_pages; + do { + page->input_state = CPage::State::READING; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + + params->destination = page->m_pPageMemStart; + params->num_sectors = 0x10; + params->sector_num = sector; + params->file_def = m_FileDef; + params->page = page; + + params->flag = nullptr; + if (pg_remaining == 1) { // on the last page... + params->flag = (char*)0xffffffff; // flag this + if (!sleep_until_done) { + params->flag = done_flag_ptr; + } + } + ovrld_log(LogCategory::PAGING, "[paging] building block for driver: 0x{:x}, {}, {}, flag: {}", + (u64)params->destination, params->sector_num, params->file_def->name.data, + (u64)params->flag); + page = page->m_pNextPage; + pg_remaining = pg_remaining + -1; + sector += 0x10; + params++; + } while (page && pg_remaining > 0); + + if (pg_remaining == 0) { + // we set up block params for all the requested pages. + int pages_actually_read = -1; + + ovrld_log(LogCategory::PAGING, "[paging] Submitting {} blocks to driver.\n", num_pages); + int status = get_driver()->ReadMultiple(&m_Descriptor, &pages_actually_read, params_array, + num_pages, true); + if ((status == 0) && pages_actually_read == num_pages) { + if (!sleep_until_done) { + return; + } + // put us to sleep... + ovrld_log(LogCategory::PAGING, "[paging] Sleeping, waiting for driver to read {}", + pages_actually_read); + SleepThread(); + ovrld_log(LogCategory::PAGING, "[paging] Driver woke us up!"); + return; + } + ASSERT_NOT_REACHED(); // unexpected failure to issue read + } else { + // ran out of pages.... + ASSERT_NOT_REACHED(); // this was just a warning.. but I think it shouldn't happen. + if (destination_page) { + do { + destination_page->input_state = CPage::State::ACTIVE; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, + ~destination_page->mask); + destination_page = destination_page->m_pNextPage; + } while (destination_page); + } + } + + ASSERT_NOT_REACHED(); + // only get here is we failed.... set the done flag. + if (sleep_until_done == 0 && done_flag_ptr) { + *done_flag_ptr = 1; + } +} + +/*! + * Callback run by the dvd driver when a page is finished reading. + */ +void CISOCDFile::ReadPagesCallback(jak3::Block* block, int error) { + if (error == 0) { + ASSERT(block->params.page->m_nAllocState == 1); + // flag page as done + block->params.page->input_state = CPage::State::READ_DONE; + // set flag + SetEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, block->params.page->mask); + + // if this block has a notification, process it: + if (block->params.flag == (char*)0xffffffff) { // indicates we should wake caller + // we assume the caller is the iso thread + WakeupThread(g_nISOThreadID); + } else if (block->params.flag) { + // in this case, it's a pointer. + *block->params.flag = 1; + } + } +} + +// DecompressBlock - not ported + +/*! + * Initialize the file system - find all files and set up their definitions. + */ +int CISOCDFileSystem::Init() { + // drive ready event flag - not ported + // get disc type - not ported + + // this is mostly not needed... except for some vag pausing nonsense :( + get_driver()->SetDriverCallback([&](int a) { DvdDriverCallback(a); }); + + // skipped a bunch of lzo pages crap + ReadDirectory(); + LoadMusicTweaks(); + // skip load Disc ID + + // should already be done in the constructor... + for (auto& f : g_CISOCDFiles) { + f.m_FileDef = nullptr; + } + return 0; +} + +// PollDrive - not ported + +/*! + * Find a file definition by name. + */ +ISOFileDef* CISOCDFileSystem::Find(const char* name) { + ISOName iname; + file_util::MakeISOName(iname.data, name); + return FindIN(&iname); +} + +/*! + * Find a file definition by its "ISO Name", a 12-byte name. + */ +ISOFileDef* CISOCDFileSystem::FindIN(const jak3::ISOName* name) { + for (auto& def : g_FileDefs) { + if (def.name == *name) { + return &def; + } + } + return nullptr; +} + +/*! + * Get the length of a file, in bytes. + */ +int CISOCDFileSystem::GetLength(const jak3::ISOFileDef* file) { + // return file->length; + lg::info("getlength"); + file_util::assert_file_exists(file->full_path.c_str(), "CISOCDFileSystem GetLength"); + FILE* fp = file_util::open_file(file->full_path.c_str(), "rb"); + ASSERT(fp); + fseek(fp, 0, SEEK_END); + uint32_t len = ftell(fp); + fclose(fp); + return len; +} + +/*! + * Open a file for reading. + */ +CBaseFile* CISOCDFileSystem::Open(const jak3::ISOFileDef* file_def, + int sector_offset, + int file_kind) { + auto* file = AllocateFile(file_def); + ASSERT(file); + + // file kind must be known to be non-compressed (1). (TODO: remove arg) + ASSERT(file_kind == 1); + + file->m_FileKind = CBaseFile::Kind::NORMAL; + file->m_nLength = file_def->length; + file->m_LengthPages = (0x7fff + file->m_nLength) >> 0xf; + if (file->m_LengthPages < 1) { + ASSERT_NOT_REACHED(); + } + file->m_nLoaded = 0; + file->m_PageOffset = 0; + + // in the original game, this was the sector of the start of the file + // we just make it 0, since we don't build up a whole iso file. + file->m_nSector = 0; + if (sector_offset != -1) { + file->m_nSector += sector_offset; + } + return file; +} + +/*! + * Open a WAD file for reading, given the offset of the data to read, in pages. + */ +CBaseFile* CISOCDFileSystem::OpenWAD(const jak3::ISOFileDef* file_def, int page_offset) { + auto* file = AllocateFile(file_def); + ASSERT(file); + + file->m_LengthPages = 1; // this is not really true.. + file->m_FileKind = CBaseFile::Kind::NORMAL; + file->m_PageOffset = 0; + file->m_nSector = page_offset * 0x10; + file->m_nLoaded = 0; + file->m_nLength = 0; + return file; +} + +/*! + * Locate the entry for a VAG file in the VAG directory. + */ +VagDirEntry* CISOCDFileSystem::FindVAGFile(const char* name) { + u32 packed_name[2]; + PackVAGFileName(packed_name, name); + for (int i = 0; i < g_VagDir.num_entries; i++) { + auto& entry = g_VagDir.entries[i]; + if (packed_name[0] == entry.words[0] && packed_name[1] == (entry.words[1] & 0x3ff)) { + return &entry; + } + } + return nullptr; +} + +/*! + * Get a CISOCDFile* for a newly opened file. + */ +CISOCDFile* CISOCDFileSystem::AllocateFile(const jak3::ISOFileDef* file_def) { + for (int i = 0; i < kMaxOpenFiles; i++) { + auto* file = &g_CISOCDFiles[i]; + if (!file->m_FileDef) { + *file = CISOCDFile(file_def, m_Sema[i]); + return file; + } + } + ASSERT_NOT_REACHED(); +} + +/*! + * Callback from the DVD driver itself into the filesystem. This was originally used for notifying + * when the tray is opened or closed. + */ +void CISOCDFileSystem::DvdDriverCallback(int) { + // the only callbacks that do anything are tray open/close, which we don't care about + ASSERT_NOT_REACHED(); +} + +// CheckDiscID - not ported +// LoadDiscID - not ported +// ReadSectorsNow - not ported + +/*! + * Find all the files on the disc and set up their information. This is modified for the PC port to + * just search for files in the appropriate out folder. + */ +void CISOCDFileSystem::ReadDirectory() { + for (const auto& f : + fs::directory_iterator(file_util::get_jak_project_dir() / "out" / "jak3" / "iso")) { + if (f.is_regular_file()) { + auto& e = g_FileDefs.emplace_back(); + std::string file_name = f.path().filename().string(); + ASSERT(file_name.length() < 16); // should be 8.3. + MakeISOName(&e.name, file_name.c_str()); + e.full_path = + fmt::format("{}/out/jak3/iso/{}", file_util::get_jak_project_dir().string(), file_name); + auto* fp = file_util::open_file(e.full_path, "rb"); + ASSERT(fp); + fseek(fp, 0, SEEK_END); + e.length = ftell(fp); + fclose(fp); + } + } +} + +/*! + * Load the "Music Tweaks" file, which contains a volume setting per music track. + */ +void CISOCDFileSystem::LoadMusicTweaks() { + ISOName tweakname; + MakeISOName(&tweakname, "TWEAKVAL.MUS"); + auto file = g_ISOCDFileSystem->FindIN(&tweakname); + if (file) { + auto fp = file_util::open_file(file->full_path, "rb"); + ASSERT(fp); + ASSERT(file->length <= sizeof(gMusicTweakInfo)); + auto ret = fread(&gMusicTweakInfo, file->length, 1, fp); + ASSERT(ret == 1); + fclose(fp); + } else { + lg::warn("Failed to open music tweak file."); + gMusicTweakInfo.TweakCount = 0; + } +} + +// Crc32 - not ported +// ReadU32 - not ported + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_cd.h b/game/overlord/jak3/iso_cd.h new file mode 100644 index 0000000000..1746db0891 --- /dev/null +++ b/game/overlord/jak3/iso_cd.h @@ -0,0 +1,58 @@ +#pragma once + +#include + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/basefilesystem.h" +#include "game/overlord/jak3/dvd_driver.h" +#include "game/overlord/jak3/isocommon.h" + +namespace jak3 { +void jak3_overlord_init_globals_iso_cd(); + +CBaseFileSystem* get_file_system(); + +extern VagDir g_VagDir; +extern MusicTweaks gMusicTweakInfo; + +struct CISOCDFile : public CBaseFile { + CISOCDFile(); + CISOCDFile(const ISOFileDef* filedef, s32 process_data_semaphore); + int m_nLoaded = 0; // bytes loaded so far + int m_nSector = 0; // next sector to read. + int m_nLength = 0; // bytes that we want to load. 0 for the whole file + CDescriptor m_Descriptor; + + EIsoStatus BeginRead() override; + + void ReadPages(int sector, + CPage* destination_page, + int num_pages, + char* done_flag_ptr, + bool flag); + EIsoStatus SyncRead() override; + void Close() override; + int RecoverPages(int num_pages) override; + int GetSector() override; + + void ReadPagesCallback(Block* block, int error); +}; + +struct CISOCDFileSystem : public CBaseFileSystem { + CISOCDFileSystem() = default; + int Init() override; + ISOFileDef* Find(const char* name) override; + ISOFileDef* FindIN(const ISOName* name) override; + int GetLength(const ISOFileDef* file) override; + CBaseFile* Open(const ISOFileDef* file_def, int sector_offset, int file_kind) override; + CBaseFile* OpenWAD(const ISOFileDef* file_def, int page_offset) override; + VagDirEntry* FindVAGFile(const char* name) override; + + void DvdDriverCallback(int a); + void ReadDirectory(); + void LoadMusicTweaks(); + CISOCDFile* AllocateFile(const ISOFileDef* file); + + // int m_drive_ready_event_flag = -1; +}; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_queue.cpp b/game/overlord/jak3/iso_queue.cpp new file mode 100644 index 0000000000..a11401ecc4 --- /dev/null +++ b/game/overlord/jak3/iso_queue.cpp @@ -0,0 +1,732 @@ +#include "iso_queue.h" + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/dma.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/isocommon.h" +#include "game/overlord/jak3/pagemanager.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" +#include "game/sound/sndshim.h" + +using namespace iop; + +namespace jak3 { +s32 g_nPriQueueSema = 0; +s32 g_VagCmdSema = 0; +u32 g_auStrmSRAM[6]; +u32 g_auTrapSRAM[6]; +PriStackEntry gPriStack[2]; +extern u32 time_of_last_unknown_rate_drive_op; +u32 g_cmds_with_speed_total = 0; +bool unk_time_mode_flag = false; +ISO_Hdr* g_selected_cmd = nullptr; +bool unk_time_mflag = 0; +s32 unk_sector = 0; +u32 vag_cmd_cnt = 0; +u32 vag_cmd_used = 0; +u32 max_vag_cmd_cnt = 0; +ISO_VAGCommand vag_cmds[16]; + +static constexpr s32 LOOP_END = 1; +static constexpr s32 LOOP_REPEAT = 2; +static constexpr s32 LOOP_START = 4; + +// Empty ADPCM block with loop flags + +// clang-format off +u8 VAG_SilentLoop[0x60] = { + 0x0, LOOP_START | LOOP_REPEAT, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, LOOP_REPEAT, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, LOOP_END | LOOP_REPEAT, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +}; +// clang-format on + +void jak3_overlord_init_globals_iso_queue() { + g_nPriQueueSema = 0; + g_VagCmdSema = 0; + for (auto& x : gPriStack) { + x = {}; + } + g_cmds_with_speed_total = 0; + unk_time_mode_flag = false; + g_selected_cmd = nullptr; + unk_time_mflag = 0; + unk_sector = 0; + vag_cmd_cnt = 0; + vag_cmd_used = 0; + for (auto& x : vag_cmds) { + x = {}; + } +} + +/*! + * Added function to check if there is a pending DGO load command. + * On PC, DOG loads are really the only loading time that users see. If there is a pending + * DGO load, we can modify logic to take advantage of PCs being dramatically faster than PS2 and + * get much better load times. + */ +bool DgoCmdWaiting() { + for (auto& level : gPriStack) { + for (int i = 0; i < level.count; i++) { + auto* cmd = level.cmds[i]; + + if (cmd && cmd->msg_type == ISO_Hdr::MsgType::DGO_LOAD) { + if (cmd->m_pBaseFile) { + auto* file = cmd->m_pBaseFile; + if (file->m_Buffer.m_nDataLength) { + return true; + } + } + } + } + } + return false; +} + +void InitBuffers() { + SemaParam sema_param; + sema_param.max_count = 1; + sema_param.init_count = 1; + sema_param.attr = 0; + sema_param.option = 0; + + g_nPriQueueSema = CreateSema(&sema_param); + ASSERT(g_nPriQueueSema >= 0); + get_page_manager()->Initialize(); + + g_auStrmSRAM[0] = 0x5040; + g_auTrapSRAM[0] = 0x9040; + snd_SRAMMarkUsed(0x5040, 0x4040); + g_auStrmSRAM[1] = 0x9080; + g_auTrapSRAM[1] = 0xd080; + snd_SRAMMarkUsed(0x9080, 0x4040); + g_auStrmSRAM[2] = 0xd0c0; + g_auTrapSRAM[2] = 0x110c0; + snd_SRAMMarkUsed(0xd0c0, 0x4040); + g_auStrmSRAM[3] = 0x11100; + g_auTrapSRAM[3] = 0x15100; + snd_SRAMMarkUsed(0x11100, 0x4040); + g_auStrmSRAM[4] = 0x15140; // 86384 - 48 + g_auTrapSRAM[4] = 0x19140; + snd_SRAMMarkUsed(0x15140, 0x4040); + g_auStrmSRAM[5] = 0x019180; + g_auTrapSRAM[5] = 0x001d180; + snd_SRAMMarkUsed(0x19180, 0x4040); + + for (int i = 0; i < 6; i++) { + if (!DMA_SendToSPUAndSync(VAG_SilentLoop, 0x30, g_auTrapSRAM[i], nullptr, nullptr)) { + DelayThread(1000); + ASSERT_NOT_REACHED(); + break; + } + } + + sema_param.max_count = 1; + sema_param.attr = 1; + sema_param.init_count = 1; + sema_param.option = 0; + g_VagCmdSema = CreateSema(&sema_param); + ASSERT(g_VagCmdSema >= 0); +} + +int QueueMessage(ISO_Hdr* msg, int pri) { + msg->status = EIsoStatus::OK_2; + msg->priority = pri; + WaitSema(g_nPriQueueSema); + int queue_idx = (pri == 5) ? 1 : 0; + bool ok = gPriStack[queue_idx].count != 8; + if (ok) { + gPriStack[queue_idx].cmds[gPriStack[queue_idx].count] = msg; + gPriStack[queue_idx].count++; + SignalSema(g_nPriQueueSema); + } else { + msg->status = EIsoStatus::FAILED_TO_QUEUE_4; + SignalSema(g_nPriQueueSema); + ReturnMessage(msg); + ASSERT_NOT_REACHED(); + } + return ok; +} + +int UnqueueMessage(ISO_Hdr* msg) { + WaitSema(g_nPriQueueSema); + int iVar5 = 0; + PriStackEntry* stack = gPriStack; + do { + int iVar4 = 0; + ISO_Hdr** cmd = stack->cmds; + if (0 < stack->count) { + do { + if (*cmd == msg) + break; + iVar4 = iVar4 + 1; + cmd++; + } while (iVar4 < stack->count); + } + iVar5 = iVar5 + 1; + if (iVar4 < stack->count) { + stack->count = stack->count + -1; + if (iVar4 < stack->count) { + ISO_Hdr** ppIVar3 = stack->cmds + iVar4; + do { + iVar4 = iVar4 + 1; + *ppIVar3 = ppIVar3[1]; + ppIVar3 = ppIVar3 + 1; + } while (iVar4 < stack->count); + } + return SignalSema(g_nPriQueueSema); + } + stack = stack + 1; + if (1 < iVar5) { + return SignalSema(g_nPriQueueSema); + } + } while (true); +} + +/*! + * Select which command to read for next + * This function considers things like seeking time, reading rates of streamed files, + * and buffer sizing. To be entirely honest, I don't understand it almost at all, and it's not + * clear that it works as expected. It seems to work good enough, and no commands get entirely + * starved of data while there are multiple streams. + */ +ISO_Hdr* GetMessage() { + // bool been_a_while; + // bool bVar2; + // int now; + // int iVar3; + // int iVar4; + // CISOCDFile *file; + // CISOCDFile *pCVar5; + // int iVar6; + // CPageList *plist; + // uint uVar7; + // int iVar8; + // int iVar9; + // PriStack *local_t2_216; + // PriStack *pri_level; + // CISOCDFile *tfile4; + // code *pcVar10; + // CISOCDFile *tfile2; + // CISOCDFile *tfile3; + // uint uVar11; + // ISO_VAGCommand *cmd; + // int idx_on_level; + // ISO_VAGCommand **ppIVar12; + // int iVar13; + // CBaseFile *tfile; + // int cmds_total; + // int iVar14; + // uint uVar15; + ISO_Hdr* cmds_array[16]; + u32 read_rates_array[16]; + int num_pages_array[16]; + int unstepped_pages_array[16]; + int remaining_pages_array[16]; + // uint its_been_a_while; + // int pages_total; + // int read_rate_total; + // int min_nospeed_pages_total; + // int max_pages_total; + // int min_speed_pages_total; + // ISO_VAGCommand *selected_cmd; + // int cmds_with_speed_total; + // uint cmd2_read_rate; + // int selected_cmd_rem_sectors; + // int pri_level_idx; + + // simple logic to select which command to use next. + + u32 now = GetSystemTimeLow(); + + bool been_a_while = false; + if (unk_time_mode_flag == 0) { + been_a_while = 0x384000 < (now - time_of_last_unknown_rate_drive_op); + } else { + unk_time_mode_flag = 0; + time_of_last_unknown_rate_drive_op = now; + } + + s32 cmds_total = 0; + get_page_manager()->GarbageCollect(); + s32 pages_total = 0; + s32 read_rate_total = 0; + s32 min_nospeed_pages_total = 0; + s32 max_pages_total = 0; + s32 min_speed_pages_total = 0; +LAB_000080e4: + s32 iVar9 = g_cmds_with_speed_total * 400 + 0x2ee; + s32 iVar13 = 0x7fffffff; + ISO_Hdr* selected_cmd = nullptr; + s32 cmds_with_speed_total = 0; + s32 cmd2_read_rate = 0; + s32 selected_cmd_rem_sectors = -1; + s32 pri_level_idx = 1; + PriStackEntry* pri_level = gPriStack + 1; + s32 iVar8 = iVar13; + + // loop over priority levels + do { + s32 idx_on_level = pri_level->count + -1; + + // if any exist on this level + if (-1 < idx_on_level) { + ISO_Hdr** ppIVar12 = pri_level->cmds + idx_on_level; + // iVar14 = cmds_total << 2; + // loop over commands on this level + do { + ISO_Hdr* cmd = *ppIVar12; + CBaseFile* file = nullptr; + // iVar4 = iVar14; + + // basic check if this command is even valid: + if (cmd && (file = cmd->m_pBaseFile, file) && cmd->status == EIsoStatus::OK_2 && + cmd->active_a != 0) { + u32 read_rate = file->m_ReadRate; + read_rate_total = read_rate_total + read_rate; // maybe this is an inverse rate... + + // build up arrays of info for each command + read_rates_array[cmds_total] = read_rate; + cmds_array[cmds_total] = cmd; + + if ((int)read_rate < 1) { + min_nospeed_pages_total = min_nospeed_pages_total + file->m_Buffer.m_nMinNumPages; + max_pages_total = max_pages_total + file->m_Buffer.m_nMaxNumPages; + } else { + min_speed_pages_total = min_speed_pages_total + file->m_Buffer.m_nMinNumPages; + cmds_with_speed_total = cmds_with_speed_total + 1; + } + + CPageList* plist = file->m_Buffer.m_pPageList; + + s32 npages = 0; + if (plist != (CPageList*)0x0) { + npages = plist->m_nNumPages; + } + pages_total = pages_total + npages; + num_pages_array[cmds_total] = npages; + + s32 n_untepped_pages = 0; + if (plist != (CPageList*)0x0) { + n_untepped_pages = plist->m_nNumUnsteppedPages; + } + unstepped_pages_array[cmds_total] = n_untepped_pages; + + s32 n_remaining_pages = 4; + if (cmd->callback != RunDGOStateMachine) { + n_remaining_pages = n_untepped_pages + file->m_LengthPages - file->m_PageOffset; + // lg::warn("remaining pages is {} = {} + {} - {}", n_remaining_pages, n_untepped_pages, + // file->m_LengthPages, file->m_PageOffset); + } + remaining_pages_array[cmds_total] = n_remaining_pages; + + if (remaining_pages_array[cmds_total] < 1) { + remaining_pages_array[cmds_total] = 1; + } + + // careful, this increments in a weird spot. + // I use cmds_total - 1 below... + int old_cmds_total = cmds_total; + cmds_total = cmds_total + 1; + + // iVar4 = iVar14 + 4; + + // next, we'll determine a desired page cutoff and discard commands where + // we have enough pages. + if (read_rate && plist) { + // 3/4 * mNumPages, this is if our allocated buffer is 75% full. + s32 desired_pages = (int)(file->m_nNumPages * 0x30) >> 6; + + // but, we want at least min pages + if (desired_pages < file->m_Buffer.m_nMinNumPages) { + desired_pages = file->m_Buffer.m_nMinNumPages; + } + + // and we want at least 2 + if (desired_pages < 2) { + desired_pages = 2; + } + + // but, we never want more pages than we plan to eventually read. + if (remaining_pages_array[old_cmds_total] < desired_pages) { + desired_pages = remaining_pages_array[old_cmds_total]; + } + + // if we have that many, we can just forget the command - no point in filling it now. + if (desired_pages <= unstepped_pages_array[old_cmds_total]) + goto LAB_00008420; + } + + s32 iVar14 = iVar9; + if ((0 < (int)read_rate) && + (iVar14 = (int)(file->m_Buffer.m_nDataLength * 1000) / (int)read_rate, + read_rate == 0)) { + ASSERT_NOT_REACHED(); + } + + s32 pri = cmd->priority; + + // really not sure what this is... + if (been_a_while) { + if ((read_rate == 0) || (iVar14 < 0x2ee)) { + been_a_while = false; + goto LAB_000080e4; + } + + // if this isn't the command we said last time. + if (g_selected_cmd != cmd) { + s32 current_sector = file->GetSector(); + current_sector = current_sector - unk_sector; + bool sector_ok = false; + if (current_sector < 0) { + current_sector = -current_sector; + if (unk_time_mflag != 0) { + LAB_000083ac: + current_sector = current_sector + 10000000; + } + sector_ok = current_sector < iVar13; + } else { + sector_ok = current_sector < iVar13; + if ((0 < current_sector) && (unk_time_mflag == 0)) + goto LAB_000083ac; + } + if (sector_ok) { + iVar13 = current_sector; + iVar8 = iVar14; + selected_cmd = cmd; + cmd2_read_rate = read_rate; + } + } + } else { + // normal selection logic??? + if ((((iVar14 == iVar8) && (selected_cmd_rem_sectors < pri)) || (iVar14 < iVar8)) && + (iVar14 <= iVar9)) { + iVar8 = iVar14; + selected_cmd = cmd; + cmd2_read_rate = read_rate; + selected_cmd_rem_sectors = pri; + } + } + } + LAB_00008420: + idx_on_level = idx_on_level + -1; + /* WARNING: ptrarith problems */ + ppIVar12 = ppIVar12 + -1; + // iVar14 = iVar4; + } while (-1 < idx_on_level); + } + pri_level--; + pri_level_idx = pri_level_idx + -1; + } while (-1 < pri_level_idx); + + if (selected_cmd) { + if (cmd2_read_rate == 0) { + unk_time_mode_flag = 1; + time_of_last_unknown_rate_drive_op = now; + } + iVar13 = unk_sector; + if (selected_cmd->m_pBaseFile) { + iVar13 = selected_cmd->m_pBaseFile->GetSector(); + } + if (unk_sector < iVar13) { + unk_time_mflag = 1; + unk_sector = iVar13; + } else { + been_a_while = iVar13 != unk_sector; + unk_sector = iVar13; + if (been_a_while) { + unk_time_mflag = 0; + unk_sector = iVar13; + } + } + } + min_speed_pages_total = min_speed_pages_total + min_nospeed_pages_total; + g_cmds_with_speed_total = cmds_with_speed_total; + g_selected_cmd = selected_cmd; + pages_total = get_page_manager()->m_CCache.m_nNumFreePages + pages_total; + if ((0 < min_speed_pages_total) && (0 < pages_total)) { + if (min_speed_pages_total == 0) { + // trap(0x1c00); + ASSERT_NOT_REACHED(); + } + min_speed_pages_total = (min_nospeed_pages_total * pages_total) / min_speed_pages_total; + if (min_speed_pages_total < min_nospeed_pages_total) { + min_speed_pages_total = min_nospeed_pages_total; + } + if (max_pages_total < min_speed_pages_total) { + min_speed_pages_total = max_pages_total; + } + pages_total = pages_total - min_speed_pages_total; + iVar9 = 0; + iVar13 = min_speed_pages_total; + iVar8 = pages_total; + if (0 < cmds_total) { + // iVar14 = 0; + iVar13 = min_speed_pages_total; + iVar8 = pages_total; + do { + CBaseFile* tfile = cmds_array[iVar9]->m_pBaseFile; + if (read_rates_array[iVar9] < 1) { + s32 uVar11 = (tfile->m_Buffer).m_nMaxNumPages; + if (max_pages_total == 0) { + ASSERT_NOT_REACHED(); + } + s32 uVar15 = (tfile->m_Buffer).m_nMinNumPages; + s32 uVar7 = (int)(uVar11 * min_speed_pages_total) / max_pages_total; + if ((int)uVar7 < (int)uVar15) { + uVar7 = uVar15; + } + + tfile->m_nNumPages = uVar7; + if ((int)uVar11 < (int)uVar7) { + uVar7 = uVar11; + } + tfile->m_nNumPages = uVar7; + if (remaining_pages_array[iVar9] < (int)uVar7) { + uVar7 = remaining_pages_array[iVar9]; + } + tfile->m_nNumPages = uVar7; + // lg::warn("num pages mod {}", uVar7); + iVar13 = iVar13 - uVar7; + } else { + s32 uVar11 = (tfile->m_Buffer).m_nMinNumPages; + s32 uVar7 = (tfile->m_Buffer).m_nMaxNumPages; + // lg::warn("taking else case: {} {} {}", uVar11, uVar7, tfile->m_nNumPages); + + s32 uVar15 = -1; + if (read_rate_total == 0) { + LAB_000085e4: + // lg::warn("going to min! (rrt is {})", read_rate_total); + uVar15 = uVar11; + } else { + if (read_rate_total == 0) { + ASSERT_NOT_REACHED(); + } + uVar15 = (read_rates_array[iVar9] * pages_total) / read_rate_total; + // lg::warn("read rate math is {}", uVar15); + if ((int)uVar15 < (int)uVar11) + goto LAB_000085e4; + } + + // lg::warn("vals {} {}", uVar7, uVar15); + if ((int)uVar7 < (int)uVar15) { + uVar15 = uVar7; + } + // lg::warn("vals 2 {} {}", remaining_pages_array[iVar9], uVar15); + if (remaining_pages_array[iVar9] < (int)uVar15) { + uVar15 = remaining_pages_array[iVar9]; + } + iVar8 = iVar8 - uVar15; + tfile->m_nNumPages = uVar15; + // lg::warn("num pages mod 2 {}", uVar15); + } + iVar9 = iVar9 + 1; + // iVar14 = iVar9 * 4; + } while (iVar9 < cmds_total); + } + while (0 < iVar13) { + iVar9 = 0; + s32 iVar14 = iVar13; + if (0 < cmds_total) { + s32 iVar4 = 0; + iVar14 = iVar13; + while (0 < iVar14) { + CBaseFile* tfile2 = cmds_array[iVar4 / 4]->m_pBaseFile; + iVar9 = iVar9 + 1; + s32 uVar11; + if (read_rates_array[iVar4 / 4] == 0 && + (uVar11 = tfile2->m_nNumPages, (int)uVar11 < remaining_pages_array[iVar4 / 4]) && + ((int)uVar11 < tfile2->m_Buffer.m_nMaxNumPages)) { + tfile2->m_nNumPages = uVar11 + 1; + iVar14 = iVar14 + -1; + } + if (cmds_total <= iVar9) + break; + iVar4 = iVar9 * 4; + } + } + been_a_while = iVar13 == iVar14; + iVar13 = iVar14; + if (been_a_while) { + iVar8 = iVar8 + iVar14; + iVar13 = 0; + } + } + while (0 < iVar8) { + iVar13 = 0; + iVar9 = iVar8; + if (0 < cmds_total) { + s32 iVar14 = 0; + iVar9 = iVar8; + while (0 < iVar9) { + CBaseFile* tfile4 = cmds_array[iVar14 / 4]->m_pBaseFile; + iVar13 = iVar13 + 1; + s32 uVar11; + if (((0 < read_rates_array[iVar14 / 4]) && + (uVar11 = tfile4->m_nNumPages, (int)uVar11 < remaining_pages_array[iVar14 / 4])) && + ((int)uVar11 < tfile4->m_Buffer.m_nMaxNumPages)) { + tfile4->m_nNumPages = uVar11 + 1; + iVar9 = iVar9 + -1; + } + if (cmds_total <= iVar13) + break; + iVar14 = iVar13 * 4; + } + } + been_a_while = iVar8 == iVar9; + iVar8 = iVar9; + if (been_a_while) { + iVar8 = 0; + } + } + iVar13 = 0; + if (0 < cmds_total) { + iVar8 = 0; + do { + CBaseFile* tfile3 = cmds_array[iVar8 / 4]->m_pBaseFile; + + iVar13 = iVar13 + 1; + s32 uVar11 = tfile3->m_nNumPages; + // lg::warn("mystery values: {} - {} = {} (from {})", num_pages_array[iVar8 / 4], + // uVar11, + // num_pages_array[iVar8 / 4] - uVar11, + // cmds_array[iVar8 / 4]->m_pBaseFile->m_FileDef->name.data); + if (((int)uVar11 < num_pages_array[iVar8 / 4]) && + (iVar8 = tfile3->RecoverPages(num_pages_array[iVar8 / 4] - uVar11), 0 < iVar8)) { + get_page_manager()->GarbageCollectPageList(tfile3->m_Buffer.m_pPageList); + } + iVar8 = iVar13 * 4; + } while (iVar13 < cmds_total); + } + } + return selected_cmd; +} + +int ProcessMessageData(ISO_Hdr* tgt_msg) { + EIsoStatus stat; + s32 ret = 1; +LAB_000088a4: + s32 num_remaining = gPriStack[0].count + -1; + if (num_remaining < 0) { + return ret; + } + auto* cmd_array = gPriStack[0].cmds + num_remaining; + ISO_Hdr* cmd = nullptr; + do { + EIsoStatus (*cb)(ISO_Hdr*) = nullptr; + cmd = *cmd_array; + if (cmd && cmd->active_a) { + stat = cmd->status; + if (stat == EIsoStatus::OK_2) { + auto* file = cmd->m_pBaseFile; + auto* buffer = &file->m_Buffer; + if (!file) { + buffer = nullptr; + } + if ((buffer && (buffer->m_eBufferType != CBuffer::BufferType::EBT_FREE)) && + (cb = cmd->callback, cb != ProcessVAGData)) { + stat = (cb)(cmd); + } + } + if (stat != EIsoStatus::OK_2) + break; + cmd->status = EIsoStatus::OK_2; + } + num_remaining = num_remaining + -1; + cmd_array = cmd_array + -1; + if (num_remaining < 0) { + return ret; + } + } while (true); + if (cmd == tgt_msg) { + ret = 0; + } + ReleaseMessage(cmd); + if (stat != EIsoStatus::IDLE_1) { + cmd->status = stat; + ReturnMessage(cmd); + } + goto LAB_000088a4; +} + +void ReturnMessage(ISO_Hdr* msg) { + if (msg->mbox_reply == 0) { + if (msg->thread_to_wake == 0) { + FreeVAGCommand((ISO_VAGCommand*)msg); + } else { + WakeupThread(msg->thread_to_wake); + } + } else { + SendMbx(msg->mbox_reply, msg); + } +} + +void ReleaseMessage(ISO_Hdr* msg) { + if (GetThreadId() == g_nISOThreadID) { + auto* file = msg->m_pBaseFile; + if (file && file->m_Status != EIsoStatus::NONE_0) { + file->Close(); + } + UnqueueMessage(msg); + } else { + if (msg->msg_type != ISO_Hdr::MsgType::ABADBABE) { + set_active_a(msg, 0); + set_active_c(msg, 0); + msg->msg_type = ISO_Hdr::MsgType::ABADBABE; + SendMbx(g_nISOMbx, msg); + } + } +} + +ISO_VAGCommand* GetVAGCommand() { + int iVar1; + u32 uVar2; + u32 uVar3; + + do { + while (vag_cmd_cnt == 0x1f) { + DelayThread(1000); + } + do { + iVar1 = WaitSema(g_VagCmdSema); + uVar2 = 0; + } while (iVar1 != 0); + do { + uVar3 = uVar2 + 1; + if (((vag_cmd_used >> (uVar2 & 0x1f) ^ 1U) & 1) != 0) { + vag_cmd_cnt = vag_cmd_cnt + 1; + vag_cmd_used = vag_cmd_used | 1 << (uVar2 & 0x1f); + if (max_vag_cmd_cnt < vag_cmd_cnt) { + max_vag_cmd_cnt = vag_cmd_cnt; + } + SignalSema(g_VagCmdSema); + return vag_cmds + uVar2; + } + uVar2 = uVar3; + } while ((int)uVar3 < 0x1f); + SignalSema(g_VagCmdSema); + } while (true); +} + +void FreeVAGCommand(ISO_VAGCommand* param_1) { + u32 uVar1; + int iVar2; + + uVar1 = param_1 - vag_cmds; + ASSERT(uVar1 < 16); + if ((uVar1 < 0x1f) && (((vag_cmd_used >> (uVar1 & 0x1f) ^ 1U) & 1) == 0)) { + do { + iVar2 = WaitSema(g_VagCmdSema); + } while (iVar2 != 0); + vag_cmd_cnt = vag_cmd_cnt - 1; + vag_cmd_used = vag_cmd_used & ~(1 << (uVar1 & 0x1f)); + SignalSema(g_VagCmdSema); + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/iso_queue.h b/game/overlord/jak3/iso_queue.h new file mode 100644 index 0000000000..2ddcf2fd69 --- /dev/null +++ b/game/overlord/jak3/iso_queue.h @@ -0,0 +1,30 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_iso_queue(); +struct ISO_Hdr; +struct ISO_VAGCommand; +void ReleaseMessage(ISO_Hdr* msg); +void FreeVagCmd(ISO_VAGCommand* msg); +int QueueMessage(ISO_Hdr* msg, int pri); +int UnqueueMessage(ISO_Hdr* msg); +void ReturnMessage(ISO_Hdr* msg); +void InitBuffers(); +bool DgoCmdWaiting(); +ISO_Hdr* GetMessage(); +int ProcessMessageData(ISO_Hdr* msg); +void FreeVAGCommand(ISO_VAGCommand* msg); +ISO_VAGCommand* GetVAGCommand(); + +struct PriStackEntry { + ISO_Hdr* cmds[8]; + int count = 0; +}; + +extern u32 g_auTrapSRAM[6]; +extern u32 g_auStrmSRAM[6]; +extern s32 g_nPriQueueSema; +extern PriStackEntry gPriStack[2]; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/isocommon.cpp b/game/overlord/jak3/isocommon.cpp new file mode 100644 index 0000000000..0caff30852 --- /dev/null +++ b/game/overlord/jak3/isocommon.cpp @@ -0,0 +1,118 @@ +#include "isocommon.h" + +#include "common/util/Assert.h" + +namespace jak3 { +void jak3_overlord_init_globals_isocommon() {} + +/*! + * Convert file name to "ISO Name" + * ISO names are upper case and 12 bytes long. + * xxxxxxxxyyy0 + * + * x - uppercase letter of file name, or space + * y - uppercase letter of file extension, or space + * 0 - null terminator (\0, not the character zero) + */ +void MakeISOName(ISOName* dst, const char* src) { + int i = 0; + const char* src_ptr = src; + char* dst_ptr = dst->data; + + // copy name and upper case + while ((i < 8) && (*src_ptr) && (*src_ptr != '.')) { + char c = *src_ptr; + src_ptr++; + if (('`' < c) && (c < '{')) { // lower case + c -= 0x20; + } + *dst_ptr = c; + dst_ptr++; + i++; + } + + // pad out name with spaces + while (i < 8) { + *dst_ptr = ' '; + dst_ptr++; + i++; + } + + // increment past period + if (*src_ptr == '.') + src_ptr++; + + // same for extension + while (i < 11 && (*src_ptr)) { + char c = *src_ptr; + src_ptr++; + if (('`' < c) && (c < '{')) { // lower case + c -= 0x20; + } + *dst_ptr = c; + dst_ptr++; + i++; + } + + while (i < 11) { + *dst_ptr = ' '; + dst_ptr++; + i++; + } + *dst_ptr = 0; +} + +// UnmakeISOName + +/*! + * Pack an 8-character (64-bits) file name into a packed vag file name (32 + 10 = 42 bit). + */ +int PackVAGFileName(u32* out, const char* name) { + if (!out || !name) { + return 0; + } + int ret = 1; + + // accumulator of up to 4 packed characters + u32 acc = 0; + u32 first_four = 0; + for (int i = 0; i < 8; i++) { + // start the second word: + if (i == 4) { + first_four = acc; + acc = 0; + } + + // read character from input + u32 name_char = *((const u8*)name); + name++; + + u32 remapped_char; + + if (name_char - 'A' < 26) { // capital letter + remapped_char = name_char - 'A' + 1; // so A becomes 1. + } else if (name_char - 'a' < 26) { // lowercase letter + remapped_char = name_char - 'a' + 1; // so a becomes 1. + } else if (name_char - '0' < 10) { // digit + remapped_char = name_char - '0' + 27; // so 0 becomes 27 + } else if (name_char == '-') { + remapped_char = 37; + } else if (name_char == ' ' || name_char == '\0') { + remapped_char = 0; + } else { + ASSERT_NOT_REACHED(); // invalid char in input. + } + + ASSERT((remapped_char & 0xff) == remapped_char); + acc = acc * 38 + remapped_char; // (null + alphabet + 10 + dash) + } + + out[0] = (first_four << 0x15) | acc; + out[1] = first_four >> 0xb; + + return ret; +} + +// UnpackVAGFileName - nobody uses it... + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/isocommon.h b/game/overlord/jak3/isocommon.h new file mode 100644 index 0000000000..a6f4a720ab --- /dev/null +++ b/game/overlord/jak3/isocommon.h @@ -0,0 +1,152 @@ +#pragma once + +#include + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_isocommon(); + +struct CBaseFile; + +struct ISOFileDef; + +enum class EIsoStatus { + NONE_0 = 0, + IDLE_1 = 0x1, + OK_2 = 0x2, // already reading, or no need to read, or no mem to read. + FAILED_TO_QUEUE_4 = 0x4, + ERROR_OPENING_FILE_8 = 0x8, + NULL_CALLBACK = 9, + ERROR_NO_FILE = 0xa, + ERROR_b = 0xb, // tried to do BeginRead on a file that's not allocated. + ERROR_NO_SOUND = 0xc, +}; + +struct SoundBankInfo; + +struct ISO_Hdr { + int unka; + int unkb; + EIsoStatus status; + int8_t active_a; + int8_t active_b; + int8_t active_c; + int8_t pad; + + enum class MsgType : u32 { + MSG_0 = 0, + LOAD_EE = 0x100, + LOAD_IOP = 0x101, + LOAD_EE_CHUNK = 0x102, + LOAD_SOUNDBANK = 0x103, + DGO_LOAD = 0x200, + VAG_QUEUE = 0x400, + VAG_STOP = 0x402, + VAG_PAUSE = 0x403, + VAG_UNPAUSE = 0x404, + VAG_SET_PITCH_VOL = 0x406, + PLAY_MUSIC_STREAM = 0x408, + ABADBABE = 0xabadbabe, + ADEADBEE = 0xadeadbee, + } msg_type = MsgType::MSG_0; + + int mbox_reply; + int thread_to_wake; + + EIsoStatus (*callback)(ISO_Hdr*) = nullptr; + CBaseFile* m_pBaseFile = nullptr; + int priority = 0; + const ISOFileDef* file_def = nullptr; +}; + +struct ISO_LoadCommon : public ISO_Hdr { + u8* addr = 0; // 44 + int maxlen = 0; + int length_to_copy = 0; // 52 + u8* dest_ptr = 0; // 68 (not truly common??) what are they doing here. + int progress_bytes = 0; // 72 +}; + +struct ISO_LoadSingle : public ISO_LoadCommon { + // addr + // maxlen + // maybe size + int sector_offset = 0; // 56 + // 60 + // 64 + // dest_ptr + // maybe ofset +}; + +struct ISO_LoadSoundbank : public ISO_LoadCommon { + const char* name = nullptr; // 60 + int priority; // 64 + SoundBankInfo* bank_info = nullptr; +}; + +struct CPage; + +struct BlockParams { + void* destination; + int num_sectors; + int sector_num; + // ADDED + const ISOFileDef* file_def; + CPage* page; + char* flag; +}; + +struct CDescriptor; + +struct Block { + BlockParams params; + CDescriptor* descriptor; + Block* next; +}; + +struct ISOName { + char data[12]; + + bool operator==(const ISOName& other) { + for (int i = 0; i < 12; i++) { + if (data[i] != other.data[i]) { + return false; + } + } + return true; + } +}; + +struct ISOFileDef { + ISOName name; + std::string full_path; // pc + u32 length; +}; + +struct VagDirEntry { + u32 words[2]; +}; + +struct VagDir { + int vag_magic_1 = 0; + int vag_magic_2 = 0; + int vag_version = 0; + int num_entries = 0; + VagDirEntry entries[4096]; +}; +static_assert(sizeof(VagDir) == 0x8010); + +constexpr int MUSIC_TWEAK_COUNT = 0x40; +struct MusicTweaks { + u32 TweakCount = 0; + struct { + char MusicName[12] = "\0"; + s32 VolumeAdjust = 0; + } MusicTweak[MUSIC_TWEAK_COUNT]; +}; + +int PackVAGFileName(u32* out, const char* name); +void MakeISOName(ISOName* dst, const char* src); + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/list.cpp b/game/overlord/jak3/list.cpp new file mode 100644 index 0000000000..b293894b76 --- /dev/null +++ b/game/overlord/jak3/list.cpp @@ -0,0 +1,54 @@ +#include "list.h" + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; +void jak3_overlord_init_globals_list() {} + +void InitList(List* list, int count, int element_size) { + VagStreamData* iter; + int iVar1; + SemaParam sema_params; + + list->count = count; + iter = (VagStreamData*)AllocSysMemory(0, count * element_size, 0); + ASSERT(iter); + ASSERT(element_size == sizeof(VagStreamData)); + list->buffer = (u8*)iter; + if (iter != (VagStreamData*)0x0) { + list->next = iter; + iVar1 = 0; + if (0 < count) { + do { + iter->in_use = 0; + if (iVar1 < count + -1) { + iter->next = (VagStreamData*)((u8*)iter + element_size); + } else { + iter->next = nullptr; + } + if (iVar1 == 0) { + iter->prev = nullptr; + } else { + iter->prev = (VagStreamData*)((u8*)iter - element_size); + } + iVar1 = iVar1 + 1; + iter = (VagStreamData*)((u8*)iter + element_size); + } while (iVar1 < count); + } + list->unk_flag = 0; + list->pending_data = 0; + sema_params.max_count = 1; + sema_params.attr = 1; + sema_params.init_count = 1; + sema_params.option = 0; + iVar1 = CreateSema(&sema_params); + list->sema = iVar1; + ASSERT(list->sema >= 0); + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/list.h b/game/overlord/jak3/list.h new file mode 100644 index 0000000000..de00d64a75 --- /dev/null +++ b/game/overlord/jak3/list.h @@ -0,0 +1,27 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_list(); + +struct VagStreamData; + +/*! + * The List system is a linked list used to track requested and playing streams. + * Originally, it supported multiple element types. + * One of those types is related to plugin streams which are not supported in PC. + * So, this is just hard-coded to use VagStreamData as the element type. + */ +struct List { + char name[8]; + int sema = 0; + int unk_flag = 0; // set when there's a free node?? + int count = 0; + int pending_data = 0; + VagStreamData* next = nullptr; + u8* buffer; +}; + +void InitList(List* list, int num_elements, int element_size); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/overlord.cpp b/game/overlord/jak3/overlord.cpp new file mode 100644 index 0000000000..368723f452 --- /dev/null +++ b/game/overlord/jak3/overlord.cpp @@ -0,0 +1,151 @@ +#include "overlord.h" + +#include "common/log/log.h" + +#include "game/overlord/jak3/dvd_driver.h" +#include "game/overlord/jak3/init.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/ramdisk.h" +#include "game/overlord/jak3/sbank.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/vblank_handler.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; + +int g_nServerThreadID = 0; +int g_nPlayerThreadID = 0; +int g_nLoaderThreadID = 0; + +void jak3_overlord_init_globals_overlord() { + g_nServerThreadID = 0; + g_nPlayerThreadID = 0; + g_nLoaderThreadID = 0; +} + +namespace { + +/*! + * Start up overlord threads. After this returns, the overlord is initialized and + * ready to run. (this might have been in start.cpp in the original, but this is close enough) + */ +int start_overlord() { + // Initialize SIF to communicate with the EE. Does nothing in port + if (!sceSifCheckInit()) { + sceSifInit(); + } + // Initialize RPC to EE + sceSifInitRpc(0); + + lg::info("======== overlrd2.irx startup ========"); + // Removed some prints related to IOP memory size + + // C++ ctors ran here. In the port, we've added these "init_globals" function that + // take care of resetting all the global/static variables and constructing C++ objects. + // do_global_ctors(); + jak3_overlord_init_globals_all(); + InitBanks(); + InitSound(); + VBlank_Initialize(); + + // RPC thread to load data from game files to the game memory. + ThreadParam thread_param; + thread_param.initPriority = 0x3b; + thread_param.stackSize = 0x800; + thread_param.entry = LoadToEE_RPC_Thread; + thread_param.attr = TH_C; + thread_param.option = 0; + strcpy(thread_param.name, "load_to_ee"); + g_nServerThreadID = CreateThread(&thread_param); + if (g_nServerThreadID <= 0) { + return 1; + } + + // thread to respond to sound play RPC's + thread_param.entry = Thread_Player; + thread_param.initPriority = 0x36; + thread_param.stackSize = 0xb00; + thread_param.attr = TH_C; + thread_param.option = 0; + strcpy(thread_param.name, "player"); + g_nPlayerThreadID = CreateThread(&thread_param); + if (g_nPlayerThreadID <= 0) { + return 1; + } + + // thread to respond to sound load RPC's + thread_param.attr = TH_C; + thread_param.entry = Thread_Loader; + thread_param.initPriority = 0x3a; + thread_param.stackSize = 0x900; + thread_param.option = 0; + strcpy(thread_param.name, "loader"); + g_nLoaderThreadID = CreateThread(&thread_param); + if (g_nLoaderThreadID <= 0) { + return 1; + } + + // Initialize the dvd driver that will be used to implement the "ISO FS" system + get_driver()->Initialize(); + + // then, initialize ISO FS itself + InitISOFS(); + + // start up RPC threads! + StartThread(g_nServerThreadID, 0); + StartThread(g_nPlayerThreadID, 0); + StartThread(g_nLoaderThreadID, 0); + + lg::info("[overlord2] Threads started"); + return 0; +} + +bool* init_complete; + +/*! + * Wrapper of start_overlord that can be run as an IOP thread. Sets init_complete flag to true. + * This is a bit of hack to transition from the normal and sane game code to the world of IOP + * threading. + */ +u32 call_start() { + start_overlord(); + *init_complete = true; + + // TODO: figure out how to quit this thread. + while (true) { + SleepThread(); + } + return 0; +} +} // namespace + +int start_overlord_wrapper(bool* signal) { + ThreadParam param = {}; + init_complete = signal; + param.attr = TH_C; + param.initPriority = 0; + param.stackSize = 0x800; + param.option = 0; + strcpy(param.name, "start"); // added for debug + param.entry = call_start; + auto start_thread = CreateThread(¶m); + StartThread(start_thread, 0); + + return 0; +} + +/*! + * Copy null-terminated string to destination buffer with the given size. + * If the string doesn't fit, it will be truncated and null terminated. + */ +char* strncpyz(char* dst, const char* src, size_t n) { + if (n) { + strncpy(dst, src, n); + dst[n - 1] = 0; + } + return dst; +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/overlord.h b/game/overlord/jak3/overlord.h new file mode 100644 index 0000000000..80e7322959 --- /dev/null +++ b/game/overlord/jak3/overlord.h @@ -0,0 +1,61 @@ +#pragma once + +#include + +#include "common/common_types.h" +#include "common/log/log.h" + +namespace jak3 { + +/*! + * External entry point for the game to start Overlord. This assumes that the IOP Kernel + * is at least initialized, then sets up all overlord threads/RPCs. Once this returns, + * it's safe to call overlord functions. + */ +int start_overlord_wrapper(bool* signal); +void jak3_overlord_init_globals_overlord(); +char* strncpyz(char* dst, const char* src, size_t n); + +extern int g_nServerThreadID; +extern int g_nPlayerThreadID; +extern int g_nLoaderThreadID; + +enum class LogCategory { + PAGING, + FILESYSTEM, + WARN, + SPU_DMA_STR, + EE_DMA, + ISO_QUEUE, + VAG_SETUP, + DGO, + RPC, + STR_RPC, + PLAYER_RPC, + DRIVER, + NUM_CATETORIES +}; + +constexpr bool g_OverlordLogEnable[(int)LogCategory::NUM_CATETORIES] = { + false, // paging: cpage's, page manager, page crossing, etc + true, // filesystem: opening/finding files + true, // warning: something weird + false, // spu dma streaming: vag streaming, clocks, spu, dma + true, // ee dma: sending stuff to the ee (dgo, etc) + true, // iso queue: message queuing + true, // vag setup: creation of vag commands (lists, etc) + false, // dgo + true, // rpc in general + true, // str rpc + false, // PLAYER + false, // driver +}; + +template +void ovrld_log(LogCategory category, const std::string& format, Args&&... args) { + if (g_OverlordLogEnable[(int)category]) { + lg::info(format, std::forward(args)...); + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/pagemanager.cpp b/game/overlord/jak3/pagemanager.cpp new file mode 100644 index 0000000000..88d829f49a --- /dev/null +++ b/game/overlord/jak3/pagemanager.cpp @@ -0,0 +1,852 @@ +#include "pagemanager.h" + +#include +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/overlord.h" +#include "game/sce/iop.h" + +using namespace iop; + +namespace jak3 { +namespace { +std::unique_ptr g_manager; +} +void jak3_overlord_init_globals_pagemanager() { + g_manager = std::make_unique(); +} + +CPageManager* get_page_manager() { + return g_manager.get(); +} + +/*! + * Add the given number of pages to the active list, returning the first in the active list. + * This should be called before writing to the pages. + * This grows the active list from the end and adds a reference count. + */ +CPage* CPageList::AddActivePages(int num_pages) { + ASSERT(m_nAllocState == AllocState::EPLAS_ALLOCATED); + ASSERT(num_pages > 0); // game warned on this, might be ok to just return null + + if (m_nNumPages < num_pages + m_nNumActivePages) { + // the original game just gave you no pages, but that seems sus, so abort for now. + ASSERT_NOT_REACHED(); + } + + // pick the page to convert from non-active to active + CPage* first_to_convert; + if (m_pLastActivePage) { + // if we have active pages, go to the page after that + first_to_convert = m_pLastActivePage->m_pNextPage; + } else { + // otherwise, start at the beginning of the page list. + first_to_convert = m_pFirstPage; + } + + if (first_to_convert) { + // the first active page should stay the same if we have one + CPage* new_first_active = m_pFirstActivePage; + if (!new_first_active) { + // but if we don't, it'll be the first we convert. + new_first_active = first_to_convert; + } + + int page_idx = 0; // how many we've done + CPage* last_converted = nullptr; // last one that was finished + CPage* to_convert = first_to_convert; // next one to convert + if (0 < num_pages) { + // loop over pages and convert them!! + do { + ASSERT(to_convert->input_state == CPage::State::UNMAKRED); + last_converted = to_convert; + last_converted->input_state = CPage::State::ACTIVE; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~last_converted->mask); + int status = last_converted->AddRef(); + ASSERT(status >= 1); + page_idx = page_idx + 1; + if (!last_converted->m_pNextPage) + break; + to_convert = last_converted->m_pNextPage; + } while (page_idx < num_pages); + } + if (page_idx == num_pages) { + // success! all converted. + // CpuSuspendIntr(local_28); + // update the active range and count + m_pFirstActivePage = new_first_active; + m_pLastActivePage = last_converted; + m_nNumActivePages = m_nNumActivePages + page_idx; + m_nNumUnsteppedPages = m_nNumUnsteppedPages + page_idx; + if (!m_pCurrentActivePage) { + m_pCurrentActivePage = first_to_convert; + } + // CpuResumeIntr(local_28[0]); + return first_to_convert; + } else { + // darn, didn't have enough. undo what we did. + // Not really sure that we need to clear the even flag again. + while (0 < page_idx) { + new_first_active->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, + ~new_first_active->mask); + new_first_active->ReleaseRef(); + } + return nullptr; + } + } + return nullptr; +} + +/*! + * Try to remove count pages from the active list, starting at the end and working back. + * This will remove buffered that the user has not yet read. The data will have to be read from the + * DVD again, so this should only be used when more free pages are absolutely needed. + * + * This may remove fewer than requested. It will not remove the current active page, and always + * leaves at least 1 active page to avoid removing a page that's currently being used. + */ +int CPageList::RemoveActivePages(int count) { + // lg::error("Remove Active Pages {}", count); + int num_removed = 0; + ASSERT(m_nAllocState == AllocState::EPLAS_ALLOCATED); + + // CpuSuspendIntr(local_28); + num_removed = 0; + + // only attempt if we have more than 1 active + if (count > 0 && m_nNumActivePages > 1) { + CPage* last_active = m_pLastActivePage; + CPage* current_active = m_pCurrentActivePage; + + // I'm not sure what the last->next = current check is actually doing. + // this check is added - I have no idea how this could happen, or why the game avoids removing + // pages in this case. Hopefully we don't hit it. + if (last_active) { + ASSERT(last_active->m_pNextPage != current_active); + } + + if (current_active && last_active && last_active->m_pNextPage != current_active) { + // assume we remove them all except 1. + num_removed = m_nNumActivePages + -1; + // but if that's more than we asked for, reduce. + if (count < num_removed) { + num_removed = count; + } + + // iterate backward to find the first to remove, stopping if we reach current_active, or we + // exceed the count to remove. + int num_pages_back = 0; + CPage* iter = last_active; + if (last_active != current_active && 0 < num_removed) { + do { + iter = iter->m_pPrevPage; + num_pages_back = num_pages_back + 1; + if (!iter) { + ASSERT_NOT_REACHED(); + } + } while (iter != current_active && num_pages_back < num_removed); + + if (0 < num_pages_back) { + // now, iterate forward and convert to inactive. + // go one forward, since the last loop terminated on the page after the last one we want. + CPage* fwd_iter = iter->m_pNextPage; + + // the last one that stays active is one after that + m_pLastActivePage = fwd_iter->m_pPrevPage; + m_nNumActivePages = m_nNumActivePages - num_pages_back; + m_nNumUnsteppedPages = m_nNumUnsteppedPages - num_pages_back; + + // the end of the conversion loop + CPage* end_iter = last_active->m_pNextPage; + num_removed = num_pages_back; + while (fwd_iter && fwd_iter != end_iter) { + fwd_iter->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~fwd_iter->mask); + fwd_iter->ReleaseRef(); + fwd_iter = fwd_iter->m_pNextPage; + } + } else { + // in this case, I think we return the wrong number of removed pages. + ASSERT_NOT_REACHED(); + } + } + } + } + // CpuResumeIntr(local_28[0]); + return num_removed; +} + +/*! + * Remove all active pages. + */ +void CPageList::CancelActivePages() { + ASSERT(m_nAllocState == AllocState::EPLAS_ALLOCATED); + // CpuSuspendIntr(local_18); + CPage* last_active = m_pLastActivePage; + CPage* iter = m_pCurrentActivePage; + // note: keep the last active page pointing at the right point in the ring to allocate. + m_pLastActivePage = m_pCurrentActivePage; + m_pFirstActivePage = nullptr; + m_pCurrentActivePage = nullptr; + m_nNumActivePages = 0; + m_nNumUnsteppedPages = 0; + if (iter && last_active && last_active->m_pNextPage != iter) { + CPage* end = last_active->m_pNextPage; + do { + if (iter == end) + break; + iter->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~iter->mask); + iter->ReleaseRef(); + iter = iter->m_pNextPage; + } while (iter); + } + // CpuResumeIntr(local_18[0]); +} + +/*! + * Step the current active page forward. This will release the reference count added when the page + * became active. If no other references were added, this page may be Garbage Collected at any time. + */ +CPage* CPageList::StepActivePage() { + ASSERT(m_nAllocState == AllocState::EPLAS_ALLOCATED); + + CPage* new_current_active = nullptr; + // CpuSuspendIntr(local_18); + auto* current_active = m_pCurrentActivePage; + if (current_active && m_pLastActivePage && m_pLastActivePage->m_pNextPage != current_active) { + ASSERT(m_nNumActivePages > 0); + m_nNumUnsteppedPages = m_nNumUnsteppedPages + -1; + current_active->ReleaseRef(); + current_active->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~current_active->mask); + new_current_active = current_active->m_pNextPage; + ASSERT(new_current_active != m_pCurrentActivePage); + m_pCurrentActivePage = new_current_active; + } else { + ASSERT_NOT_REACHED(); // step past end of active warning, seems bad. + } + // CpuResumeIntr(local_18[0]); + return new_current_active; +} + +/*! + * Remove pages that are no longer needed. They will be sent back to the Page Manager. + */ +void CPageList::GarbageCollect() { + ovrld_log(LogCategory::PAGING, "[paging] Garbage collecting, currently have {} pages, {} active", + m_nNumPages, m_nNumActivePages); + + // for (auto* p = m_pFirstPage; p; p = p->m_pNextPage) { + // ovrld_log(LogCategory::PAGING, + // "page 0x{:x}, first active? {} last active? {} current active? {} last? {}", + // p->m_nPageIdx, p == m_pFirstActivePage, p == m_pLastActivePage, + // p == m_pCurrentActivePage, p == m_pLastPage); + // } + // trim pages at the front. Anything unreferenced before the current active page is ok to clean. + CPage* page = m_pFirstPage; + if (page && page != m_pCurrentActivePage) { + ASSERT(page->m_nAllocState == 1); // pages in CPageLists should always be allocated. + + while (page->m_nPageRefCount == 0 && page->m_nDmaRefCount == 0) { // only unref'd pages. + ASSERT(page->m_nAllocState == 1); // prior to active. + CPage* next_page = page->m_pNextPage; + // CpuSuspendIntr(&local_18); + m_nNumPages = m_nNumPages + -1; + // pop page from our normal list + m_pFirstPage = next_page; + if (m_pLastPage == page) { + m_pLastPage = nullptr; + // sanity check - we just killed our last page from the list, count should be 0 + ASSERT(m_nNumPages == 0); + } + + // maintain active list too + if (m_pFirstActivePage == page) { + m_nNumActivePages = m_nNumActivePages + -1; + if (page == m_pLastActivePage) { + // since we're getting rid of this page from our list, don't keep a ref to it. + m_pFirstActivePage = nullptr; + m_pLastActivePage = nullptr; + ASSERT(m_nNumActivePages == 0); // sanity check count. + } else { + m_pFirstActivePage = next_page; + } + } + if (m_pLastActivePage == page) { + m_pLastActivePage = nullptr; + } + if (next_page) { + next_page->m_pPrevPage = nullptr; + } + // CpuResumeIntr(local_18); + + // now clean the page itself + ovrld_log(LogCategory::PAGING, "[paging] GC took page 0x{:x} (fwd)", page->m_nPageIdx); + page->m_pPageList = nullptr; + page->m_pPrevPage = nullptr; + page->m_pNextPage = nullptr; + page->m_nAllocState = 0; + page->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + int page_idx = page - get_page_manager()->m_CCache.m_Pages; + if (page_idx < 0x1d) { + get_page_manager()->m_CCache.m_nAllocatedMask &= ~(1 << (page_idx & 0x1f)); + } else { + ASSERT_NOT_REACHED(); // idk + } + get_page_manager()->m_CCache.m_nNumFreePages++; + if (!next_page) { + break; + } + page = next_page; + if (page == m_pCurrentActivePage) { + break; + } + } + } + + // now, start at the end and work backward. We'll stop once we reach the last active page, since + // we expect everything before that to have a nonzero ref count. + page = m_pLastPage; + if (page && page != m_pLastActivePage && page != m_pCurrentActivePage) { + ASSERT(page->m_nAllocState == 1); + while ((page->m_nPageRefCount == 0 && (page->m_nDmaRefCount == 0))) { + ovrld_log(LogCategory::PAGING, "[paging] GC took page 0x{:x} (bwd)", page->m_nPageIdx); + ASSERT(page->m_nAllocState == 1); + CPage* prev = page->m_pPrevPage; + // CpuSuspendIntr(&local_14); + m_nNumPages = m_nNumPages + -1; + m_pLastPage = prev; + if (m_pFirstPage == page) { + m_pFirstPage = nullptr; + ASSERT(m_nNumPages == 0); + } + if (prev != (CPage*)0x0) { + prev->m_pNextPage = (CPage*)0x0; + } + // CpuResumeIntr(local_14); + page->m_pPageList = nullptr; + page->m_pPrevPage = nullptr; + page->m_pNextPage = nullptr; + page->m_nAllocState = 0; + page->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + int page_idx = page - get_page_manager()->m_CCache.m_Pages; + if (page_idx < 0x1d) { + get_page_manager()->m_CCache.m_nAllocatedMask &= ~(1 << (page_idx & 0x1f)); + } else { + ASSERT_NOT_REACHED(); + } + get_page_manager()->m_CCache.m_nNumFreePages++; + + if (!prev) { + return; + } + if (prev == m_pLastActivePage) { + return; + } + page = prev; + if (prev == m_pCurrentActivePage) { + return; + } + } + } + + ovrld_log(LogCategory::PAGING, + "[paging] Done Garbage collecting, currently have {} pages, {} active in 0x{:x}", + m_nNumPages, m_nNumActivePages, (u64)this); +} + +/*! + * Wait on the pages indicated by the mask. + */ +void CPageManager::WaitForPagesFilled(u32 mask) { + if ((mask & m_CCache.m_PendingMask) != 0) { + WaitEventFlag(m_CCache.m_PagesFilledEventFlag, mask, 0); + } else { + // waiting for something that's not pending... might be ok. was a warning. + ASSERT_NOT_REACHED(); + } +} + +CPage::CPage(uint8_t* page_mem_start, uint8_t* page_mem_end, int page_idx) { + m_pNextPage = nullptr; + mask = 1 << (page_idx & 0x1f); + m_pPrevPage = nullptr; + m_pPageMemStart = page_mem_start; + m_pPageList = nullptr; + m_pPageMemEnd = page_mem_end; + m_nPageRefCount = 0; + m_nPageIdx = page_idx; + m_nDmaRefCount = 0; + m_nAllocState = 0; + input_state = State::UNMAKRED; +} + +/*! + * Add one to this CPage's reference count, preventing it from being garbage collected + */ +int CPage::AddRef() { + // CpuSuspendIntr(local_18); + auto* page_list = m_pPageList; + int ret = -1; + ASSERT(page_list); + ASSERT(m_nAllocState == 1); + if (m_nAllocState == 1 && page_list) { + page_list->m_nPageRefCnt = page_list->m_nPageRefCnt + 1; + m_nPageRefCount = m_nPageRefCount + 1; + ret = m_nPageRefCount; + } + // CpuResumeIntr(local_18[0]); + return ret; +} + +/*! + * Subtract one from this CPage's reference count. + */ +int CPage::ReleaseRef() { + // CpuSuspendIntr(local_18); + auto* page_list = m_pPageList; + int ret = -1; + ASSERT(page_list); + ASSERT(m_nAllocState == 1); + if (m_nAllocState == 1 && page_list) { + page_list->m_nPageRefCnt = page_list->m_nPageRefCnt - 1; + m_nPageRefCount = m_nPageRefCount - 1; + ret = m_nPageRefCount; + ASSERT(ret >= 0); + } + // CpuResumeIntr(local_18[0]); + return ret; +} + +/*! + * Add one to the DMA reference count of this page + */ +int CPage::AddDmaRef() { + // CpuSuspendIntr(local_18); + auto* page_list = m_pPageList; + int ret = -1; + ASSERT(page_list); + ASSERT(m_nAllocState == 1); + if (m_nAllocState == 1 && page_list) { + page_list->m_nDmaRefCnt = page_list->m_nDmaRefCnt + 1; + m_nDmaRefCount = m_nDmaRefCount + 1; + ret = m_nPageRefCount; + } + // CpuResumeIntr(local_18[0]); + return ret; +} + +int CPage::ReleaseDmaRef() { + // CpuSuspendIntr(local_18); + auto* page_list = m_pPageList; + int ret = -1; + ASSERT(page_list); + ASSERT(m_nAllocState == 1); + if (m_nAllocState == 1 && page_list) { + page_list->m_nDmaRefCnt = page_list->m_nDmaRefCnt - 1; + m_nDmaRefCount = m_nDmaRefCount - 1; + ret = m_nPageRefCount; + ASSERT(ret >= 0); + } + // CpuResumeIntr(local_18[0]); + return ret; +} + +/*! + * Copy data from this page to destination. This works with sizes that are greater than the page + * size, and will look at future pages. However, it does not actually advance progress in the page. + */ +void CPage::FromPagesCopy(uint8_t* in, uint8_t* dest, s32 size) { + ASSERT(in); + ASSERT(dest); + ASSERT(size >= 0); + CPage* page = this; + if (0 < size) { + while (true) { + s32 input_page_left = (page->m_pPageMemEnd - in) + 1; + ASSERT(input_page_left >= 0); + if (size < input_page_left) + break; + size -= input_page_left; + memcpy(dest, in, input_page_left); + dest += input_page_left; + if (size == 0) { + return; + } + ASSERT(size > 0); + ASSERT(page->m_pNextPage); + page = page->m_pNextPage; + in = page->m_pPageMemStart; + } + memcpy(dest, in, size); + } +} + +CCache::CCache() { + m_PendingMask = kAllPagesMask; + m_PagesFilledEventFlag = -1; + m_nNumFreePages = 0; + m_nAllocatedMask = 0; + m_nPagelistAllocatedMask = 0; +} + +void CCache::Initialize() { + static_assert(0xe81d0 == kPageStride * kNumPages); + m_paCache = AllocSysMemory(0, kPageStride * kNumPages, nullptr); + ASSERT(m_paCache); + m_nNumFreePages = kNumPages; + + // initialize pageslists + for (auto& page_list : m_PageLists) { + page_list.m_pFirstActivePage = nullptr; + page_list.m_pLastActivePage = nullptr; + page_list.m_pCurrentActivePage = nullptr; + + page_list.m_pFirstPage = nullptr; + page_list.m_pLastPage = nullptr; + page_list.m_nNumActivePages = 0; + page_list.m_nNumUnsteppedPages = 0; + page_list.m_nPageRefCnt = 0; + page_list.m_nDmaRefCnt = 0; + page_list.m_nAllocState = CPageList::AllocState::EPLAS_FREE; + } + + u8* mem = (u8*)m_paCache; + for (int i = 0; i < kNumPages; i++) { + m_Pages[i] = CPage(mem, mem + kPageSize - 1, i); + // interestingly, the stride is a bit longer. + mem += kPageStride; + } + + m_nAllocatedMask = 0; + m_nPagelistAllocatedMask = 0; + + EventFlagParam param; + param.attr = 2; + param.option = 0; + param.init_pattern = 0; + m_PagesFilledEventFlag = CreateEventFlag(¶m); // TODO args here + ASSERT(m_PagesFilledEventFlag >= 0); +} + +/*! + * Increase the length by the given amount. This is used for the DVD reading side to inform the + * consumer that there is more data available. + */ +void CBuffer::AddData(int len) { + // suspend interrupts + m_nDataLength += len; + // resume interrupts +} + +/*! + * Advance the current point in the buffer. This is used by the consume to mark forward progress. + */ +void CBuffer::AdvanceCurrentData(int len) { + // suspend interrupts + m_nDataLength -= len; + m_pCurrentData += len; + // resume interrupts +} + +/*! + * Set up pages. + */ +void CPageManager::Initialize() { + m_CCache.Initialize(); +} + +CPageList* CPageManager::AllocPageListBytes(int bytes, bool flag) { + return AllocPageList((bytes + kPageSize - 1) / kPageSize, flag); +} + +s32 alloc_bitmask(u32* mask, u32 length, u32 start = 0) { + for (u32 i = start; i < length; i++) { + if ((*mask & (1 << i)) == 0) { + // it's free! + (*mask) |= (1 << i); + return i; + } + } + return -1; +} + +/*! + * Allocate a PageList with the given number of pages. + */ +CPageList* CPageManager::AllocPageList(int count, bool consecutive_pages) { + ASSERT(count > 0); + ASSERT(count <= CCache::kNumPages); + + if (count > m_CCache.m_nNumFreePages) { + // if we're out of pages, use RecoverPages to discard pages that we've already read, but + // nobody is using yet. We'll be able to read them from the DVD again. + lg::warn("Recovering pages - {} requested in AllocPageList, but only {} available", count, + m_CCache.m_nNumFreePages); + RecoverPages(count); + ASSERT(m_CCache.m_nNumFreePages >= count); + } + + // next, find a pagelist. the original game had some fancy bit magic here, but this is simpler + int plist_idx = alloc_bitmask(&m_CCache.m_nPagelistAllocatedMask, CCache::kNumPageLists); + ASSERT(plist_idx >= 0); + CPageList* plist = &m_CCache.m_PageLists[plist_idx]; + + // Fill this array with allocated pages + CPage* pages[CCache::kNumPages]; + int pages_allocated = 0; + int last_page_allocated = -1; + int next_page_to_check = 0; + + while (pages_allocated < count) { + if (next_page_to_check >= CCache::kNumPages) { + break; + } + // grab the next page + int page_idx = alloc_bitmask(&m_CCache.m_nAllocatedMask, CCache::kNumPages, next_page_to_check); + ASSERT(page_idx >= 0); + + // start after this page on the next search + next_page_to_check = page_idx + 1; + + pages[pages_allocated] = &m_CCache.m_Pages[page_idx]; + pages_allocated++; + + // if we asked for consecutive pages, but didn't get them, we need to rewind our progress. + // but, we shouldn't rewind next_page_to_check! + if (consecutive_pages && last_page_allocated != -1 && last_page_allocated + 1 != page_idx) { + page_idx = -1; + while (pages_allocated) { + pages_allocated--; + + u32 i = pages[pages_allocated] - m_CCache.m_Pages; + ASSERT(i >= 0 && i < CCache::kNumPages); + m_CCache.m_nAllocatedMask &= ~(1 << i); + } + } + + last_page_allocated = page_idx; + } + + if (pages_allocated != count) { + // allocation failed + ASSERT_NOT_REACHED(); + } + + m_CCache.m_nNumFreePages -= count; + ASSERT(m_CCache.m_nNumFreePages >= 0); + + // zero everything + plist->m_pFirstPage = nullptr; + plist->m_pLastPage = nullptr; + plist->m_pFirstActivePage = nullptr; + plist->m_pLastActivePage = nullptr; + plist->m_pCurrentActivePage = nullptr; + plist->m_nNumPages = 0; + plist->m_nNumActivePages = 0; + plist->m_nNumUnsteppedPages = 0; + ASSERT(plist->m_nPageRefCnt == 0); + ASSERT(plist->m_nDmaRefCnt == 0); + + plist->m_nAllocState = CPageList::AllocState::EPLAS_ALLOCATED; + + // set up the pages + CPage* prev = nullptr; + CPage* page = nullptr; + for (int i = 0; i < pages_allocated; i++) { + page = pages[i]; + page->m_pPageList = plist; + page->m_pPrevPage = prev; + if (prev) { + prev->m_pNextPage = page; + } + page->m_nAllocState = 1; + page->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + prev = page; + } + page->m_pNextPage = nullptr; + plist->m_nNumPages = count; + plist->m_pLastPage = page; + plist->m_pFirstPage = pages[0]; + return plist; +} + +/*! + * Allocate page_count more pages, add them to the end of the list. This can be used to get more + * pages for the DVD driver to write to. + */ +CPageList* CPageManager::GrowPageList(jak3::CPageList* in, int page_count) { + ASSERT(in); + ASSERT(in->m_nAllocState == CPageList::AllocState::EPLAS_ALLOCATED); + ASSERT(page_count >= 0); + + if (page_count > m_CCache.m_nNumFreePages) { + // if we're out of pages, use RecoverPages to discard pages that we've already read, but + // nobody is using yet. We'll be able to read them from the DVD again. + lg::warn("Recovering pages - {} requested in AllocPageList, but only {} available", page_count, + m_CCache.m_nNumFreePages); + RecoverPages(page_count); + ASSERT(m_CCache.m_nNumFreePages >= page_count); + } + + CPage* pages[CCache::kNumPages]; + int next_page_to_check = 0; + int pages_allocated = 0; + while (pages_allocated != page_count) { + if (next_page_to_check >= CCache::kNumPages) { + break; + } + int page_idx = alloc_bitmask(&m_CCache.m_nAllocatedMask, CCache::kNumPages, next_page_to_check); + ASSERT(page_idx >= 0); // otherwise need to handle this better + next_page_to_check = page_idx + 1; + pages[pages_allocated] = &m_CCache.m_Pages[page_idx]; + pages_allocated++; + } + + if (pages_allocated != page_count) { + ASSERT_NOT_REACHED(); + } + + m_CCache.m_nNumFreePages -= pages_allocated; + + // set up the pages + CPage* prev = nullptr; + CPage* page = nullptr; + for (int i = 0; i < pages_allocated; i++) { + page = pages[i]; + ASSERT(page); + ASSERT(page->m_nAllocState == 0); + page->m_pPageList = in; + page->m_pPrevPage = prev; + if (prev) { + prev->m_pNextPage = page; + } + page->m_nAllocState = 1; + page->input_state = CPage::State::UNMAKRED; + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + prev = page; + } + page->m_pNextPage = nullptr; + + // suspendintr + if (in->m_nNumPages == 0) { + ASSERT(!in->m_pFirstPage); + ASSERT(!in->m_pLastPage); + ASSERT(!in->m_pFirstActivePage); + ASSERT(!in->m_pLastActivePage); + ASSERT(!in->m_pCurrentActivePage); + in->m_pFirstPage = pages[0]; + } else { + auto* old_end = in->m_pLastPage; + ASSERT(!old_end->m_pNextPage); + old_end->m_pNextPage = pages[0]; + pages[0]->m_pPrevPage = old_end; + } + in->m_pLastPage = page; + in->m_nNumPages += pages_allocated; + // resume intr + return in; +} + +/*! + * Return a PageList and its pages to the CCache. If the PageList is still referenced, the freeing + * will be deferred until GC. + */ +void CPageManager::FreePageList(jak3::CPageList* list) { + ASSERT(list); + ASSERT(list->m_nAllocState != CPageList::AllocState::EPLAS_FREE); + // suspend itr + list->m_nAllocState = CPageList::AllocState::FREE_PENDING; + // resume intr + + if (list->m_nDmaRefCnt || list->m_nPageRefCnt) { + lg::warn("Skipping free since list is referenced!"); + return; + } + + // loop over pages, clearing them. + CPage* page = list->m_pFirstPage; + int pages_count = 0; + int pages[CCache::kNumPages]; + + while (page) { + u32 page_slot = page - m_CCache.m_Pages; + ASSERT(page_slot < CCache::kNumPages); + pages[pages_count] = page_slot; + pages_count++; + auto* next = page->m_pNextPage; + page->m_pPageList = nullptr; + page->m_pPrevPage = nullptr; + page->m_pNextPage = nullptr; + page->m_nAllocState = 0; + page->input_state = CPage::State::UNMAKRED; + ASSERT(!page->m_nPageRefCount); + ASSERT(!page->m_nDmaRefCount); + ClearEventFlag(get_page_manager()->m_CCache.m_PagesFilledEventFlag, ~page->mask); + page = next; + } + + // clear list + if (pages_count != list->m_nNumPages) { + lg::die("Paging error: found {} pages out of {} in FreePageList", pages_count, + list->m_nNumPages); + } + ASSERT(pages_count == list->m_nNumPages); + list->m_pFirstActivePage = nullptr; + list->m_nNumPages = 0; + list->m_pLastActivePage = nullptr; + list->m_pCurrentActivePage = nullptr; + list->m_nNumActivePages = 0; + list->m_nNumUnsteppedPages = 0; + list->m_nAllocState = CPageList::AllocState::EPLAS_FREE; + m_CCache.m_nNumFreePages += pages_count; + ASSERT(m_CCache.m_nNumFreePages <= CCache::kNumPages); + list->m_pFirstPage = nullptr; + list->m_pLastPage = nullptr; + // unset bits in allocated mask + while (0 < pages_count) { + pages_count--; + m_CCache.m_nAllocatedMask &= ~(1 << pages[pages_count]); + } + // unset bit for the pagelist itself + u32 plist_idx = list - m_CCache.m_PageLists; + ASSERT(plist_idx >= 0 && plist_idx < CCache::kNumPageLists); + m_CCache.m_nPagelistAllocatedMask &= ~(1 << plist_idx); +} + +int CPageManager::RecoverPages(int) { + ASSERT_NOT_REACHED(); // TODO, this looks at pristack +} + +/*! + * Call GarbageCollect on all allocate CPageLists. + */ +void CPageManager::GarbageCollect() { + for (u32 i = 0; i < CCache::kNumPageLists; i++) { + if (m_CCache.m_nPagelistAllocatedMask & (1 << i)) { + GarbageCollectPageList(&m_CCache.m_PageLists[i]); + } + } +} + +/*! + * Do garbage collection of pages and page lists. + */ +void CPageManager::GarbageCollectPageList(jak3::CPageList* list) { + ASSERT(list); + list->GarbageCollect(); + // if we tried to free the list in the past, but failed, try to do it again now. + if (list->m_nAllocState == CPageList::AllocState::FREE_PENDING) { + FreePageList(list); + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/pagemanager.h b/game/overlord/jak3/pagemanager.h new file mode 100644 index 0000000000..c82c62f042 --- /dev/null +++ b/game/overlord/jak3/pagemanager.h @@ -0,0 +1,181 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_pagemanager(); + +/*! + * CPages Overview + * + * Data is read from the DVD driver into CPages. The CPages are then given to consumers. + * Each file that's opened has an associated CPageList. + * + * The CPageList is a linked list of pages. Within this linked list, there is a section of "active + * pages" which have been filled by the DVD driver. There is also the "current active page", which + * is the page that the user will read from next. Note that pages before the current active page + * and still be referenced by the user, but they should keep a nonzero reference count so the CPage + * is not Garbage Collected. + * + * By default, each active page will have a ref count of 1. + * + * The CBuffer object owned by CBaseFile uses memory managed by this CPage system. + * + * The pages are preallocated by the CPageManager, which gives out pages as needed. + */ + +struct CPage; +struct CPageList; +struct ISO_Hdr; + +constexpr int kPageSize = 0x8000; +constexpr int kPageStride = 0x8010; + +/*! + * A CBuffer stores file data in pages, and tracks the progress through the page data as it is fed + * into the ISO data handling system. + */ +struct CBuffer { + // The pages in this buffer are managed by a PageList + CPageList* m_pPageList = nullptr; + + // The ISO command that requested us to load this data + ISO_Hdr* m_pIsoCmd = nullptr; + + // Current progress through the data (todo: load or process?) + uint8_t* m_pCurrentData = nullptr; + + // First address in the current page + uint8_t* m_pCurrentPageStart = nullptr; + + // todo + int m_nDataLength = 0; + + enum class BufferType { + // this is a really confusing enum... + EBT_FREE = 0, // there is no buffer allocate + NORMAL = 1, // a buffer sized for non-VAG stream operations (several possible sizes) + VAG = 2, // a buffer size for VAG streams (larger than normal sizes) + REQUEST_NORMAL = 3, // argument passed to InitBuffer to get a normal buffer + REQUEST_VAG = 4, // argument passed to InitBuffer to get a VAG size buffer + } m_eBufferType = BufferType::EBT_FREE; + + // Try to have at least this many pages filled + int m_nMinNumPages = 0; + + // Don't fill more than this number of pages + int m_nMaxNumPages = 0; + + void AddData(int len); + void AdvanceCurrentData(int len); +}; + +/*! + * List of pages for a file. + */ +struct CPageList { + CPageList() = default; // ??? + + // list of all pages + CPage* m_pFirstPage = nullptr; + CPage* m_pLastPage = nullptr; + + // list of active pages. This is part of the all page list + CPage* m_pFirstActivePage = nullptr; + CPage* m_pLastActivePage = nullptr; + + // page that the application is currently reading from + CPage* m_pCurrentActivePage = nullptr; + + // total number of CPage, including both active/inactive + int m_nNumPages = 0; + + // number of cpages in the active page list + int m_nNumActivePages = 0; + + // number of CPages remaining for the user, including the current active page + int m_nNumUnsteppedPages = 0; + + // Reference counters to know if this data is still needed or not. + int m_nPageRefCnt = 0; + int m_nDmaRefCnt = 0; + + enum class AllocState { + EPLAS_FREE = 0, + EPLAS_ALLOCATED = 1, + FREE_PENDING = 2, // FreePageList called, but no + } m_nAllocState = AllocState::EPLAS_FREE; + + CPage* StepActivePage(); + CPage* AddActivePages(int num_pages); + int RemoveActivePages(int num_pages); + void CancelActivePages(); + void GarbageCollect(); +}; + +/*! + * A single page, pointing to a contiguous buffer of file data. + */ +struct CPage { + CPage(uint8_t* page_mem_start, uint8_t* page_mem_end, int page_idx); + CPage() = default; // ??? + CPage* m_pNextPage = nullptr; + CPage* m_pPrevPage = nullptr; + CPageList* m_pPageList = nullptr; + int m_nPageRefCount = 0; + int m_nDmaRefCount = 0; + int m_nAllocState = 0; + enum class State { + UNMAKRED = 0, + ACTIVE = 1, + READING = 2, + READ_DONE = 3 + } input_state = State::UNMAKRED; + uint8_t* m_pPageMemStart = nullptr; + uint8_t* m_pPageMemEnd = nullptr; + u32 m_nPageIdx = 0; + u32 mask = 0; + + int AddRef(); + int ReleaseRef(); + int AddDmaRef(); + int ReleaseDmaRef(); + void FromPagesCopy(uint8_t* in, uint8_t* dest, s32 size); +}; + +/*! + * CCache contains the actual CPage/CPageList objects to be given out to files. + */ +struct CCache { + static constexpr int kNumPages = 29; + static constexpr int kNumPageLists = 29; + static constexpr int kAllPagesMask = (1 << kNumPages) - 1; + + CCache(); + void Initialize(); + void* m_paCache = nullptr; + CPageList m_PageLists[kNumPageLists]; + CPage m_Pages[kNumPages]; + int m_nNumFreePages = 0; + u32 m_nAllocatedMask; + u32 m_nPagelistAllocatedMask; + int m_PagesFilledEventFlag; + int m_PendingMask; +}; + +struct CPageManager { + CCache m_CCache; + + CPageList* GrowPageList(CPageList* in, int page_count); + CPageList* AllocPageList(int count, bool flag); + CPageList* AllocPageListBytes(int bytes, bool flag); + void FreePageList(CPageList* list); + void WaitForPagesFilled(u32 mask); + void Initialize(); + int RecoverPages(int k); + void GarbageCollect(); + void GarbageCollectPageList(CPageList* list); +}; + +CPageManager* get_page_manager(); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/ramdisk.cpp b/game/overlord/jak3/ramdisk.cpp new file mode 100644 index 0000000000..33676d252d --- /dev/null +++ b/game/overlord/jak3/ramdisk.cpp @@ -0,0 +1,50 @@ +#include "ramdisk.h" + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_api.h" +#include "game/overlord/jak3/rpc_interface.h" +#include "game/sce/iop.h" + +namespace jak3 { + +constexpr int kRamdiskBufSize = 512; +u8 gRamdiskRpcBuf[kRamdiskBufSize]; + +void jak3_overlord_init_globals_ramdisk() {} + +/*! + * RPC Handler for "load to ee" rpc. + */ +void* RPC_LoadToEE(unsigned int fno, void* msg_ptr, int) { + switch (fno) { + case LoadToEEFno::LOAD_FILE: { + RpcLoadToEEMsg* msg = (RpcLoadToEEMsg*)(msg_ptr); + auto f = FindISOFile(msg->name); + ASSERT(f); + LoadISOFileToEE(f, msg->addr, msg->length); + } break; + default: + ASSERT_NOT_REACHED(); + } + return nullptr; +} + +u32 LoadToEE_RPC_Thread() { + using namespace iop; + + sceSifQueueData dq; + sceSifServeData serve; + + // set up RPC + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::LoadToEE, RPC_LoadToEE, gRamdiskRpcBuf, kRamdiskBufSize, nullptr, + nullptr, &dq); + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/ramdisk.h b/game/overlord/jak3/ramdisk.h new file mode 100644 index 0000000000..acd14e58b8 --- /dev/null +++ b/game/overlord/jak3/ramdisk.h @@ -0,0 +1,10 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_ramdisk(); + +u32 LoadToEE_RPC_Thread(); + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/rpc_interface.h b/game/overlord/jak3/rpc_interface.h new file mode 100644 index 0000000000..4b2d4d49aa --- /dev/null +++ b/game/overlord/jak3/rpc_interface.h @@ -0,0 +1,280 @@ +#pragma once + +#include "common/common_types.h" + +/*! + * This file has structs that are shared between GOAL and Overlord. + * The memory layout of these structs should not be changed. + */ + +namespace jak3 { + +struct SoundStreamName { + char chars[48]; +}; + +// vblank message + +struct SoundIOPInfo { + u32 frame; // 0 + s32 strpos; // 4 + u32 str_id; // 8 + u32 freemem; // 12 + u8 chinfo[48]; // 16 + u32 freemem2; // 64 + u32 nocd; // 68 + u32 dirtycd; // 72 + u32 diskspeed[2]; // 76 + u32 lastspeed; // 84 + s32 dupseg; // 88 + s32 times[41]; // 92 + u32 times_seq; // 256 + u32 iop_ticks; // 260 + u32 pad0[2]; + u32 stream_position[4]; // 272 + u32 stream_status[4]; // 288 + SoundStreamName stream_name[4]; + u32 stream_id[4]; + u8 music_register[17]; + // s8 music_excite; + char ramdisk_name[16]; + u32 pad[11]; + char sound_bank0[16]; + char sound_bank1[16]; + char sound_bank2[16]; + char sound_bank3[16]; + char sound_bank4[16]; + char sound_bank5[16]; + char sound_bank6[16]; + char sound_bank7[16]; +}; +// static_assert(offsetof(SoundIOPInfo, stream_name) == 304); +// static_assert(offsetof(SoundIOPInfo, stream_id) == 496); +// static_assert(offsetof(SoundIOPInfo, music_register) == 512); +// static_assert(offsetof(SoundIOPInfo, ramdisk_name) == 529); +// static_assert(offsetof(SoundIOPInfo, sound_bank0) == 592); +static_assert(sizeof(SoundIOPInfo) == 0x2d0); + +// static_assert(sizeof(SoundIOPInfo) == 288); + +// Common + +enum RpcId { + Player = 0xfab0, // sound effects playback + Loader = 0xfab1, // sound effects loading. + LoadToEE = 0xfab2, // was ramdisk, now just a simple way to load a file to EE memory. + DGO = 0xfab3, // level/engine .DGO loading + STR = 0xfab4, // loading .str files of animations or other streamed data + PLAY = 0xfab5, // playing and queueing vag streams +}; + +// RAMDISK RPC (renamed to LoadToEE for jak 3, kinda) +struct RpcLoadToEEMsg { + u32 unk; + u32 addr; + u32 unk2; + u32 length; + char name[16]; +}; +static_assert(sizeof(RpcLoadToEEMsg) == 32); + +enum LoadToEEFno { + LOAD_FILE = 4, +}; + +// DGO RPC + +struct RPC_Dgo_Cmd { + uint16_t rsvd; + uint16_t status; + uint32_t buffer1; + uint32_t buffer2; + uint32_t buffer_heap_top; + char name[16]; + int32_t cgo_id; + uint8_t pad[28]; +}; +static_assert(sizeof(RPC_Dgo_Cmd) == 0x40); + +enum DgoFno { + LOAD = 0, + LOAD_NEXT = 1, + CANCEL = 2, +}; + +// STR RPC +struct RPC_Str_Cmd { + u16 rsvd; + u16 result; // 2 + u32 address; + s32 section; // 8 + u32 maxlen; + u32 dummy[4]; + char basename[48]; // 32 +}; + +// PLAYER/LOADER RPCS + +struct RPC_Play_Cmd { + u16 rsvd; + u16 result; + u32 address; + u32 section; + u32 maxlen; + u32 id[4]; + SoundStreamName names[4]; + u32 pad[8]; +}; + +struct SoundName { + char data[16]; +}; + +enum class SoundCommand : u16 { + // IOP_STORE = 0, + // IOP_FREE = 1, + LOAD_BANK = 2, + // LOAD_BANK_FROM_IOP = 3, + // LOAD_BANK_FROM_EE = 4, + LOAD_MUSIC = 5, + UNLOAD_BANK = 6, + PLAY = 7, + PAUSE_SOUND = 8, + STOP_SOUND = 9, + CONTINUE_SOUND = 10, + SET_PARAM = 11, + SET_MASTER_VOLUME = 12, + PAUSE_GROUP = 13, + STOP_GROUP = 14, + CONTINUE_GROUP = 15, + GET_IRX_VERSION = 16, + // SET_FALLOFF_CURVE = 17, + // SET_SOUND_FALLOFF = 18, + // RELOAD_INFO = 19, + SET_LANGUAGE = 20, + // SET_FLAVA = 21, + SET_MIDI_REG = 22, + SET_REVERB = 23, + SET_EAR_TRANS = 24, + SHUTDOWN = 25, + // LIST_SOUNDS = 26, + UNLOAD_MUSIC = 27, + SET_FPS = 28, + // BOOT_LOAD = 29, + // GAME_LOAD = 30, + // NUM_TESTS = 31, + // NUM_TESTRUNS = 32, + // NUM_SECTORS = 33, + // NUM_STREAMSECTORS = 34, + // NUM_STREMBANKS = 35, + // TRACK_PITCH = 36, + // LINVEL_NOM = 37, + CANCEL_DGO = 49, + SET_STEREO_MODE = 50, +}; + +struct SoundPlayParams { + u16 mask; + s16 pitch_mod; + s16 bend; + s16 fo_min; + s16 fo_max; + s8 fo_curve; + s8 priority; + s32 volume; + s32 trans[3]; + u8 group; + u8 reg[3]; +}; + +struct Rpc_Player_Base_Cmd { + u16 rsvd1 = 0; + SoundCommand command; +}; +static_assert(sizeof(Rpc_Player_Base_Cmd) == 4); + +struct Rpc_Player_Sound_Cmd : public Rpc_Player_Base_Cmd { + s32 sound_id = 0; +}; +static_assert(sizeof(Rpc_Player_Sound_Cmd) == 8); + +struct Rpc_Player_Group_Cmd : public Rpc_Player_Base_Cmd { + u32 group = 0; +}; +static_assert(sizeof(Rpc_Player_Group_Cmd) == 8); + +struct Rpc_Player_Play_Cmd : public Rpc_Player_Sound_Cmd { + s32 pad[2]; + SoundName name; + SoundPlayParams params; +}; +static_assert(sizeof(Rpc_Player_Play_Cmd) == 0x40); + +struct Rpc_Player_Set_Param_Cmd : public Rpc_Player_Sound_Cmd { + SoundPlayParams params; + s32 auto_time; + s32 auto_from; +}; +static_assert(sizeof(Rpc_Player_Set_Param_Cmd) == 0x30); + +struct Rpc_Player_Set_Master_Volume_Cmd : public Rpc_Player_Group_Cmd { + s32 volume; +}; +static_assert(sizeof(Rpc_Player_Set_Master_Volume_Cmd) == 12); + +struct Rpc_Player_Set_Ear_Trans_Cmd : public Rpc_Player_Base_Cmd { + s32 ear_trans1[3]; + s32 ear_trans0[3]; + s32 ear_trans[3]; + s32 cam_forward[3]; + s32 cam_left[3]; + s32 cam_scale; + s32 cam_inverted; +}; +static_assert(sizeof(Rpc_Player_Set_Ear_Trans_Cmd) == 0x48); + +struct Rpc_Player_Set_Fps_Cmd : public Rpc_Player_Base_Cmd { + u8 fps; + u8 pad; +}; +static_assert(sizeof(Rpc_Player_Set_Fps_Cmd) == 5 + 1); + +struct Rpc_Player_Cancel_Dgo_Cmd : public Rpc_Player_Group_Cmd { + u32 id; +}; +static_assert(sizeof(Rpc_Player_Cancel_Dgo_Cmd) == 12); + +struct Rpc_Loader_Bank_Cmd : public Rpc_Player_Base_Cmd { + u32 pad[3]; + SoundName bank_name; +}; +static_assert(sizeof(Rpc_Loader_Bank_Cmd) == 32); + +struct Rpc_Loader_Load_Bank_Cmd : public Rpc_Loader_Bank_Cmd { + u32 ee_addr; + u32 mode; + u32 priority; +}; +static_assert(sizeof(Rpc_Loader_Load_Bank_Cmd) == 0x2c); + +struct Rpc_Loader_Get_Irx_Version : public Rpc_Player_Base_Cmd { + u32 major; + u32 minor; + u32 ee_addr; +}; +static_assert(sizeof(Rpc_Loader_Get_Irx_Version) == 16); + +struct Rpc_Loader_Set_Language : public Rpc_Player_Base_Cmd { + u32 lang; +}; +static_assert(sizeof(Rpc_Loader_Set_Language) == 8); + +struct Rpc_Loader_Set_Stereo_Mode : public Rpc_Player_Base_Cmd { + s32 mode; +}; +static_assert(sizeof(Rpc_Loader_Set_Stereo_Mode) == 8); + +constexpr int kPlayerCommandStride = 0x50; +constexpr int kLoaderCommandStride = 0x50; + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/sbank.cpp b/game/overlord/jak3/sbank.cpp new file mode 100644 index 0000000000..dbbf3e9896 --- /dev/null +++ b/game/overlord/jak3/sbank.cpp @@ -0,0 +1,167 @@ +#include "sbank.h" + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/overlord.h" + +namespace jak3 { + +constexpr int kNumBanks = 8; +SoundBankInfo* gBanks[kNumBanks]; + +SoundBankInfo gCommonBank; +SoundBankInfo gModeBank; +SoundBankInfo gLevel0Bank, gLevel0hBank; +SoundBankInfo gLevel1Bank, gLevel1hBank; +SoundBankInfo gLevel2Bank, gLevel2hBank; + +void jak3_overlord_init_globals_sbank() { + gBanks[0] = &gCommonBank; + gBanks[1] = &gModeBank; + gBanks[2] = &gLevel0Bank; + gBanks[3] = &gLevel0hBank; + gBanks[4] = &gLevel1Bank; + gBanks[5] = &gLevel1hBank; + gBanks[6] = &gLevel2Bank; + gBanks[7] = &gLevel2hBank; +} + +void InitBanks() { + for (int i = 0; i < kNumBanks; i++) { + auto* bank = gBanks[i]; + bank->in_use = 0; + bank->snd_handle = nullptr; + bank->loaded = false; + bank->idx = i; + bank->unk0 = 0; + } + + strncpyz(gBanks[0]->m_name2, "common", 0x10); + gBanks[0]->m_nSpuMemSize = 0xbbe40; + gBanks[0]->m_nSpuMemLoc = 0x1d1c0; + + strncpyz(gBanks[1]->m_name2, "mode", 0x10); + gBanks[1]->m_nSpuMemSize = 0x25400; + gBanks[1]->m_nSpuMemLoc = 0xe0000; + + strncpyz(gBanks[2]->m_name2, "level0", 0x10); + gBanks[2]->m_nSpuMemLoc = 0x105400; + gBanks[2]->m_nSpuMemSize = 0x51400; + + strncpyz(gBanks[3]->m_name2, "level0h", 0x10); + gBanks[3]->m_nSpuMemLoc = 0x12de00; + gBanks[3]->m_nSpuMemSize = 0x28a00; + + strncpyz(gBanks[4]->m_name2, "level1", 0x10); + gBanks[4]->m_nSpuMemSize = 0x51400; + gBanks[4]->m_nSpuMemLoc = 0x156800; + + strncpyz(gBanks[5]->m_name2, "level1h", 0x10); + gBanks[5]->m_nSpuMemSize = 0x28a00; + gBanks[5]->m_nSpuMemLoc = 0x17f200; + + strncpyz(gBanks[6]->m_name2, "level2", 0x10); + gBanks[6]->m_nSpuMemSize = 0x51400; + gBanks[6]->m_nSpuMemLoc = 0x1a7c00; + + strncpyz(gBanks[7]->m_name2, "level2h", 0x10); + gBanks[7]->m_nSpuMemSize = 0x28a00; + gBanks[7]->m_nSpuMemLoc = 0x1d0600; +} + +SoundBankInfo* AllocateBankName(const char* name, u32 mode) { + int iVar1; + int mem_sz; + SoundBankInfo** ppSVar2; + int iVar3; + int iVar4; + SoundBankInfo* pSVar5; + int iVar6; + int iVar6_d4 = 2; + SoundBankInfo* bank = nullptr; + + // handle common case + if (memcmp(name, "common", 7) == 0 || memcmp(name, "commonj", 8) == 0) { + if (!gBanks[0]->in_use) { + bank = gBanks[0]; + } + } else if (memcmp(name, "mode", 4) == 0) { + if (!gBanks[1]->in_use) { + bank = gBanks[1]; + } + } + + if (mode == 4) { + for (int bank_idx = 2; bank_idx < kNumBanks; bank_idx += 2) { + if (!gBanks[bank_idx]->in_use && !gBanks[bank_idx + 1]->in_use) { + bank = gBanks[bank_idx]; + bank->m_nSpuMemSize = 0x51400; + break; + } + } + } else if (mode > 3 && (mode - 6u < 3)) { // wtf + iVar1 = 2; + // iVar6 = 8; + iVar6_d4 = 2; + while (gBanks[iVar6_d4]->in_use == 0 || gBanks[iVar6_d4]->mode != mode) { + auto* sbi = gBanks[iVar6_d4 + 1]; + iVar6 = iVar6 + 8; + if (((sbi->in_use != 0) && (iVar4 = iVar1, sbi->mode == mode)) || + (iVar1 = iVar1 + 2, iVar4 = -1, 7 < iVar1)) + goto LAB_0000c2fc; + } + iVar4 = iVar1 + 1; + LAB_0000c2fc: + if (iVar4 < 0) { + iVar1 = 2; + ppSVar2 = gBanks; + LAB_0000c36c: + ppSVar2 = ppSVar2 + 2; + pSVar5 = *ppSVar2; + iVar1 = iVar1 + 2; + if ((pSVar5->in_use != 0) || (ppSVar2[1]->in_use != 0)) + goto LAB_0000c39c; + mem_sz = 0x28a00; + pSVar5->m_nSpuMemSize = mem_sz; + bank = pSVar5; + goto LAB_0000c3a4; + } + pSVar5 = gBanks[iVar4]; + if (pSVar5->in_use == 0) { + gBanks[iVar1]->m_nSpuMemSize = 0x28a00; + bank = pSVar5; + } + } +LAB_0000c3a4: + if (bank) { + bank->mode = mode; + bank->snd_handle = nullptr; + bank->unk0 = 0; + } + return bank; + +LAB_0000c39c: + if (7 < iVar1) + goto LAB_0000c3a4; + goto LAB_0000c36c; +} + +SoundBankInfo* LookupBank(const char* name) { + for (int i = kNumBanks; i-- > 0;) { + if (memcmp(name, gBanks[i]->m_name1, 16) == 0) { + return gBanks[i]; + } + } + return nullptr; +} + +int GetFalloffCurve(int x) { + if (x < 0) { + return 1; + } + if (x == 0 || 0x28 < x) { + x = 2; + } + return x; +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/sbank.h b/game/overlord/jak3/sbank.h new file mode 100644 index 0000000000..6882e78950 --- /dev/null +++ b/game/overlord/jak3/sbank.h @@ -0,0 +1,29 @@ +#pragma once + +#include "common/common_types.h" + +#include "game/sound/sndshim.h" + +namespace jak3 { + +struct SoundBankInfo { + // int m_name1[4]; + char m_name1[16]; + char m_name2[16]; + int m_nSpuMemLoc = 0; + int m_nSpuMemSize = 0; + // s32 snd_handle = 0; + snd::BankHandle snd_handle = nullptr; + u8 in_use = 0; + u8 loaded = 0; + u8 mode = 0; + u8 idx = 0; + int unk0 = 0; +}; + +void jak3_overlord_init_globals_sbank(); +void InitBanks(); +SoundBankInfo* LookupBank(const char* name); +SoundBankInfo* AllocateBankName(const char* name, u32 mode); +extern SoundBankInfo* gBanks[8]; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/soundcommon.cpp b/game/overlord/jak3/soundcommon.cpp new file mode 100644 index 0000000000..b69feea1c0 --- /dev/null +++ b/game/overlord/jak3/soundcommon.cpp @@ -0,0 +1,19 @@ +#include "soundcommon.h" + +#include +#include +#include + +namespace jak3 { +void jak3_overlord_init_globals_soundcommon() {} + +// Only for use with 16 character sound names! +void strcpy_toupper(char* dest, const char* source) { + // clear the dest string + memset(dest, 0, 16); + std::string string(source); + std::transform(string.begin(), string.end(), string.begin(), ::toupper); + std::replace(string.begin(), string.end(), '-', '_'); + string.copy(dest, 16); +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/soundcommon.h b/game/overlord/jak3/soundcommon.h new file mode 100644 index 0000000000..760ddf46f1 --- /dev/null +++ b/game/overlord/jak3/soundcommon.h @@ -0,0 +1,7 @@ +#pragma once + +namespace jak3 { +void jak3_overlord_init_globals_soundcommon(); + +void strcpy_toupper(char* dest, const char* src); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/spustreams.cpp b/game/overlord/jak3/spustreams.cpp new file mode 100644 index 0000000000..df518ccf83 --- /dev/null +++ b/game/overlord/jak3/spustreams.cpp @@ -0,0 +1,1066 @@ +#include "spustreams.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/dma.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_queue.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" +#include "game/sound/sdshim.h" + +namespace jak3 { +using namespace iop; +void jak3_overlord_init_globals_spustreams() {} + +u32 bswap_read32(u32 param_1) { + return param_1 >> 0x18 | ((int)param_1 >> 8 & 0xff00U) | (param_1 & 0xff00) << 8 | + param_1 << 0x18; +} + +void UpdateIsoBuffer(ISO_VAGCommand* cmd, int length) { + ASSERT(cmd); + ASSERT(cmd->m_pBaseFile); + + auto* file = cmd->m_pBaseFile; + int transfer_size = cmd->xfer_size; + + // advance progress in file + file->m_Buffer.m_pCurrentData += length; + + // this part is weird - we've advanced the current data pointer, and now we're updating the + // size field in the buffer. But, we're potentially adjusting the size in between these. + // This means that our m_pCurrentData + m_DataLength may go off the end of the buffer?? + int tranferred_already = -length; + if (transfer_size < length) { + tranferred_already = -transfer_size; + length = transfer_size; + // ASSERT_NOT_REACHED(); // for now... + } + cmd->xfer_size = transfer_size + tranferred_already; + file->m_Buffer.AddData(-length); + cmd->num_isobuffered_chunks = cmd->num_isobuffered_chunks + 1; +} + +/*! + * Callback for handling VAG data. This transfers data from the Page buffers to SPU memory. + */ +EIsoStatus ProcessVAGData(ISO_Hdr* _msg) { + int spu_addr; + u32 uVar1; + int iVar2; + u32 val; + uint8_t* iop_mem; + int* piVar4; + int iVar5; + int iVar6; + ISO_VAGCommand* sibling; + u32 val2; + CBuffer* buffer; + CBaseFile* file; + int length; + // int iVar9; + // undefined4 local_28[2]; + bool got_chunks; + + ASSERT(_msg); + auto* msg = (ISO_VAGCommand*)_msg; + ASSERT(msg->m_pBaseFile); + file = msg->m_pBaseFile; + ASSERT(file->m_ProcessDataSemaphore != -1); + + // lock the semaphore + // lg::error("--------------- proces vag!!! {}\n", msg->name); + WaitSema(file->m_ProcessDataSemaphore); + buffer = &file->m_Buffer; + + if (msg->unk_gvsp_flag) { + lg::error("unk gvsp flag set in process data - no more needed??"); + } + + // reject if errored/stopped - in this case no more data is needed. + if (msg->unk_gvsp_flag || msg->flags.stop || msg->flags.file_disappeared || + msg->flags.stereo_secondary) { + goto exit; + } + + // reject if error. + if (msg->error != 0) { + file->m_Buffer.m_nDataLength = 0; + goto exit; + } + + // reject if dma in progress - wait for that to finish first + if (msg->safe_to_modify_dma == 0) { + goto exit; + } + + // determine the length we need to do an upload. + sibling = msg->stereo_sibling; + got_chunks = msg->num_isobuffered_chunks != 0; + length = 0x2000; + if (sibling) { + length = 0x4000; + } + + // reject if not enough data. + if (got_chunks) { + int desired_length = length; + if (msg->xfer_size < length) { + desired_length = msg->xfer_size; + } + if ((int)file->m_Buffer.m_nDataLength < desired_length) { + lg::warn("ProcessVAG data is starved."); + goto exit; + } + } + + // reject if no buffer + if (!buffer->m_pPageList || !buffer->m_pPageList->m_pCurrentActivePage) + goto exit; + + // update buffer so it handles page crossing + file->CheckPageBoundary(); + CPage* page; + + // add ref count to the page. + if (!buffer->m_pPageList || ((page = buffer->m_pPageList->m_pCurrentActivePage, + !page || (spu_addr = page->AddRef(), spu_addr < 1)))) + goto exit; + + // make sure the page has the right state. I think this should never really happen, but I guess + // they are paranoid. + if (page->input_state != CPage::State::READ_DONE) { + int status = page->ReleaseRef(); + ASSERT(status >= 0); + goto exit; + } + + if (got_chunks) { // if we've already started streaming, all way have to do is update. + if (msg->num_isobuffered_chunks & 1u) { + int vag_transfer_size = msg->xfer_size; + if ((length < vag_transfer_size) || ((u32)msg->unk_spu_mem_offset < 0x4000)) { + VAG_MarkLoopEnd(file->m_Buffer.m_pCurrentData, 0x2000); + VAG_MarkLoopStart(file->m_Buffer.m_pCurrentData); + if (sibling) { + VAG_MarkLoopEnd(file->m_Buffer.m_pCurrentData, 0x4000); + VAG_MarkLoopStart(file->m_Buffer.m_pCurrentData + 0x2000); + } + } else { + spu_addr = 0x2010; + if ((0x1f < (int)vag_transfer_size) && + (spu_addr = vag_transfer_size + 0x1ff0, sibling != (ISO_VAGCommand*)0x0)) { + spu_addr = ((int)(vag_transfer_size + (vag_transfer_size >> 0x1f)) >> 1) + 0x1ff0; + } + msg->unk_spu_mem_offset = spu_addr; + if (sibling != (ISO_VAGCommand*)0x0) { + sibling->unk_spu_mem_offset = msg->unk_spu_mem_offset; + } + } + // CpuSuspendIntr(local_28); + iop_mem = file->m_Buffer.m_pCurrentData; + spu_addr = msg->stream_sram + 0x2000; + } else { + int vag_transfer_size = msg->xfer_size; + if ((length < (int)vag_transfer_size) || ((u32)msg->unk_spu_mem_offset < 0x4000)) { + VAG_MarkLoopEnd(file->m_Buffer.m_pCurrentData, 0x2000); + VAG_MarkLoopStart(file->m_Buffer.m_pCurrentData); + if (sibling) { + VAG_MarkLoopEnd(file->m_Buffer.m_pCurrentData, 0x4000); + VAG_MarkLoopStart(file->m_Buffer.m_pCurrentData + 0x2000); + } + } else { + spu_addr = 0x10; + if ((0x1f < (int)vag_transfer_size) && + (spu_addr = vag_transfer_size - 0x10, sibling != (ISO_VAGCommand*)0x0)) { + spu_addr = ((int)(vag_transfer_size + (vag_transfer_size >> 0x1f)) >> 1) + -0x10; + } + msg->unk_spu_mem_offset = spu_addr; + if (sibling != (ISO_VAGCommand*)0x0) { + sibling->unk_spu_mem_offset = msg->unk_spu_mem_offset; + } + } + // CpuSuspendIntr(local_28); + iop_mem = file->m_Buffer.m_pCurrentData; + spu_addr = msg->stream_sram; + } + spu_addr = DMA_SendToSPUAndSync(iop_mem, 0x2000, spu_addr, msg, page); + if (spu_addr != 0) { + set_active_b(msg, 0); + goto LAB_000106a0; + } + LAB_0001067c: + // + { + int status = page->ReleaseRef(); + ASSERT(status >= 0); + } + + } else { + // we're starting the vag file! check the header: + piVar4 = (int*)file->m_Buffer.m_pCurrentData; + if ((*piVar4 != 0x70474156) && (*piVar4 != 0x56414770)) { + lg::error("Invalid VAG data is 0x{:x}", *piVar4); + ASSERT_NOT_REACHED(); // invalid data + msg->error = 1; + file->m_Buffer.m_nDataLength = 0; + int status = page->ReleaseRef(); + ASSERT(status >= 0); + goto exit; + } + + // read the rate/xfer size. + val = piVar4[4]; + msg->vag_file_rate = val; + val2 = piVar4[3]; + msg->unk_gvsp_cntr = 0; + msg->xfer_size = val2; + if (*piVar4 == 0x70474156) { + uVar1 = bswap_read32(val); + msg->vag_file_rate = uVar1; + uVar1 = bswap_read32(val2); + msg->xfer_size = uVar1; + } + + // lg::die("xfer size is {}", msg->xfer_size); + + // set sibling properties + if (sibling) { + spu_addr = msg->xfer_size; + sibling->vag_file_rate = msg->vag_file_rate; + sibling->xfer_size = spu_addr; + sibling->unk_gvsp_cntr = 0; + } + + spu_addr = msg->xfer_size; + if (sibling != (ISO_VAGCommand*)0x0) { + spu_addr = spu_addr >> 1; + } + uVar1 = spu_addr + 0x30; + if ((uVar1 & 0x1fff) != 0) { + uVar1 = (uVar1 - (uVar1 & 0x1fff)) + 0x2000; + } + if (sibling != (ISO_VAGCommand*)0x0) { + uVar1 = uVar1 * 2; + } + uVar1 = (uVar1 + 0x7fff) >> 0xf; + if (uVar1 == 0) { + uVar1 = 1; + } + file->m_LengthPages = uVar1; + iVar6 = msg->vag_file_rate; + iVar5 = msg->xfer_size; + spu_addr = iVar5 + 0x30; + msg->unk_spu_mem_offset = 0x4000; + msg->xfer_size = spu_addr; + uVar1 = (u32)(iVar6 << 0xc) / 48000; + msg->pitch1_file = uVar1; + msg->pitch1 = uVar1; + if (spu_addr < 0x2001) { + iVar2 = 0x10; + if (0x1f < spu_addr) { + iVar2 = iVar5 + 0x20; + } + msg->unk_spu_mem_offset = iVar2; + if (sibling != (ISO_VAGCommand*)0x0) { + sibling->xfer_size = msg->xfer_size; + sibling->unk_spu_mem_offset = msg->unk_spu_mem_offset; + sibling->vag_file_rate = iVar6; + sibling->pitch1 = msg->pitch1; + sibling->pitch1_file = msg->pitch1_file; + sibling->xfer_size = msg->xfer_size; + sibling->unk_spu_mem_offset = msg->unk_spu_mem_offset; + sibling->unk_gvsp_cntr = 0; + } + } + // CpuSuspendIntr(local_28); + spu_addr = + DMA_SendToSPUAndSync(file->m_Buffer.m_pCurrentData, 0x2000, msg->stream_sram, msg, page); + if (spu_addr == 0) + goto LAB_0001067c; + msg->position_for_ee = 0; + msg->unk_gvsp_len = 0; + if (sibling) { // added. + sibling->position_for_ee = 0; + } + LAB_000106a0: + UpdateIsoBuffer(msg, length); + } + // CpuResumeIntr(local_28[0]); +exit: + SignalSema(file->m_ProcessDataSemaphore); + return EIsoStatus::OK_2; +} + +u32 GetSpuRamAddress(ISO_VAGCommand* cmd) { + return sceSdGetAddr(SD_VA_NAX | cmd->voice); + + u32 voice = cmd->voice; + u32 current_addr = cmd->stream_sram; + BlockUntilVoiceSafe(voice, 0xf00); + u32 sce_addr = sceSdGetAddr(voice | 0x2240); + // lg::info("sce addr {}", sce_addr); + if ((sce_addr < current_addr) || (current_addr + 0x4040 <= sce_addr)) { + ASSERT_NOT_REACHED(); + sce_addr = current_addr + 0x4040; + } + return sce_addr; +} + +u32 GetVAGStreamPos(ISO_VAGCommand* cmd) { + u32 uVar1; + int iVar2; + u32 uVar3; + u32 uVar4; + ISO_VAGCommand* sibling; + u32 uVar5; + // undefined4 local_20[2]; + + sibling = cmd->stereo_sibling; + if (cmd->id == 0) { + cmd->position_for_ee = 0; + if (sibling == (ISO_VAGCommand*)0x0) { + return 0; + } + sibling->position_for_ee = 0; + return 0; + } + if (cmd->flags.file_disappeared != 0) { + cmd->position_for_ee = cmd->clockd; + if (sibling == (ISO_VAGCommand*)0x0) { + return 0; + } + sibling->position_for_ee = sibling->clockd; + return 0; + } + if (((cmd->flags.running == 0) || (cmd->flags.saw_chunks1 == 0)) || (cmd->flags.paused != 0)) { + cmd->position_for_ee = cmd->clocka; + if (sibling == (ISO_VAGCommand*)0x0) { + return 0; + } + sibling->position_for_ee = sibling->clocka; + return 0; + } + if (cmd->flags.stereo_secondary != 0) { + cmd->position_for_ee = cmd->clocka; + return 0; + } + // CpuSuspendIntr(local_20); + uVar1 = GetSpuRamAddress(cmd); + uVar5 = 0; + // lg::info("offset is {}, {} - {}\n", uVar1 - cmd->stream_sram, uVar1, cmd->stream_sram); + uVar1 = uVar1 - cmd->stream_sram; + if (sibling != (ISO_VAGCommand*)0x0) { + uVar5 = GetSpuRamAddress(sibling); + uVar5 = uVar5 - sibling->stream_sram; + } + // CpuResumeIntr(local_20[0]); + if (sibling != (ISO_VAGCommand*)0x0) { + if (((uVar1 < 0x4000) && (uVar5 < 0x4000)) && + ((cmd->flags.bit20 == 0 && (sibling->flags.bit20 == 0)))) { + iVar2 = (int)((uVar1 - uVar5) * 0x40000) >> 0x12; + if (iVar2 < 0) { + iVar2 = -iVar2; + } + if (4 < iVar2) { + PauseVAG(cmd); + uVar1 = cmd->current_spu_address - cmd->stream_sram; + uVar5 = sibling->current_spu_address - sibling->stream_sram; + UnPauseVAG(cmd); + } + } + if (sibling == (ISO_VAGCommand*)0x0) + goto LAB_00011010; + // CpuSuspendIntr(local_20); + // lg::info("inner values are: {} {}", uVar1, uVar5); + if ((0x4000 < uVar1) && (cmd->flags.bit20 == 0)) { + cmd->flags.bit20 = 1; + cmd->flags.bit21 = 0; + cmd->flags.bit22 = 0; + sibling->flags.bit20 = 1; + sibling->flags.bit21 = 0; + sibling->flags.bit22 = 0; + } + if (uVar5 < 0x4001) { + if (uVar1 < 0x2000) { + if (cmd->flags.bit21 == 0) { + cmd->unk_gvsp_cntr = cmd->unk_gvsp_cntr + 1; + cmd->flags.bit21 = 1; + cmd->flags.bit22 = 0; + LAB_000109b8: + cmd->flags.bit20 = 0; + } + } else { + if (cmd->flags.bit22 == 0) { + cmd->unk_gvsp_cntr = cmd->unk_gvsp_cntr + 1; + cmd->flags.bit22 = 1; + cmd->flags.bit21 = 0; + goto LAB_000109b8; + } + } + if (uVar5 < 0x2000) { + if (sibling->flags.bit21 == 0) { + sibling->unk_gvsp_cntr = sibling->unk_gvsp_cntr + 1; + sibling->flags.bit21 = 1; + sibling->flags.bit22 = 0; + LAB_00010a1c: + sibling->flags.bit20 = 0; + } + } else { + if (sibling->flags.bit22 == 0) { + sibling->unk_gvsp_cntr = sibling->unk_gvsp_cntr + 1; + sibling->flags.bit22 = 1; + sibling->flags.bit21 = 0; + goto LAB_00010a1c; + } + } + } else { + if (sibling->flags.bit20 == 0) { + cmd->flags.bit20 = 1; + cmd->flags.bit21 = 0; + cmd->flags.bit22 = 0; + sibling->flags.bit20 = 1; + sibling->flags.bit21 = 0; + sibling->flags.bit22 = 0; + } + } + // lg::info("bits are {} {} {}\n", cmd->flags.bit20, cmd->flags.bit21, cmd->flags.bit22); + // CpuResumeIntr(local_20[0]); + if (cmd->unk_gvsp_flag != 0) + goto switchD_00010a60_caseD_1; + + // lg::info("switching {}", cmd->unk_gvsp_state2); + switch (cmd->unk_gvsp_state2) { + case 0: + if ((((cmd->flags.dma_complete_even_chunk_count == 0) || (cmd->flags.bit21 == 0)) || + (sibling->flags.dma_complete_even_chunk_count == 0)) || + (sibling->flags.bit21 == 0)) + goto switchD_00010a60_caseD_1; + cmd->flags.dma_complete_even_chunk_count = 0; + cmd->unk_gvsp_state2 = 2; + sibling->flags.dma_complete_even_chunk_count = 0; + sibling->unk_gvsp_state2 = 2; + case 2: + if ((cmd->flags.dma_complete_odd_chunk_count == 0) || + (sibling->flags.dma_complete_odd_chunk_count == 0)) { + if ((cmd->flags.bit20 != 0) || (sibling->flags.bit20 != 0)) { + uVar1 = 0x2000; + uVar5 = 0x2000; + cmd->flags.bit17 = 1; + cmd->flags.bit16 = 0; + cmd->unk_gvsp_state2 = 4; + sibling->flags.bit17 = 1; + sibling->unk_gvsp_state2 = 4; + LAB_00010efc: + sibling->flags.bit16 = 0; + } + goto switchD_00010a60_caseD_1; + } + if ((cmd->flags.bit20 == 0) && (sibling->flags.bit20 == 0)) { + BlockUntilVoiceSafe(cmd->voice, 0xf00); + BlockUntilVoiceSafe(sibling->voice, 0xf00); + // CpuSuspendIntr(local_20); + // lg::info("sax case 1 (stream)"); + sceSdSetAddr(cmd->voice | 0x2140, cmd->stream_sram + 0x2000); + sceSdSetAddr(sibling->voice | 0x2140, sibling->stream_sram + 0x2000); + iVar2 = 3; + cmd->flags.bit15 = 1; + cmd->flags.bit14 = 0; + cmd->flags.bit13 = 0; + sibling->flags.bit15 = 1; + sibling->flags.bit14 = 0; + LAB_00010d78: + sibling->flags.bit13 = 0; + LAB_00010e78: + cmd->unk_gvsp_state2 = iVar2; + sibling->unk_gvsp_state2 = iVar2; + // CpuResumeIntr(local_20[0]); + goto switchD_00010a60_caseD_1; + } + LAB_00010bc4: + RestartVag(cmd, 1); + uVar1 = 0x2000; + iVar2 = 9; + uVar5 = 0x2000; + break; + default: + goto switchD_00010a60_caseD_1; + case 3: + // lg::info("case 3 bits: ({} {}) ({} {})\n", cmd->flags.bit20, cmd->flags.bit22, + // sibling->flags.bit20, sibling->flags.bit22); + if ((cmd->flags.bit20 != 0) || (sibling->flags.bit20 != 0)) + goto LAB_00010bc4; + if ((cmd->flags.bit22 == 0) || (sibling->flags.bit22 == 0)) + goto switchD_00010a60_caseD_1; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + BlockUntilVoiceSafe(sibling->voice, 0xf00); + // CpuSuspendIntr(local_20); + // lg::info("sax case 2 (trap)"); + sceSdSetAddr(cmd->voice | 0x2140, cmd->trap_sram); + sceSdSetAddr(sibling->voice | 0x2140, sibling->trap_sram); + iVar2 = 5; + cmd->flags.bit13 = 1; + cmd->flags.bit14 = 0; + cmd->flags.bit15 = 0; + sibling->flags.bit13 = 1; + sibling->flags.bit14 = 0; + sibling->flags.bit15 = 0; + cmd->flags.dma_complete_odd_chunk_count = 0; + sibling->flags.dma_complete_odd_chunk_count = 0; + goto LAB_00010e78; + case 4: + uVar1 = cmd->unk_gvsp_len; + uVar5 = sibling->unk_gvsp_len; + if ((cmd->flags.dma_complete_odd_chunk_count == 0) || + (sibling->flags.dma_complete_odd_chunk_count == 0)) + goto switchD_00010a60_caseD_1; + RestartVag(cmd, 1); + iVar2 = 9; + break; + case 5: + if ((cmd->flags.dma_complete_even_chunk_count == 0) || + (sibling->flags.dma_complete_even_chunk_count == 0)) { + if (cmd->flags.bit20 == 0) + goto switchD_00010a60_caseD_1; + cmd->flags.bit16 = 1; + cmd->flags.bit17 = 0; + cmd->unk_gvsp_state2 = 7; + uVar1 = 0x4000; + uVar5 = 0x4000; + sibling->flags.bit16 = 1; + sibling->unk_gvsp_state2 = 7; + goto LAB_00010db0; + } + if ((cmd->flags.bit20 != 0) || (sibling->flags.bit20 != 0)) + goto LAB_00010dd8; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + BlockUntilVoiceSafe(sibling->voice, 0xf00); + // CpuSuspendIntr(local_20); + // lg::info("sax case 3 (stream)"); + sceSdSetAddr(cmd->voice | 0x2140, cmd->stream_sram); + sceSdSetAddr(sibling->voice | 0x2140, sibling->stream_sram); + iVar2 = 6; + cmd->flags.bit14 = 1; + cmd->flags.bit15 = 0; + cmd->flags.bit13 = 0; + sibling->flags.bit14 = 1; + sibling->flags.bit15 = 0; + goto LAB_00010d78; + case 6: + if ((cmd->flags.bit20 == 0) && (sibling->flags.bit20 == 0)) { + if ((cmd->flags.bit21 == 0) || (sibling->flags.bit21 == 0)) + goto switchD_00010a60_caseD_1; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + BlockUntilVoiceSafe(sibling->voice, 0xf00); + // CpuSuspendIntr(local_20); + // lg::info("sax case 4 (trap)"); + sceSdSetAddr(cmd->voice | 0x2140, cmd->trap_sram); + sceSdSetAddr(sibling->voice | 0x2140, sibling->trap_sram); + cmd->flags.bit13 = 1; + cmd->flags.bit14 = 0; + cmd->flags.bit15 = 0; + iVar2 = 2; + sibling->flags.bit13 = 1; + sibling->flags.bit14 = 0; + sibling->flags.bit15 = 0; + cmd->flags.dma_complete_even_chunk_count = 0; + sibling->flags.dma_complete_even_chunk_count = 0; + goto LAB_00010e78; + } + LAB_00010dd8: + RestartVag(cmd, 0); + uVar1 = 0x4000; + iVar2 = 8; + uVar5 = 0x4000; + break; + case 7: + uVar1 = cmd->unk_gvsp_len; + uVar5 = uVar1; + if ((cmd->flags.dma_complete_even_chunk_count == 0) || + (uVar5 = uVar1, sibling->flags.dma_complete_even_chunk_count == 0)) + goto switchD_00010a60_caseD_1; + RestartVag(cmd, 0); + iVar2 = 8; + uVar5 = uVar1; + break; + case 8: + if ((cmd->flags.bit21 == 0) || (sibling->flags.bit21 == 0)) { + uVar1 = cmd->unk_gvsp_len; + uVar5 = uVar1; + goto switchD_00010a60_caseD_1; + } + cmd->unk_gvsp_state2 = 6; + cmd->flags.bit16 = 0; + sibling->unk_gvsp_state2 = 6; + goto LAB_00010efc; + case 9: + if ((cmd->flags.bit22 == 0) || (sibling->flags.bit22 == 0)) { + uVar1 = cmd->unk_gvsp_len; + uVar5 = sibling->unk_gvsp_len; + goto switchD_00010a60_caseD_1; + } + cmd->unk_gvsp_state2 = 3; + cmd->flags.bit17 = 0; + sibling->unk_gvsp_state2 = 3; + LAB_00010db0: + sibling->flags.bit17 = 0; + goto switchD_00010a60_caseD_1; + } + cmd->unk_gvsp_state2 = iVar2; + sibling->unk_gvsp_state2 = iVar2; + switchD_00010a60_caseD_1: + if (cmd->unk_gvsp_cntr == 0) { + cmd->clockc = uVar1; + sibling->clockc = uVar1; + } else { + iVar2 = sibling->unk_gvsp_cntr; + cmd->clockc = uVar1 + cmd->unk_gvsp_cntr * 0x2000 + -0x2000; + sibling->clockc = uVar5 + iVar2 * 0x2000 + -0x2000; + if (0x2000 < uVar1) { + cmd->clockc = cmd->clockc + -0x2000; + } + if (0x2000 < uVar5) { + sibling->clockc = sibling->clockc + -0x2000; + } + } + uVar4 = cmd->vag_file_rate; + if (uVar4 == 0) { + uVar3 = 0; + } else { + uVar3 = (u32)(cmd->clockc * 0x1c0) / uVar4; + if (uVar4 == 0) { + ASSERT_NOT_REACHED(); + } + } + iVar2 = sibling->clockc; + uVar4 = sibling->vag_file_rate; + cmd->unk_gvsp_len = uVar1; + cmd->position_for_ee = uVar3 << 2; + cmd->clocka = uVar3 << 2; + if (uVar4 == 0) { + uVar1 = 0; + } else { + uVar1 = (u32)(iVar2 * 0x1c0) / uVar4; + if (uVar4 == 0) { + ASSERT_NOT_REACHED(); + } + } + sibling->unk_gvsp_len = uVar5; + sibling->position_for_ee = uVar1 << 2; + sibling->clocka = uVar1 << 2; + return 0; + } +LAB_00011010: + if (uVar1 < 0x4001) { + if (uVar1 < 0x2000) { + if (cmd->flags.bit21 == 0) { + cmd->unk_gvsp_cntr = cmd->unk_gvsp_cntr + 1; + cmd->flags.bit21 = 1; + cmd->flags.bit22 = 0; + LAB_00011098: + cmd->flags.bit20 = 0; + } + } else { + if (cmd->flags.bit22 == 0) { + cmd->unk_gvsp_cntr = cmd->unk_gvsp_cntr + 1; + cmd->flags.bit22 = 1; + cmd->flags.bit21 = 0; + goto LAB_00011098; + } + } + } else { + if (cmd->flags.bit20 == 0) { + cmd->flags.bit20 = 1; + cmd->flags.bit21 = 0; + cmd->flags.bit22 = 0; + } + } + if (cmd->unk_gvsp_flag != 0) + goto switchD_000110d0_caseD_1; + switch (cmd->unk_gvsp_state2) { + case 0: + if ((cmd->flags.dma_complete_even_chunk_count == 0) || (cmd->flags.bit21 == 0)) + goto switchD_000110d0_caseD_1; + cmd->unk_gvsp_state2 = 2; + cmd->flags.dma_complete_even_chunk_count = 0; + switchD_000110d0_caseD_2: + if (cmd->flags.dma_complete_odd_chunk_count == 0) { + if (cmd->flags.bit20 != 0) { + uVar1 = 0x2000; + iVar2 = 4; + cmd->flags.bit17 = 1; + LAB_00011368: + cmd->unk_gvsp_state2 = iVar2; + cmd->flags.bit16 = 0; + } + } else { + if (cmd->flags.bit20 == 0) { + BlockUntilVoiceSafe(cmd->voice, 0xf00); + // CpuSuspendIntr(local_20); + sceSdSetAddr(cmd->voice | 0x2140, cmd->stream_sram + 0x2000); + cmd->flags.bit15 = 1; + cmd->unk_gvsp_state2 = 3; + cmd->flags.bit14 = 0; + LAB_00011284: + cmd->flags.bit13 = 0; + LAB_00011324:; + // CpuResumeIntr(local_20[0]); + } else { + LAB_00011188: + RestartVag(cmd, 1); + uVar1 = 0x2000; + LAB_0001120c: + iVar2 = 9; + LAB_00011350: + cmd->unk_gvsp_state2 = iVar2; + } + } + switchD_000110d0_caseD_1: + if (cmd->unk_gvsp_cntr == 0) { + cmd->clockc = uVar1; + } else { + iVar2 = uVar1 + cmd->unk_gvsp_cntr * 0x2000; + cmd->clockc = iVar2 + -0x2000; + if (0x2000 < uVar1) { + cmd->clockc = iVar2 + -0x4000; + } + } + uVar5 = cmd->vag_file_rate; + if (uVar5 == 0) { + uVar4 = 0; + } else { + uVar4 = (u32)(cmd->clockc * 0x1c0) / uVar5; + if (uVar5 == 0) { + // trap(0x1c00); + ASSERT_NOT_REACHED(); + } + } + cmd->unk_gvsp_len = uVar1; + cmd->position_for_ee = uVar4 << 2; + cmd->clocka = uVar4 << 2; + return 0; + default: + goto switchD_000110d0_caseD_1; + case 2: + goto switchD_000110d0_caseD_2; + case 3: + if (cmd->flags.bit20 != 0) + goto LAB_00011188; + if (cmd->flags.bit22 == 0) + goto switchD_000110d0_caseD_1; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + // CpuSuspendIntr(local_20); + sceSdSetAddr(cmd->voice | 0x2140, cmd->trap_sram); + cmd->flags.bit13 = 1; + cmd->unk_gvsp_state2 = 5; + cmd->flags.bit14 = 0; + cmd->flags.bit15 = 0; + cmd->flags.dma_complete_odd_chunk_count = 0; + goto LAB_00011324; + case 4: + uVar1 = cmd->unk_gvsp_len; + if (cmd->flags.dma_complete_odd_chunk_count == 0) + goto switchD_000110d0_caseD_1; + RestartVag(cmd, 1); + goto LAB_0001120c; + case 5: + if (cmd->flags.dma_complete_even_chunk_count == 0) { + if (cmd->flags.bit20 == 0) + goto switchD_000110d0_caseD_1; + uVar1 = 0x4000; + cmd->flags.bit16 = 1; + iVar2 = 7; + goto LAB_000112a0; + } + if (cmd->flags.bit20 != 0) + goto LAB_000112bc; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + // CpuSuspendIntr(local_20); + sceSdSetAddr(cmd->voice | 0x2140, cmd->stream_sram); + cmd->flags.bit14 = 1; + cmd->unk_gvsp_state2 = 6; + cmd->flags.bit15 = 0; + goto LAB_00011284; + case 6: + if (cmd->flags.bit20 == 0) { + if (cmd->flags.bit21 == 0) + goto switchD_000110d0_caseD_1; + BlockUntilVoiceSafe(cmd->voice, 0xf00); + // CpuSuspendIntr(local_20); + sceSdSetAddr(cmd->voice | 0x2140, cmd->trap_sram); + cmd->flags.bit13 = 1; + cmd->unk_gvsp_state2 = 2; + cmd->flags.bit14 = 0; + cmd->flags.bit15 = 0; + cmd->flags.dma_complete_even_chunk_count = 0; + goto LAB_00011324; + } + LAB_000112bc: + RestartVag(cmd, 0); + uVar1 = 0x4000; + goto LAB_0001134c; + case 7: + uVar1 = cmd->unk_gvsp_len; + if (cmd->flags.dma_complete_even_chunk_count == 0) + goto switchD_000110d0_caseD_1; + RestartVag(cmd, 0); + LAB_0001134c: + iVar2 = 8; + goto LAB_00011350; + case 8: + iVar2 = 6; + if (cmd->flags.bit21 == 0) { + LAB_00011374: + uVar1 = cmd->unk_gvsp_len; + goto switchD_000110d0_caseD_1; + } + goto LAB_00011368; + case 9: + iVar2 = 3; + if (cmd->flags.bit22 == 0) + goto LAB_00011374; + LAB_000112a0: + cmd->unk_gvsp_state2 = iVar2; + cmd->flags.bit17 = 0; + goto switchD_000110d0_caseD_1; + } +} + +u32 CheckVAGStreamProgress(ISO_VAGCommand* cmd) { + u32 uVar1; + u32 last_offset_in_stream_sram; + ISO_VAGCommand* pIVar3; + + if (cmd->flags.file_disappeared == 0) { + if (cmd->flags.stereo_secondary != 0) { + return 1; + } + if (cmd->error != 0) { + return 0; + } + if ((cmd->flags.bit20 != 0) && (cmd->unk_gvsp_flag != 0)) { + return 0; + } + if (cmd->flags.saw_chunks1 == 0) { + return 1; + } + if (cmd->flags.paused != 0) { + return 1; + } + uVar1 = cmd->unk_spu_mem_offset; + pIVar3 = cmd->stereo_sibling; + last_offset_in_stream_sram = cmd->unk_gvsp_len; + if ((uVar1 < 0x4000) && (((last_offset_in_stream_sram < 0x2001 && (uVar1 < 0x2001)) || + ((0x1fff < last_offset_in_stream_sram && (0x1fff < uVar1)))))) { + if (uVar1 <= (last_offset_in_stream_sram & 0xfffffff0)) { + return 0; + } + // CpuSuspendIntr(local_18); + if ((cmd->unk_gvsp_flag == 0) && + (last_offset_in_stream_sram < (u32)cmd->unk_spu_mem_offset)) { + BlockUntilVoiceSafe(cmd->voice, 0xf00); + sceSdSetAddr(cmd->voice | 0x2140, cmd->stream_sram + cmd->unk_spu_mem_offset); + cmd->unk_gvsp_flag = 1; + if (pIVar3 != (ISO_VAGCommand*)0x0) { + BlockUntilVoiceSafe(pIVar3->voice, 0xf00); + sceSdSetAddr(pIVar3->voice | 0x2140, pIVar3->stream_sram + cmd->unk_spu_mem_offset); + pIVar3->unk_gvsp_flag = 1; + } + } + set_active_a(cmd, 0); + set_active_b(cmd, 0); + // CpuResumeIntr(local_18[0]); + return 1; + } + if (cmd->flags.saw_chunks1 == 0) { + return 1; + } + if (cmd->active_b != 0) { + return 1; + } + if (cmd->safe_to_modify_dma == 0) { + return 1; + } + if (cmd->unk_gvsp_flag != 0) { + return 1; + } + if (last_offset_in_stream_sram < 0x2000) { + uVar1 = cmd->num_isobuffered_chunks; + } else { + uVar1 = cmd->num_isobuffered_chunks ^ 1; + } + if ((uVar1 & 1) == 0) { + return 1; + } + + set_active_b(cmd, 1); + } + return 1; +} + +void StopVagStream(ISO_VAGCommand* cmd) { + ISO_VAGCommand* sibling; + VagStreamData vsd; + // undefined auStack72 [36]; + // int local_24; + // int local_20; + // undefined4 local_18 [2]; + + // CpuSuspendIntr(local_18); + sibling = cmd->stereo_sibling; + cmd->flags.saw_chunks1 = 0; + if (sibling != (ISO_VAGCommand*)0x0) { + sibling->flags.saw_chunks1 = 0; + } + if ((cmd->music_flag == 0) && (cmd->maybe_sound_handler != 0)) { + PauseVAG(cmd); + strncpy(vsd.name, cmd->name, 0x30); + vsd.id = cmd->id; + // RemoveVagStreamFromList(&vsd, &g_PluginStreamsList); + RemoveVagStreamFromList(&vsd, &g_EEPlayList); + // local_20 = cmd->plugin_id; + // local_24 = cmd->id; + // RemoveLfoStreamFromList(auStack72,&g_LfoStreamsList); + } else { + PauseVAG(cmd); + cmd->flags.stop = 1; + if (sibling != (ISO_VAGCommand*)0x0) { + PauseVAG(sibling); + cmd->flags.stop = 1; + } + } + // CpuResumeIntr(local_18[0]); +} + +void ProcessStreamData() { + EIsoStatus iVar2; + CBuffer* pCVar3; + ISO_VAGCommand* msg; + int iVar5; + ISO_VAGCommand** ppIVar6; + + WaitSema(g_nPriQueueSema); + if (gPriStack[1].count < 8) { + iVar5 = gPriStack[1].count + -1; + if (-1 < iVar5) { + ppIVar6 = (ISO_VAGCommand**)gPriStack[0].cmds + iVar5; + do { + msg = ppIVar6[9]; + if (msg != (ISO_VAGCommand*)0x0) { + // lg::warn("process stream data for {}, {} {} {}\n", msg->name, + // (msg->status == EIsoStatus::OK_2), (msg->active_b != 0), + // (msg->active_c != 0)); + if (((msg->status == EIsoStatus::OK_2) && (msg->active_b != 0)) && (msg->active_c != 0)) { + auto* file = msg->m_pBaseFile; + pCVar3 = &file->m_Buffer; + if (!file) { + pCVar3 = (CBuffer*)0x0; + } + if (((pCVar3 != (CBuffer*)0x0) && + (pCVar3->m_eBufferType != CBuffer::BufferType::EBT_FREE)) && + (msg->callback == ProcessVAGData)) { + iVar2 = ProcessVAGData(msg); + msg->status = iVar2; + if ((iVar2 != EIsoStatus::OK_2) && (msg->safe_to_modify_dma != 0)) { + ReleaseMessage(msg); + } + } + } + if (msg->status != EIsoStatus::OK_2) { + ReleaseMessage(msg); + } + } + iVar5 = iVar5 + -1; + ppIVar6 = ppIVar6 + -1; + } while (-1 < iVar5); + } + } + SignalSema(g_nPriQueueSema); +} + +void CheckVagStreamsProgress() { + int now; + int iVar1; + bool* flags; + int iVar2; + u32* times; + ISO_VAGCommand* cmd; + + if ((g_bVagCmdsInitialized != 0) && (g_bSoundEnable != 0)) { + now = GetSystemTimeLow(); + times = voice_key_times; + flags = voice_key_flags; + iVar2 = 0x2f; + do { + iVar2 = iVar2 + -1; + if ((*flags != 0) && (0x17ff < (u32)(*times - now))) { + *flags = 0; + } + flags = flags + 1; + times = times + 1; + } while (-1 < iVar2); + if ((g_bRecentlyKeyedVoice != 0) && (0x17ff < (u32)(g_nTimeOfLastVoiceKey - now))) { + g_bRecentlyKeyedVoice = 0; + } + iVar2 = 5; + ProcessStreamData(); + // CpuSuspendIntr(local_18); + cmd = g_aVagCmds; + do { + if (((cmd->flags.saw_chunks1 != 0) || + ((cmd->flags.running != 0 && (cmd->flags.file_disappeared != 0)))) || + ((cmd->active_b != 0 && (cmd->id != 0)))) { + iVar1 = CheckVAGStreamProgress(cmd); + if (iVar1 == 0) { + if (cmd->flags.stereo_secondary == 0) { + StopVagStream(cmd); + } + } else { + GetVAGStreamPos(cmd); + } + } + iVar2 = iVar2 + -1; + cmd = cmd + 1; + } while (-1 < iVar2); + // CpuResumeIntr(local_18[0]); + } +} + +void BlockUntilAllVoicesSafe() { + int now; + int last_time; + + last_time = g_nTimeOfLastVoiceKey; + if (g_bRecentlyKeyedVoice != 0) { + do { + now = GetSystemTimeLow(); + } while ((u32)(now - last_time) < 0x900); + } +} + +void BlockUntilVoiceSafe(int voice, u32 delay) { + int iVar1; + int iVar2; + + if (voice_key_flags[voice] != 0) { + iVar2 = voice_key_times[voice]; + do { + iVar1 = GetSystemTimeLow(); + } while ((u32)(iVar1 - iVar2) < delay); + } +} + +void MarkVoiceKeyedOnOff(int voice, u32 time) { + g_nTimeOfLastVoiceKey = time; + voice_key_times[voice] = time; + voice_key_flags[voice] = 1; + g_bRecentlyKeyedVoice = 1; +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/spustreams.h b/game/overlord/jak3/spustreams.h new file mode 100644 index 0000000000..1c292e3953 --- /dev/null +++ b/game/overlord/jak3/spustreams.h @@ -0,0 +1,14 @@ +#pragma once + +#include "common/common_types.h" + +#include "game/overlord/jak3/isocommon.h" + +namespace jak3 { +struct ISO_Hdr; +struct ISO_VAGCommand; +void jak3_overlord_init_globals_spustreams(); +EIsoStatus ProcessVAGData(ISO_Hdr* msg); +void StopVagStream(ISO_VAGCommand* cmd); +u32 GetSpuRamAddress(ISO_VAGCommand* cmd); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/srpc.cpp b/game/overlord/jak3/srpc.cpp new file mode 100644 index 0000000000..3df21824d4 --- /dev/null +++ b/game/overlord/jak3/srpc.cpp @@ -0,0 +1,604 @@ +#include "srpc.h" + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_api.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/rpc_interface.h" +#include "game/overlord/jak3/sbank.h" +#include "game/overlord/jak3/soundcommon.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/vag.h" +#include "game/overlord/jak3/vblank_handler.h" +#include "game/sce/iop.h" +#include "game/sound/sndshim.h" + +namespace jak3 { + +using namespace iop; + +// This file has two RPCs: PLAYER and LOADER +// Generally, PLAYER receives commands to play/pause sound effects or streams, which complete +// quickly. + +// LOADER will load soundbanks, and can take some time to complete - likely why it is moved +// into its own RPC, to avoid having soundbank loads block playback of other sounds. + +constexpr int kPlayerBufSize = 0x50 * 128; +static uint8_t s_anRPC_PlayerBuf[kPlayerBufSize]; + +constexpr int kLoaderBufSize = 0x50; +static uint8_t s_anRPC_LoaderBuf[kLoaderBufSize]; + +constexpr u32 kNumLanguages = 12; +static const char* languages[kNumLanguages] = {"ENG", "FRE", "GER", "SPA", "ITA", "COM", + "JAP", "KOR", "RUS", "POR", "DUT", "UKE"}; + +const char* g_pszLanguage = languages[0]; +u8 g_nFPS = 60; +SoundBankInfo* g_LoadingSoundBank = nullptr; + +void jak3_overlord_init_globals_srpc() { + g_nFPS = 60; + g_LoadingSoundBank = nullptr; + g_pszLanguage = languages[0]; +} + +u32 Thread_Player() { + sceSifQueueData dq; + sceSifServeData serve; + + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::Player, RPC_Player, &s_anRPC_PlayerBuf, kPlayerBufSize, nullptr, + nullptr, &dq); + + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} + +u32 Thread_Loader() { + sceSifQueueData dq; + sceSifServeData serve; + + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::Loader, RPC_Loader, &s_anRPC_LoaderBuf, kLoaderBufSize, nullptr, + nullptr, &dq); + + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} + +void* RPC_Player(unsigned int, void* msg, int size) { + if (!g_bSoundEnable) { + return nullptr; + } + + // const auto* cmd = (RPC_Player_Cmd*)msg; + ovrld_log(LogCategory::PLAYER_RPC, "Got Player RPC with {} cmds", size / kPlayerCommandStride); + const u8* m_ptr = (const u8*)msg; + const u8* end = m_ptr + size; + + for (; m_ptr < end; m_ptr += kPlayerCommandStride) { + switch (((const Rpc_Player_Base_Cmd*)m_ptr)->command) { + case SoundCommand::PLAY: { + const auto* cmd = (const Rpc_Player_Play_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[Player RPC] command PLAY {} id {}", cmd->name.data, + cmd->sound_id); + s32 id = cmd->sound_id; + if (id) { + auto* sound = LookupSound(id); + if (!sound) { + ovrld_log(LogCategory::PLAYER_RPC, "[Player RPC] allocating a new one"); + sound = AllocateSound(); + if (sound) { + SFXUserData user_val; + strcpy_toupper(sound->name.data, cmd->name.data); + sound->params = cmd->params; + sound->auto_time = 0; + s32 get_status = + snd_GetSoundUserData(nullptr, nullptr, -1, sound->name.data, &user_val); + s32 mask = sound->params.mask; + if ((mask & 8) == 0) { + sound->params.group = 0; + } + if ((mask & 0x40) == 0) { + if (get_status == 0 || user_val.data[0] == 0) { + sound->params.fo_min = 5; + } else { + sound->params.fo_min = (int16_t)user_val.data[0]; + } + } + if ((mask & 0x80) == 0) { + if (get_status == 0 || user_val.data[1] == 0) { + sound->params.fo_max = 0x1e; + } else { + sound->params.fo_max = (int16_t)user_val.data[1]; + } + } + if ((mask & 0x100) == 0) { + u32 fo_curve = 0; + if (get_status != 0) { + fo_curve = user_val.data[2]; + } + (sound->params).fo_curve = fo_curve; + } + (sound->params).fo_curve = GetFalloffCurve(sound->params.fo_curve); + auto handle = snd_PlaySoundByNameVolPanPMPB( + 0, 0, sound->name.data, GetVolume(sound), GetPan(sound), + (int)(sound->params).pitch_mod, (int)(sound->params).bend); + sound->id = id; + sound->sound_handle = handle; + if (handle != 0) { + if ((sound->params.mask & 0x800) != 0) { + snd_SetSoundReg(sound->sound_handle, 0, sound->params.reg[0]); + } + if ((sound->params.mask & 0x1000) != 0) { + snd_SetSoundReg(sound->sound_handle, 1, sound->params.reg[1]); + } + if ((sound->params.mask & 0x2000) != 0) { + snd_SetSoundReg(sound->sound_handle, 2, sound->params.reg[2]); + } + } + } + } else { + SFXUserData user_val; + sound->params = cmd->params; + s32 get_status = + snd_GetSoundUserData(nullptr, nullptr, -1, sound->name.data, &user_val); + s32 mask = (sound->params).mask; + if ((mask & 8) == 0) { + (sound->params).group = 0; + } + if ((mask & 0x40) == 0) { + if (get_status == 0 || user_val.data[0] == 0) { + (sound->params).fo_min = 5; + } else { + (sound->params).fo_min = user_val.data[0]; + } + } + if ((mask & 0x80) == 0) { + if (get_status == 0 || user_val.data[1] == 0) { + (sound->params).fo_max = 0x1e; + } else { + (sound->params).fo_max = user_val.data[1]; + } + } + if ((mask & 0x100) == 0) { + s8 fo_curve = 0; + if (get_status != 0) { + fo_curve = user_val.data[2]; + } + (sound->params).fo_curve = fo_curve; + } + (sound->params).fo_curve = GetFalloffCurve(sound->params.fo_curve); + UpdateVolume(sound); + snd_SetSoundPitchModifier(sound->sound_handle, (int)(sound->params).pitch_mod); + if (((sound->params).mask & 4) != 0) { + snd_SetSoundPitchBend(sound->sound_handle, (int)(sound->params).bend); + } + if (((sound->params).mask & 0x800) != 0) { + snd_SetSoundReg(sound->sound_handle, 0, sound->params.reg[0]); + } + if (((sound->params).mask & 0x1000) != 0) { + snd_SetSoundReg(sound->sound_handle, 1, (int)(char)(sound->params).reg[1]); + } + if (((sound->params).mask & 0x2000) != 0) { + snd_SetSoundReg(sound->sound_handle, 2, sound->params.reg[2]); + } + } + } + } break; + case SoundCommand::PAUSE_SOUND: { + const auto* cmd = (const Rpc_Player_Sound_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Pause Sound ID {}", cmd->sound_id); + if (cmd->sound_id) { + auto* sound = LookupSound(cmd->sound_id); + if (sound) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching Sound {} to pause", + sound->name.data); + snd_PauseSound(sound->sound_handle); + } else { + auto* vag = FindVagStreamId(cmd->sound_id); + if (vag) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching VAG {} to pause", + vag->name); + PauseVAG(vag); + } + } + } + } break; + case SoundCommand::STOP_SOUND: { + const auto* cmd = (const Rpc_Player_Sound_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] stop Sound ID {}", cmd->sound_id); + if (cmd->sound_id) { + auto* sound = LookupSound(cmd->sound_id); + if (sound) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching Sound {} to stop", + sound->name.data); + snd_StopSound(sound->sound_handle); + } else { + auto* vag = FindVagStreamId(cmd->sound_id); + if (vag) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching VAG {} to stop", + vag->name); + StopVagStream(vag); + } + } + } + } break; + case SoundCommand::CONTINUE_SOUND: { + const auto* cmd = (const Rpc_Player_Sound_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] continue Sound ID {}", cmd->sound_id); + if (cmd->sound_id) { + auto* sound = LookupSound(cmd->sound_id); + if (sound) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching Sound {} to continue", + sound->name.data); + snd_ContinueSound(sound->sound_handle); + } else { + auto* vag = FindVagStreamId(cmd->sound_id); + if (vag) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching VAG {} to continue", + vag->name); + UnPauseVAG(vag); + } + } + } + } break; + case SoundCommand::SET_PARAM: { + const auto* cmd = (const Rpc_Player_Set_Param_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] SET_PARAM Sound ID {}", cmd->sound_id); + if (cmd->sound_id) { + auto* sound = LookupSound(cmd->sound_id); + if (sound) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching Sound {} to SET_PARAM", + sound->name.data); + auto& params = cmd->params; + u16 mask = cmd->params.mask; + s32 atime = cmd->auto_time; + s32 afrom = cmd->auto_from; + if ((mask & 1) != 0) { + if ((mask & 0x10) == 0) { + sound->params.volume = params.volume; + } else { + sound->auto_time = atime; + sound->new_volume = params.volume; + } + } + if ((mask & 0x20) != 0) { + sound->params.trans[0] = params.trans[0]; + sound->params.trans[1] = params.trans[1]; + sound->params.trans[2] = params.trans[2]; + } + if ((mask & 0x21) != 0) { + UpdateVolume(sound); + } + if ((mask & 2) != 0) { + auto pitch_mod = params.pitch_mod; + sound->params.pitch_mod = pitch_mod; + if ((mask & 0x10) == 0) { + snd_SetSoundPitchModifier(sound->sound_handle, params.pitch_mod); + } else { + snd_AutoPitch(sound->sound_handle, pitch_mod, atime, afrom); + } + } + if ((mask & 4) != 0) { + auto bend = params.bend; + sound->params.bend = bend; + if ((mask & 0x10) == 0) { + snd_SetSoundPitchBend(sound->sound_handle, params.bend); + } else { + snd_AutoPitchBend(sound->sound_handle, (int)bend, atime, afrom); + } + } + if ((mask & 0x400) != 0) { + sound->params.priority = params.priority; + } + if ((mask & 8) != 0) { + sound->params.group = params.group; + } + if ((mask & 0x40) != 0) { + sound->params.fo_min = params.fo_min; + } + if ((mask & 0x80) != 0) { + sound->params.fo_max = params.fo_max; + } + if ((mask & 0x100) != 0) { + sound->params.fo_curve = GetFalloffCurve(params.fo_curve); + } + if ((mask & 0x800) != 0) { + sound->params.reg[0] = params.reg[0]; + snd_SetSoundReg(sound->sound_handle, 0, params.reg[0]); + } + if ((mask & 0x1000) != 0) { + sound->params.reg[1] = params.reg[1]; + snd_SetSoundReg(sound->sound_handle, 1, params.reg[1]); + } + if ((mask & 0x2000) != 0) { + sound->params.reg[2] = params.reg[2]; + snd_SetSoundReg(sound->sound_handle, 2, params.reg[2]); + } + } else { + auto* vag = FindVagStreamId(cmd->sound_id); + if (vag) { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Found matching VAG {} to SET_PARAM", + vag->name); + auto& params = cmd->params; + auto mask = params.mask; + if ((mask & 2) != 0) { + SetVAGStreamPitch(cmd->sound_id, params.pitch_mod); + } + if ((mask & 0x20) != 0) { + vag->trans[0] = params.trans[0]; + vag->trans[1] = params.trans[1]; + vag->trans[2] = params.trans[2]; + vag->updated_trans = 1; + } + if ((mask & 8) != 0) { + vag->play_group = params.group; + } + if ((mask & 0x40) != 0) { + vag->fo_min = (int)params.fo_min; + } + if ((mask & 0x80) != 0) { + vag->fo_max = (int)params.fo_max; + } + if ((mask & 0x100) != 0) { + vag->fo_curve = GetFalloffCurve(params.fo_curve); + } + if ((mask & 1) != 0) { + vag->play_volume = params.volume; + } + } + } + } + } break; + case SoundCommand::SET_MASTER_VOLUME: { + const auto* cmd = (const Rpc_Player_Set_Master_Volume_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Set Master Volume to {}", cmd->volume); + for (int i = 0; i < 17; i++) { + if (cmd->group & (1 << i)) { + g_anMasterVolume[i] = cmd->volume; + snd_SetMasterVolume(i, cmd->volume); + SetAllVagsVol(i); + } + } + } break; + case SoundCommand::PAUSE_GROUP: { + const auto* cmd = (const Rpc_Player_Group_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Pause groups 0b{:b}", cmd->group); + snd_PauseAllSoundsInGroup(cmd->group); + if (cmd->group & 4) { + PauseVAGStreams(); + } + if (cmd->group & 2) { + g_bMusicPause = true; + } + } break; + case SoundCommand::STOP_GROUP: { + const auto* cmd = (const Rpc_Player_Group_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Stop groups 0b{:b}", cmd->group); + KillSoundsInGroup(cmd->group); + if (cmd->group & 4) { + ISO_VAGCommand vag_cmd; + vag_cmd.msg_type = ISO_Hdr::MsgType::VAG_STOP; // seems unsupported by iso thread. + vag_cmd.mbox_reply = 0; + vag_cmd.thread_to_wake = 0; + vag_cmd.vag_dir_entry = nullptr; + vag_cmd.name[0] = 0; + vag_cmd.maybe_sound_handler = 0; + vag_cmd.id = 0; + vag_cmd.priority_pq = 0; + StopVagStream(&vag_cmd); + } + } break; + case SoundCommand::CONTINUE_GROUP: { + const auto* cmd = (const Rpc_Player_Group_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Continue groups 0b{:b}", cmd->group); + snd_ContinueAllSoundsInGroup(cmd->group); + if (cmd->group & 4) { + UnpauseVAGStreams(); + } + if (cmd->group & 2) { + g_bMusicPause = false; + } + } break; + case SoundCommand::SET_REVERB: { + ovrld_log(LogCategory::WARN, "[RPC Player] Unimplemented set reverb."); + } break; + case SoundCommand::SET_EAR_TRANS: { + const auto* cmd = (const Rpc_Player_Set_Ear_Trans_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] set ear trans"); + SetEarTrans(cmd->ear_trans0, cmd->ear_trans1, cmd->ear_trans, cmd->cam_forward, + cmd->cam_left, cmd->cam_scale, (cmd->cam_inverted != 0)); + } break; + case SoundCommand::SHUTDOWN: { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] Shutdown!"); + WaitSema(g_n989Semaphore); + if (g_bSoundEnable) { + g_bSoundEnable = false; + snd_StopSoundSystem(); + } + SignalSema(g_n989Semaphore); + } break; + case SoundCommand::SET_FPS: { + const auto* cmd = (const Rpc_Player_Set_Fps_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] set fps {}", (int)cmd->fps); + g_nFPS = cmd->fps; + } break; + case SoundCommand::CANCEL_DGO: { + const auto* cmd = (const Rpc_Player_Cancel_Dgo_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Player] cancel dgo {}", cmd->id); + CancelDGONoSync(cmd->id); + } break; + case SoundCommand::SET_MIDI_REG: + // this is what the real overlord does - just ignore it! + break; + default: + ovrld_log(LogCategory::WARN, "[RPC Player] Unsupported Player {}", + (int)((const Rpc_Player_Base_Cmd*)m_ptr)->command); + ASSERT_NOT_REACHED(); + } + } + + return nullptr; +} + +void* RPC_Loader(unsigned int, void* msg, int size) { + if (!g_bSoundEnable) { + return nullptr; + } + + // const auto* cmd = (RPC_Player_Cmd*)msg; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got Loader RPC with {} cmds", + size / kLoaderCommandStride); + u8* m_ptr = (u8*)msg; + const u8* end = m_ptr + size; + + for (; m_ptr < end; m_ptr += kLoaderCommandStride) { + switch (((const Rpc_Player_Base_Cmd*)m_ptr)->command) { + case SoundCommand::LOAD_BANK: { + auto* cmd = (const Rpc_Loader_Load_Bank_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got sound bank load command: {}", + cmd->bank_name.data); + // src = &cmd->bank_name; + if (!LookupBank(cmd->bank_name.data)) { + auto* info = AllocateBankName(cmd->bank_name.data, cmd->mode); + if (info) { + strncpyz(info->m_name1, cmd->bank_name.data, 0x10); + info->in_use = 1; + info->unk0 = 0; + g_LoadingSoundBank = info; + if (LoadSoundBankToIOP(cmd->bank_name.data, info, cmd->priority) == 0) { + info->loaded = 1; + } else { + info->loaded = 0; + info->in_use = 0; + } + g_LoadingSoundBank = nullptr; + } + } + } break; + case SoundCommand::LOAD_MUSIC: { + auto* cmd = (const Rpc_Loader_Bank_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got music load command: {}", + cmd->bank_name.data); + + // lock + u32 wait_status = 1; + while (wait_status) { + wait_status = WaitSema(g_nMusicSemaphore); + } + + // set music name + if ((cmd->bank_name).data[0] == 0) { + g_szTargetMusicName[0] = 0; + } else { + strcpy(g_szTargetMusicName, cmd->bank_name.data); + } + + // release + SignalSema(g_nMusicSemaphore); + } break; + + case SoundCommand::UNLOAD_BANK: { + auto* cmd = (const Rpc_Loader_Bank_Cmd*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got bank load unload command: {}", + cmd->bank_name.data); + SoundBankInfo* ifno = LookupBank(cmd->bank_name.data); + if (ifno) { + auto snd_handle = ifno->snd_handle; + ifno->snd_handle = nullptr; + if (ifno->unk0 == 0) { + ifno->in_use = 0; + } + ifno->mode = 0; + ifno->loaded = 0; + snd_UnloadBank(snd_handle); + snd_ResolveBankXREFS(); + } + } break; + + case SoundCommand::GET_IRX_VERSION: { + auto* cmd = (Rpc_Loader_Get_Irx_Version*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got IRX version command"); + g_nInfoEE = cmd->ee_addr; + cmd->major = 4; + cmd->minor = 0; + return cmd; + } break; + + case SoundCommand::SET_LANGUAGE: { + auto* cmd = (Rpc_Loader_Set_Language*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got set language command {}", cmd->lang); + ASSERT(cmd->lang < kNumLanguages); + g_pszLanguage = languages[cmd->lang]; + } break; + + case SoundCommand::UNLOAD_MUSIC: { + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got unload music command"); + + // lock + u32 wait_status = 1; + while (wait_status) { + wait_status = WaitSema(g_nMusicSemaphore); + } + + // set music name + g_szTargetMusicName[0] = 0; + + // release + SignalSema(g_nMusicSemaphore); + } break; + + case SoundCommand::SET_STEREO_MODE: { + auto* cmd = (Rpc_Loader_Set_Stereo_Mode*)m_ptr; + ovrld_log(LogCategory::PLAYER_RPC, "[RPC Loader] Got set stereo command {}", cmd->mode); + + switch (cmd->mode) { + case 0: + SetPlaybackMode(1); + break; + case 1: + SetPlaybackMode(2); + break; + case 2: + SetPlaybackMode(0); + break; + default: + ASSERT_NOT_REACHED(); + } + } break; + + default: + ovrld_log(LogCategory::WARN, "[RPC Loader] Unsupported Loader {}", + (int)((const Rpc_Player_Base_Cmd*)m_ptr)->command); + ASSERT_NOT_REACHED(); + break; + } + } + return nullptr; +} + +void SetVagStreamName(ISO_VAGCommand* cmd, int len) { + ASSERT(cmd); + if (!cmd->music_flag && cmd->info_idx < 4) { + if (!len) { + g_SRPCSoundIOPInfo.stream_name[cmd->info_idx].chars[0] = 0; + } else { + strncpy(g_SRPCSoundIOPInfo.stream_name[cmd->info_idx].chars, cmd->name, 0x30); + } + } else { + // ASSERT_NOT_REACHED(); + } +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/srpc.h b/game/overlord/jak3/srpc.h new file mode 100644 index 0000000000..48fe12a26e --- /dev/null +++ b/game/overlord/jak3/srpc.h @@ -0,0 +1,16 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_srpc(); +u32 Thread_Player(); +u32 Thread_Loader(); +struct ISO_VAGCommand; +void SetVagStreamName(ISO_VAGCommand* cmd, int len); +void* RPC_Player(unsigned int fno, void* msg, int size); +void* RPC_Loader(unsigned int fno, void* msg, int size); +extern const char* g_pszLanguage; +extern u8 g_nFPS; + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/ssound.cpp b/game/overlord/jak3/ssound.cpp new file mode 100644 index 0000000000..b1f21aef0e --- /dev/null +++ b/game/overlord/jak3/ssound.cpp @@ -0,0 +1,995 @@ +#include "ssound.h" + +#include + +#include "common/util/Assert.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" +#include "game/sound/sdshim.h" +#include "game/sound/sndshim.h" + +namespace jak3 { + +struct Curve { + s32 a, b, c, d; +}; + +constexpr int kNumSounds = 0x40; + +using namespace iop; +s32 g_n989Semaphore = -1; +s32 g_EarTransSema = -1; +bool g_bSoundEnable = true; +u32 g_anStreamVoice[6]; +VolumePair g_aPanTable[361]; +SoundInfo gSounds[kNumSounds]; +s32 gEarTrans[6]; +s32 gCamTrans[3]; +s32 gCamForward[3]; +s32 gCamLeft[3]; +s32 gCamScale; +Curve gCurves[0x29]; +std::array unktable; +bool g_CameraInvert = false; +u32 gLastTick = 0; + +static s32 sqrt_table[256] = { + 0, 4096, 5793, 7094, 8192, 9159, 10033, 10837, 11585, 12288, 12953, 13585, 14189, + 14768, 15326, 15864, 16384, 16888, 17378, 17854, 18318, 18770, 19212, 19644, 20066, 20480, + 20886, 21283, 21674, 22058, 22435, 22806, 23170, 23530, 23884, 24232, 24576, 24915, 25249, + 25580, 25905, 26227, 26545, 26859, 27170, 27477, 27780, 28081, 28378, 28672, 28963, 29251, + 29537, 29819, 30099, 30377, 30652, 30924, 31194, 31462, 31727, 31991, 32252, 32511, 32768, + 33023, 33276, 33527, 33776, 34024, 34270, 34514, 34756, 34996, 35235, 35472, 35708, 35942, + 36175, 36406, 36636, 36864, 37091, 37316, 37540, 37763, 37985, 38205, 38424, 38642, 38858, + 39073, 39287, 39500, 39712, 39923, 40132, 40341, 40548, 40755, 40960, 41164, 41368, 41570, + 41771, 41972, 42171, 42369, 42567, 42763, 42959, 43154, 43348, 43541, 43733, 43925, 44115, + 44305, 44494, 44682, 44869, 45056, 45242, 45427, 45611, 45795, 45977, 46160, 46341, 46522, + 46702, 46881, 47059, 47237, 47415, 47591, 47767, 47942, 48117, 48291, 48465, 48637, 48809, + 48981, 49152, 49322, 49492, 49661, 49830, 49998, 50166, 50332, 50499, 50665, 50830, 50995, + 51159, 51323, 51486, 51649, 51811, 51972, 52134, 52294, 52454, 52614, 52773, 52932, 53090, + 53248, 53405, 53562, 53719, 53874, 54030, 54185, 54340, 54494, 54647, 54801, 54954, 55106, + 55258, 55410, 55561, 55712, 55862, 56012, 56162, 56311, 56459, 56608, 56756, 56903, 57051, + 57198, 57344, 57490, 57636, 57781, 57926, 58071, 58215, 58359, 58503, 58646, 58789, 58931, + 59073, 59215, 59357, 59498, 59639, 59779, 59919, 60059, 60199, 60338, 60477, 60615, 60753, + 60891, 61029, 61166, 61303, 61440, 61576, 61712, 61848, 61984, 62119, 62254, 62388, 62523, + 62657, 62790, 62924, 63057, 63190, 63323, 63455, 63587, 63719, 63850, 63982, 64113, 64243, + 64374, 64504, 64634, 64763, 64893, 65022, 65151, 65279, 65408, +}; + +void jak3_overlord_init_globals_ssound() { + g_bSoundEnable = true; + g_n989Semaphore = -1; + g_EarTransSema = -1; + for (auto& x : g_anStreamVoice) { + x = 0; + } + for (auto& x : gSounds) { + x = {}; + } + unktable.fill(0); + g_CameraInvert = false; + gLastTick = 0; +} +void InitSound() { + for (auto& sound : gSounds) { + sound.id = 0; + } + + int j = 0; + do { + unktable[j] = 0; + unktable[j + 0x2c] = 0; + unktable[j + 0x58] = 0; + unktable[j + 0x84] = 0; + unktable[j + 0xb0] = 0; + j = j + 1; + } while (j < 0x29); + + SetCurve(0, 0, 0, 1, 0, 0, 0, 0); + SetCurve(1, 0, 0, 0, 0, 0, 1, 0); + SetCurve(2, 0, 0, 1, 0, 0, 0, 0); + SetCurve(3, 0x1000, 0, 1, 0, 0, 0, 0); + SetCurve(4, 0, 0x1000, 1, 0, 0, 0, 0); + SetCurve(5, 0x800, 0, 1, 0, 0, 0, 0); + SetCurve(6, 0x800, 0x800, 1, 0, 0, 0, 0); + SetCurve(7, 0xfffff000, 0, 1, 0, 0, 0, 0); + SetCurve(8, 0xfffff800, 0, 1, 0, 0, 0, 0); + SetCurve(9, 0, 0, 1, 0, 0, 0, 0); + SetCurve(10, 0, 0, 0, 0, 0, 0, 0); + SetCurve(0xb, 0, 0, 1, 0, 0, 0, 0); + SetCurve(0xc, 0, 0, 1, 0, 1, 0, 0); + SetCurve(0xd, 0x1000, 0, 1, 0, 1, 0, 0); + SetCurve(0xe, 0, 0x1000, 1, 0, 1, 0, 0); + SetCurve(0xf, 0x800, 0, 1, 0, 1, 0, 0); + SetCurve(0x10, 0x800, 0x800, 1, 0, 1, 0, 0); + SetCurve(0x11, 0xfffff000, 0, 1, 0, 1, 0, 0); + SetCurve(0x12, 0xfffff800, 0, 1, 0, 1, 0, 0); + SetCurve(0x13, 0, 0, 0, 0, 1, 0, 0); + SetCurve(0x14, 0, 0, 0, 0, 0, 1, 1); + SetCurve(0x15, 0, 0, 1, 0, 0, 0, 1); + SetCurve(0x16, 0x1000, 0, 1, 0, 0, 0, 1); + SetCurve(0x17, 0, 0x1000, 1, 0, 0, 0, 1); + SetCurve(0x18, 0x800, 0, 1, 0, 0, 0, 1); + SetCurve(0x19, 0x800, 0x800, 1, 0, 0, 0, 1); + SetCurve(0x1a, 0xfffff000, 0, 1, 0, 0, 0, 1); + SetCurve(0x1b, 0xfffff800, 0, 1, 0, 0, 0, 1); + SetCurve(0x1c, 0, 0, 1, 0, 0, 0, 1); + SetCurve(0x1d, 0, 0, 0, 0, 0, 0, 1); + SetCurve(0x1e, 0, 0, 1, 0, 0, 0, 1); + SetCurve(0x1f, 0, 0, 1, 0, 1, 0, 1); + SetCurve(0x20, 0x1000, 0, 1, 0, 1, 0, 1); + SetCurve(0x21, 0, 0x1000, 1, 0, 1, 0, 1); + SetCurve(0x22, 0x800, 0, 1, 0, 1, 0, 1); + SetCurve(0x23, 0x800, 0x800, 1, 0, 1, 0, 1); + SetCurve(0x24, 0xfffff000, 0, 1, 0, 1, 0, 1); + SetCurve(0x25, 0xfffff800, 0, 1, 0, 1, 0, 1); + SetCurve(0x26, 0, 0, 0, 0, 1, 0, 1); + SetCurve(0x27, 0, 0, 1, 1, 0, 1, 0); + SetCurve(0x28, 0, 0, 1, 1, 0, 1, 1); + + // changed + // snd_StartSoundSystemEx(2); + snd_StartSoundSystem(); + + // iVar4 = 5; + // snd_RegisterIOPMemAllocator(FUN_0000dc7c,FUN_0000de84); + // snd_LockVoiceAllocatorEx(1,0x12345678); + // piVar1 = g_anStreamVoice; + // do { + // iVar2 = snd_ExternVoiceAlloc(2,0x7f); + // iVar4 = iVar4 + -1; + // *piVar1 = iVar2 * 2 + ((iVar2 / 6 + (iVar2 >> 0x1f) >> 2) - (iVar2 >> 0x1f)) * -0x2f; + // piVar1 = piVar1 + 1; + // } while (-1 < iVar4); + + g_anStreamVoice[0] = SD_VOICE(0, 0); + g_anStreamVoice[1] = SD_VOICE(0, 1); + g_anStreamVoice[2] = SD_VOICE(0, 2); + g_anStreamVoice[3] = SD_VOICE(0, 3); + g_anStreamVoice[4] = SD_VOICE(0, 4); + g_anStreamVoice[5] = SD_VOICE(0, 5); + + // snd_UnlockVoiceAllocator(); + // snd_SetMixerMode(0,0); + // iVar4 = 0; + // do { + // iVar2 = iVar4 + 1; + // snd_SetGroupVoiceRange(iVar4,6,0x2f); + // iVar4 = iVar2; + // } while (iVar2 < 0xe); + // snd_SetGroupVoiceRange(2,0,5); + + // what is this even doing. + // sceSdGetAddr(0x1c00); + // sceSdGetAddr(0x1d00); + // sceSdGetAddr(0x1c01); + // sceSdGetAddr(0x1d01); + // CpuSuspendIntr(local_18); + // sceSdSetAddr(0,0); + // sceSdSetAddr(1,0); + // sceSdSetAddr(0,0xff); + // sceSdSetAddr(1,0xff); + // CpuResumeIntr(local_18[0]); + + // uVar3 = sceSdGetAddr(0x1c01); + // snd_SRAMMarkUsed(uVar3,0x7000); + // uVar3 = sceSdGetAddr(0x1c00); + // snd_SRAMMarkUsed(uVar3,0x7000); + // local_3c = 0x104; + // local_36 = 0xa7b; + // local_38 = 0xa7b; + // g_nCore1ReverbMode = 4; + // g_nCore0ReverbMode = 4; + // local_34 = 0; + // local_30 = 0; + // local_40 = 0; + // sceSdSetEffectAttr(0, &local_40); + // local_40 = 1; + // sceSdSetEffectAttr(1, &local_40); + // maybe_sceSdSetCoreAttr(2, 1); + // maybe_sceSdSetCoreAttr(3, 1); + + // TODO: this is possibly very wrong: + // g_aPanTable = snd_GetPanTable(); + for (int i = 0; i < 91; i++) { + s16 opposing_front = static_cast(((i * 0x33ff) / 90) + 0xc00); + + s16 rear_right = static_cast(((i * -0x2800) / 90) + 0x3400); + s16 rear_left = static_cast(((i * -0xbff) / 90) + 0x3fff); + + g_aPanTable[90 - i].left = 0x3FFF; + g_aPanTable[180 - i].left = opposing_front; + g_aPanTable[270 - i].left = rear_right; + g_aPanTable[360 - i].left = rear_left; + + g_aPanTable[i].right = opposing_front; + g_aPanTable[90 + i].right = 0x3FFF; + g_aPanTable[180 + i].right = rear_left; + g_aPanTable[270 + i].right = rear_right; + } + + SetPlaybackMode(2); + + SemaParam param; + param.attr = 1; + param.init_count = 1; + param.max_count = 1; + param.option = 0; + g_nMusicSemaphore = CreateSema(¶m); + ASSERT(g_nMusicSemaphore >= 0); + param.attr = 1; + param.init_count = 1; + param.max_count = 1; + param.option = 0; + g_n989Semaphore = CreateSema(¶m); + ASSERT(g_n989Semaphore >= 0); + + param.max_count = 1; + param.attr = 1; + param.init_count = 1; + param.option = 0; + g_EarTransSema = CreateSema(¶m); + ASSERT(g_EarTransSema >= 0); + + // Init989Plugins(); + // InitStreamLfoHandler(); + // InitVagStreamList((List*)&g_PluginStreamsList, 4, s_plugin_00015918); + InitVagStreamList(&g_EEStreamsList, 4, "ee"); + InitVagStreamList(&g_EEPlayList, 8, "play"); + InitVagStreamList(&g_RequestedStreamsList, 8, "streams"); + InitVagStreamList(&g_NewStreamsList, 4, "new"); +} + +SoundInfo* LookupSound(int id) { + if (id == 0) { + return nullptr; + } + + for (auto& sound : gSounds) { + if (sound.id == id) { + s32 handle = snd_SoundIsStillPlaying(sound.sound_handle); + sound.sound_handle = handle; + if (handle) { + return &sound; + } else { + sound.id = 0; + return nullptr; + } + } + } + + return nullptr; +} + +void CleanSounds() { + for (auto& sound : gSounds) { + if (sound.id) { + s32 handle = snd_SoundIsStillPlaying(sound.sound_handle); + sound.sound_handle = handle; + if (handle == 0) { + sound.id = 0; + } + } + } +} + +void KillSoundsInGroup(u32 group) { + for (auto& sound : gSounds) { + if (sound.id) { + s32 handle = snd_SoundIsStillPlaying(sound.sound_handle); + sound.sound_handle = handle; + if (handle) { + if (sound.params.group & group) { + snd_StopSound(handle); + sound.id = 0; + } + } else { + sound.id = 0; + } + } + } +} + +void KillLeastUsefulSound() { + int unique_sounds = 0; + struct Entry { + u32 id; + u32 count; + SoundInfo* info; + }; + Entry entries[kNumSounds]; + Entry* best_entry = nullptr; + + for (auto& sound : gSounds) { + if (sound.id) { + Entry* existing_entry = nullptr; + u32 uid = snd_GetSoundID(sound.sound_handle); + + // look for entry: + for (int i = 0; i < unique_sounds; i++) { + if (entries[i].id == uid) { + existing_entry = &entries[i]; + break; + } + } + + // if none found, create + if (!existing_entry) { + existing_entry = &entries[unique_sounds]; + unique_sounds++; + existing_entry->id = uid; + existing_entry->count = 0; + existing_entry->info = &sound; + } + + // update + existing_entry->count++; + + // se if we're best + if (!best_entry) { + best_entry = existing_entry; + } else { + if (best_entry->count < existing_entry->count) { + best_entry = existing_entry; + } + } + + // update entry: + + // update best: + } + } + + if (best_entry) { + snd_StopSound(best_entry->info->sound_handle); + best_entry->info->id = 0; + } +} + +SoundInfo* AllocateSound() { + for (auto& sound : gSounds) { + if (!sound.id) { + return &sound; + } + } + + CleanSounds(); + for (auto& sound : gSounds) { + if (!sound.id) { + return &sound; + } + } + + KillLeastUsefulSound(); + + for (auto& sound : gSounds) { + if (!sound.id) { + return &sound; + } + } + + ASSERT_NOT_REACHED(); + return nullptr; +} + +u32 CalculateFalloffVolume(s32* trans, + u32 vol, + u32 fo_curve, + u32 fo_min, + u32 fo_max, + u32* outa, + u32* outb) { + ASSERT(fo_curve < 0x29); + // undefined4 uVar1; + u32 uVar2; + int iVar3; + int iVar4; + u32 uVar5; + int iVar6; + int iVar7; + int iVar8; + u32 uVar9; + u32 uVar10; + + uVar10 = 0; + WaitSema(g_EarTransSema); + if (outa) { + *outa = 0; + } + if (outb) { + *outb = 0; + } + if (unktable[fo_curve + 0x84] != 0) { + SignalSema(g_EarTransSema); + return vol; + } + if (unktable[fo_curve + 0x58] != 0) { + trans = gEarTrans + 3; + } + switch (fo_curve) { + case 9: + case 0xb: + case 0x1c: + case 0x1e: + iVar8 = gEarTrans[3] - *trans; + iVar3 = gEarTrans[4] - trans[1]; + iVar7 = gEarTrans[5] - trans[2]; + uVar2 = 3; + if (outa) { + LAB_0000d094: + *outa = uVar2; + } + break; + case 10: + case 0x13: + case 0x1d: + case 0x26: + iVar8 = 0; + iVar3 = gEarTrans[1] - trans[1]; + iVar7 = 0; + if (outa) { + *outa = 2; + } + goto LAB_0000d0a4; + default: + iVar8 = gEarTrans[0] - *trans; + iVar7 = gEarTrans[2] - trans[2]; + iVar3 = gEarTrans[1] - trans[1]; + if (outa) { + uVar2 = 1; + goto LAB_0000d094; + } + } + if (iVar8 < 0) { + iVar8 = -iVar8; + } +LAB_0000d0a4: + if (iVar3 < 0) { + iVar3 = -iVar3; + } + if (iVar7 < 0) { + iVar7 = -iVar7; + } + fo_min = fo_min << 8; + fo_max = fo_max << 8; + uVar9 = 0; + iVar6 = iVar3; + if (iVar3 < iVar7) { + iVar6 = iVar7; + } + iVar4 = fo_max; + if (fo_max < iVar8) { + iVar4 = iVar8; + } + if (iVar4 < iVar6) { + iVar4 = iVar6; + } + while (0x7fff < iVar4) { + fo_max = fo_max >> 1; + fo_min = fo_min >> 1; + iVar8 = iVar8 >> 1; + iVar3 = iVar3 >> 1; + iVar7 = iVar7 >> 1; + uVar9 = uVar9 + 1; + iVar4 = iVar4 >> 1; + } + if (gCamScale != 0x10000) { + iVar8 = iVar8 * gCamScale >> 0x10; + iVar3 = iVar3 * gCamScale >> 0x10; + iVar7 = iVar7 * gCamScale >> 0x10; + if (0x10000 < gCamScale) { + iVar6 = iVar3; + if (iVar3 < iVar7) { + iVar6 = iVar7; + } + iVar4 = fo_max; + if (fo_max < iVar8) { + iVar4 = iVar8; + } + if (iVar4 < iVar6) { + iVar4 = iVar6; + } + while (0x7fff < iVar4) { + fo_max = fo_max >> 1; + fo_min = fo_min >> 1; + iVar8 = iVar8 >> 1; + iVar3 = iVar3 >> 1; + iVar7 = iVar7 >> 1; + uVar9 = uVar9 + 1; + iVar4 = iVar4 >> 1; + } + } + } + if ((outb) || (((iVar8 <= fo_max && (iVar3 <= fo_max)) && (iVar7 <= fo_max)))) { + uVar10 = iVar8 * iVar8 + iVar3 * iVar3 + iVar7 * iVar7; + iVar8 = 0; + if (uVar10 != 0) { + uVar5 = 0; + while ((uVar10 & 0xc0000000) == 0) { + uVar10 = uVar10 << 2; + uVar5 = uVar5 + 1; + } + iVar8 = (int)(u32)sqrt_table[uVar10 >> 0x18] >> (uVar5 & 0x1f); + } + if (outb) { + *outb = iVar8 << (uVar9 & 0x1f); + } + uVar10 = vol; + if ((fo_min < iVar8) && (uVar10 = 0, iVar8 < fo_max)) { + uVar10 = iVar8 - fo_min; + uVar9 = fo_max - fo_min; + while (0xffff < uVar10) { + uVar10 = uVar10 >> 1; + uVar9 = (int)uVar9 >> 1; + } + uVar5 = (uVar10 << 0x10) / uVar9; + if (uVar9 == 0) { + ASSERT_NOT_REACHED(); + } + uVar10 = vol; + if (uVar5 != 0x10000) { + uVar10 = uVar5 * uVar5 >> 0x10; + uVar10 = gCurves[fo_curve].c * uVar5 + gCurves[fo_curve].b * uVar10 + + gCurves[fo_curve].d * 0x10000 + + gCurves[fo_curve].a * (uVar10 * uVar5 >> 0x10) >> + 0xc; + if ((int)uVar10 < 0) { + uVar10 = 0; + } else { + if (0x10000 < uVar10) { + uVar10 = 0x10000; + } + } + uVar10 = (int)(uVar10 * vol) >> 0x10; + } + } + } + if ((fo_curve == 0xb) && (uVar10 < 0x180)) { + uVar10 = 0x180; + } + SignalSema(g_EarTransSema); + return uVar10; +} + +constexpr s16 unk_table_2[2056] = { + 0xB4, 0x0, 0xB4, 0x0, 0x5A, 0x5A, 0x10E, 0x10E, 0xB4, 0x0, 0xB4, 0x0, 0x5A, + 0x5A, 0x10E, 0x10E, 0xB4, 0x0, 0xB4, 0x0, 0x5A, 0x5A, 0x10E, 0x10E, 0xB4, 0x0, + 0xB4, 0x0, 0x5A, 0x5A, 0x10E, 0x10E, 0xB4, 0x0, 0xB4, 0x0, 0x5A, 0x5A, 0x10E, + 0x10E, 0xB3, 0x1, 0xB5, 0x167, 0x5B, 0x59, 0x10D, 0x10F, 0xB3, 0x1, 0xB5, 0x167, + 0x5B, 0x59, 0x10D, 0x10F, 0xB3, 0x1, 0xB5, 0x167, 0x5B, 0x59, 0x10D, 0x10F, 0xB3, + 0x1, 0xB5, 0x167, 0x5B, 0x59, 0x10D, 0x10F, 0xB2, 0x2, 0xB6, 0x166, 0x5C, 0x58, + 0x10C, 0x110, 0xB2, 0x2, 0xB6, 0x166, 0x5C, 0x58, 0x10C, 0x110, 0xB2, 0x2, 0xB6, + 0x166, 0x5C, 0x58, 0x10C, 0x110, 0xB2, 0x2, 0xB6, 0x166, 0x5C, 0x58, 0x10C, 0x110, + 0xB2, 0x2, 0xB6, 0x166, 0x5C, 0x58, 0x10C, 0x110, 0xB1, 0x3, 0xB7, 0x165, 0x5D, + 0x57, 0x10B, 0x111, 0xB1, 0x3, 0xB7, 0x165, 0x5D, 0x57, 0x10B, 0x111, 0xB1, 0x3, + 0xB7, 0x165, 0x5D, 0x57, 0x10B, 0x111, 0xB1, 0x3, 0xB7, 0x165, 0x5D, 0x57, 0x10B, + 0x111, 0xB0, 0x4, 0xB8, 0x164, 0x5E, 0x56, 0x10A, 0x112, 0xB0, 0x4, 0xB8, 0x164, + 0x5E, 0x56, 0x10A, 0x112, 0xB0, 0x4, 0xB8, 0x164, 0x5E, 0x56, 0x10A, 0x112, 0xB0, + 0x4, 0xB8, 0x164, 0x5E, 0x56, 0x10A, 0x112, 0xB0, 0x4, 0xB8, 0x164, 0x5E, 0x56, + 0x10A, 0x112, 0xAF, 0x5, 0xB9, 0x163, 0x5F, 0x55, 0x109, 0x113, 0xAF, 0x5, 0xB9, + 0x163, 0x5F, 0x55, 0x109, 0x113, 0xAF, 0x5, 0xB9, 0x163, 0x5F, 0x55, 0x109, 0x113, + 0xAF, 0x5, 0xB9, 0x163, 0x5F, 0x55, 0x109, 0x113, 0xAE, 0x6, 0xBA, 0x162, 0x60, + 0x54, 0x108, 0x114, 0xAE, 0x6, 0xBA, 0x162, 0x60, 0x54, 0x108, 0x114, 0xAE, 0x6, + 0xBA, 0x162, 0x60, 0x54, 0x108, 0x114, 0xAE, 0x6, 0xBA, 0x162, 0x60, 0x54, 0x108, + 0x114, 0xAE, 0x6, 0xBA, 0x162, 0x60, 0x54, 0x108, 0x114, 0xAD, 0x7, 0xBB, 0x161, + 0x61, 0x53, 0x107, 0x115, 0xAD, 0x7, 0xBB, 0x161, 0x61, 0x53, 0x107, 0x115, 0xAD, + 0x7, 0xBB, 0x161, 0x61, 0x53, 0x107, 0x115, 0xAD, 0x7, 0xBB, 0x161, 0x61, 0x53, + 0x107, 0x115, 0xAC, 0x8, 0xBC, 0x160, 0x62, 0x52, 0x106, 0x116, 0xAC, 0x8, 0xBC, + 0x160, 0x62, 0x52, 0x106, 0x116, 0xAC, 0x8, 0xBC, 0x160, 0x62, 0x52, 0x106, 0x116, + 0xAC, 0x8, 0xBC, 0x160, 0x62, 0x52, 0x106, 0x116, 0xAC, 0x8, 0xBC, 0x160, 0x62, + 0x52, 0x106, 0x116, 0xAB, 0x9, 0xBD, 0x15F, 0x63, 0x51, 0x105, 0x117, 0xAB, 0x9, + 0xBD, 0x15F, 0x63, 0x51, 0x105, 0x117, 0xAB, 0x9, 0xBD, 0x15F, 0x63, 0x51, 0x105, + 0x117, 0xAB, 0x9, 0xBD, 0x15F, 0x63, 0x51, 0x105, 0x117, 0xAB, 0x9, 0xBD, 0x15F, + 0x63, 0x51, 0x105, 0x117, 0xAA, 0xA, 0xBE, 0x15E, 0x64, 0x50, 0x104, 0x118, 0xAA, + 0xA, 0xBE, 0x15E, 0x64, 0x50, 0x104, 0x118, 0xAA, 0xA, 0xBE, 0x15E, 0x64, 0x50, + 0x104, 0x118, 0xAA, 0xA, 0xBE, 0x15E, 0x64, 0x50, 0x104, 0x118, 0xA9, 0xB, 0xBF, + 0x15D, 0x65, 0x4F, 0x103, 0x119, 0xA9, 0xB, 0xBF, 0x15D, 0x65, 0x4F, 0x103, 0x119, + 0xA9, 0xB, 0xBF, 0x15D, 0x65, 0x4F, 0x103, 0x119, 0xA9, 0xB, 0xBF, 0x15D, 0x65, + 0x4F, 0x103, 0x119, 0xA9, 0xB, 0xBF, 0x15D, 0x65, 0x4F, 0x103, 0x119, 0xA8, 0xC, + 0xC0, 0x15C, 0x66, 0x4E, 0x102, 0x11A, 0xA8, 0xC, 0xC0, 0x15C, 0x66, 0x4E, 0x102, + 0x11A, 0xA8, 0xC, 0xC0, 0x15C, 0x66, 0x4E, 0x102, 0x11A, 0xA8, 0xC, 0xC0, 0x15C, + 0x66, 0x4E, 0x102, 0x11A, 0xA8, 0xC, 0xC0, 0x15C, 0x66, 0x4E, 0x102, 0x11A, 0xA7, + 0xD, 0xC1, 0x15B, 0x67, 0x4D, 0x101, 0x11B, 0xA7, 0xD, 0xC1, 0x15B, 0x67, 0x4D, + 0x101, 0x11B, 0xA7, 0xD, 0xC1, 0x15B, 0x67, 0x4D, 0x101, 0x11B, 0xA7, 0xD, 0xC1, + 0x15B, 0x67, 0x4D, 0x101, 0x11B, 0xA6, 0xE, 0xC2, 0x15A, 0x68, 0x4C, 0x100, 0x11C, + 0xA6, 0xE, 0xC2, 0x15A, 0x68, 0x4C, 0x100, 0x11C, 0xA6, 0xE, 0xC2, 0x15A, 0x68, + 0x4C, 0x100, 0x11C, 0xA6, 0xE, 0xC2, 0x15A, 0x68, 0x4C, 0x100, 0x11C, 0xA6, 0xE, + 0xC2, 0x15A, 0x68, 0x4C, 0x100, 0x11C, 0xA5, 0xF, 0xC3, 0x159, 0x69, 0x4B, 0xFF, + 0x11D, 0xA5, 0xF, 0xC3, 0x159, 0x69, 0x4B, 0xFF, 0x11D, 0xA5, 0xF, 0xC3, 0x159, + 0x69, 0x4B, 0xFF, 0x11D, 0xA5, 0xF, 0xC3, 0x159, 0x69, 0x4B, 0xFF, 0x11D, 0xA5, + 0xF, 0xC3, 0x159, 0x69, 0x4B, 0xFF, 0x11D, 0xA4, 0x10, 0xC4, 0x158, 0x6A, 0x4A, + 0xFE, 0x11E, 0xA4, 0x10, 0xC4, 0x158, 0x6A, 0x4A, 0xFE, 0x11E, 0xA4, 0x10, 0xC4, + 0x158, 0x6A, 0x4A, 0xFE, 0x11E, 0xA4, 0x10, 0xC4, 0x158, 0x6A, 0x4A, 0xFE, 0x11E, + 0xA4, 0x10, 0xC4, 0x158, 0x6A, 0x4A, 0xFE, 0x11E, 0xA3, 0x11, 0xC5, 0x157, 0x6B, + 0x49, 0xFD, 0x11F, 0xA3, 0x11, 0xC5, 0x157, 0x6B, 0x49, 0xFD, 0x11F, 0xA3, 0x11, + 0xC5, 0x157, 0x6B, 0x49, 0xFD, 0x11F, 0xA3, 0x11, 0xC5, 0x157, 0x6B, 0x49, 0xFD, + 0x11F, 0xA3, 0x11, 0xC5, 0x157, 0x6B, 0x49, 0xFD, 0x11F, 0xA2, 0x12, 0xC6, 0x156, + 0x6C, 0x48, 0xFC, 0x120, 0xA2, 0x12, 0xC6, 0x156, 0x6C, 0x48, 0xFC, 0x120, 0xA2, + 0x12, 0xC6, 0x156, 0x6C, 0x48, 0xFC, 0x120, 0xA2, 0x12, 0xC6, 0x156, 0x6C, 0x48, + 0xFC, 0x120, 0xA2, 0x12, 0xC6, 0x156, 0x6C, 0x48, 0xFC, 0x120, 0xA1, 0x13, 0xC7, + 0x155, 0x6D, 0x47, 0xFB, 0x121, 0xA1, 0x13, 0xC7, 0x155, 0x6D, 0x47, 0xFB, 0x121, + 0xA1, 0x13, 0xC7, 0x155, 0x6D, 0x47, 0xFB, 0x121, 0xA1, 0x13, 0xC7, 0x155, 0x6D, + 0x47, 0xFB, 0x121, 0xA1, 0x13, 0xC7, 0x155, 0x6D, 0x47, 0xFB, 0x121, 0xA0, 0x14, + 0xC8, 0x154, 0x6E, 0x46, 0xFA, 0x122, 0xA0, 0x14, 0xC8, 0x154, 0x6E, 0x46, 0xFA, + 0x122, 0xA0, 0x14, 0xC8, 0x154, 0x6E, 0x46, 0xFA, 0x122, 0xA0, 0x14, 0xC8, 0x154, + 0x6E, 0x46, 0xFA, 0x122, 0xA0, 0x14, 0xC8, 0x154, 0x6E, 0x46, 0xFA, 0x122, 0x9F, + 0x15, 0xC9, 0x153, 0x6F, 0x45, 0xF9, 0x123, 0x9F, 0x15, 0xC9, 0x153, 0x6F, 0x45, + 0xF9, 0x123, 0x9F, 0x15, 0xC9, 0x153, 0x6F, 0x45, 0xF9, 0x123, 0x9F, 0x15, 0xC9, + 0x153, 0x6F, 0x45, 0xF9, 0x123, 0x9F, 0x15, 0xC9, 0x153, 0x6F, 0x45, 0xF9, 0x123, + 0x9E, 0x16, 0xCA, 0x152, 0x70, 0x44, 0xF8, 0x124, 0x9E, 0x16, 0xCA, 0x152, 0x70, + 0x44, 0xF8, 0x124, 0x9E, 0x16, 0xCA, 0x152, 0x70, 0x44, 0xF8, 0x124, 0x9E, 0x16, + 0xCA, 0x152, 0x70, 0x44, 0xF8, 0x124, 0x9E, 0x16, 0xCA, 0x152, 0x70, 0x44, 0xF8, + 0x124, 0x9D, 0x17, 0xCB, 0x151, 0x71, 0x43, 0xF7, 0x125, 0x9D, 0x17, 0xCB, 0x151, + 0x71, 0x43, 0xF7, 0x125, 0x9D, 0x17, 0xCB, 0x151, 0x71, 0x43, 0xF7, 0x125, 0x9D, + 0x17, 0xCB, 0x151, 0x71, 0x43, 0xF7, 0x125, 0x9D, 0x17, 0xCB, 0x151, 0x71, 0x43, + 0xF7, 0x125, 0x9D, 0x17, 0xCB, 0x151, 0x71, 0x43, 0xF7, 0x125, 0x9C, 0x18, 0xCC, + 0x150, 0x72, 0x42, 0xF6, 0x126, 0x9C, 0x18, 0xCC, 0x150, 0x72, 0x42, 0xF6, 0x126, + 0x9C, 0x18, 0xCC, 0x150, 0x72, 0x42, 0xF6, 0x126, 0x9C, 0x18, 0xCC, 0x150, 0x72, + 0x42, 0xF6, 0x126, 0x9C, 0x18, 0xCC, 0x150, 0x72, 0x42, 0xF6, 0x126, 0x9B, 0x19, + 0xCD, 0x14F, 0x73, 0x41, 0xF5, 0x127, 0x9B, 0x19, 0xCD, 0x14F, 0x73, 0x41, 0xF5, + 0x127, 0x9B, 0x19, 0xCD, 0x14F, 0x73, 0x41, 0xF5, 0x127, 0x9B, 0x19, 0xCD, 0x14F, + 0x73, 0x41, 0xF5, 0x127, 0x9B, 0x19, 0xCD, 0x14F, 0x73, 0x41, 0xF5, 0x127, 0x9A, + 0x1A, 0xCE, 0x14E, 0x74, 0x40, 0xF4, 0x128, 0x9A, 0x1A, 0xCE, 0x14E, 0x74, 0x40, + 0xF4, 0x128, 0x9A, 0x1A, 0xCE, 0x14E, 0x74, 0x40, 0xF4, 0x128, 0x9A, 0x1A, 0xCE, + 0x14E, 0x74, 0x40, 0xF4, 0x128, 0x9A, 0x1A, 0xCE, 0x14E, 0x74, 0x40, 0xF4, 0x128, + 0x9A, 0x1A, 0xCE, 0x14E, 0x74, 0x40, 0xF4, 0x128, 0x99, 0x1B, 0xCF, 0x14D, 0x75, + 0x3F, 0xF3, 0x129, 0x99, 0x1B, 0xCF, 0x14D, 0x75, 0x3F, 0xF3, 0x129, 0x99, 0x1B, + 0xCF, 0x14D, 0x75, 0x3F, 0xF3, 0x129, 0x99, 0x1B, 0xCF, 0x14D, 0x75, 0x3F, 0xF3, + 0x129, 0x99, 0x1B, 0xCF, 0x14D, 0x75, 0x3F, 0xF3, 0x129, 0x99, 0x1B, 0xCF, 0x14D, + 0x75, 0x3F, 0xF3, 0x129, 0x98, 0x1C, 0xD0, 0x14C, 0x76, 0x3E, 0xF2, 0x12A, 0x98, + 0x1C, 0xD0, 0x14C, 0x76, 0x3E, 0xF2, 0x12A, 0x98, 0x1C, 0xD0, 0x14C, 0x76, 0x3E, + 0xF2, 0x12A, 0x98, 0x1C, 0xD0, 0x14C, 0x76, 0x3E, 0xF2, 0x12A, 0x98, 0x1C, 0xD0, + 0x14C, 0x76, 0x3E, 0xF2, 0x12A, 0x97, 0x1D, 0xD1, 0x14B, 0x77, 0x3D, 0xF1, 0x12B, + 0x97, 0x1D, 0xD1, 0x14B, 0x77, 0x3D, 0xF1, 0x12B, 0x97, 0x1D, 0xD1, 0x14B, 0x77, + 0x3D, 0xF1, 0x12B, 0x97, 0x1D, 0xD1, 0x14B, 0x77, 0x3D, 0xF1, 0x12B, 0x97, 0x1D, + 0xD1, 0x14B, 0x77, 0x3D, 0xF1, 0x12B, 0x97, 0x1D, 0xD1, 0x14B, 0x77, 0x3D, 0xF1, + 0x12B, 0x96, 0x1E, 0xD2, 0x14A, 0x78, 0x3C, 0xF0, 0x12C, 0x96, 0x1E, 0xD2, 0x14A, + 0x78, 0x3C, 0xF0, 0x12C, 0x96, 0x1E, 0xD2, 0x14A, 0x78, 0x3C, 0xF0, 0x12C, 0x96, + 0x1E, 0xD2, 0x14A, 0x78, 0x3C, 0xF0, 0x12C, 0x96, 0x1E, 0xD2, 0x14A, 0x78, 0x3C, + 0xF0, 0x12C, 0x96, 0x1E, 0xD2, 0x14A, 0x78, 0x3C, 0xF0, 0x12C, 0x95, 0x1F, 0xD3, + 0x149, 0x79, 0x3B, 0xEF, 0x12D, 0x95, 0x1F, 0xD3, 0x149, 0x79, 0x3B, 0xEF, 0x12D, + 0x95, 0x1F, 0xD3, 0x149, 0x79, 0x3B, 0xEF, 0x12D, 0x95, 0x1F, 0xD3, 0x149, 0x79, + 0x3B, 0xEF, 0x12D, 0x95, 0x1F, 0xD3, 0x149, 0x79, 0x3B, 0xEF, 0x12D, 0x95, 0x1F, + 0xD3, 0x149, 0x79, 0x3B, 0xEF, 0x12D, 0x94, 0x20, 0xD4, 0x148, 0x7A, 0x3A, 0xEE, + 0x12E, 0x94, 0x20, 0xD4, 0x148, 0x7A, 0x3A, 0xEE, 0x12E, 0x94, 0x20, 0xD4, 0x148, + 0x7A, 0x3A, 0xEE, 0x12E, 0x94, 0x20, 0xD4, 0x148, 0x7A, 0x3A, 0xEE, 0x12E, 0x94, + 0x20, 0xD4, 0x148, 0x7A, 0x3A, 0xEE, 0x12E, 0x94, 0x20, 0xD4, 0x148, 0x7A, 0x3A, + 0xEE, 0x12E, 0x94, 0x20, 0xD4, 0x148, 0x7A, 0x3A, 0xEE, 0x12E, 0x93, 0x21, 0xD5, + 0x147, 0x7B, 0x39, 0xED, 0x12F, 0x93, 0x21, 0xD5, 0x147, 0x7B, 0x39, 0xED, 0x12F, + 0x93, 0x21, 0xD5, 0x147, 0x7B, 0x39, 0xED, 0x12F, 0x93, 0x21, 0xD5, 0x147, 0x7B, + 0x39, 0xED, 0x12F, 0x93, 0x21, 0xD5, 0x147, 0x7B, 0x39, 0xED, 0x12F, 0x93, 0x21, + 0xD5, 0x147, 0x7B, 0x39, 0xED, 0x12F, 0x92, 0x22, 0xD6, 0x146, 0x7C, 0x38, 0xEC, + 0x130, 0x92, 0x22, 0xD6, 0x146, 0x7C, 0x38, 0xEC, 0x130, 0x92, 0x22, 0xD6, 0x146, + 0x7C, 0x38, 0xEC, 0x130, 0x92, 0x22, 0xD6, 0x146, 0x7C, 0x38, 0xEC, 0x130, 0x92, + 0x22, 0xD6, 0x146, 0x7C, 0x38, 0xEC, 0x130, 0x92, 0x22, 0xD6, 0x146, 0x7C, 0x38, + 0xEC, 0x130, 0x92, 0x22, 0xD6, 0x146, 0x7C, 0x38, 0xEC, 0x130, 0x91, 0x23, 0xD7, + 0x145, 0x7D, 0x37, 0xEB, 0x131, 0x91, 0x23, 0xD7, 0x145, 0x7D, 0x37, 0xEB, 0x131, + 0x91, 0x23, 0xD7, 0x145, 0x7D, 0x37, 0xEB, 0x131, 0x91, 0x23, 0xD7, 0x145, 0x7D, + 0x37, 0xEB, 0x131, 0x91, 0x23, 0xD7, 0x145, 0x7D, 0x37, 0xEB, 0x131, 0x91, 0x23, + 0xD7, 0x145, 0x7D, 0x37, 0xEB, 0x131, 0x91, 0x23, 0xD7, 0x145, 0x7D, 0x37, 0xEB, + 0x131, 0x90, 0x24, 0xD8, 0x144, 0x7E, 0x36, 0xEA, 0x132, 0x90, 0x24, 0xD8, 0x144, + 0x7E, 0x36, 0xEA, 0x132, 0x90, 0x24, 0xD8, 0x144, 0x7E, 0x36, 0xEA, 0x132, 0x90, + 0x24, 0xD8, 0x144, 0x7E, 0x36, 0xEA, 0x132, 0x90, 0x24, 0xD8, 0x144, 0x7E, 0x36, + 0xEA, 0x132, 0x90, 0x24, 0xD8, 0x144, 0x7E, 0x36, 0xEA, 0x132, 0x8F, 0x25, 0xD9, + 0x143, 0x7F, 0x35, 0xE9, 0x133, 0x8F, 0x25, 0xD9, 0x143, 0x7F, 0x35, 0xE9, 0x133, + 0x8F, 0x25, 0xD9, 0x143, 0x7F, 0x35, 0xE9, 0x133, 0x8F, 0x25, 0xD9, 0x143, 0x7F, + 0x35, 0xE9, 0x133, 0x8F, 0x25, 0xD9, 0x143, 0x7F, 0x35, 0xE9, 0x133, 0x8F, 0x25, + 0xD9, 0x143, 0x7F, 0x35, 0xE9, 0x133, 0x8F, 0x25, 0xD9, 0x143, 0x7F, 0x35, 0xE9, + 0x133, 0x8F, 0x25, 0xD9, 0x143, 0x7F, 0x35, 0xE9, 0x133, 0x8E, 0x26, 0xDA, 0x142, + 0x80, 0x34, 0xE8, 0x134, 0x8E, 0x26, 0xDA, 0x142, 0x80, 0x34, 0xE8, 0x134, 0x8E, + 0x26, 0xDA, 0x142, 0x80, 0x34, 0xE8, 0x134, 0x8E, 0x26, 0xDA, 0x142, 0x80, 0x34, + 0xE8, 0x134, 0x8E, 0x26, 0xDA, 0x142, 0x80, 0x34, 0xE8, 0x134, 0x8E, 0x26, 0xDA, + 0x142, 0x80, 0x34, 0xE8, 0x134, 0x8E, 0x26, 0xDA, 0x142, 0x80, 0x34, 0xE8, 0x134, + 0x8D, 0x27, 0xDB, 0x141, 0x81, 0x33, 0xE7, 0x135, 0x8D, 0x27, 0xDB, 0x141, 0x81, + 0x33, 0xE7, 0x135, 0x8D, 0x27, 0xDB, 0x141, 0x81, 0x33, 0xE7, 0x135, 0x8D, 0x27, + 0xDB, 0x141, 0x81, 0x33, 0xE7, 0x135, 0x8D, 0x27, 0xDB, 0x141, 0x81, 0x33, 0xE7, + 0x135, 0x8D, 0x27, 0xDB, 0x141, 0x81, 0x33, 0xE7, 0x135, 0x8D, 0x27, 0xDB, 0x141, + 0x81, 0x33, 0xE7, 0x135, 0x8C, 0x28, 0xDC, 0x140, 0x82, 0x32, 0xE6, 0x136, 0x8C, + 0x28, 0xDC, 0x140, 0x82, 0x32, 0xE6, 0x136, 0x8C, 0x28, 0xDC, 0x140, 0x82, 0x32, + 0xE6, 0x136, 0x8C, 0x28, 0xDC, 0x140, 0x82, 0x32, 0xE6, 0x136, 0x8C, 0x28, 0xDC, + 0x140, 0x82, 0x32, 0xE6, 0x136, 0x8C, 0x28, 0xDC, 0x140, 0x82, 0x32, 0xE6, 0x136, + 0x8C, 0x28, 0xDC, 0x140, 0x82, 0x32, 0xE6, 0x136, 0x8C, 0x28, 0xDC, 0x140, 0x82, + 0x32, 0xE6, 0x136, 0x8B, 0x29, 0xDD, 0x13F, 0x83, 0x31, 0xE5, 0x137, 0x8B, 0x29, + 0xDD, 0x13F, 0x83, 0x31, 0xE5, 0x137, 0x8B, 0x29, 0xDD, 0x13F, 0x83, 0x31, 0xE5, + 0x137, 0x8B, 0x29, 0xDD, 0x13F, 0x83, 0x31, 0xE5, 0x137, 0x8B, 0x29, 0xDD, 0x13F, + 0x83, 0x31, 0xE5, 0x137, 0x8B, 0x29, 0xDD, 0x13F, 0x83, 0x31, 0xE5, 0x137, 0x8B, + 0x29, 0xDD, 0x13F, 0x83, 0x31, 0xE5, 0x137, 0x8B, 0x29, 0xDD, 0x13F, 0x83, 0x31, + 0xE5, 0x137, 0x8A, 0x2A, 0xDE, 0x13E, 0x84, 0x30, 0xE4, 0x138, 0x8A, 0x2A, 0xDE, + 0x13E, 0x84, 0x30, 0xE4, 0x138, 0x8A, 0x2A, 0xDE, 0x13E, 0x84, 0x30, 0xE4, 0x138, + 0x8A, 0x2A, 0xDE, 0x13E, 0x84, 0x30, 0xE4, 0x138, 0x8A, 0x2A, 0xDE, 0x13E, 0x84, + 0x30, 0xE4, 0x138, 0x8A, 0x2A, 0xDE, 0x13E, 0x84, 0x30, 0xE4, 0x138, 0x8A, 0x2A, + 0xDE, 0x13E, 0x84, 0x30, 0xE4, 0x138, 0x8A, 0x2A, 0xDE, 0x13E, 0x84, 0x30, 0xE4, + 0x138, 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x89, 0x2B, 0xDF, 0x13D, + 0x85, 0x2F, 0xE3, 0x139, 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x89, + 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, + 0xE3, 0x139, 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x89, 0x2B, 0xDF, + 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, + 0x89, 0x2B, 0xDF, 0x13D, 0x85, 0x2F, 0xE3, 0x139, 0x88, 0x2C, 0xE0, 0x13C, 0x86, + 0x2E, 0xE2, 0x13A, 0x88, 0x2C, 0xE0, 0x13C, 0x86, 0x2E, 0xE2, 0x13A, 0x88, 0x2C, + 0xE0, 0x13C, 0x86, 0x2E, 0xE2, 0x13A, 0x88, 0x2C, 0xE0, 0x13C, 0x86, 0x2E, 0xE2, + 0x13A, 0x88, 0x2C, 0xE0, 0x13C, 0x86, 0x2E, 0xE2, 0x13A, 0x88, 0x2C, 0xE0, 0x13C, + 0x86, 0x2E, 0xE2, 0x13A, 0x88, 0x2C, 0xE0, 0x13C, 0x86, 0x2E, 0xE2, 0x13A, 0x88, + 0x2C, 0xE0, 0x13C, 0x86, 0x2E, 0xE2, 0x13A, 0x87, 0x2D, 0xE1, 0x13B, 0x87, 0x2D, + 0xE1, 0x13B, +}; + +s32 CalculateAngle(s32* trans, u32 fo_curve, u32 param_3) { + u32 uVar2; + int iVar3; + u32 uVar4; + u32 uVar5; + int iVar6; + int iVar7; + u32 uVar8; + ASSERT(fo_curve < 0x29); + WaitSema(g_EarTransSema); + if (unktable[fo_curve] != 0) { + if (unktable[fo_curve + 0x2c] == 0) { + if (unktable[fo_curve + 0x58] != 0) { + trans = gEarTrans + 3; + } + iVar6 = trans[1]; + iVar3 = gCamTrans[0] - *trans; + iVar7 = gCamTrans[2] - trans[2]; + } else { + iVar7 = gCamForward[0] - gCamTrans[0]; + iVar3 = gCamTrans[2] - gCamForward[2]; + iVar6 = gCamForward[1]; + } + iVar6 = gCamTrans[1] - iVar6; + if (((iVar3 + 0x200168U | iVar6 + 0x200168U | iVar7 + 0x200168U) & 0xffc00000) != 0) { + if (iVar3 < 0) { + iVar3 = iVar3 + 0x3ff; + } + iVar3 = iVar3 >> 10; + if (iVar6 < 0) { + iVar6 = iVar6 + 0x3ff; + } + iVar6 = iVar6 >> 10; + if (iVar7 < 0) { + iVar7 = iVar7 + 0x3ff; + } + iVar7 = iVar7 >> 10; + } + uVar8 = iVar3 * gCamLeft[0] + iVar6 * gCamLeft[1] + iVar7 * gCamLeft[2]; + uVar5 = uVar8; + if ((int)uVar8 < 0) { + uVar5 = -uVar8; + } + uVar2 = iVar3 * gCamForward[0] + iVar6 * gCamForward[1] + iVar7 * gCamForward[2]; + uVar4 = uVar2; + if ((int)uVar2 < 0) { + uVar4 = -uVar2; + } + if ((0x1ffff < (int)uVar5) || (0x1ffff < (int)uVar4)) { + uVar4 = (int)uVar4 >> 8; + uVar5 = (int)uVar5 >> 8; + } + if ((uVar4 != 0) || (uVar5 != 0)) { + uVar8 = (uVar8 & 0x80000000) >> 0x1e | uVar2 >> 0x1f; + if ((int)uVar4 < (int)uVar5) { + if (uVar5 == 0) { + ASSERT_NOT_REACHED(); + } + uVar8 = uVar8 | (int)(uVar4 << 8) / (int)uVar5 << 3 | 4; + } else { + if (uVar4 == 0) { + ASSERT_NOT_REACHED(); + } + uVar8 = uVar8 | (int)(uVar5 << 8) / (int)uVar4 << 3; + } + ASSERT(uVar8 < 2056); + iVar3 = (int)(short)unk_table_2[uVar8]; + iVar6 = iVar3; + if (((param_3 != 0) && (iVar6 = iVar3, g_CameraInvert != 0)) && (iVar6 = 0, iVar3 != 0)) { + iVar6 = 0x168 - iVar3; + } + SignalSema(g_EarTransSema); + return iVar6; + } + } + SignalSema(g_EarTransSema); + return 0; +} + +s32 GetVolume(SoundInfo* sound) { + return CalculateFalloffVolume(sound->params.trans, sound->params.volume, sound->params.fo_curve, + sound->params.fo_min, sound->params.fo_max, nullptr, nullptr); +} + +s32 GetPan(SoundInfo* sound) { + return CalculateAngle(sound->params.trans, sound->params.fo_curve, 1); +} + +void UpdateLocation(SoundInfo* sound) { + auto handle = snd_SoundIsStillPlaying(sound->sound_handle); + sound->sound_handle = handle; + if (handle == 0) { + sound->id = 0; + } else { + auto vol = GetVolume(sound); + if (vol == 0 && unktable[(int)(sound->params).fo_curve + 0xb0] == 0) { + snd_StopSound(sound->sound_handle); + } else { + auto pan = GetPan(sound); + // ovrld_log(LogCategory::WARN, "HACK: falling back to old version of setting vol/pan"); + snd_SetSoundVolPan(handle, vol, pan); + + // FUN_00013e0c(handle,4,0,pan,0,0); + // if ((short)(sound->params).mask < 0) { + // FUN_00013d6c(handle,vol,0x40); + // } + // else { + // snd_SetSoundVolPan(handle,vol,0xfffffffe,4); + // } + } + } +} + +void UpdateAutoVol(SoundInfo* snd, int time) { + bool bVar1; + auto iVar6 = snd->auto_time; + auto iVar4 = snd->new_volume; + if (time < iVar6) { + auto iVar5 = iVar4; + if (iVar4 == -4) { + iVar5 = 0; + } + auto vol = (snd->params).volume; + int new_vol; + if (iVar6 == 0) { + ASSERT_NOT_REACHED(); + } + iVar5 = ((iVar5 - vol) * time) / iVar6; + if (iVar5 < 0) { + new_vol = vol + iVar5; + bVar1 = new_vol < iVar4; + } else { + new_vol = vol + iVar5; + if (iVar5 < 1) { + new_vol = vol + 1; + } + bVar1 = iVar4 < new_vol; + } + (snd->params).volume = new_vol; + if (bVar1) { + (snd->params).volume = iVar4; + } + snd->auto_time = iVar6 - time; + } else { + if (iVar4 == -4) { + snd_StopSound(snd->sound_handle); + snd->id = 0; + } else { + (snd->params).volume = iVar4; + } + snd->auto_time = 0; + } +} + +void UpdateVolume(SoundInfo* sound) { + auto handle = snd_SoundIsStillPlaying(sound->sound_handle); + sound->sound_handle = handle; + if (handle == 0) { + sound->id = 0; + } else { + if ((s16)(sound->params).mask < 0) { + // idk + snd_SetSoundVolPan(handle, GetVolume(sound), -2); + + // FUN_00013d6c(handle, GetVolume(sound), 0x40, 4); + } else { + snd_SetSoundVolPan(handle, GetVolume(sound), -2); + } + } +} + +void SetEarTrans(const s32* ear_trans0, + const s32* ear_trans1, + const s32* cam_trans, + const s32* cam_fwd, + const s32* cam_left, + s32 cam_scale, + bool cam_inverted) { + auto tick = snd_GetTick(); + auto time = tick - gLastTick; + gLastTick = tick; + WaitSema(g_EarTransSema); + gEarTrans[0] = *ear_trans0; + g_CameraInvert = cam_inverted; + gEarTrans[1] = ear_trans0[1]; + gEarTrans[2] = ear_trans0[2]; + gEarTrans[3] = *ear_trans1; + gEarTrans[4] = ear_trans1[1]; + gEarTrans[5] = ear_trans1[2]; + gCamTrans[0] = *cam_trans; + gCamTrans[1] = cam_trans[1]; + gCamTrans[2] = cam_trans[2]; + gCamForward[0] = *cam_fwd; + gCamForward[1] = cam_fwd[1]; + gCamForward[2] = cam_fwd[2]; + gCamLeft[0] = *cam_left; + gCamLeft[1] = cam_left[1]; + gCamLeft[2] = cam_left[2]; + gCamScale = cam_scale; + SignalSema(g_EarTransSema); + + for (auto& sound : gSounds) { + if (sound.id) { + if (sound.auto_time) { + UpdateAutoVol(&sound, time); + } + UpdateLocation(&sound); + } + } + + auto* cmd = g_aVagCmds; + s32 iVar2 = 5; + do { + if ((cmd->music_flag == 0) && (cmd->maybe_sound_handler != 0)) { + if ((cmd->flags.scanned == 0) || (cmd->flags.bit8 != 0)) { + if (cmd->flags.bit20 == 0) { + if ((u32)cmd->play_volume < 0x11) { + cmd->play_volume = 0; + } else { + cmd->play_volume = cmd->play_volume - 0x10; + } + SetVAGVol(cmd); + if (cmd->play_volume != 0) + goto LAB_0000db94; + } + LAB_0000db78: + StopVagStream(cmd); + } else { + time = snd_SoundIsStillPlaying(cmd->id); + if (time != 0) + goto LAB_0000db88; + if (cmd->flags.bit20 != 0) + goto LAB_0000db78; + // CpuSuspendIntr(local_28); + cmd->flags.bit8 = 1; + // CpuResumeIntr(local_28[0]); + } + } else { + LAB_0000db88: + SetVAGVol(cmd); + } + LAB_0000db94: + iVar2 = iVar2 + -1; + cmd = cmd + 1; + if (iVar2 < 0) { + return; + } + } while (true); +} + +void SetCurve(int param_1, + u32 param_2, + u32 param_3, + uint8_t param_4, + uint8_t param_5, + uint8_t param_6, + uint8_t param_7, + uint8_t param_8) { + gCurves[param_1].c = (param_3 - param_2) + -0x1000; + gCurves[param_1].d = 0x1000; + unktable[param_1 + 0xb0] = param_8; + gCurves[param_1].b = param_2 + param_3 * -3; + unktable[param_1] = param_4; + unktable[param_1 + 0x2c] = param_5; + unktable[param_1 + 0x58] = param_6; + unktable[param_1 + 0x84] = param_7; + gCurves[param_1].a = param_3 * 2; +} + +void SetPlaybackMode(s32 mode) { + g_nPlaybackMode = mode; + snd_SetPlayBackMode(mode); +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/ssound.h b/game/overlord/jak3/ssound.h new file mode 100644 index 0000000000..420fd65ac2 --- /dev/null +++ b/game/overlord/jak3/ssound.h @@ -0,0 +1,50 @@ +#pragma once + +#include "common/common_types.h" + +#include "game/overlord/jak3/rpc_interface.h" + +namespace jak3 { +void jak3_overlord_init_globals_ssound(); +void InitSound(); + +extern s32 g_n989Semaphore; +extern bool g_bSoundEnable; + +struct SoundInfo { + SoundName name; + s32 id; + s32 sound_handle; + s32 new_volume; + s32 auto_time; + SoundPlayParams params; +}; + +struct VolumePair { + s16 left; + s16 right; +}; + +SoundInfo* LookupSound(s32 id); +SoundInfo* AllocateSound(); +int GetFalloffCurve(int fo_curve); +s32 GetVolume(SoundInfo* sound); +s32 GetPan(SoundInfo* sound); +void UpdateVolume(SoundInfo* sound); +void KillSoundsInGroup(u32 group); +void SetEarTrans(const s32* ear_trans0, + const s32* ear_trans1, + const s32* cam_trans, + const s32* cam_forward, + const s32* cam_left, + s32 cam_scale, + bool cam_inverted); +void SetPlaybackMode(s32 mode); +void SetCurve(int curve_idx, u32, u32, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t); +u32 CalculateFalloffVolume(s32* trans, u32 vol, u32 fo_curve, u32 fo_min, u32 fo_max, u32*, u32*); +s32 CalculateAngle(s32* trans, u32 fo_curve, u32); + +extern u32 g_anStreamVoice[6]; +extern VolumePair g_aPanTable[361]; +extern bool g_CameraInvert; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/stream.cpp b/game/overlord/jak3/stream.cpp new file mode 100644 index 0000000000..ef9ebde05a --- /dev/null +++ b/game/overlord/jak3/stream.cpp @@ -0,0 +1,282 @@ +#include "stream.h" + +#include "common/util/Assert.h" +#include "common/util/FileUtil.h" + +#include "game/overlord/jak3/iso_api.h" +#include "game/overlord/jak3/iso_cd.h" +#include "game/overlord/jak3/overlord.h" +#include "game/overlord/jak3/rpc_interface.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" + +namespace jak3 { + +using namespace iop; + +constexpr int kStrBufSize = sizeof(RPC_Str_Cmd); +static RPC_Str_Cmd sSTRBuf; + +constexpr int kNumPlayCmds = 4; +constexpr int kRpcBuf2Size = sizeof(RPC_Play_Cmd) * kNumPlayCmds; +static RPC_Play_Cmd sRPCBuf2[kNumPlayCmds]; + +constexpr int SECTOR_TABLE_SIZE = 512; + +struct StrFileHeader { + u32 sectors[SECTOR_TABLE_SIZE]; // start of chunk, in sectors. including this sector. + u32 sizes[SECTOR_TABLE_SIZE]; // size of chunk, in bytes. always an integer number of sectors +}; + +static_assert(sizeof(StrFileHeader) == 0x1000, "Sector header size"); + +struct CacheEntry { + ISOFileDef* filedef = nullptr; + s32 countdown = 0; + StrFileHeader header; +}; + +constexpr int STR_INDEX_CACHE_SIZE = 4; +CacheEntry sCache[STR_INDEX_CACHE_SIZE]; + +void jak3_overlord_init_globals_stream() {} + +u32 STRThread() { + sceSifQueueData dq; + sceSifServeData serve; + + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::STR, RPC_STR, &sSTRBuf, kStrBufSize, nullptr, nullptr, &dq); + + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} + +u32 PLAYThread() { + sceSifQueueData dq; + sceSifServeData serve; + + CpuDisableIntr(); + sceSifInitRpc(0); + sceSifSetRpcQueue(&dq, GetThreadId()); + sceSifRegisterRpc(&serve, RpcId::PLAY, RPC_PLAY, &sRPCBuf2, kRpcBuf2Size, nullptr, nullptr, &dq); + + CpuEnableIntr(); + sceSifRpcLoop(&dq); + return 0; +} + +void* RPC_STR(unsigned int, void* msg_in, int size) { + auto* msg = (RPC_Str_Cmd*)msg_in; + ASSERT(size == sizeof(RPC_Str_Cmd)); + + if (msg->section < 0) { + ovrld_log(LogCategory::STR_RPC, "RPC_STR loading full file {}", msg->basename); + // not a stream file - treat it like a normal load + auto* filedef = get_file_system()->Find(msg->basename); + if (filedef) { + msg->maxlen = LoadISOFileToEE(filedef, msg->address, msg->maxlen); + if (msg->maxlen) { + msg->result = 0; + return msg; + } else { + ovrld_log(LogCategory::WARN, "Failed to LoadISOFileToEE in RPC_STR for {}", msg->basename); + } + } else { + ovrld_log(LogCategory::WARN, "Failed to open {} for RPC STR", msg->basename); + } + } else { + // this is an animation load. Convert name: + ISOName animation_iso_name; + file_util::ISONameFromAnimationName(animation_iso_name.data, msg->basename); + auto* filedef = get_file_system()->FindIN(&animation_iso_name); + ovrld_log(LogCategory::STR_RPC, "STR_RPC for {} chunk {}", msg->basename, msg->section); + + if (filedef) { + // found it! See if we've cached this animation's header. + int cache_entry = 0; + int oldest = INT32_MAX; + int oldest_idx = -1; + while (cache_entry < STR_INDEX_CACHE_SIZE && sCache[cache_entry].filedef != filedef) { + sCache[cache_entry].countdown--; + if (sCache[cache_entry].countdown < oldest) { + oldest_idx = cache_entry; + oldest = sCache[cache_entry].countdown; + } + cache_entry++; + } + + if (cache_entry == STR_INDEX_CACHE_SIZE) { + // cache miss, we need to load the header to the header cache on the IOP + ovrld_log(LogCategory::STR_RPC, + "STR_RPC header cache miss - loading .str file header now."); + cache_entry = oldest_idx; + sCache[oldest_idx].filedef = filedef; + sCache[oldest_idx].countdown = INT32_MAX - 1; + if (!LoadISOFileToIOP(filedef, (u8*)&sCache[oldest_idx].header, sizeof(StrFileHeader))) { + ovrld_log(LogCategory::WARN, "STR_RPC failed to load .str file header for {}", + msg->basename); + msg->result = 1; + return msg; + } + } + + // load data, using the cached header to find the location of the chunk. + if (!LoadISOFileChunkToEE(filedef, msg->address, + sCache[cache_entry].header.sizes[msg->section], + sCache[cache_entry].header.sectors[msg->section])) { + ovrld_log(LogCategory::WARN, "STR_RPC failed to load .str file chunk {} for {}", + msg->section, msg->basename); + msg->result = 1; + } else { + // successful load! + msg->maxlen = sCache[cache_entry].header.sizes[msg->section]; + msg->result = 0; + return msg; + } + } + } + msg->result = 1; + return msg; +} + +void* RPC_PLAY(unsigned int, void* msg_in, int size) { + static_assert(sizeof(RPC_Play_Cmd) == 256); + + if (size <= 0) { + return msg_in; + } + + auto* msg_array = (RPC_Play_Cmd*)msg_in; + + for (u32 msg_idx = 0; msg_idx < size / sizeof(RPC_Play_Cmd); msg_idx++) { + auto* msg = &msg_array[msg_idx]; + + // the operation is stashed in the "result" field of the message + switch (msg->result) { + case 1: { + // remove vag streams by name + for (int s = 0; s < 4; s++) { + VagStreamData vsd; + if (msg->names[s].chars[0] != 0) { + // lg::warn("RPC PLAY remove {}", msg->names[s].chars); + strncpy(vsd.name, msg->names[s].chars, 0x30); + vsd.id = msg->id[s]; + WaitSema(g_EEStreamsList.sema); + RemoveVagStreamFromList(&vsd, &g_EEStreamsList); + SignalSema(g_EEStreamsList.sema); + WaitSema(g_EEPlayList.sema); + RemoveVagStreamFromList(&vsd, &g_EEPlayList); + SignalSema(g_EEPlayList.sema); + } + } + } break; + case 2: { + // completely redefine the set of vag streams to queue up. + WaitSema(g_EEStreamsList.sema); // lock stream list + EmptyVagStreamList(&g_EEStreamsList); // clear all existing streams + + // the first stream has the highest priority. + int priority = 9; + for (int s = 0; s < 4; s++) { + if (msg->names[s].chars[0] && msg->id[s]) { + // lg::warn("RPC PLAY queue {}", msg->names[s].chars); + + // set up list entry for this stream + VagStreamData vsd; + strncpy(vsd.name, msg->names[s].chars, 0x30); + vsd.id = msg->id[s]; + vsd.art_load = msg->address & 1 << (s & 0x1f) & 0xf; + vsd.movie_art_load = msg->address & 0x10 << (s & 0x1f) & 0xf0; + vsd.sound_handler = 0; + vsd.priority = priority; + + // if we have an existing one, make sure it has the appropriate flags + auto* existing_vag = FindThisVagStream(vsd.name, vsd.id); + if (existing_vag) { + existing_vag->art_flag = (u32)(vsd.art_load != 0); + existing_vag->music_flag = 0; + existing_vag->movie_flag = (u32)(vsd.movie_art_load != 0); + if (vsd.art_load != 0) { + existing_vag->flags.art = 1; + } + if (existing_vag->movie_flag != 0) { + existing_vag->flags.movie = 1; + } + } + + // add to list + InsertVagStreamInList(&vsd, &g_EEStreamsList); + } + + if (priority == 8) { + priority = 2; + } else { + if (0 < priority) { + priority = priority + -1; + } + } + s = s + 1; + } + SignalSema(g_EEStreamsList.sema); + } break; + case 0: { + int priority = 9; + for (int s = 0; s < 4; s++) { + if (msg->names[s].chars[0] && msg->id[s]) { + // lg::warn("RPC PLAY play {}", msg->names[s].chars); + + VagStreamData vsd; + strncpy(vsd.name, msg->names[s].chars, 0x30); + vsd.id = msg->id[s]; + vsd.volume2 = msg->section; + vsd.group = msg->maxlen; + vsd.plugin_id = 0; + vsd.sound_handler = 0; + vsd.maybe_volume_3 = 0; + vsd.priority = priority; + auto* existing_vag = FindThisVagStream(msg->names[s].chars, vsd.id); + if (existing_vag != (ISO_VAGCommand*)0x0) { + existing_vag->play_volume = vsd.volume2; + existing_vag->play_group = vsd.group; + if (existing_vag->flags.running != 0) + goto LAB_000092a4; + } + WaitSema(g_EEPlayList.sema); + auto* already_playing = FindVagStreamInList(&vsd, &g_EEPlayList); + if (!already_playing) { + already_playing = InsertVagStreamInList(&vsd, &g_EEPlayList); + strncpy(already_playing->name, vsd.name, 0x30); + already_playing->id = vsd.id; + already_playing->priority = vsd.priority; + already_playing->sound_handler = vsd.sound_handler; + already_playing->plugin_id = vsd.plugin_id; + already_playing->unk1 = 0; + already_playing->art_load = 0; + already_playing->movie_art_load = 0; + } + SignalSema(g_EEPlayList.sema); + } else { + // lg::warn("RPC PLAY play (NONE)"); + } + LAB_000092a4: + if (priority == 8) { + priority = 2; + } else { + if (0 < priority) { + priority = priority + -1; + } + } + } + + } break; + } + } + + return msg_in; +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/stream.h b/game/overlord/jak3/stream.h new file mode 100644 index 0000000000..fe2beff37e --- /dev/null +++ b/game/overlord/jak3/stream.h @@ -0,0 +1,13 @@ +#pragma once + +#include "common/common_types.h" + +namespace jak3 { +void jak3_overlord_init_globals_stream(); + +u32 PLAYThread(); +u32 STRThread(); +void* RPC_STR(unsigned int fno, void* msg, int size); +void* RPC_PLAY(unsigned int fno, void* msg, int size); + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/streamlist.cpp b/game/overlord/jak3/streamlist.cpp new file mode 100644 index 0000000000..156b4a6c43 --- /dev/null +++ b/game/overlord/jak3/streamlist.cpp @@ -0,0 +1,339 @@ +#include "streamlist.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; +List g_RequestedStreamsList; +List g_NewStreamsList; +List g_EEStreamsList; +List g_EEPlayList; +void jak3_overlord_init_globals_streamlist() { + g_RequestedStreamsList = {}; + g_NewStreamsList = {}; + g_EEStreamsList = {}; + g_EEPlayList = {}; +} + +void InitVagStreamList(List* list, int size, const char* name) { + strncpy(list->name, name, 8); + + InitList(list, size, sizeof(VagStreamData)); + + auto* iter = list->next; + if (0 < size) { + do { + iter->in_use = 0; + strncpy(iter->name, "free", 0x30); + iter->group = 2; + iter->id = 0; + iter->sound_handler = 0; + iter->priority = 0; + iter->art_load = 0; + iter->movie_art_load = 0; + iter->unk2 = 0; + iter->unk1 = 0; + iter->volume2 = 0; + iter->maybe_volume_3 = 0; + iter = iter + 1; + size = size + -1; + } while (size != 0); + } + + ASSERT(list->buffer); +} + +VagStreamData* FindVagStreamInList(VagStreamData* stream, List* list) { + int iVar1; + VagStreamData* iter; + u32 max_idx; + u32 idx; + u32 uVar2; + VagStreamData* ret; + VagStreamData* pVVar3; + + max_idx = list->count; + iter = list->next; + ret = nullptr; + idx = 0; + if (max_idx != 0) { + do { + uVar2 = idx; + pVVar3 = ret; + if ((iter->id != stream->id) || (iVar1 = strncmp(iter->name, stream->name, 0x30), + uVar2 = max_idx, pVVar3 = iter, iVar1 == 0)) { + ret = pVVar3; + idx = uVar2; + } + idx = idx + 1; + iter = iter->next; + } while (idx < max_idx); + } + return ret; +} + +VagStreamData* GetVagStreamInList(u32 idx, List* list) { + VagStreamData* iter = nullptr; + if ((idx < (u32)list->count) && (iter = list->next, idx != 0)) { + do { + idx = idx - 1; + iter = iter->next; + } while (idx != 0); + } + return iter; +} + +void EmptyVagStreamList(List* list) { + VagStreamData* elt; + u32 i; + u32 cnt; + + cnt = list->count; + elt = (VagStreamData*)list->buffer; + i = 0; + if (cnt != 0) { + do { + i = i + 1; + strncpy(elt->name, "free", 0x30); + elt->group = 2; + elt->id = 0; + elt->sound_handler = 0; + elt->priority = 0; + elt->art_load = 0; + elt->movie_art_load = 0; + elt->unk2 = 0; + elt->unk1 = 0; + elt->volume2 = 0; + elt->maybe_volume_3 = 0; + elt->in_use = 0; + elt = elt + 1; + } while (i < cnt); + } + list->unk_flag = 1; +} + +void RemoveVagStreamFromList(VagStreamData* stream, List* list) { + VagStreamData* elt = FindVagStreamInList(stream, list); + if (elt) { + elt->in_use = 0; + strncpy(elt->name, "free", 0x30); + elt->group = 2; + elt->id = 0; + elt->priority = 0; + elt->art_load = 0; + elt->movie_art_load = 0; + elt->unk1 = 0; + elt->volume2 = 0; + elt->maybe_volume_3 = 0; + elt->sound_handler = 0; + list->unk_flag = 1; + elt->unk2 = 0; + } +} + +VagStreamData* InsertVagStreamInList(VagStreamData* user_stream, List* list) { + u32 uVar1; + VagStreamData* pVVar10; + VagStreamData* pVVar11; + VagStreamData* pVVar12; + + u32 count = list->count; + VagStreamData* free_elt = nullptr; + u32 free_elt_idx = 0; + VagStreamData* iter = list->next; + if (count != 0) { + do { + if (iter->id == 0) { + free_elt = iter; + free_elt_idx = count; + } + free_elt_idx = free_elt_idx + 1; + iter = iter->next; + } while (free_elt_idx < count); + } + if ((free_elt != (VagStreamData*)0x0) && + (uVar1 = 0, pVVar11 = list->next, pVVar12 = nullptr, count != 0)) { + do { + pVVar10 = pVVar11; + uVar1 = uVar1 + 1; + if (pVVar10->priority < user_stream->priority) { + list->unk_flag = 1; + free_elt->in_use = 1; + strncpy(free_elt->name, user_stream->name, 0x30); + free_elt->id = user_stream->id; + free_elt->plugin_id = user_stream->plugin_id; + free_elt->art_load = user_stream->art_load; + free_elt->movie_art_load = user_stream->movie_art_load; + free_elt->priority = user_stream->priority; + free_elt->sound_handler = user_stream->sound_handler; + free_elt->volume2 = user_stream->volume2; + free_elt->maybe_volume_3 = user_stream->maybe_volume_3; + free_elt->group = user_stream->group; + free_elt->unk1 = 0; + if (pVVar12 == (VagStreamData*)0x0) { + if (free_elt == pVVar10) { + return free_elt; + } + auto* prev = free_elt->next; + auto* next = free_elt->prev; + list->next = free_elt; + prev->prev = next; + pVVar11 = free_elt->prev; + pVVar10->prev = free_elt; + pVVar11->next = prev; + free_elt->prev = nullptr; + free_elt->next = pVVar10; + return free_elt; + } + if (free_elt == pVVar10) { + return free_elt; + } + auto* pVVar13 = free_elt->prev; + pVVar13->next = free_elt->next; + pVVar11 = pVVar12->next; + free_elt->next->prev = pVVar13; + free_elt->next = pVVar11; + pVVar10->prev = free_elt; + pVVar12->next = free_elt; + free_elt->prev = pVVar12; + return free_elt; + } + pVVar11 = pVVar10->next; + pVVar12 = pVVar10; + } while (uVar1 < count); + } + return free_elt; +} + +void MergeVagStreamLists(List* list_a, List* list_b) { + VagStreamData* stream; + VagStreamData* pVVar1; + u32 uVar2; + u32 idx; + + idx = 0; + uVar2 = 0; +LAB_0000fde8: + do { + stream = GetVagStreamInList(idx, list_a); + idx = idx + 1; + if (stream != (VagStreamData*)0x0) { + if (stream->id == 0) + goto LAB_0000fde8; + pVVar1 = FindVagStreamInList(stream, list_b); + if (pVVar1 == (VagStreamData*)0x0) { + InsertVagStreamInList(stream, list_b); + } + } + uVar2 = uVar2 + 1; + if (3 < uVar2) { + return; + } + } while (true); +} + +void QueueNewStreamsFromList(List* list) { + VagStreamData* stream; + ISO_VAGCommand* pIVar1; + u32 uVar2; + u32 idx; + + SetVagStreamsNotScanned(); + idx = 0; + EmptyVagStreamList(&g_NewStreamsList); + g_NewStreamsList.unk_flag = 0; + uVar2 = 0; +LAB_0000fe94: + do { + stream = GetVagStreamInList(idx, list); + idx = idx + 1; + if (stream == (VagStreamData*)0x0) { + uVar2 = 4; + } else { + if (stream->id == 0) + goto LAB_0000fe94; + pIVar1 = FindThisVagStream(stream->name, stream->id); + if (pIVar1 == (ISO_VAGCommand*)0x0) { + pIVar1 = FindThisVagStream(stream->name, stream->id); + if (pIVar1 == (ISO_VAGCommand*)0x0) { + InsertVagStreamInList(stream, &g_NewStreamsList); + } + } else { + pIVar1->flags.scanned = 1; + if (pIVar1->stereo_sibling != (ISO_VAGCommand*)0x0) { + pIVar1->stereo_sibling->flags.scanned = 1; + } + if (stream->priority != pIVar1->priority_pq) { + SetNewVagCmdPri(pIVar1, stream->priority); + } + } + } + uVar2 = uVar2 + 1; + if (3 < uVar2) { + return; + } + } while (true); +} + +void CheckPlayList(List* list) { + int count; + ISO_VAGCommand* cmd; + VagStreamData* iter; + + count = list->count; + iter = list->next; +joined_r0x0000ff80: + do { + while (true) { + if (count == 0) { + return; + } + count = count + -1; + if (iter->id != 0) + break; + iter = iter->next; + } + cmd = FindThisVagStream(iter->name, iter->id); + } while (cmd == (ISO_VAGCommand*)0x0); + if (cmd->flags.running == 0) + goto code_r0x0000ffc4; + goto LAB_00010004; +code_r0x0000ffc4: + if (((cmd->flags.saw_chunks1 != 0) || (cmd->flags.file_disappeared != 0)) && + (cmd->flags.nostart == 0)) { + IsoPlayVagStream(cmd); + LAB_00010004: + RemoveVagStreamFromList(iter, list); + } + goto joined_r0x0000ff80; +} + +void StreamListThread() { + if (g_RequestedStreamsList.pending_data == 0) { + WaitSema(g_RequestedStreamsList.sema); + EmptyVagStreamList(&g_RequestedStreamsList); + g_RequestedStreamsList.unk_flag = 0; + // WaitSema(DAT_00015dd0); + // MergeVagStreamLists((List*)&g_PluginStreamsList, &g_RequestedStreamsList); + // SignalSema(DAT_00015dd0); + WaitSema(g_EEStreamsList.sema); + MergeVagStreamLists(&g_EEStreamsList, &g_RequestedStreamsList); + SignalSema(g_EEStreamsList.sema); + g_RequestedStreamsList.pending_data = 1; + SignalSema(g_RequestedStreamsList.sema); + WaitSema(g_EEPlayList.sema); + CheckPlayList(&g_EEPlayList); + SignalSema(g_EEPlayList.sema); + // WaitSema(DAT_0001e31c); + // CheckLfoList(&g_LfoStreamsList); + // SignalSema(DAT_0001e31c); + } +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/streamlist.h b/game/overlord/jak3/streamlist.h new file mode 100644 index 0000000000..6acddb3b0c --- /dev/null +++ b/game/overlord/jak3/streamlist.h @@ -0,0 +1,22 @@ +#pragma once + +#include "game/overlord/jak3/list.h" + +namespace jak3 { +void jak3_overlord_init_globals_streamlist(); + +struct ISO_VAGCommand; + +extern List g_RequestedStreamsList; +extern List g_NewStreamsList; +extern List g_EEStreamsList; +extern List g_EEPlayList; + +void QueueNewStreamsFromList(List* list); +void RemoveVagStreamFromList(VagStreamData* entry, List* list); +void EmptyVagStreamList(List* list); +VagStreamData* InsertVagStreamInList(VagStreamData* entry, List* list); +VagStreamData* FindVagStreamInList(VagStreamData* entry, List* list); +void InitVagStreamList(List* list, int size, const char* name); +void StreamListThread(); +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/todo.txt b/game/overlord/jak3/todo.txt new file mode 100644 index 0000000000..68871518bb --- /dev/null +++ b/game/overlord/jak3/todo.txt @@ -0,0 +1,6 @@ +- pan stuff is wrong - it's now using a table from 989snd +- Check ssound.cpp for most of these issues, and bottom of vag.cpp +- in some cases, we're hitting different playback modes? see comment dolby crap, we hit this when going outside freedom hq +- changing file size +- UpdateVolume +- goal src update diff --git a/game/overlord/jak3/vag.cpp b/game/overlord/jak3/vag.cpp new file mode 100644 index 0000000000..6bcaeb2ba4 --- /dev/null +++ b/game/overlord/jak3/vag.cpp @@ -0,0 +1,1042 @@ +#include "vag.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/basefile.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/iso_queue.h" +#include "game/overlord/jak3/spustreams.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/sce/iop.h" +#include "game/sound/sdshim.h" + +#define VOICE_BIT(voice) (1 << ((voice) >> 1)) + +namespace jak3 { +using namespace iop; + +bool g_bExtPause = false; +bool g_bExtResume = false; +ISO_VAGCommand g_aVagCmds[6]; +int g_anMasterVolume[32]; +bool voice_key_flags[0x30]; +u32 voice_key_times[0x30]; +u32 g_nTimeOfLastVoiceKey = 0; +bool g_bRecentlyKeyedVoice = false; +u32 g_nActiveVagStreams = 0; +u32 g_nPlaybackMode = 2; + +struct VagCmdPriListEntry { + ISO_VAGCommand* cmds[6]; +}; + +VagCmdPriListEntry g_aapVagCmdsPriList[10]; +u32 g_anVagCmdPriCounter[10]; + +void jak3_overlord_init_globals_vag() { + g_bExtPause = false; + g_bExtResume = false; + for (auto& c : g_aVagCmds) { + c = {}; + } + for (auto& x : g_anMasterVolume) { + x = 0x400; + } + g_nActiveVagStreams = 0; + g_nPlaybackMode = 2; +} + +void ISO_VAGCommand::set_all_flags_zero() { + flags.bit0 = 0; + flags.saw_chunks1 = 0; + flags.paused = 0; + flags.bit3 = 0; + + flags.running = 0; + flags.clocks_set = 0; + flags.file_disappeared = 0; + flags.scanned = 0; + + flags.bit8 = 0; + flags.stop = 0; + flags.art = 0; + flags.stereo_secondary = 0; + flags.bit12 = 0; + flags.bit13 = 0; + flags.bit14 = 0; + flags.bit15 = 0; + flags.bit16 = 0; + flags.bit17 = 0; + flags.dma_complete_even_chunk_count = 0; + flags.dma_complete_odd_chunk_count = 0; + flags.bit20 = 0; + flags.bit21 = 0; + flags.bit22 = 0; + flags.nostart = 0; + flags.movie = 0; + flags.bit25 = 0; +} + +u32 ISO_VAGCommand::pack_flags() { + u32 ret = 0; + u8* ptr = &flags.bit0; + u32 mask = 1; + for (; ptr <= &flags.bit25; ptr++) { + if (*ptr) { + ret |= mask; + } + mask <<= 1; + } + return ret; +} + +void InitVAGCmd(ISO_VAGCommand* cmd, int paused) { + set_active_a(cmd, 0); + set_active_b(cmd, 0); + set_active_c(cmd, 0); + cmd->set_all_flags_zero(); + cmd->unk_gvsp_state2 = 0; + cmd->lfo_callback = nullptr; + if (paused == 0) { + cmd->flags.paused = 0; + } else { + cmd->flags.paused = 1; + } + cmd->safe_to_modify_dma = 1; + cmd->unk_spu_mem_offset = 0x4000; + cmd->callback = NullCallback; + cmd->dma_chan = -1; + cmd->fo_min = 5; + cmd->fo_max = 0x1e; + cmd->unk_gvsp_len = 0; + cmd->position_for_ee = 0; + cmd->unk_gvsp_cntr = 0; + cmd->clocka = 0; + cmd->clockb = 0; + cmd->clockc = 0; + cmd->clockd = 0; + cmd->flags.clocks_set = 0; + cmd->flags.file_disappeared = 0; + cmd->num_isobuffered_chunks = 0; + cmd->xfer_size = 0; + cmd->vag_file_rate = 0; + cmd->error = 0; + cmd->unk_gvsp_flag = 0; + cmd->m_pBaseFile = nullptr; + cmd->stereo_sibling = nullptr; + cmd->dma_iop_mem_ptr = nullptr; + cmd->pitch_cmd = 0; + cmd->updated_trans = 0; + cmd->trans[0] = 0; + cmd->trans[1] = 0; + cmd->trans[2] = 0; + cmd->fo_curve = GetFalloffCurve(1); + cmd->play_group = 2; + set_active_a(cmd, 1); + set_active_b(cmd, 1); +} + +void InitVagCmds() { + auto now = GetSystemTimeLow(); + for (auto& x : voice_key_flags) { + x = false; + } + for (auto& x : voice_key_times) { + x = now; + } + g_nTimeOfLastVoiceKey = 0; + g_bRecentlyKeyedVoice = false; + + for (int i = 0; i < 6; i++) { + auto* cmd = &g_aVagCmds[i]; + InitVAGCmd(cmd, 1); + cmd->info_idx = i; + cmd->stream_sram = g_auStrmSRAM[i]; + cmd->trap_sram = g_auTrapSRAM[i]; + cmd->voice = g_anStreamVoice[i]; + cmd->music_flag = i >= 4; + cmd->file_def = nullptr; + cmd->vag_file_def = nullptr; + cmd->vag_dir_entry = nullptr; + cmd->flags.saw_chunks1 = 0; + cmd->play_volume = 0; + cmd->pitch_cmd = 0; + cmd->id = 0; + cmd->plugin_id = 0; + cmd->maybe_sound_handler = 0; + cmd->oog = 0; + cmd->dolby_pan_angle = 0; + cmd->priority_pq = 0; + cmd->art_flag = 0; + cmd->movie_flag = 0; + } + + for (auto& level : g_aapVagCmdsPriList) { + for (auto& cmd : level.cmds) { + cmd = nullptr; + } + } + for (auto& x : g_anVagCmdPriCounter) { + x = 0; + } + // oops - wrong value from jak 2 maybe? + g_anVagCmdPriCounter[0] = 4; +} + +void RemoveVagCmd(ISO_VAGCommand* cmd) { + ASSERT(cmd); + ASSERT(!cmd->music_flag); + ASSERT(cmd->info_idx < 4); + + g_aapVagCmdsPriList[cmd->priority_pq].cmds[cmd->info_idx] = nullptr; + if (g_anVagCmdPriCounter[cmd->priority_pq]) { + g_anVagCmdPriCounter[cmd->priority_pq]--; + } else { + ASSERT_NOT_REACHED(); + } + g_anVagCmdPriCounter[0]++; +} + +ISO_VAGCommand* FindFreeVagCmd() { + for (int i = 0; i < 4; i++) { + if (g_aVagCmds[i].id == 0) { + return &g_aVagCmds[i]; + } + } + return nullptr; +} + +void SetNewVagCmdPri(ISO_VAGCommand* cmd, int pri) { + ASSERT(cmd); + ASSERT(!cmd->music_flag); + ASSERT(cmd->info_idx < 4); + auto old_pri = cmd->priority_pq; + g_aapVagCmdsPriList[old_pri].cmds[cmd->info_idx] = nullptr; + if (0 < g_anVagCmdPriCounter[old_pri]) { + g_anVagCmdPriCounter[old_pri]--; + } else { + ASSERT_NOT_REACHED(); + } + g_anVagCmdPriCounter[pri]++; + cmd->priority_pq = pri; + g_aapVagCmdsPriList[pri].cmds[cmd->info_idx] = cmd; +} + +int HowManyBelowThisPriority(int max_pri) { + int count = 0; + for (int i = 0; i < max_pri; i++) { + count += g_anVagCmdPriCounter[i]; + } + return count; +} + +/*! + * The "smart"ness of this function is less than advertised. + */ +ISO_VAGCommand* SmartAllocMusicVagCommand(const ISO_VAGCommand* user_command, int flag) { + ASSERT(user_command); + int idx = flag ? 5 : 4; + auto* cmd = &g_aVagCmds[idx]; + if (cmd->id == 0) { + g_nActiveMusicStreams++; + } + return cmd; +} + +ISO_VAGCommand* SmartAllocVagCmd(ISO_VAGCommand* user_cmd) { + ASSERT(user_cmd); + ISO_VAGCommand* cmd = FindFreeVagCmd(); + if (!cmd && (cmd = FindNotQueuedVagCmd(), !cmd)) { + u32 pri = 0; + if ((user_cmd->priority_pq != 0) && (pri = 0, user_cmd->priority_pq != 0)) { + do { + u32 cmd_idx = 0; + do { + auto* pIVar1 = g_aapVagCmdsPriList[pri].cmds[cmd_idx]; + if (pIVar1 && (cmd = pIVar1, pIVar1->flags.stereo_secondary == 0)) { + pri = user_cmd->priority_pq; + cmd_idx = 4; + cmd = pIVar1; + } + cmd_idx = cmd_idx + 1; + } while (cmd_idx < 4); + pri = pri + 1; + } while (pri < (u32)user_cmd->priority_pq); + } + if (!cmd) { + return nullptr; + } + } + g_nActiveVagStreams = g_nActiveVagStreams + 1; + return cmd; +} + +void FreeVagCmd(ISO_VAGCommand* cmd) { + set_active_a(cmd, 0); + set_active_b(cmd, 0); + set_active_c(cmd, 0); + cmd->set_all_flags_zero(); + + cmd->flags.paused = 1; + cmd->flags.saw_chunks1 = 0; + cmd->flags.scanned = 0; + cmd->clocka = 0; + cmd->clockb = 0; + cmd->clockc = 0; + cmd->clockd = 0; + SetVagStreamName(cmd, 0); + cmd->safe_to_modify_dma = 1; + cmd->unk_spu_mem_offset = 0x4000; + cmd->callback = NullCallback; + cmd->dma_chan = -1; + cmd->lfo_callback = 0; + cmd->pitch1 = 0; + cmd->pitch1_file = 0; + cmd->file_def = nullptr; + cmd->vag_file_def = nullptr; + cmd->vag_dir_entry = nullptr; + cmd->unk_gvsp_len = 0; + cmd->position_for_ee = 0; + cmd->unk_gvsp_cntr = 0; + cmd->name[0] = 0; + cmd->num_isobuffered_chunks = 0; + cmd->xfer_size = 0; + cmd->vag_file_rate = 0; + cmd->error = 0; + cmd->unk_gvsp_flag = 0; + cmd->play_volume = 0; + cmd->pitch_cmd = 0; + cmd->id = 0; + cmd->plugin_id = 0; + cmd->maybe_sound_handler = 0; + cmd->priority_pq = 0; + cmd->art_flag = 0; + cmd->movie_flag = 0; + cmd->updated_trans = 0; + cmd->m_pBaseFile = nullptr; + cmd->dma_iop_mem_ptr = nullptr; + cmd->unk_gvsp_state2 = 0; + if (!cmd->music_flag) { + if (0 < g_nActiveVagStreams) { + g_nActiveVagStreams = g_nActiveVagStreams + -1; + } else { + ASSERT_NOT_REACHED(); + } + } else { + if (0 < g_nActiveMusicStreams) { + g_nActiveMusicStreams = g_nActiveMusicStreams + -1; + } else { + ASSERT_NOT_REACHED(); + } + } + // CpuResumeIntr(local_10[0]); +} + +void SetVagStreamsNotScanned() { + for (int i = 0; i < 4; i++) { + g_aVagCmds[i].flags.scanned = false; + } +} + +void SetVagStreamsNoStart(int value) { + for (int i = 0; i < 4; i++) { + g_aVagCmds[i].flags.nostart = value; + } +} + +ISO_VAGCommand* FindNotQueuedVagCmd() { + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + if (!cmd->flags.scanned && !cmd->flags.stereo_secondary && !cmd->flags.running) { + return cmd; + } + } + return nullptr; +} + +int AnyVagRunning() { + int count = 0; + for (int i = 0; i < 4; i++) { + if (g_aVagCmds[i].flags.running) { + count++; + } + } + return count; +} + +ISO_VAGCommand* FindVagStreamPluginId(int id) { + if (id == 0) { + return nullptr; + } + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + if (cmd->plugin_id == id) { + return cmd; + } + } + return nullptr; +} + +ISO_VAGCommand* FindVagStreamId(int id) { + if (id == 0) { + return nullptr; + } + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + if (cmd->id == id) { + return cmd; + } + } + return nullptr; +} + +ISO_VAGCommand* FindVagStreamName(const char* name) { + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + if (strcmp(cmd->name, name) == 0) { + return cmd; + } + } + return nullptr; +} + +ISO_VAGCommand* FindThisVagStream(const char* name, int id) { + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + if (strcmp(cmd->name, name) == 0 && cmd->id == id) { + return cmd; + } + } + return nullptr; +} + +ISO_VAGCommand* FindMusicStreamName(const char* name) { + for (int i = 4; i < 6; i++) { + auto* cmd = &g_aVagCmds[i]; + if (strcmp(cmd->name, name) == 0) { + return cmd; + } + } + return nullptr; +} + +ISO_VAGCommand* FindThisMusicStream(const char* name, int id) { + for (int i = 4; i < 6; i++) { + auto* cmd = &g_aVagCmds[i]; + if (strcmp(cmd->name, name) == 0 && cmd->id == id) { + return cmd; + } + } + return nullptr; +} + +/*! + * Immediately stop the audio playback of a command, without the ability to resume. + * This will key off voices. + */ +void StopVAG(ISO_VAGCommand* cmd) { + // mark buffer inactive, so we don't stream more data + set_active_a(cmd, 0); + set_active_b(cmd, 0); + + // safely pause playback + PauseVAG(cmd); + + // deal with SPU voices: + if (cmd->flags.clocks_set) { + // do individual voice blocks + u32 voice_mask = VOICE_BIT(cmd->voice); + BlockUntilVoiceSafe(cmd->voice, 0x900); + auto* sibling = cmd->stereo_sibling; + if (sibling) { + voice_mask |= VOICE_BIT(sibling->voice); + BlockUntilVoiceSafe(sibling->voice, 0x900); + } + BlockUntilAllVoicesSafe(); + + sceSdSetSwitch((cmd->voice & 1) | SD_S_KOFF, voice_mask); + + auto now = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(cmd->voice, now); + if (sibling) { + MarkVoiceKeyedOnOff(sibling->voice, now); + } + } + + // clear out command + cmd->set_all_flags_zero(); + cmd->callback = NullCallback; + cmd->clockd = 0; + cmd->play_volume = 0; + cmd->pitch_cmd = 0; + cmd->id = 0; + cmd->plugin_id = 0; + cmd->maybe_sound_handler = 0; + cmd->lfo_callback = 0; + cmd->pitch1 = 0; + cmd->pitch1_file = 0; + cmd->clocka = 0; + cmd->clockb = 0; + cmd->clockc = 0; +} + +/*! + * Stop a VAG, also remove it from lists of active commands. + */ +void TerminateVAG(ISO_VAGCommand* in_cmd) { + // ISO_VAGCommand *sibling; + // VagStreamData vsd; + // undefined auStack64 [36]; + // int local_1c; + // int local_18; + // bool not_music; + ASSERT(in_cmd); + bool not_music = !in_cmd->music_flag; + VagStreamData vsd; + strncpy(vsd.name, in_cmd->name, 0x30); + vsd.id = in_cmd->id; + StopVAG(in_cmd); + ReleaseMessage(in_cmd); + if (not_music) { + RemoveVagCmd(in_cmd); + } + FreeVagCmd(in_cmd); + auto* sibling = in_cmd->stereo_sibling; + if (sibling) { + sibling->flags.scanned = 0; + if (not_music) { + RemoveVagCmd(sibling); + } + FreeVagCmd(sibling); + } + if (not_music) { + if (in_cmd->maybe_sound_handler != 0) { + // TODO LFO support + // RemoveVagStreamFromList(&vsd, &g_PluginStreamsList); + // RemoveLfoStreamFromList(auStack64, &g_LfoStreamsList); + ASSERT_NOT_REACHED(); + } + RemoveVagStreamFromList(&vsd, &g_EEPlayList); + } +} + +/*! + * Pause a vag stream by setting the volume to 0, the pitch to 0, then keying off the voice. + */ +void PauseVAG(ISO_VAGCommand* cmd) { + if (cmd->flags.paused == 0) { + // CpuSuspendIntr(local_18); + if (cmd->flags.stereo_secondary == 0) { + auto* sibling = cmd->stereo_sibling; + if (!sibling) { + if (cmd->flags.saw_chunks1) { + // this means we enabled volume before, so disable it. + static_assert(SD_VP_VOLL == 0); + static_assert(SD_VP_VOLR == 0x100); + static_assert(SD_VP_PITCH == 0x200); + sceSdSetParam(cmd->voice | SD_VP_VOLL, 0); + sceSdSetParam(cmd->voice | SD_VP_VOLR, 0); + } + + // in either case, set pitch to 0 to stop playback. + sceSdSetParam(cmd->voice | SD_VP_PITCH, 0); + + auto voice = cmd->voice; + BlockUntilVoiceSafe(voice, 0x900); + BlockUntilAllVoicesSafe(); + // key off + sceSdSetSwitch((cmd->voice & 1) | SD_S_KOFF, VOICE_BIT(voice)); + MarkVoiceKeyedOnOff(cmd->voice, GetSystemTimeLow()); + + // remember where to resume from + if (cmd->flags.clocks_set == 0) { + cmd->current_spu_address = 0; + } else { + cmd->current_spu_address = GetSpuRamAddress(cmd); + } + cmd->flags.paused = 1; + } else { + if (cmd->flags.saw_chunks1 != 0) { + sceSdSetParam(cmd->voice | SD_VP_VOLL, 0); + sceSdSetParam(cmd->voice | SD_VP_VOLR, 0); + sceSdSetParam(sibling->voice | SD_VP_VOLL, 0); + sceSdSetParam(sibling->voice | SD_VP_VOLR, 0); + } + sceSdSetParam(sibling->voice | SD_VP_PITCH, 0); + sceSdSetParam(cmd->voice | SD_VP_PITCH, 0); + auto sibling_voice = sibling->voice; + auto voice = cmd->voice; + BlockUntilVoiceSafe(voice, 0x900); + BlockUntilVoiceSafe(sibling->voice, 0x900); + BlockUntilAllVoicesSafe(); + sceSdSetSwitch((cmd->voice & 1) | SD_S_KOFF, + (VOICE_BIT(voice)) | (VOICE_BIT(sibling_voice))); + auto now = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(cmd->voice, now); + MarkVoiceKeyedOnOff(sibling->voice, now); + if (cmd->flags.clocks_set == 0) { + cmd->current_spu_address = 0; + sibling->current_spu_address = 0; + } else { + u32 spu_ram_addr = GetSpuRamAddress(cmd); + cmd->current_spu_address = spu_ram_addr & 0xfffffff8; + sibling->current_spu_address = + ((spu_ram_addr & 0xfffffff8) - cmd->stream_sram) + sibling->stream_sram; + } + cmd->flags.paused = 1; + sibling->flags.paused = 1; + } + } + // CpuResumeIntr(local_18[0]); + } +} + +namespace { +u32 read_rate_calc(u32 pitch) { + u64 pitch1 = (pitch >> 3); + u64 mult_result = pitch1 * 0x2492'4925ull; + return mult_result >> 32; +} +} // namespace +/*! + * Start up a VAG stream after it was paused. Also, used to start a vag stream for the first time. + */ +void UnPauseVAG(ISO_VAGCommand* cmd) { + if (cmd->flags.paused) { + // CpuSuspendIntr(&local_28); + if (cmd->flags.stereo_secondary == 0) { + auto* sibling = cmd->stereo_sibling; + auto pitch = CalculateVAGPitch(cmd->pitch1, cmd->pitch_cmd); + + // calculate read rate + if (cmd->m_pBaseFile) { + auto p2 = CalculateVAGPitch(cmd->pitch1_file, cmd->pitch_cmd); + u32 rate; + if (sibling == (ISO_VAGCommand*)0x0) { + rate = p2 * 0x177; + } else { + rate = p2 * 0x2ee; + } + cmd->m_pBaseFile->m_ReadRate = read_rate_calc(rate); + } + + int lvol, rvol; + CalculateVAGVolumes(cmd, &lvol, &rvol); + if (!sibling) { + // only update volume here if we've actually started the stream. + // otherwise, the stream is still getting set up, and the unpause will occur in + // the SPU interrupt handler. + if (cmd->flags.saw_chunks1) { + BlockUntilVoiceSafe(cmd->voice, 0x900); + if (cmd->current_spu_address != 0) { + sceSdSetAddr(cmd->voice | SD_VA_SSA, cmd->current_spu_address); + } + sceSdSetParam(cmd->voice | SD_VP_PITCH, pitch & 0xffff); + BlockUntilAllVoicesSafe(); + // lg::error("keying on 1!"); + sceSdSetSwitch((cmd->voice & 1) | SD_S_KON, VOICE_BIT(cmd->voice)); + MarkVoiceKeyedOnOff(cmd->voice, GetSystemTimeLow()); + sceSdSetParam(cmd->voice | SD_VP_VOLL, lvol); + sceSdSetParam(cmd->voice | SD_VP_VOLR, rvol); + } + cmd->flags.paused = 0; + } else { + if (cmd->flags.saw_chunks1) { + BlockUntilVoiceSafe(cmd->voice, 0x900); + BlockUntilVoiceSafe(sibling->voice, 0x900); + sceSdSetParam(cmd->voice | SD_VP_PITCH, pitch & 0xffff); + sceSdSetParam(sibling->voice | SD_VP_PITCH, pitch & 0xffff); + if (cmd->current_spu_address != 0) { + sceSdSetAddr(cmd->voice | SD_VA_SSA, cmd->current_spu_address); + sceSdSetAddr(sibling->voice | SD_VA_SSA, sibling->current_spu_address); + } + BlockUntilAllVoicesSafe(); + sceSdSetSwitch((cmd->voice & 1) | SD_S_KON, + (VOICE_BIT(cmd->voice)) | (VOICE_BIT(sibling->voice))); + auto now = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(cmd->voice, now); + MarkVoiceKeyedOnOff(sibling->voice, now); + sceSdSetParam(cmd->voice | SD_VP_VOLL, lvol); + sceSdSetParam(sibling->voice | SD_VP_VOLL, 0); + sceSdSetParam(cmd->voice | SD_VP_VOLR, 0); + sceSdSetParam(sibling->voice | SD_VP_VOLR, rvol); + } + cmd->flags.paused = 0; + sibling->flags.paused = 0; + } + } + // CpuResumeIntr(local_28); + } +} + +// TODO: needs some cleanup +void RestartVag(ISO_VAGCommand* cmd, int p) { + (void)p; + // CpuSuspendIntr(&local_28); + int lvol, rvol; + CalculateVAGVolumes(cmd, &lvol, &rvol); + if (cmd->flags.stereo_secondary == 0) { + auto* sibling = cmd->stereo_sibling; + u32 voice_mask = VOICE_BIT(cmd->voice); + BlockUntilVoiceSafe(cmd->voice, 0x900); + if (sibling) { + voice_mask |= VOICE_BIT(sibling->voice); + BlockUntilVoiceSafe(sibling->voice, 0x900); + } + BlockUntilAllVoicesSafe(); + sceSdSetSwitch((cmd->voice & 1) | SD_S_KOFF, voice_mask); + sceSdSetParam(cmd->voice | SD_VP_VOLL, 0); + sceSdSetParam(cmd->voice | SD_VP_VOLR, 0); + // wtf is this crap + // CpuResumeIntr(local_28); + DelayThread(100); + // CpuSuspendIntr(&local_28); + u32 bVar1; + u32 uVar4; + if (sibling == (ISO_VAGCommand*)0x0) { + bVar1 = cmd->voice; + uVar4 = cmd->stream_sram; + } else { + sceSdSetParam(sibling->voice, 0); + sceSdSetParam(sibling->voice | 0x100, 0); + sceSdSetAddr(cmd->voice | 0x2040, cmd->stream_sram); + bVar1 = sibling->voice; + uVar4 = sibling->stream_sram; + } + sceSdSetAddr(bVar1 | 0x2040, uVar4); + BlockUntilAllVoicesSafe(); + sceSdSetSwitch((cmd->voice & 1) | 0x1500, voice_mask); + auto uVar3 = GetSystemTimeLow(); + MarkVoiceKeyedOnOff(cmd->voice, uVar3); + u32 uVar2; + if (!sibling) { + sceSdSetParam(cmd->voice, lvol); + uVar2 = cmd->voice; + } else { + MarkVoiceKeyedOnOff(sibling->voice, uVar3); + sceSdSetParam(cmd->voice, lvol); + sceSdSetParam(sibling->voice, 0); + sceSdSetParam(cmd->voice | 0x100, 0); + uVar2 = sibling->voice; + } + sceSdSetParam(uVar2 | 0x100, rvol); + } + // CpuResumeIntr(local_28); +} + +void PauseVagStreams(bool music) { + if (music != 0) { + WaitSema(g_nMusicSemaphore); + g_bAnotherMusicPauseFlag = true; + g_bMusicIsPaused = true; + } + + for (int i = 0; i < (music ? 6 : 4); i++) { + auto* cmd = &g_aVagCmds[i]; + if (cmd->flags.running && !cmd->flags.paused) { + PauseVAG(cmd); + } + } + + if (music != 0) { + SignalSema(g_nMusicSemaphore); + } +} + +void UnPauseVagStreams(bool music) { + int iVar1; + ISO_VAGCommand* cmd; + + if (music != 0) { + WaitSema(g_nMusicSemaphore); + } + cmd = g_aVagCmds; + iVar1 = 4; + if ((music != 0) && (iVar1 = 6, g_bMusicPause != 0)) { + iVar1 = 4; + } + while (iVar1 != 0) { + iVar1 = iVar1 + -1; + if ((cmd->flags.running != 0) && (cmd->flags.paused != 0)) { + UnPauseVAG(cmd); + } + cmd = cmd + 1; + } + if (music != 0) { + g_bAnotherMusicPauseFlag = false; + if (g_bMusicPause == 0) { + g_bMusicIsPaused = false; + } + SignalSema(g_nMusicSemaphore); + } +} + +int CalculateDolbyPanAngle(ISO_VAGCommand* cmd, u32 angle) { + int iVar1; + int iVar2; + + iVar1 = 0; + if (cmd != (ISO_VAGCommand*)0x0) { + if (0x167 < angle) { + // TODO: sus 64-bit multiply + angle = angle + (u32)((u64)(angle >> 3) * 0x16c16c17 >> 0x22) * -0x168; + } + iVar1 = cmd->dolby_pan_angle; + iVar2 = iVar1; + if (0x167 < iVar1) { + iVar2 = iVar1 + -0x168; + } + iVar2 = angle - iVar2; + if (iVar2 < -0xb4) { + iVar2 = iVar2 + 0x168; + } else { + if (0xb4 < iVar2) { + iVar2 = iVar2 + -0x168; + } + } + iVar1 = iVar1 + iVar2; + if (iVar1 < 0) { + iVar1 = iVar1 + 0x2d0; + } + if (0x2cf < iVar1) { + iVar1 = iVar1 + -0x2d0; + } + cmd->dolby_pan_angle = iVar1; + } + return iVar1; +} + +void CalculateVAGVolumes(ISO_VAGCommand* cmd, int* lvol, int* rvol) { + u32 angle; + int iVar3; + int iVar4; + int iVar5; + u32 uVar7; + u32 uVar8; + int iVar9; + + ASSERT(cmd && lvol && rvol); + + iVar9 = g_nPlaybackMode; + iVar3 = 0x3fff; + iVar4 = 0x3fff; + uVar8 = 0; + if (cmd->music_flag == 0) { + iVar5 = cmd->maybe_sound_handler; + if (iVar5 == 0) { + if (cmd->updated_trans == 0) { + uVar7 = (u32)(cmd->play_volume * g_anMasterVolume[cmd->play_group]) >> 6; + goto LAB_0000bb58; + } + uVar7 = CalculateFalloffVolume(cmd->trans, + (cmd->play_volume * g_anMasterVolume[cmd->play_group]) >> 10, + cmd->fo_curve, cmd->fo_min, cmd->fo_max, 0, 0); + iVar3 = CalculateAngle(cmd->trans, cmd->fo_curve, 0); + angle = iVar3 + 0x5aU + (u32)((u64)((iVar3 + 0x5aU) >> 3) * 0x16c16c17 >> 0x22) * -0x168; + if (0x400 < uVar7) { + uVar7 = 0x400; + } + uVar7 = uVar7 << 4 | uVar7 >> 6; + } else { + ASSERT_NOT_REACHED(); + } + + if (iVar9 == 1) { + iVar3 = 0x2d41; + iVar4 = 0x2d41; + } else { + if (iVar9 < 2) { + iVar3 = 0x2d41; + if (iVar9 == 0) { + // ASSERT_NOT_REACHED(); // dolby crap + // TODO: + iVar4 = 0x2d41; + // uVar8 = CalculateDolbyPanAngle(cmd, angle); + // iVar9 = (uint)((u64)(uVar8 >> 1) * 0xb60b60b7 >> 0x25) * 4; + // if (0x167 < uVar8) { + // uVar8 = uVar8 - 0x168; + // } + // if (uVar8 < 0xb4) { + // psVar6 = (short*)(g_aPanTable + uVar8 * 4); + // sVar1 = psVar6[1]; + // sVar2 = *psVar6; + // } else { + // iVar3 = g_aPanTable + uVar8 * 4; + // sVar1 = *(short*)(iVar3 + -0x2d0); + // sVar2 = *(short*)(iVar3 + -0x2ce); + // } + // iVar4 = (int)sVar1; + // iVar3 = (int)sVar2; + // if ((int)((uint) * (ushort*)(iVar9 + 0x15800) << 0x10) < 0) { + // iVar3 = -iVar3; + // } + // if (*(short*)(iVar9 + 0x15802) < 0) { + // iVar4 = -iVar4; + // } + // uVar8 = 0xffffc001; + } else { + iVar4 = 0x2d41; + } + } else { + iVar3 = 0x2d41; + if (iVar9 == 2) { + cmd->dolby_pan_angle = angle; + if (angle < 0xb4) { + auto pte = g_aPanTable[angle]; + // psVar6 = (short*)(g_aPanTable + angle * 4); + iVar4 = pte.right; + iVar3 = pte.left; + } else { + // iVar3 = g_aPanTable + angle * 4; + u32 angle2 = (angle - 180); + ASSERT(angle2 < 360); + auto pte = g_aPanTable[angle2]; + iVar4 = pte.left; + iVar3 = pte.right; + } + } else { + iVar4 = 0x2d41; + } + } + } + } else { + uVar7 = ((u32)(g_nMusicFade * g_anMasterVolume[1]) >> 0xc) * g_nMusicTweak >> 7; + } + +LAB_0000bb58: + iVar9 = iVar4; + if (g_CameraInvert != 0) { + iVar9 = iVar3; + iVar3 = iVar4; + } + iVar3 = iVar3 * uVar7; + iVar9 = iVar9 * uVar7; + if (iVar3 < 0) { + iVar3 = iVar3 + 0x3fff; + } + uVar7 = iVar3 >> 0xe; + if (iVar9 < 0) { + iVar9 = iVar9 + 0x3fff; + } + angle = iVar9 >> 0xe; + if (0x3fff < (int)uVar7) { + uVar7 = 0x3fff; + } + if ((int)uVar7 < (int)uVar8) { + uVar7 = uVar8; + } + *lvol = uVar7 & 0x7fff; + if (0x3fff < (int)angle) { + angle = 0x3fff; + } + if ((int)angle < (int)uVar8) { + angle = uVar8; + } + *rvol = angle & 0x7fff; +} + +s32 CalculateVAGPitch(int param_1, int param_2) { + if (param_2) { + if (param_2 <= 0) { + return 0x5f4 * param_1 / (0x5f4 - param_2); + } else { + return param_1 * (param_2 + 0x5f4) / 0x5f4; + } + } + + return param_1; + // if (b != 0) { + // if (0 < b) { + // return (a * (b + 0x5f4)) / 0x5f4; + // } + // a = (a * 0x5f4) / (0x5f4U - b); + // } + // return a; +} + +void SetVAGVol(ISO_VAGCommand* cmd) { + if (cmd && cmd->flags.running && !cmd->flags.paused && !cmd->flags.stereo_secondary) { + auto* sibling = cmd->stereo_sibling; + int lvol, rvol; + CalculateVAGVolumes(cmd, &lvol, &rvol); + auto* file = cmd->m_pBaseFile; + if (file) { + u32 rate = CalculateVAGPitch(cmd->pitch1_file, cmd->pitch_cmd); + if (!sibling) { + rate = rate * 0x177; + } else { + rate = rate * 0x2ee; + } + file->m_ReadRate = read_rate_calc(rate); + } + + // like jak2, rewritten to not use sceSdProcBatch + if (!sibling) { + sceSdSetParam(SD_VP_VOLL | cmd->voice, lvol); + sceSdSetParam(SD_VP_VOLR | cmd->voice, rvol); + sceSdSetParam(SD_VP_PITCH | cmd->voice, CalculateVAGPitch(cmd->pitch1, cmd->pitch_cmd)); + } else { + // left channel, left vol + if (g_CameraInvert) { + sceSdSetParam(SD_VP_VOLL | cmd->voice, 0); + } else { + sceSdSetParam(SD_VP_VOLL | cmd->voice, lvol); + } + + // right channel, left vol + if (g_CameraInvert) { + sceSdSetParam(SD_VP_VOLL | sibling->voice, rvol); + } else { + sceSdSetParam(SD_VP_VOLL | sibling->voice, 0); + } + + if (g_CameraInvert) { + sceSdSetParam(SD_VP_VOLR | cmd->voice, lvol); + } else { + sceSdSetParam(SD_VP_VOLR | cmd->voice, 0); + } + + if (g_CameraInvert) { + sceSdSetParam(SD_VP_VOLR | sibling->voice, 0); + } else { + sceSdSetParam(SD_VP_VOLR | sibling->voice, rvol); + } + + sceSdSetParam(SD_VP_PITCH | cmd->voice, CalculateVAGPitch(cmd->pitch1, cmd->pitch_cmd)); + } + // CpuSuspendIntr(local_20); + // sceSdProcBatch(batch, 0, count); + // CpuResumeIntr(local_20[0]); + } +} + +void SetAllVagsVol(int x) { + if (x < 0) { + for (int i = 0; i < 4; i++) { + SetVAGVol(&g_aVagCmds[i]); + } + } else { + for (int i = 0; i < 4; i++) { + if (g_aVagCmds[i].maybe_sound_handler) { + ASSERT_NOT_REACHED(); + // there's more check before this... + SetVAGVol(&g_aVagCmds[i]); + } + } + } +} + +void VAG_MarkLoopStart(uint8_t* data) { + data[0x11] = 2; + data[1] = 6; +} + +void VAG_MarkLoopEnd(uint8_t* data, int offset) { + data[offset + -0xf] = 3; +} +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/vag.h b/game/overlord/jak3/vag.h new file mode 100644 index 0000000000..1ce2179cf5 --- /dev/null +++ b/game/overlord/jak3/vag.h @@ -0,0 +1,173 @@ +#pragma once + +#include "game/overlord/jak3/isocommon.h" +namespace jak3 { +void jak3_overlord_init_globals_vag(); + +extern bool g_bExtPause; +extern bool g_bExtResume; + +struct ISO_VAGCommand : ISO_Hdr { + ISOFileDef* vag_file_def = nullptr; // 44 (actually INT file def?) + VagDirEntry* vag_dir_entry = nullptr; // 48 + ISO_VAGCommand* stereo_sibling = nullptr; // 52 + + // pointer to IOP memory to DMA to SPU. Points to the data for the next new transfer. + const u8* dma_iop_mem_ptr = nullptr; // 56 + + // the DMA channel to upload to for sceCdVoiceTrans + int dma_chan = 0; // 60 + + // if not set, a pending dma interrupt will want to modify this command. + int safe_to_modify_dma = 0; // 64 + + u32 current_spu_address = 0; // 68 + + char name[48]; // 72 + char overflow[16]; + + // SPU address of the next chunk to fill + // for stereo mode, there's a 0x2000 offset between the left and right audio. This stream_sram + // doesn't include that offset. + u32 stream_sram; // 124 + u32 trap_sram; // 138 + + // spu voice for playback + int voice; // 132 + int info_idx; // 136 + int maybe_sound_handler = 0; // 140 + void* lfo_callback = nullptr; // 144 + + int oog = 0; // 180 + int dolby_pan_angle = 0; // 184 + int clocka = 0; // 188 + int clockb = 0; // 192 + int clockc = 0; // 196 + int clockd = 0; // 200 + int unk_gvsp_len; // 204 + int position_for_ee; // 208 + int unk_gvsp_cntr; // 212 + + struct { + u8 bit0 = 0; // 216 + u8 saw_chunks1 = 0; // 217 + // will start the voice, but with a pitch of 0. + u8 paused = 0; // 218 + u8 bit3 = 0; // 219 + u8 running = 0; // 220 + u8 clocks_set = 0; // 221, set by SetVagClock if it succeeds. + u8 file_disappeared = 0; // 222, set if SetVagClock notices that bBaseFile is gone! + u8 scanned = 0; // 223, set shortly after internal command is created. + u8 bit8 = 0; + u8 stop = 0; // 225, set if this is a non-plugin stream, and was stopped by StopVagStream. + u8 art = 0; // 226, set if this has art_flag set + // set if we are the non-main stereo command. + u8 stereo_secondary = 0; // 227 + u8 bit12 = 0; // 228 + u8 bit13 = 0; // 229 + u8 bit14 = 0; // 230 + u8 bit15 = 0; // 231 + u8 bit16 = 0; // 232 + u8 bit17 = 0; // 233 + // set if SPU DMA has completed for an even or odd number of chunks of non-stereo audio. + u8 dma_complete_even_chunk_count = 0; // 234 + u8 dma_complete_odd_chunk_count = 0; // 235 + u8 bit20 = 0; + u8 bit21 = 0; + u8 bit22 = 0; + u8 nostart = 0; + u8 movie = 0; + u8 bit25 = 0; + } flags; + + u32 pack_flags(); + + void set_all_flags_zero(); + int unk_gvsp_state2 = 0; // 244 + int num_isobuffered_chunks = 0; // 248 + + // if we need to do a second SPU DMA for stereo's second channel, the size of that transfer + int xfer_size; // 252 + int vag_file_rate; // 256 + + int pitch1; // 260 pitch to use for playback, possibly overwritten + int pitch1_file; // 264 pitch to use for playback, from the file itself (sample rate) + int pitch_cmd; // 268 pitch mod command (?) + int error; // 272 + int unk_spu_mem_offset; // 276 + int unk_gvsp_flag; // 280 + int play_volume = 0; // 284 + int id = 0; // 288 + int plugin_id = 0; // 292 + int priority_pq = 0; // 296 + int art_flag = 0; // 300 + int music_flag = 0; // 304 + int updated_trans = 0; // 308 + int trans[3]; // 312 + int fo_min; // 324 + int fo_max; // 328 + int fo_curve; // 332 + int play_group = 0; // 336 + int movie_flag = 0; // 340 +}; + +struct VagStreamData { + VagStreamData* next = nullptr; + VagStreamData* prev = nullptr; + int in_use; + char name[0x30]; + int id; + int plugin_id; + int sound_handler; + int art_load; + int movie_art_load; + int priority; + int unk2; + int unk1; + int volume2; + int maybe_volume_3; + int group; +}; + +extern ISO_VAGCommand g_aVagCmds[6]; +extern int g_anMasterVolume[32]; +extern bool voice_key_flags[0x30]; +extern u32 voice_key_times[0x30]; +extern u32 g_nTimeOfLastVoiceKey; +extern bool g_bRecentlyKeyedVoice; + +int CalculateVAGPitch(int a, int b); +void BlockUntilVoiceSafe(int, u32); +void BlockUntilAllVoicesSafe(); +void CheckVagStreamsProgress(); +void MarkVoiceKeyedOnOff(int voice, u32 systime); +void UnPauseVAG(ISO_VAGCommand* cmd); +ISO_VAGCommand* FindMusicStreamName(const char* name); +ISO_VAGCommand* SmartAllocMusicVagCommand(const ISO_VAGCommand* user_command, int flag); +void InitVAGCmd(ISO_VAGCommand* cmd, int paused); +int HowManyBelowThisPriority(int pri); +ISO_VAGCommand* FindThisVagStream(const char* name, int id); +ISO_VAGCommand* SmartAllocVagCmd(ISO_VAGCommand* user_command); +void RemoveVagCmd(ISO_VAGCommand* cmd); +void SetNewVagCmdPri(ISO_VAGCommand* cmd, int pri); +void TerminateVAG(ISO_VAGCommand* cmd); +ISO_VAGCommand* FindThisMusicStream(const char* name, int id); +ISO_VAGCommand* FindVagStreamName(const char* name); +int AnyVagRunning(); +void PauseVAG(ISO_VAGCommand* cmd); +void InitVagCmds(); +void PauseVagStreams(bool music); +void UnPauseVagStreams(bool music); +void SetVagStreamsNoStart(int value); +ISO_VAGCommand* FindVagStreamId(int); +void SetVAGVol(ISO_VAGCommand* cmd); +void SetAllVagsVol(int); +void PauseVAGStreams(); +ISO_VAGCommand* FindNotQueuedVagCmd(); +void CalculateVAGVolumes(ISO_VAGCommand* cmd, int* l, int* r); +void SetVagStreamsNotScanned(); +void VAG_MarkLoopEnd(uint8_t* data, int offset); +void VAG_MarkLoopStart(uint8_t* data); +void RestartVag(ISO_VAGCommand* cmd, int p); +extern u32 g_nPlaybackMode; +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/vblank_handler.cpp b/game/overlord/jak3/vblank_handler.cpp new file mode 100644 index 0000000000..c9e1eed906 --- /dev/null +++ b/game/overlord/jak3/vblank_handler.cpp @@ -0,0 +1,201 @@ +#include "vblank_handler.h" + +#include + +#include "common/log/log.h" +#include "common/util/Assert.h" + +#include "game/overlord/jak3/dma.h" +#include "game/overlord/jak3/iso.h" +#include "game/overlord/jak3/sbank.h" +#include "game/overlord/jak3/srpc.h" +#include "game/overlord/jak3/ssound.h" +#include "game/overlord/jak3/streamlist.h" +#include "game/overlord/jak3/vag.h" +#include "game/sce/iop.h" + +namespace jak3 { +using namespace iop; +u32 g_nInfoEE = 0; +SoundIOPInfo g_SRPCSoundIOPInfo; +bool g_bVBlankInitialized = false; +s32 g_nVBlankThreadID = -1; +s32 g_nVBlankSemaphoreID = -1; +bool g_bVBlankRegistered = false; +u32 g_nIopTicks = 0; +u32 g_nFrameNum = 0; +void jak3_overlord_init_globals_vblank_handler() { + g_nInfoEE = 0; + g_SRPCSoundIOPInfo = {}; + g_bVBlankInitialized = false; + g_nVBlankThreadID = -1; + g_nVBlankSemaphoreID = -1; + g_bVBlankRegistered = false; + g_nIopTicks = 0; + g_nFrameNum = 0; +} + +int VBlankHandler(void*); +u32 VBlankThread(); + +void VBlank_Initialize() { + ThreadParam thread_param; + SemaParam sema_param; + + if (g_bVBlankInitialized == 0) { + thread_param.attr = 0x2000000; + thread_param.stackSize = 0x800; + thread_param.initPriority = 0x34; + thread_param.option = 0; + thread_param.entry = VBlankThread; + strcpy(thread_param.name, "vblank"); + g_nVBlankThreadID = CreateThread(&thread_param); + ASSERT(g_nVBlankThreadID >= 0); + sema_param.max_count = 200; // hack + sema_param.attr = 0; + sema_param.init_count = 0; + sema_param.option = 0; + g_nVBlankSemaphoreID = CreateSema(&sema_param); + ASSERT(g_nVBlankSemaphoreID >= 0); + int ret = StartThread(g_nVBlankThreadID, 0); + ASSERT(ret == 0); + RegisterVblankHandler(0, 0x40, VBlankHandler, 0); + g_bVBlankInitialized = true; + g_bVBlankRegistered = true; + } +} + +int VBlankHandler(void*) { + if ((g_bVBlankInitialized != 0) && (-1 < g_nVBlankSemaphoreID)) { + SignalSema(g_nVBlankSemaphoreID); // was iSignalSema + } + return 1; +} + +u32 VBlankThread() { + // char *pcVar1; + // int iVar2; + // uint uVar3; + // SoundBankInfo *pSVar4; + // ISO_VAGCommand *cmd; + // SoundBankInfo **ppSVar5; + // uint *puVar6; + // uint uVar7; + // int iVar8; + // int iVar9; + // SoundIOPInfo *local_30; + // void *local_2c; + // undefined4 local_28; + // undefined4 local_24; + // undefined4 local_20 [2]; + + do { + while ((g_bVBlankInitialized == 0 || (g_nVBlankSemaphoreID < 0))) { + DelayThread(1000000); + } + WaitSema(g_nVBlankSemaphoreID); + g_nIopTicks = g_nIopTicks + 1; + if (g_bSoundEnable != 0) { + CheckVagStreamsProgress(); + if ((g_nIopTicks & 1U) != 0) { + StreamListThread(); + } + if (g_nMusicFadeDir < 0) { + g_nMusicFade = g_nMusicFade + -0x200; + if (g_nMusicFade < 0) { + g_nMusicFade = 0; + LAB_00011f60: + g_nMusicFadeDir = 0; + } + } else { + if ((0 < g_nMusicFadeDir) && + (g_nMusicFade = g_nMusicFade + 0x400, 0x10000 < g_nMusicFade)) { + g_nMusicFade = 0x10000; + goto LAB_00011f60; + } + } + if (g_nInfoEE) { + g_nFrameNum = g_nFrameNum + 1; + // puVar6 = g_SRPCSoundIOPInfo.stream_status; + for (int i = 0; i < 4; i++) { + auto* cmd = &g_aVagCmds[i]; + u32 stream_status = cmd->pack_flags(); + + if ((cmd->flags.file_disappeared != 0) && (cmd->flags.paused == 0)) { + auto uVar3 = CalculateVAGPitch(0x400, cmd->pitch_cmd); + if (g_nFPS == 0) { + ASSERT_NOT_REACHED(); + } + cmd->clockd = cmd->clockd + uVar3 / g_nFPS; + } + + if ((cmd->flags.saw_chunks1 == 0) && (cmd->flags.clocks_set != 0)) { + g_SRPCSoundIOPInfo.stream_status[i] = stream_status; + g_SRPCSoundIOPInfo.stream_id[i] = cmd->id; + g_SRPCSoundIOPInfo.stream_position[i] = 0; + } else { + g_SRPCSoundIOPInfo.stream_status[i] = stream_status; + g_SRPCSoundIOPInfo.stream_id[i] = cmd->id; + g_SRPCSoundIOPInfo.stream_position[i] = cmd->position_for_ee; + } + } + // CpuSuspendIntr(local_20); + + // CpuResumeIntr(local_20[0]); + g_SRPCSoundIOPInfo.iop_ticks = g_nIopTicks; + g_SRPCSoundIOPInfo.freemem = 12345; // hack + g_SRPCSoundIOPInfo.frame = g_nFrameNum; + g_SRPCSoundIOPInfo.freemem2 = QueryTotalFreeMemSize(); + g_SRPCSoundIOPInfo.nocd = 0; // hack + g_SRPCSoundIOPInfo.dirtycd = 0; // hack + g_SRPCSoundIOPInfo.dupseg = -1; + g_SRPCSoundIOPInfo.diskspeed[0] = 0; + g_SRPCSoundIOPInfo.diskspeed[1] = 0; + g_SRPCSoundIOPInfo.lastspeed = 0; + + memset(&g_SRPCSoundIOPInfo.sound_bank0[0], 0, 8 * 16); + + if (gBanks[0]->in_use && gBanks[0]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank0, gBanks[0]->m_name1); + } + if (gBanks[1]->in_use && gBanks[1]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank1, gBanks[1]->m_name1); + } + if (gBanks[2]->in_use && gBanks[2]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank2, gBanks[2]->m_name1); + } + if (gBanks[3]->in_use && gBanks[3]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank3, gBanks[3]->m_name1); + } + if (gBanks[4]->in_use && gBanks[4]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank4, gBanks[4]->m_name1); + } + if (gBanks[5]->in_use && gBanks[5]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank5, gBanks[5]->m_name1); + } + if (gBanks[6]->in_use && gBanks[6]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank6, gBanks[6]->m_name1); + } + if (gBanks[7]->in_use && gBanks[7]->loaded) { + strcpy(g_SRPCSoundIOPInfo.sound_bank7, gBanks[7]->m_name1); + } + + for (int i = 0; i < 48; i++) { + g_SRPCSoundIOPInfo.chinfo[i] = (snd_GetVoiceStatus(i) != 1) - 1; + } + + sceSifDmaData dma; + dma.data = &g_SRPCSoundIOPInfo; + dma.addr = (void*)(u64)g_nInfoEE; + dma.size = sizeof(g_SRPCSoundIOPInfo); + static_assert(sizeof(g_SRPCSoundIOPInfo) == 0x2d0); + dma.mode = 0; + /*dmaid =*/sceSifSetDma(&dma, 1); + } + } + RunDeferredVoiceTrans(); + // Poll(&g_DvdDriver); + } while (true); +} + +} // namespace jak3 \ No newline at end of file diff --git a/game/overlord/jak3/vblank_handler.h b/game/overlord/jak3/vblank_handler.h new file mode 100644 index 0000000000..5c343e7a2b --- /dev/null +++ b/game/overlord/jak3/vblank_handler.h @@ -0,0 +1,12 @@ +#pragma once + +#include "common/common_types.h" + +#include "game/overlord/jak3/rpc_interface.h" + +namespace jak3 { +void jak3_overlord_init_globals_vblank_handler(); +void VBlank_Initialize(); +extern u32 g_nInfoEE; +extern SoundIOPInfo g_SRPCSoundIOPInfo; +} // namespace jak3 \ No newline at end of file diff --git a/game/runtime.cpp b/game/runtime.cpp index b39317b604..3f41177a2b 100644 --- a/game/runtime.cpp +++ b/game/runtime.cpp @@ -78,6 +78,8 @@ #include "game/overlord/jak2/stream.h" #include "game/overlord/jak2/streamlist.h" #include "game/overlord/jak2/vag.h" +#include "game/overlord/jak3/init.h" +#include "game/overlord/jak3/overlord.h" #include "game/system/Deci2Server.h" #include "game/system/iop_thread.h" #include "sce/deci2.h" @@ -269,33 +271,36 @@ void iop_runner(SystemThreadInterface& iface, GameVersion version) { iop::LIBRARY_register(&iop); Gfx::register_vsync_callback([&iop]() { iop.kernel.signal_vblank(); }); - jak1::dma_init_globals(); - jak2::dma_init_globals(); + if (version != GameVersion::Jak3) { + jak1::dma_init_globals(); + jak2::dma_init_globals(); - iso_init_globals(); - jak1::iso_init_globals(); - jak2::iso_init_globals(); + iso_init_globals(); + jak1::iso_init_globals(); + jak2::iso_init_globals(); - fake_iso_init_globals(); - jak1::fake_iso_init_globals(); - jak2::iso_cd_init_globals(); + fake_iso_init_globals(); + jak1::fake_iso_init_globals(); + jak2::iso_cd_init_globals(); - jak1::iso_queue_init_globals(); - jak2::iso_queue_init_globals(); + jak1::iso_queue_init_globals(); + jak2::iso_queue_init_globals(); - jak2::spusstreams_init_globals(); - jak1::ramdisk_init_globals(); - sbank_init_globals(); + jak2::spusstreams_init_globals(); + jak1::ramdisk_init_globals(); + sbank_init_globals(); - // soundcommon - jak1::srpc_init_globals(); - jak2::srpc_init_globals(); - srpc_init_globals(); - ssound_init_globals(); - jak2::ssound_init_globals(); + // soundcommon + jak1::srpc_init_globals(); + jak2::srpc_init_globals(); + srpc_init_globals(); + ssound_init_globals(); + jak2::ssound_init_globals(); + + jak1::stream_init_globals(); + jak2::stream_init_globals(); + } - jak1::stream_init_globals(); - jak2::stream_init_globals(); prof().end_event(); iface.initialization_complete(); @@ -323,9 +328,11 @@ void iop_runner(SystemThreadInterface& iface, GameVersion version) { jak1::start_overlord_wrapper(iop.overlord_argc, iop.overlord_argv, &complete); break; case GameVersion::Jak2: - case GameVersion::Jak3: // TODO: jak3 using jak2's overlord. jak2::start_overlord_wrapper(iop.overlord_argc, iop.overlord_argv, &complete); break; + case GameVersion::Jak3: + jak3::start_overlord_wrapper(&complete); + break; default: ASSERT_NOT_REACHED(); } @@ -334,7 +341,6 @@ void iop_runner(SystemThreadInterface& iface, GameVersion version) { { auto p = scoped_prof("overlord-wait-for-init"); while (complete == false) { - prof().root_event(); iop.kernel.dispatch(); } } @@ -344,7 +350,7 @@ void iop_runner(SystemThreadInterface& iface, GameVersion version) { // IOP Kernel loop while (!iface.get_want_exit() && !iop.want_exit) { - prof().root_event(); + // prof().root_event(); // The IOP scheduler informs us of how many microseconds are left until it has something to do. // So we can wait for that long or until something else needs it to wake up. auto wait_duration = iop.kernel.dispatch(); diff --git a/game/sce/iop.cpp b/game/sce/iop.cpp index 2784c9fa42..6756fa1513 100644 --- a/game/sce/iop.cpp +++ b/game/sce/iop.cpp @@ -174,6 +174,10 @@ void DelayThread(u32 usec) { iop->kernel.DelayThread(usec); } +void YieldThread() { + iop->kernel.YieldThread(); +} + int sceCdBreak() { return 1; } @@ -199,16 +203,20 @@ s32 PollMbx(MsgPacket** recvmsg, int mbxid) { return iop->kernel.PollMbx((void**)recvmsg, mbxid); } +s32 ReceiveMbx(MsgPacket** recvmsg, int mbxid) { + return iop->kernel.ReceiveMbx((void**)recvmsg, mbxid); +} + s32 PeekMbx(s32 mbx) { return iop->kernel.PeekMbx(mbx); } -static int now = 0; +s32 MbxSize(s32 mbx) { + return iop->kernel.MbxSize(mbx); +} -void GetSystemTime(SysClock* time) { - time->lo = 0; - time->hi = now; - now += 10; +u32 GetSystemTimeLow() { + return iop->kernel.GetSystemTimeLow(); } void SleepThread() { @@ -216,7 +224,7 @@ void SleepThread() { } s32 CreateSema(SemaParam* param) { - return iop->kernel.CreateSema(param->attr, param->option, param->max_count, param->init_count); + return iop->kernel.CreateSema(param->attr, param->option, param->init_count, param->max_count); } s32 WaitSema(s32 sema) { @@ -231,6 +239,22 @@ s32 PollSema(s32 sema) { return iop->kernel.PollSema(sema); } +s32 CreateEventFlag(const EventFlagParam* param) { + return iop->kernel.CreateEventFlag(param->attr, param->option, param->init_pattern); +} + +s32 ClearEventFlag(s32 flag, u32 pattern) { + return iop->kernel.ClearEventFlag(flag, pattern); +} + +s32 WaitEventFlag(s32 flag, u32 pattern, u32 mode) { + return iop->kernel.WaitEventFlag(flag, pattern, mode); +} + +s32 SetEventFlag(s32 flag, u32 pattern) { + return iop->kernel.SetEventFlag(flag, pattern); +} + s32 WakeupThread(s32 thid) { iop->kernel.WakeupThread(thid); return 0; diff --git a/game/sce/iop.h b/game/sce/iop.h index 50a06088c1..62fa6549ac 100644 --- a/game/sce/iop.h +++ b/game/sce/iop.h @@ -30,6 +30,10 @@ #define SA_THFIFO 0 #define SA_THPRI 1 +#define EW_AND 0 +#define EW_OR 1 +#define EW_CLEAR 0x10 + class IOP; namespace iop { @@ -56,7 +60,7 @@ struct sceCdRMode { }; struct sceSifDmaData { - void* data; + const void* data; void* addr; unsigned int size; unsigned int mode; @@ -85,7 +89,7 @@ struct ThreadParam { int initPriority; // added! - char name[64]; + char name[64] = ""; }; struct SemaParam { @@ -95,6 +99,12 @@ struct SemaParam { int32_t max_count; }; +struct EventFlagParam { + u32 attr; + u32 option; + u32 init_pattern; +}; + // void PS2_RegisterIOP(IOP *iop); int QueryTotalFreeMemSize(); void* AllocSysMemory(int type, unsigned long size, void* addr); @@ -105,6 +115,7 @@ void CpuDisableIntr(); void CpuEnableIntr(); void SleepThread(); void DelayThread(u32 usec); +void YieldThread(); s32 CreateThread(ThreadParam* param); s32 ExitThread(); s32 StartThread(s32 thid, u32 arg); @@ -135,16 +146,23 @@ u32 sceSifSetDma(sceSifDmaData* sdd, int len); s32 SendMbx(int mbxid, void* sendmsg); s32 PollMbx(MsgPacket** recvmsg, int mbxid); +s32 ReceiveMbx(MsgPacket** recvmsg, int mbxid); s32 PeekMbx(s32 mbx); +s32 MbxSize(s32 mbx); s32 CreateMbx(MbxParam* param); -void GetSystemTime(SysClock* time); +u32 GetSystemTimeLow(); s32 CreateSema(SemaParam* param); s32 WaitSema(s32 sema); s32 SignalSema(s32 sema); s32 PollSema(s32 sema); +s32 CreateEventFlag(const EventFlagParam* param); +s32 ClearEventFlag(s32 flag, u32 pattern); +s32 SetEventFlag(s32 flag, u32 pattern); +s32 WaitEventFlag(s32 flag, u32 pattern, u32 mode); + s32 RegisterVblankHandler(int edge, int priority, int (*handler)(void*), void* userdata); void FlushDcache(); diff --git a/game/settings/settings.cpp b/game/settings/settings.cpp index 93092e6d31..bd1621fa1b 100644 --- a/game/settings/settings.cpp +++ b/game/settings/settings.cpp @@ -53,6 +53,8 @@ void DebugSettings::load_settings() { } void DebugSettings::save_settings() { + // Update the version string as we are now saving it back ground + version = current_version; json data = *this; auto debug_settings_filename = file_util::get_user_misc_dir(g_game_version) / "debug-settings.json"; @@ -65,12 +67,17 @@ void to_json(json& j, const DisplaySettings& obj) { json_serialize(display_id); json_serialize(window_xpos); json_serialize(window_ypos); + json_serialize(display_mode); } void from_json(const json& j, DisplaySettings& obj) { json_deserialize_if_exists(version); json_deserialize_if_exists(display_id); json_deserialize_if_exists(window_xpos); json_deserialize_if_exists(window_ypos); + if (j.contains("display_mode")) { + int mode = j.at("display_mode"); + obj.display_mode = static_cast(mode); + } } DisplaySettings::DisplaySettings() {} @@ -92,6 +99,8 @@ void DisplaySettings::load_settings() { } void DisplaySettings::save_settings() { + // Update the version string as we are now saving it back ground + version = current_version; json data = *this; auto file_path = file_util::get_user_settings_dir(g_game_version) / "display-settings.json"; file_util::create_dir_if_needed_for_file(file_path); @@ -139,6 +148,8 @@ void InputSettings::load_settings() { } void InputSettings::save_settings() { + // Update the version string as we are now saving it back ground + version = current_version; json data = *this; auto file_path = file_util::get_user_settings_dir(g_game_version) / "input-settings.json"; file_util::create_dir_if_needed_for_file(file_path); diff --git a/game/settings/settings.h b/game/settings/settings.h index 2b66c04e54..d3d2cc7074 100644 --- a/game/settings/settings.h +++ b/game/settings/settings.h @@ -11,7 +11,8 @@ namespace game_settings { struct DebugSettings { DebugSettings(); - std::string version = "1.2"; + std::string current_version = "1.2"; + std::string version = current_version; bool show_imgui = false; int imgui_font_size = 16; @@ -32,13 +33,17 @@ void to_json(json& j, const DebugSettings& obj); void from_json(const json& j, DebugSettings& obj); struct DisplaySettings { + enum class DisplayMode { Windowed = 0, Fullscreen = 1, Borderless = 2 }; + DisplaySettings(); - std::string version = "1.1"; + std::string current_version = "1.2"; + std::string version = current_version; int window_xpos = 50; int window_ypos = 50; int display_id = 0; + DisplayMode display_mode = DisplayMode::Borderless; void load_settings(); void save_settings(); @@ -50,7 +55,8 @@ void from_json(const json& j, DisplaySettings& obj); struct InputSettings { InputSettings(); - std::string version = "1.0"; + std::string current_version = "1.0"; + std::string version = current_version; // NOTE - assumes only port 0 std::string last_selected_controller_guid = ""; diff --git a/game/sound/989snd/blocksound_handler.cpp b/game/sound/989snd/blocksound_handler.cpp index 4429b472ce..f1e189d5a0 100644 --- a/game/sound/989snd/blocksound_handler.cpp +++ b/game/sound/989snd/blocksound_handler.cpp @@ -15,8 +15,9 @@ BlockSoundHandler::BlockSoundHandler(SoundBank& bank, VoiceManager& vm, s32 sfx_vol, s32 sfx_pan, - SndPlayParams& params) - : m_group(sfx.VolGroup), m_sfx(sfx), m_vm(vm), m_bank(bank) { + SndPlayParams& params, + u32 sound_id) + : m_group(sfx.VolGroup), m_sfx(sfx), m_vm(vm), m_bank(bank), m_sound_id(sound_id) { s32 vol, pan, pitch_mod, pitch_bend; if (sfx_vol == -1) { sfx_vol = sfx.Vol; diff --git a/game/sound/989snd/blocksound_handler.h b/game/sound/989snd/blocksound_handler.h index 52920b3650..f1b30a80fa 100644 --- a/game/sound/989snd/blocksound_handler.h +++ b/game/sound/989snd/blocksound_handler.h @@ -25,7 +25,8 @@ class BlockSoundHandler : public SoundHandler { VoiceManager& vm, s32 sfx_vol, s32 sfx_pan, - SndPlayParams& params); + SndPlayParams& params, + u32 sound_id); ~BlockSoundHandler() override; bool Tick() override; @@ -39,6 +40,7 @@ class BlockSoundHandler : public SoundHandler { void SetPMod(s32 mod) override; void SetRegister(u8 reg, u8 value) override { m_registers.at(reg) = value; }; void SetPBend(s32 bend) override; + u32 SoundID() const override { return m_sound_id; } void DoGrain(); @@ -86,5 +88,7 @@ class BlockSoundHandler : public SoundHandler { s32 m_countdown{0}; u32 m_next_grain{0}; + + u32 m_sound_id{0}; }; } // namespace snd diff --git a/game/sound/989snd/player.cpp b/game/sound/989snd/player.cpp index be5821928f..da8c7e6b1f 100644 --- a/game/sound/989snd/player.cpp +++ b/game/sound/989snd/player.cpp @@ -193,6 +193,14 @@ void Player::StopSound(u32 sound_id) { // m_handlers.erase(sound_id); } +u32 Player::GetSoundID(u32 sound_handle) { + std::scoped_lock lock(mTickLock); + auto handler = mHandlers.find(sound_handle); + if (handler == mHandlers.end()) + return -1; + return handler->second->SoundID(); +} + void Player::SetSoundReg(u32 sound_id, u8 reg, u8 value) { std::scoped_lock lock(mTickLock); if (mHandlers.find(sound_id) == mHandlers.end()) { diff --git a/game/sound/989snd/player.h b/game/sound/989snd/player.h index c6c18e3f76..f03498c20a 100644 --- a/game/sound/989snd/player.h +++ b/game/sound/989snd/player.h @@ -48,6 +48,7 @@ class Player { void SetMasterVolume(u32 group, s32 volume); void UnloadBank(BankHandle bank_handle); void StopSound(u32 sound_handle); + u32 GetSoundID(u32 sound_handle); void SetPanTable(VolPair* pantable); void SetPlaybackMode(s32 mode); void PauseSound(s32 sound_handle); diff --git a/game/sound/989snd/sfxblock.cpp b/game/sound/989snd/sfxblock.cpp index 9de0dac857..9fc9920ec1 100644 --- a/game/sound/989snd/sfxblock.cpp +++ b/game/sound/989snd/sfxblock.cpp @@ -18,7 +18,7 @@ std::optional> SFXBlock::MakeHandler(VoiceManager& return std::nullopt; } - auto handler = std::make_unique(*this, SFX, vm, vol, pan, params); + auto handler = std::make_unique(*this, SFX, vm, vol, pan, params, sound_id); return handler; } diff --git a/game/sound/989snd/sound_handler.h b/game/sound/989snd/sound_handler.h index 45594f41a8..85ef182134 100644 --- a/game/sound/989snd/sound_handler.h +++ b/game/sound/989snd/sound_handler.h @@ -24,5 +24,6 @@ class SoundHandler { virtual void SetPMod(s32 mod) = 0; virtual void SetPBend(s32 /*mod*/){}; virtual void SetRegister(u8 /*reg*/, u8 /*value*/) {} + virtual u32 SoundID() const { return -1; } }; } // namespace snd diff --git a/game/sound/sdshim.cpp b/game/sound/sdshim.cpp index 12247d2628..251c9fb00e 100644 --- a/game/sound/sdshim.cpp +++ b/game/sound/sdshim.cpp @@ -9,7 +9,7 @@ #include "fmt/core.h" -std::shared_ptr voices[4]; +std::shared_ptr voices[kNVoices]; u8 spu_memory[0x15160 * 10]; static sceSdTransIntrHandler trans_handler[2] = {nullptr, nullptr}; @@ -21,7 +21,7 @@ u32 sceSdGetSwitch(u32 entry) { } snd::Voice* voice_from_entry(u32 entry) { - u32 it = entry & 3; + u32 it = entry % kNVoices; return voices[it].get(); } @@ -66,7 +66,6 @@ void sceSdSetSwitch(u32 entry, u32 value) { void sceSdSetAddr(u32 entry, u32 value) { [[maybe_unused]] u32 core = entry & 1; [[maybe_unused]] u32 voice_id = (entry >> 1) & 0x1f; - auto* voice = voice_from_entry(voice_id); if (!voice) { return; @@ -123,10 +122,10 @@ void sceSdSetTransIntrHandler(s32 channel, sceSdTransIntrHandler handler, void* userdata[channel] = data; } -u32 sceSdVoiceTrans(s32 channel, s32 mode, void* iop_addr, u32 spu_addr, u32 size) { +u32 sceSdVoiceTrans(s32 channel, s32 mode, const void* iop_addr, u32 spu_addr, u32 size) { memcpy(&spu_memory[spu_addr], iop_addr, size); if (trans_handler[channel] != nullptr) { - trans_handler[channel](channel, userdata); + trans_handler[channel](channel, userdata[channel]); } return size; } diff --git a/game/sound/sdshim.h b/game/sound/sdshim.h index fd2eb4dc52..fc0a9dfe58 100644 --- a/game/sound/sdshim.h +++ b/game/sound/sdshim.h @@ -19,7 +19,8 @@ #define SD_S_KOFF (0x16 << 8) #define SD_VOICE(_core, _v) ((_core) | ((_v) << 1)) -extern std::shared_ptr voices[4]; +constexpr int kNVoices = 8; +extern std::shared_ptr voices[kNVoices]; extern u8 spu_memory[0x15160 * 10]; using sceSdTransIntrHandler = int (*)(int, void*); @@ -30,4 +31,4 @@ void sceSdSetSwitch(u32 entry, u32 value); void sceSdSetAddr(u32 entry, u32 value); void sceSdSetParam(u32 entry, u32 value); void sceSdSetTransIntrHandler(s32 channel, sceSdTransIntrHandler, void* data); -u32 sceSdVoiceTrans(s32 channel, s32 mode, void* iop_addr, u32 spu_addr, u32 size); +u32 sceSdVoiceTrans(s32 channel, s32 mode, const void* iop_addr, u32 spu_addr, u32 size); diff --git a/game/sound/sndshim.cpp b/game/sound/sndshim.cpp index 5831010805..c52f2e2f83 100644 --- a/game/sound/sndshim.cpp +++ b/game/sound/sndshim.cpp @@ -105,6 +105,14 @@ void snd_StopSound(s32 sound_handle) { } } +u32 snd_GetSoundID(s32 sound_handle) { + if (player) { + return player->GetSoundID(sound_handle); + } else { + return -1; + } +} + void snd_SetSoundVolPan(s32 sound_handle, s32 vol, s32 pan) { if (player) { player->SetSoundVolPan(sound_handle, vol, pan); @@ -220,6 +228,26 @@ snd::BankHandle snd_BankLoadEx(const char* filename, } } +namespace { +bool started = false; +std::vector sbk_data; +} // namespace + +void snd_BankLoadFromIOPPartialEx_Start() { + started = true; + sbk_data.clear(); +} + +void snd_BankLoadFromIOPPartialEx(const u8* data, u32 length, u32 spu_mem_loc, u32 spu_mem_size) { + sbk_data.insert(sbk_data.end(), data, data + length); +} +void snd_BankLoadFromIOPPartialEx_Completion() { + ASSERT(started); + started = false; + player->LoadBank(std::span(sbk_data)); + sbk_data.clear(); +} + s32 snd_GetVoiceStatus(s32 voice) { // hacky thincg to say that voice 0 is uses allocated if (voice == 0) { diff --git a/game/sound/sndshim.h b/game/sound/sndshim.h index 998029803c..bb0f07e5f1 100644 --- a/game/sound/sndshim.h +++ b/game/sound/sndshim.h @@ -35,6 +35,7 @@ void snd_SetPanTable(s16* table); void snd_SetPlayBackMode(s32 mode); s32 snd_SoundIsStillPlaying(s32 sound_handle); void snd_StopSound(s32 sound_handle); +u32 snd_GetSoundID(s32 sound_handle); void snd_SetSoundVolPan(s32 sound_handle, s32 vol, s32 pan); void snd_SetMasterVolume(s32 which, s32 volume); void snd_UnloadBank(snd::BankHandle bank_handle); @@ -69,6 +70,11 @@ snd::BankHandle snd_BankLoadEx(const char* filepath, s32 data_offset, u32 spu_mem_loc, u32 spu_mem_size); + +void snd_BankLoadFromIOPPartialEx_Start(); +void snd_BankLoadFromIOPPartialEx(const u8* data, u32 length, u32 spu_mem_loc, u32 spu_mem_size); +void snd_BankLoadFromIOPPartialEx_Completion(); + s32 snd_GetVoiceStatus(s32 voice); s32 snd_GetFreeSPUDMA(); void snd_FreeSPUDMA(s32 channel); diff --git a/game/system/IOP_Kernel.cpp b/game/system/IOP_Kernel.cpp index 10ce6e88fa..56b8d663ff 100644 --- a/game/system/IOP_Kernel.cpp +++ b/game/system/IOP_Kernel.cpp @@ -2,6 +2,7 @@ #include +#include "common/global_profiler/GlobalProfiler.h" #include "common/log/log.h" #include "common/util/Assert.h" #include "common/util/FileUtil.h" @@ -27,12 +28,27 @@ void IopThread::functionWrapper() { } } +IOP_Kernel::IOP_Kernel() { + // this ugly hack + threads.reserve(16); + CreateThread("null-thread", nullptr, 0); + CreateMbx(); + CreateSema(0, 0, 0, 0); + kernel_thread = co_active(); + m_start_time = time_point_cast(steady_clock::now()); +} + /* ** ----------------------------------------------------------------------------- ** Functions callable by threads ** ----------------------------------------------------------------------------- */ +u32 IOP_Kernel::GetSystemTimeLow() { + auto delta_time = time_point_cast(steady_clock::now()) - m_start_time; + return delta_time.count() * 36.864; +} + /*! * Create a new thread. Will not run the thread. */ @@ -89,6 +105,12 @@ void IOP_Kernel::SleepThread() { leaveThread(); } +void IOP_Kernel::YieldThread() { + ASSERT(_currentThread); + _currentThread->state = IopThread::State::Ready; + leaveThread(); +} + /*! * Wake up a thread. Doesn't run it immediately though. */ @@ -118,6 +140,105 @@ s32 IOP_Kernel::WaitSema(s32 id) { return KE_OK; } +s32 IOP_Kernel::ClearEventFlag(s32 id, u32 pattern) { + auto& ef = event_flags.at(id); + // yes, this seems backward, but the manual says this is how it works. + ef.value &= pattern; + return 0; +} + +namespace { +bool event_flag_check(u32 pattern, u32 check_pattern, u32 mode) { + if (mode & 1) { + // or + return (pattern & check_pattern); + } else { + // and + return (pattern & check_pattern) == check_pattern; + } +} +} // namespace + +s32 IOP_Kernel::WaitEventFlag(s32 flag, u32 pattern, u32 mode) { + auto& ef = event_flags.at(flag); + // check to see if we already match + if (event_flag_check(ef.value, pattern, mode)) { + if (mode & 0x10) { + ef.value = 0; + } + return KE_OK; + } else { + if (!ef.multiple_waiters_allowed && !ef.wait_list.empty()) { + lg::die("Multiple thread trying to wait on an event flag, but this option was not enabled."); + } + + auto& wait_entry = ef.wait_list.emplace_back(); + wait_entry.pattern = pattern; + wait_entry.mode = mode; + wait_entry.thread = _currentThread; + + _currentThread->state = IopThread::State::Wait; + _currentThread->waitType = IopThread::Wait::EventFlag; + leaveThread(); + + return KE_OK; + } +} + +s32 IOP_Kernel::SetEventFlag(s32 flag, u32 pattern) { + auto& ef = event_flags.at(flag); + ef.value |= pattern; + + for (auto it = ef.wait_list.begin(); it != ef.wait_list.end();) { + if (event_flag_check(ef.value, it->pattern, it->mode)) { + if (it->mode & 0x10) { + ef.value = 0; + } + it->thread->waitType = IopThread::Wait::None; + it->thread->state = IopThread::State::Ready; + it = ef.wait_list.erase(it); + } else { + ++it; + } + } + + return KE_OK; +} + +s32 IOP_Kernel::ReceiveMbx(void** msg, s32 id) { + auto& box = mbxs.at(id); + if (!box.messages.empty()) { + auto ret = PollMbx(msg, id); + ASSERT(ret == KE_OK); + return KE_OK; + } + + ASSERT(!box.wait_thread); // don't know how to deal with this, hopefully doesn't come up. + + box.wait_thread = _currentThread; + _currentThread->state = IopThread::State::Wait; + _currentThread->waitType = IopThread::Wait::Messagebox; + leaveThread(); + + auto ret = PollMbx(msg, id); + ASSERT(ret == KE_OK); + return KE_OK; +} + +s32 IOP_Kernel::SendMbx(s32 mbx, void* value) { + ASSERT(mbx < (s32)mbxs.size()); + auto& box = mbxs[mbx]; + box.messages.push(value); + auto* to_run = box.wait_thread; + + if (to_run) { + box.wait_thread = nullptr; + to_run->waitType = IopThread::Wait::None; + to_run->state = IopThread::State::Ready; + } + return 0; +} + s32 IOP_Kernel::SignalSema(s32 id) { auto& sema = semas.at(id); @@ -265,6 +386,9 @@ std::optional IOP_Kernel::dispatch() { // Run until all threads are idle IopThread* next = schedNext(); + if (next) { + prof().root_event(); + } while (next != nullptr) { // Check vblank interrupt if (vblank_handler != nullptr && vblank_recieved) { @@ -272,6 +396,7 @@ std::optional IOP_Kernel::dispatch() { vblank_recieved = false; } // printf("[IOP Kernel] Dispatch %s (%d)\n", next->name.c_str(), next->thID); + auto p = scoped_prof(next->name.c_str()); runThread(next); updateDelay(); processWakeups(); diff --git a/game/system/IOP_Kernel.h b/game/system/IOP_Kernel.h index b8a5b51389..3409d639a9 100644 --- a/game/system/IOP_Kernel.h +++ b/game/system/IOP_Kernel.h @@ -53,14 +53,10 @@ struct IopThread { Dormant, }; - enum class Wait { - None, - Semaphore, - Delay, - }; + enum class Wait { None, Semaphore, Delay, Messagebox, EventFlag }; - IopThread(std::string n, void (*f)(), s32 ID, u32 priority) - : name(std::move(n)), function(f), priority(priority), thID(ID) { + IopThread(std::string n, void (*f)(), s32 ID, u32 pri) + : name(std::move(n)), function(f), priority(pri), thID(ID) { thread = co_create(0x300000, functionWrapper); } @@ -79,8 +75,12 @@ struct IopThread { struct Semaphore { enum class attribute { fifo, prio }; - Semaphore(attribute attr, s32 option, s32 init_count, s32 max_count) - : attr(attr), option(option), count(init_count), initCount(init_count), maxCount(max_count) {} + Semaphore(attribute _attr, s32 _option, s32 init_count, s32 max_count) + : attr(_attr), + option(_option), + count(init_count), + initCount(init_count), + maxCount(max_count) {} attribute attr{attribute::fifo}; u32 option{0}; @@ -91,17 +91,26 @@ struct Semaphore { std::list wait_list; }; +struct EventFlagWaiter { + IopThread* thread = nullptr; + u32 pattern = 0; + u32 mode = 0; +}; + +struct EventFlag { + bool multiple_waiters_allowed = false; + u32 value = 0; + std::list wait_list; +}; + +struct Messagebox { + std::queue messages; + IopThread* wait_thread = nullptr; +}; + class IOP_Kernel { public: - IOP_Kernel() { - // this ugly hack - threads.reserve(16); - CreateThread("null-thread", nullptr, 0); - CreateMbx(); - CreateSema(0, 0, 0, 0); - kernel_thread = co_active(); - } - + IOP_Kernel(); s32 CreateThread(std::string n, void (*f)(), u32 priority); s32 ExitThread(); void StartThread(s32 id); @@ -109,6 +118,7 @@ class IOP_Kernel { void SleepThread(); void WakeupThread(s32 id); void iWakeupThread(s32 id); + void YieldThread(); std::optional dispatch(); void set_rpc_queue(iop::sceSifQueueData* qd, u32 thread); void rpc_loop(iop::sceSifQueueData* qd); @@ -137,30 +147,29 @@ class IOP_Kernel { */ s32 PollMbx(void** msg, s32 mbx) { ASSERT(mbx < (s32)mbxs.size()); - s32 gotSomething = mbxs[mbx].empty() ? 0 : 1; + s32 gotSomething = mbxs[mbx].messages.empty() ? 0 : 1; if (gotSomething) { - void* thing = mbxs[mbx].front(); + void* thing = mbxs[mbx].messages.front(); if (msg) { *msg = thing; } - mbxs[mbx].pop(); + mbxs[mbx].messages.pop(); } return gotSomething ? KE_OK : KE_MBOX_NOMSG; } - s32 PeekMbx(s32 mbx) { return !mbxs[mbx].empty(); } + s32 PeekMbx(s32 mbx) { return !mbxs[mbx].messages.empty(); } + s32 MbxSize(s32 mbx) { return mbxs[mbx].messages.size(); } + + s32 ReceiveMbx(void** msg, s32 id); /*! * Push something into a mbx */ - s32 SendMbx(s32 mbx, void* value) { - ASSERT(mbx < (s32)mbxs.size()); - mbxs[mbx].push(value); - return 0; - } + s32 SendMbx(s32 mbx, void* value); s32 CreateSema(s32 attr, s32 option, s32 init_count, s32 max_count) { s32 id = semas.size(); @@ -172,11 +181,27 @@ class IOP_Kernel { s32 SignalSema(s32 id); s32 PollSema(s32 id); + s32 CreateEventFlag(s32 attr, s32 option, u32 init_pattern) { + ASSERT(option == 0); + s32 id = event_flags.size(); + auto& flag = event_flags.emplace_back(); + flag.value = init_pattern; + flag.multiple_waiters_allowed = attr == 2; + return id; + } + + s32 WaitEventFlag(s32 flag, u32 pattern, u32 mode); + s32 SetEventFlag(s32 flag, u32 pattern); + + s32 ClearEventFlag(s32 id, u32 pattern); + s32 RegisterVblankHandler(int (*handler)(void*)) { vblank_handler = handler; return 0; } + u32 GetSystemTimeLow(); + void signal_vblank() { vblank_recieved = true; }; bool sif_busy(u32 id); @@ -198,17 +223,20 @@ class IOP_Kernel { IopThread* schedNext(); std::optional nextWakeup(); - s32 (*vblank_handler)(void*); + s32 (*vblank_handler)(void*) = nullptr; std::atomic_bool vblank_recieved = false; cothread_t kernel_thread; s32 _nextThID = 0; IopThread* _currentThread = nullptr; std::vector threads; - std::vector> mbxs; + std::vector mbxs; std::vector sif_records; std::vector semas; + std::vector event_flags; std::queue wakeup_queue; bool mainThreadSleep = false; std::mutex sif_mtx, wakeup_mtx; + + time_stamp m_start_time; }; diff --git a/game/system/hid/display_manager.cpp b/game/system/hid/display_manager.cpp index 87620b2b08..5094c8302a 100644 --- a/game/system/hid/display_manager.cpp +++ b/game/system/hid/display_manager.cpp @@ -7,12 +7,12 @@ #include "fmt/core.h" #include "fmt/format.h" -DisplayManager::DisplayManager(SDL_Window* window) - : m_window(window), m_selected_fullscreen_display_id(0) { +DisplayManager::DisplayManager(SDL_Window* window) : m_window(window) { prof().instant_event("ROOT"); { auto p = scoped_prof("display_manager::init"); - m_display_settings.load_settings(); + // initialize settings + m_display_settings = game_settings::DisplaySettings(); #ifdef _WIN32 // Windows hint to disable OS level forced scaling and allow native resolution at non 100% // scales @@ -20,10 +20,11 @@ DisplayManager::DisplayManager(SDL_Window* window) #endif update_curr_display_info(); update_video_modes(); - // Load display settings from a file - m_display_settings = game_settings::DisplaySettings(); + // Load from file now (after initializing current window settings) + m_display_settings.load_settings(); // Adjust window / monitor position initialize_window_position_from_settings(); + set_display_mode(m_display_settings.display_mode); } } @@ -31,8 +32,7 @@ DisplayManager::~DisplayManager() { prof().instant_event("ROOT"); { auto p = scoped_prof("display_manager::destroy"); - if (m_window_display_mode == WindowDisplayMode::Windowed) { - m_display_settings.display_id = m_active_display_id; + if (m_display_settings.display_mode == game_settings::DisplaySettings::DisplayMode::Windowed) { m_display_settings.window_xpos = m_window_xpos; m_display_settings.window_ypos = m_window_ypos; } @@ -44,9 +44,11 @@ void DisplayManager::initialize_window_position_from_settings() { // Check that the display id is still valid if (m_current_display_modes.find(m_display_settings.display_id) == m_current_display_modes.end()) { + lg::warn("[DISPLAY] Saved display ID is no longer valid, resetting to display 0"); m_display_settings.display_id = 0; m_display_settings.window_xpos = 50; m_display_settings.window_ypos = 50; + m_display_settings.save_settings(); } SDL_Rect rect; @@ -58,11 +60,13 @@ void DisplayManager::initialize_window_position_from_settings() { // Adjust the settings if they are out of bounds if (m_display_settings.window_xpos <= rect.x || m_display_settings.window_xpos + 50 >= rect.x + rect.w) { + lg::warn("[DISPLAY] Saved xpos is out of bounds, resetting"); m_display_settings.window_xpos = rect.x + 50; m_display_settings.save_settings(); } if (m_display_settings.window_ypos <= rect.y || m_display_settings.window_ypos + 50 > rect.y + rect.h) { + lg::warn("[DISPLAY] Saved ypos is out of bounds, resetting"); m_display_settings.window_ypos = rect.y + 50; m_display_settings.save_settings(); } @@ -133,11 +137,11 @@ void DisplayManager::process_ee_events() { case EEDisplayEventType::SET_WINDOW_SIZE: set_window_size(std::get(evt.param1), std::get(evt.param2)); break; - case EEDisplayEventType::SET_WINDOW_DISPLAY_MODE: - set_window_display_mode(std::get(evt.param1)); + case EEDisplayEventType::SET_DISPLAY_MODE: + set_display_mode(std::get(evt.param1)); break; - case EEDisplayEventType::SET_FULLSCREEN_DISPLAY_ID: - set_fullscreen_display_id(std::get(evt.param1)); + case EEDisplayEventType::SET_DISPLAY_ID: + set_display_id(std::get(evt.param1)); break; } ee_event_queue.pop(); @@ -152,25 +156,25 @@ std::string DisplayManager::get_connected_display_name(int id) { } int DisplayManager::get_active_display_refresh_rate() { - if (m_active_display_id >= 0 && - m_current_display_modes.find(m_active_display_id) != m_current_display_modes.end()) { - return m_current_display_modes.at(m_active_display_id).refresh_rate; + if (get_active_display_id() >= 0 && + m_current_display_modes.find(get_active_display_id()) != m_current_display_modes.end()) { + return m_current_display_modes.at(get_active_display_id()).refresh_rate; } return 0; } int DisplayManager::get_screen_width() { - if (m_active_display_id >= 0 && - m_current_display_modes.find(m_active_display_id) != m_current_display_modes.end()) { - return m_current_display_modes.at(m_active_display_id).screen_width; + if (get_active_display_id() >= 0 && + m_current_display_modes.find(get_active_display_id()) != m_current_display_modes.end()) { + return m_current_display_modes.at(get_active_display_id()).screen_width; } return 640; } int DisplayManager::get_screen_height() { - if (m_active_display_id >= 0 && - m_current_display_modes.find(m_active_display_id) != m_current_display_modes.end()) { - return m_current_display_modes.at(m_active_display_id).screen_height; + if (get_active_display_id() >= 0 && + m_current_display_modes.find(get_active_display_id()) != m_current_display_modes.end()) { + return m_current_display_modes.at(get_active_display_id()).screen_height; } return 480; } @@ -182,6 +186,16 @@ Resolution DisplayManager::get_resolution(int id) { return {0, 0, 0.0}; } +bool DisplayManager::is_supported_resolution(int width, int height) { + for (const auto resolution : m_available_resolutions) { + if (resolution.width == width && resolution.height == height) { + return true; + } + } + lg::warn("[DISPLAY] {}x{} is not a supported resolution", width, height); + return false; +} + void DisplayManager::enqueue_set_window_size(int width, int height) { const std::lock_guard lock(event_queue_mtx); ee_event_queue.push({EEDisplayEventType::SET_WINDOW_SIZE, width, height}); @@ -191,54 +205,58 @@ void DisplayManager::set_window_size(int width, int height) { SDL_SetWindowSize(m_window, width, height); } -void DisplayManager::enqueue_set_window_display_mode(WindowDisplayMode mode) { +void DisplayManager::enqueue_set_window_display_mode( + game_settings::DisplaySettings::DisplayMode mode) { const std::lock_guard lock(event_queue_mtx); - ee_event_queue.push({EEDisplayEventType::SET_WINDOW_DISPLAY_MODE, mode, {}}); + ee_event_queue.push({EEDisplayEventType::SET_DISPLAY_MODE, mode, {}}); } -void DisplayManager::set_window_display_mode(WindowDisplayMode mode) { +void DisplayManager::set_display_mode(game_settings::DisplaySettings::DisplayMode mode) { + lg::info("[DISPLAY] Setting to display mode: {}", static_cast(mode)); // https://wiki.libsdl.org/SDL2/SDL_SetWindowFullscreen int result = 0; switch (mode) { - case WindowDisplayMode::Windowed: + case game_settings::DisplaySettings::DisplayMode::Windowed: result = SDL_SetWindowFullscreen(m_window, 0); if (result == 0) { - lg::info("windowed mode - resizing window to {}x{}", m_window_width, m_window_height); + lg::info("[DISPLAY] windowed mode - resizing window to {}x{}", m_window_width, + m_window_height); SDL_SetWindowSize(m_window, m_window_width, m_window_height); } else { sdl_util::log_error("unable to change window to windowed mode"); } break; - case WindowDisplayMode::Fullscreen: - case WindowDisplayMode::Borderless: + case game_settings::DisplaySettings::DisplayMode::Fullscreen: + case game_settings::DisplaySettings::DisplayMode::Borderless: // 1. exit fullscreen result = SDL_SetWindowFullscreen(m_window, 0); if (result == 0) { SDL_Rect display_bounds; - result = SDL_GetDisplayBounds(m_selected_fullscreen_display_id, &display_bounds); + result = SDL_GetDisplayBounds(get_active_display_id(), &display_bounds); if (result < 0) { sdl_util::log_error(fmt::format("unable to get display bounds for display id {}", - m_selected_fullscreen_display_id)); + get_active_display_id())); } else { // 2. move it to the right monitor - lg::info("preparing fullscreen - moving window to {},{} on display id {}", - display_bounds.x + 50, display_bounds.y + 50, m_selected_fullscreen_display_id); + lg::info("[DISPLAY] preparing fullscreen - moving window to {},{} on display id {}", + display_bounds.x + 50, display_bounds.y + 50, get_active_display_id()); SDL_SetWindowPosition(m_window, display_bounds.x + 50, display_bounds.y + 50); - if (mode == WindowDisplayMode::Fullscreen) { + if (mode == game_settings::DisplaySettings::DisplayMode::Fullscreen) { update_video_modes(); // If fullscreen, we have to resize the window to take up the full resolution // // Some people are weird and don't use the monitor's maximum supported resolution // in which case, we use what the user actually has selected. - const auto& display_res = m_current_display_modes.at(m_selected_fullscreen_display_id); - lg::info("preparing fullscreen - setting window resolution to {}x{}", + const auto& display_res = m_current_display_modes.at(get_active_display_id()); + lg::info("[DISPLAY] preparing fullscreen - setting window resolution to {}x{}", display_res.screen_width, display_res.screen_height); set_window_size(display_res.screen_width, display_res.screen_height); } // 3. fullscreen it! - result = SDL_SetWindowFullscreen(m_window, mode == WindowDisplayMode::Fullscreen - ? SDL_WINDOW_FULLSCREEN - : SDL_WINDOW_FULLSCREEN_DESKTOP); + result = SDL_SetWindowFullscreen( + m_window, mode == game_settings::DisplaySettings::DisplayMode::Fullscreen + ? SDL_WINDOW_FULLSCREEN + : SDL_WINDOW_FULLSCREEN_DESKTOP); if (result < 0) { sdl_util::log_error("unable to switch window fullscreen or borderless fullscreen"); } @@ -254,32 +272,35 @@ void DisplayManager::set_window_display_mode(WindowDisplayMode mode) { fmt::format("unable to change window display mode to {}", fmt::underlying(mode))); } else { // Set the mode, now that we've been successful - m_window_display_mode = mode; + m_display_settings.display_mode = mode; + m_display_settings.save_settings(); } } -void DisplayManager::enqueue_set_fullscreen_display_id(int display_id) { +void DisplayManager::enqueue_set_display_id(int display_id) { const std::lock_guard lock(event_queue_mtx); - ee_event_queue.push({EEDisplayEventType::SET_FULLSCREEN_DISPLAY_ID, display_id, {}}); + ee_event_queue.push({EEDisplayEventType::SET_DISPLAY_ID, display_id, {}}); } -void DisplayManager::set_fullscreen_display_id(int display_id) { +void DisplayManager::set_display_id(int display_id) { + lg::info("[DISPLAY] Setting display id to: {}", display_id); if (display_id >= (int)m_current_display_modes.size()) { display_id = 0; } - bool update_fullscreen = m_window_display_mode != WindowDisplayMode::Windowed && - m_selected_fullscreen_display_id != display_id; - m_selected_fullscreen_display_id = display_id; - if (update_fullscreen) { - set_window_display_mode(m_window_display_mode); + m_display_settings.display_id = display_id; + if (get_display_mode() != game_settings::DisplaySettings::DisplayMode::Windowed) { + set_display_mode((game_settings::DisplaySettings::DisplayMode)m_display_settings.display_mode); } + m_display_settings.save_settings(); } void DisplayManager::update_curr_display_info() { - m_active_display_id = SDL_GetWindowDisplayIndex(m_window); - if (m_active_display_id < 0) { + lg::info("[DISPLAY] Updating current display info"); + m_display_settings.display_id = SDL_GetWindowDisplayIndex(m_window); + if (get_active_display_id() < 0) { sdl_util::log_error("could not retrieve current window's display index"); } + lg::info("[DISPLAY] current display id is {}", m_display_settings.display_id); SDL_GL_GetDrawableSize(m_window, &m_window_width, &m_window_height); SDL_GetWindowPosition(m_window, &m_window_xpos, &m_window_ypos); // Update the scale of the display as well @@ -290,6 +311,7 @@ void DisplayManager::update_curr_display_info() { } void DisplayManager::update_video_modes() { + lg::info("[DISPLAY] Enumerating video modes"); const auto num_displays = SDL_GetNumVideoDisplays(); if (num_displays < 0) { sdl_util::log_error("could not retrieve number of displays"); @@ -341,14 +363,15 @@ void DisplayManager::update_video_modes() { } void DisplayManager::update_resolutions() { + lg::info("[DISPLAY] Enumerating resolutions"); // Enumerate display's display modes to get the resolutions - auto num_display_modes = SDL_GetNumDisplayModes(m_active_display_id); + auto num_display_modes = SDL_GetNumDisplayModes(get_active_display_id()); SDL_DisplayMode curr_mode; for (int i = 0; i < num_display_modes; i++) { - auto ok = SDL_GetDisplayMode(m_active_display_id, i, &curr_mode); + auto ok = SDL_GetDisplayMode(get_active_display_id(), i, &curr_mode); if (ok != 0) { sdl_util::log_error(fmt::format("unable to get display mode for display {}, index {}", - m_active_display_id, i)); + get_active_display_id(), i)); continue; } Resolution new_res = {curr_mode.w, curr_mode.h, diff --git a/game/system/hid/display_manager.h b/game/system/hid/display_manager.h index befc696479..23f0c3c82c 100644 --- a/game/system/hid/display_manager.h +++ b/game/system/hid/display_manager.h @@ -17,8 +17,6 @@ - hiDPI support, see https://wiki.libsdl.org/SDL2/SDL_GetRendererOutputSize */ -enum class WindowDisplayMode { Windowed = 0, Fullscreen = 1, Borderless = 2 }; - enum class WindowState { Minimized, Maximized, Restored }; enum class Orientation { Landscape, LandscapeFlipped, Portrait, PortraitFlipped, Unknown }; @@ -47,16 +45,12 @@ struct Resolution { /// Manages display related operations and querying class DisplayManager { private: - enum class EEDisplayEventType { - SET_WINDOW_SIZE, - SET_WINDOW_DISPLAY_MODE, - SET_FULLSCREEN_DISPLAY_ID - }; + enum class EEDisplayEventType { SET_WINDOW_SIZE, SET_DISPLAY_MODE, SET_DISPLAY_ID }; struct EEDisplayEvent { EEDisplayEventType type; - std::variant param1; - std::variant param2; + std::variant param1; + std::variant param2; }; public: @@ -69,7 +63,7 @@ class DisplayManager { /// event so it can be ran from the proper thread context (the graphics thread) void process_ee_events(); - // Accessors + int get_active_display_id() { return m_display_settings.display_id; } bool is_window_active() { return m_window != nullptr; } bool is_minimized() { return m_window_state == WindowState::Minimized; } int get_window_width() { return m_window_width; } @@ -83,14 +77,17 @@ class DisplayManager { int get_active_display_refresh_rate(); int get_screen_width(); int get_screen_height(); - WindowDisplayMode get_window_display_mode() { return m_window_display_mode; } + game_settings::DisplaySettings::DisplayMode get_display_mode() { + return m_display_settings.display_mode; + } int get_num_resolutions() { return m_available_resolutions.size(); } Resolution get_resolution(int id); + bool is_supported_resolution(int width, int height); // Mutators void enqueue_set_window_size(int width, int height); - void enqueue_set_window_display_mode(WindowDisplayMode mode); - void enqueue_set_fullscreen_display_id(int display_id); + void enqueue_set_window_display_mode(game_settings::DisplaySettings::DisplayMode mode); + void enqueue_set_display_id(int display_id); void set_game_size(int width, int height) { m_window_game_width = width; @@ -109,12 +106,6 @@ class DisplayManager { std::mutex event_queue_mtx; std::queue ee_event_queue; - WindowDisplayMode m_window_display_mode = WindowDisplayMode::Windowed; - int m_active_display_id; - // This can differ from the active display id, this is set by the game - // to explicitly define which monitor the game should be fullscreened with - int m_selected_fullscreen_display_id; - int m_window_xpos = 0; int m_window_ypos = 0; int m_window_width = 0; @@ -139,6 +130,6 @@ class DisplayManager { void update_resolutions(); void set_window_size(int width, int height); - void set_window_display_mode(WindowDisplayMode mode); - void set_fullscreen_display_id(int display_id); + void set_display_mode(game_settings::DisplaySettings::DisplayMode mode); + void set_display_id(int display_id); }; diff --git a/game/system/iop_thread.cpp b/game/system/iop_thread.cpp index 0ac74120d3..910a29da79 100644 --- a/game/system/iop_thread.cpp +++ b/game/system/iop_thread.cpp @@ -1,5 +1,7 @@ #include "iop_thread.h" +#include "common/global_profiler/GlobalProfiler.h" + #ifdef __linux__ #include #elif _WIN32 @@ -57,6 +59,7 @@ void* IOP::iop_alloc(int size) { void IOP::wait_run_iop( std::chrono::time_point wakeup) { + auto p = scoped_prof("krnlw"); std::unique_lock lk(run_cv_mutex); iop_run_cv.wait_until(lk, wakeup); } diff --git a/goal_src/goal-lib.gc b/goal_src/goal-lib.gc index 456ae1cc3d..9ec8b3fe00 100644 --- a/goal_src/goal-lib.gc +++ b/goal_src/goal-lib.gc @@ -1134,6 +1134,10 @@ `(> (fabs (- ,val 0.0)) 0.000000000000000001)) +(defmacro fequal-epsilon? (a b epsilon) + `(< (fabs (- ,a ,b)) + ,epsilon)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; user stuf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/goal_src/jak1/engine/game/game-save.gc b/goal_src/jak1/engine/game/game-save.gc index c4773b0485..362ed99fa5 100644 --- a/goal_src/jak1/engine/game/game-save.gc +++ b/goal_src/jak1/engine/game/game-save.gc @@ -594,14 +594,16 @@ ;; loop over all tags (while (< (the-as int save-data) (the-as int (+ (+ (-> save length) 76) (the-as int save)))) (let ((a0-1 (-> save-data elt-type))) + ;; og:preserve-this Moved these settings to pc-settings (cond - ((= a0-1 (game-save-elt sfx-volume)) (set! (-> *setting-control* default sfx-volume) (-> save-data user-float0))) - ((= a0-1 (game-save-elt music-volume)) (set! (-> *setting-control* default music-volume) (-> save-data user-float0))) - ((= a0-1 (game-save-elt dialog-volume)) (set! (-> *setting-control* default dialog-volume) (-> save-data user-float0))) + ;; ((= a0-1 (game-save-elt sfx-volume)) (set! (-> *setting-control* default sfx-volume) (-> save-data user-float0))) + ;; ((= a0-1 (game-save-elt music-volume)) (set! (-> *setting-control* default music-volume) (-> save-data user-float0))) + ;; ((= a0-1 (game-save-elt dialog-volume)) (set! (-> *setting-control* default dialog-volume) (-> save-data user-float0))) ((= a0-1 (game-save-elt language)) (set! (-> *setting-control* default language) (the-as language-enum (-> save-data user-uint64)))) - ((= a0-1 (game-save-elt vibration)) (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1))) - ((= a0-1 (game-save-elt play-hints)) (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1))))) + ;; ((= a0-1 (game-save-elt vibration)) (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1))) + ;; ((= a0-1 (game-save-elt play-hints)) (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1))) + (else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now")))) (set! save-data (the-as game-save-tag (&+ (the-as pointer save-data) (logand -16 (+ (* (the-as int (-> save-data elt-size)) (-> save-data elt-count)) 31))))))) diff --git a/goal_src/jak1/engine/sound/gsound-h.gc b/goal_src/jak1/engine/sound/gsound-h.gc index 8a75cda205..010027bc29 100644 --- a/goal_src/jak1/engine/sound/gsound-h.gc +++ b/goal_src/jak1/engine/sound/gsound-h.gc @@ -74,6 +74,7 @@ (list-sounds) (unload-music) (set-fps) + ;; og:preserve-this mirror mode (set-mirror 201)) ;; flavors for music @@ -279,6 +280,7 @@ (shutdown sound-rpc-shutdown :overlay-at (-> data 0)) (list-sounds sound-rpc-list-sounds :overlay-at (-> data 0)) (unload-music sound-rpc-unload-music :overlay-at (-> data 0)) + ;; og:preserve-this mirror mode (mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0)))) ;; GOAL-side sound specification. diff --git a/goal_src/jak1/engine/target/target2.gc b/goal_src/jak1/engine/target/target2.gc index 14f2035a28..1f3cedc7aa 100644 --- a/goal_src/jak1/engine/target/target2.gc +++ b/goal_src/jak1/engine/target/target2.gc @@ -109,7 +109,7 @@ (sides-y-scale float) (x-offset int32)) (:methods - (dumb-15 (_type_) none)) + (spawn-particles! (_type_) none)) (:states hud-coming-in hud-going-out @@ -172,7 +172,7 @@ (if (nonzero? (-> this particles v1-0 part)) (&+! (-> this particles v1-0 part) arg0)))) (the-as first-person-hud ((method-of-type process relocate) this arg0))) -(defmethod dumb-15 ((this first-person-hud)) +(defmethod spawn-particles! ((this first-person-hud)) (dotimes (s5-0 (-> this nb-of-particles)) (set! (-> this particles s5-0 pos x) (+ -256.0 (-> this particles s5-0 init-pos x))) (set! (-> this particles s5-0 pos y) @@ -185,7 +185,9 @@ (the float (+ (the int (-> this particles s5-0 pos y)) 2048)) (- (-> *math-camera* hvdf-off z) (* 1024.0 (-> this particles s5-0 pos z))) (-> *math-camera* hvdf-off w))) - (spawn (-> this particles s5-0 part) *null-vector*)) + ;; og:preserve-this Positioning of first person hud sprites + (when (or (-> *pc-settings* use-vis?) (= s5-0 2)) + (spawn (-> this particles s5-0 part) *null-vector*))) 0 (none)) @@ -219,7 +221,7 @@ (suspend))) :post (behavior () - (dumb-15 self))) + (spawn-particles! self))) (defstate hud-normal (first-person-hud) :event @@ -244,7 +246,7 @@ (suspend))) :post (behavior () - (dumb-15 self))) + (spawn-particles! self))) (defun part-first-person-hud-left-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (let ((s5-0 (handle->process (-> *target* fp-hud)))) diff --git a/goal_src/jak1/engine/ui/progress/progress-part.gc b/goal_src/jak1/engine/ui/progress/progress-part.gc index a42309db4a..98c029fa3a 100644 --- a/goal_src/jak1/engine/ui/progress/progress-part.gc +++ b/goal_src/jak1/engine/ui/progress/progress-part.gc @@ -824,9 +824,9 @@ (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) (progress-new-particle :part 98 :x -320.0 :y 224.0 :z 14.0) (progress-new-particle :part 99 :x -320.0 :y 224.0 :z 14.0) - (progress-new-particle :part 97 :x -320.0 :y 112.0 :z 4.0) - (progress-new-particle :part 100 :x -320.0 :y 193.0 :z 4.0) - (progress-new-particle :part 101 :x -320.0 :y 40.0 :z 4.0) + (progress-new-particle :part 97 :x -320.0 :y 112.0 :z 4.0) ;; powercell + (progress-new-particle :part 100 :x -320.0 :y 193.0 :z 4.0) ;; scout fly + (progress-new-particle :part 101 :x -320.0 :y 40.0 :z 4.0) ;; orb glow (progress-new-particle :part 92 :x -320.0 :y 90.0 :z 16.0) (progress-new-particle :part 93 :x -320.0 :y 172.0 :z 16.0) (progress-new-particle :part 94 :x -320.0 :y 254.0 :z 16.0) diff --git a/goal_src/jak1/engine/ui/progress/progress.gc b/goal_src/jak1/engine/ui/progress/progress.gc index db15123901..ffba0c1920 100644 --- a/goal_src/jak1/engine/ui/progress/progress.gc +++ b/goal_src/jak1/engine/ui/progress/progress.gc @@ -500,7 +500,9 @@ (defmethod adjust-sprites ((this progress)) (let ((f0-1 (* (1/ METER_LENGTH) (the float (-> this in-out-position))))) + ;; right position (set! (-> this particles 2 init-pos x) (the float (+ (-> this right-x-offset) 409 (the int (* 301.5 f0-1))))) + ;; left position (set! (-> this particles 1 init-pos x) (the float (+ (-> this left-x-offset) 59))) (set! (-> this left-side-x-scale) (meters (+ (/ (if (= (-> *pc-settings* aspect-custom-x) 16) 5.0 3.5) (-> this sides-x-scale)) (* 10.0 f0-1)))) diff --git a/goal_src/jak1/kernel-defs.gc b/goal_src/jak1/kernel-defs.gc index 7ee1e35711..ff29c2b0bd 100644 --- a/goal_src/jak1/kernel-defs.gc +++ b/goal_src/jak1/kernel-defs.gc @@ -499,15 +499,15 @@ (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-fullscreen-display (function int none)) - -(define-extern pc-set-display-mode (function symbol none)) +(define-extern pc-set-window-size! (function int int none)) +(define-extern pc-get-display-id (function int)) +(define-extern pc-set-display-id! (function int none)) +(define-extern pc-set-display-mode! (function symbol none)) (define-extern pc-get-num-resolutions (function int)) (define-extern pc-get-resolution (function int (pointer int64) (pointer int64) none)) +(define-extern pc-is-supported-resolution? (function int int symbol)) (define-extern pc-set-frame-rate (function int none)) diff --git a/goal_src/jak1/levels/jungle/jungle-mirrors.gc b/goal_src/jak1/levels/jungle/jungle-mirrors.gc index a825e9b1b7..c935d53dbf 100644 --- a/goal_src/jak1/levels/jungle/jungle-mirrors.gc +++ b/goal_src/jak1/levels/jungle/jungle-mirrors.gc @@ -722,6 +722,16 @@ (set! (-> *part-id-table* 813 init-specs 11 initial-valuef) (- 32768.0 f0-13)) (set! (-> *part-id-table* 814 init-specs 3 initial-valuef) (- 49152.0 f0-13)) (set! (-> *part-id-table* 814 init-specs 11 initial-valuef) (- 49152.0 f0-13))) + ;; og:preserve-this hide the binocular borders on non-standard aspect ratios (set alpha to zero) + (when (not (-> *pc-settings* use-vis?)) + (set! (-> *part-id-table* 803 init-specs 9 initial-valuef) 0.0) + (set! (-> *part-id-table* 804 init-specs 9 initial-valuef) 0.0) + (set! (-> *part-id-table* 805 init-specs 10 initial-valuef) 0.0) + (set! (-> *part-id-table* 806 init-specs 10 initial-valuef) 0.0) + (set! (-> *part-id-table* 807 init-specs 10 initial-valuef) 0.0) + (set! (-> *part-id-table* 808 init-specs 10 initial-valuef) 0.0) + (set! (-> *part-id-table* 809 init-specs 10 initial-valuef) 0.0) + (set! (-> *part-id-table* 810 init-specs 10 initial-valuef) 0.0)) (spawn (-> self part) *zero-vector*) (let ((s4-5 (new 'stack-no-clear 'vector)) (s3-2 (new 'stack-no-clear 'vector)) diff --git a/goal_src/jak1/pc/debug/default-menu-pc.gc b/goal_src/jak1/pc/debug/default-menu-pc.gc index 648be74180..95d467e1f1 100644 --- a/goal_src/jak1/pc/debug/default-menu-pc.gc +++ b/goal_src/jak1/pc/debug/default-menu-pc.gc @@ -508,30 +508,30 @@ ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y))))) (menu "Fullscreen" - (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) - (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) - (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t)))) + (function "Windowed" #f ,(lambda () (pc-set-display-mode! 'windowed))) + (function "Fullscreen" #f ,(lambda () (pc-set-display-mode! 'fullscreen))) + (function "Borderless" #f ,(lambda () (pc-set-display-mode! 'borderless)))) (menu "Sizes" - (function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480 #t))) - (function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360 #t))) - (function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540 #t))) - (function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540 #t))) - (function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600 #t))) - (function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720 #t))) - (function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720 #t))) - (function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768 #t))) - (function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768 #t))) - (function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960 #t))) - (function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080 #t))) - (function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080 #t))) - (function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440 #t))) - (function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440 #t))) - (function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160 #t))) - (function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160 #t))) - (function "512 x 224" #f ,(lambda () (set-size! *pc-settings* 512 224 #t))) - (function "512 x 256" #f ,(lambda () (set-size! *pc-settings* 512 256 #t))) - (function "512 x 448" #f ,(lambda () (set-size! *pc-settings* 512 448 #t))) - (function "512 x 512" #f ,(lambda () (set-size! *pc-settings* 512 512 #t)))) + (function "640 x 480" #f ,(lambda () (set-window-size! *pc-settings* 640 480))) + (function "640 x 360" #f ,(lambda () (set-window-size! *pc-settings* 640 360))) + (function "720 x 540" #f ,(lambda () (set-window-size! *pc-settings* 720 540))) + (function "960 x 540" #f ,(lambda () (set-window-size! *pc-settings* 960 540))) + (function "800 x 600" #f ,(lambda () (set-window-size! *pc-settings* 800 600))) + (function "960 x 720" #f ,(lambda () (set-window-size! *pc-settings* 960 720))) + (function "1280 x 720" #f ,(lambda () (set-window-size! *pc-settings* 1280 720))) + (function "1024 x 768" #f ,(lambda () (set-window-size! *pc-settings* 1024 768))) + (function "1366 x 768" #f ,(lambda () (set-window-size! *pc-settings* 1366 768))) + (function "1280 x 960" #f ,(lambda () (set-window-size! *pc-settings* 1280 960))) + (function "1440 x 1080" #f ,(lambda () (set-window-size! *pc-settings* 1440 1080))) + (function "1920 x 1080" #f ,(lambda () (set-window-size! *pc-settings* 1920 1080))) + (function "1920 x 1440" #f ,(lambda () (set-window-size! *pc-settings* 1920 1440))) + (function "2560 x 1440" #f ,(lambda () (set-window-size! *pc-settings* 2560 1440))) + (function "2880 x 2160" #f ,(lambda () (set-window-size! *pc-settings* 2880 2160))) + (function "3840 x 2160" #f ,(lambda () (set-window-size! *pc-settings* 3840 2160))) + (function "512 x 224" #f ,(lambda () (set-window-size! *pc-settings* 512 224))) + (function "512 x 256" #f ,(lambda () (set-window-size! *pc-settings* 512 256))) + (function "512 x 448" #f ,(lambda () (set-window-size! *pc-settings* 512 448))) + (function "512 x 512" #f ,(lambda () (set-window-size! *pc-settings* 512 512)))) (menu "Secrets" (menu "PC cheats" (flag "Big head jak" (the binteger (pc-cheats big-head)) dm-pc-cheats-pick-func) diff --git a/goal_src/jak1/pc/features/autosplit-h.gc b/goal_src/jak1/pc/features/autosplit-h.gc index fa7ce0303d..5235c324bc 100644 --- a/goal_src/jak1/pc/features/autosplit-h.gc +++ b/goal_src/jak1/pc/features/autosplit-h.gc @@ -1,7 +1,9 @@ ;;-*-Lisp-*- (in-package goal) + (require "kernel-defs.gc") + ;; LiveSplit ASL requires all settings to initalized _before_ you connect the process ;; Therefore everything has to be laid out in a predictable fashion before hand ;; So this is a lot of hard-coding, but not too bad when just copied from the debug menu code @@ -165,11 +167,13 @@ (int-finalboss-movies uint8) (unk-finalboss-movies uint8) (int-jungle-fishgame uint8) + (com-jungle-lurkerm uint8) + (com-misty-muse uint8) + (com-rolling-moles uint8) + (com-rolling-race uint8) ;; end marker just to make things look nice in a memory view - (end-marker uint8 4))) + (end-marker uint8 4))) (define-extern *autosplit-info-jak1* autosplit-info-jak1) - (define-extern update-autosplit-info-jak1 (function none)) - (define-extern update-autosplit-jak1-new-game (function none)) diff --git a/goal_src/jak1/pc/features/autosplit.gc b/goal_src/jak1/pc/features/autosplit.gc index bbf33f7010..2e2489f420 100644 --- a/goal_src/jak1/pc/features/autosplit.gc +++ b/goal_src/jak1/pc/features/autosplit.gc @@ -269,6 +269,15 @@ (if (task-closed? (game-task finalboss-movies) (task-status unknown)) 1 0)) (set! (-> *autosplit-info-jak1* int-jungle-fishgame) (if (task-closed? (game-task jungle-fishgame) (task-status need-introduction)) 1 0)) + (set! (-> *autosplit-info-jak1* com-jungle-lurkerm) + (if (task-closed? (game-task jungle-lurkerm) (task-status need-reminder)) 1 0)) + (set! (-> *autosplit-info-jak1* com-misty-muse) + (if (task-closed? (game-task misty-muse) (task-status need-reminder)) 1 0)) + (set! (-> *autosplit-info-jak1* com-rolling-moles) + (if (task-closed? (game-task rolling-moles) (task-status need-reminder)) 1 0)) + (set! (-> *autosplit-info-jak1* com-rolling-race) + (if (task-closed? (game-task rolling-race) (task-status need-reminder)) 1 0)) + ;; end (none)) diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index 48d466aadc..a01708a818 100644 --- a/goal_src/jak1/pc/pckernel-common.gc +++ b/goal_src/jak1/pc/pckernel-common.gc @@ -31,30 +31,18 @@ ;;;; updates ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmethod set-display-mode! ((obj pc-settings) (mode symbol) (call-handlers symbol)) - "sets the game's display mode" - ;; no-op if the display mode hasn't actually changed - (when (!= mode (-> obj display-mode)) - ;; change the display mode. - (set! (-> obj display-mode) mode) - (when call-handlers - ;; set fullscreen to what we want - (pc-set-display-mode (-> obj display-mode)) - ;; if windowed mode, set the size properly - (when (= (-> obj display-mode) 'windowed) - ;; TODO - this means the user can never have a window smaller than MIN_WIDTH/HEIGHT - (pc-set-window-size (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height)))))) - 0) - -(defmethod set-size! ((obj pc-settings) (width int) (height int) (call-handlers symbol)) +(defmethod set-window-size! ((obj pc-settings) (width int) (height int)) "sets the size of the display window" - (format 0 "Setting ~A size to ~D x ~D~%" (-> obj display-mode) width height) - (cond - ((= 'windowed (-> obj display-mode)) - (set! (-> obj window-width) width) - (set! (-> obj window-height) height) - (if call-handlers (pc-set-window-size (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height))))) - (else (set! (-> obj width) width) (set! (-> obj height) height))) + (let ((display-mode (pc-get-display-mode))) + (format 0 "Setting ~A size to ~D x ~D~%" display-mode width height) + (cond + ((= display-mode 'windowed) + (set! (-> obj window-width) width) + (set! (-> obj window-height) height) + (pc-set-window-size! (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height)))) + (else + (set! (-> obj width) width) + (set! (-> obj height) height)))) (none)) (defmethod set-aspect! ((obj pc-settings) (aw int) (ah int)) @@ -77,7 +65,7 @@ (defmethod set-frame-rate! ((obj pc-settings) (rate int) (call-handlers symbol)) "set the target framerate." (if call-handlers (pc-set-frame-rate rate)) - (if (and (!= 'fullscreen (-> obj display-mode)) (!= (pc-get-active-display-refresh-rate) rate)) (set! (-> obj vsync?) #f)) + (if (and (!= 'fullscreen (pc-get-display-mode)) (!= (pc-get-active-display-refresh-rate) rate)) (set! (-> obj vsync?) #f)) (set! (-> obj target-fps) rate) (case rate ((50) (set-game-setting! obj 'video-mode 'pal)) @@ -85,18 +73,6 @@ (else (set-game-setting! obj 'video-mode 'custom))) rate) -(defmethod set-monitor! ((obj pc-settings) (monitor int)) - "set the monitor to use when in fullscreen/borderless" - ;; if monitor selection is out of bounds (e.g. if a monitor got disconnected), - ;; then default to the primary monitor - (cond - ((>= (-> obj monitor) (pc-get-display-count)) - (format 0 "Monitor selection out of bounds, defaulting to primary monitor.~%") - (set! (-> obj monitor) 0)) - (else (set! (-> obj monitor) monitor))) - (pc-set-fullscreen-display (-> obj monitor)) - (none)) - (defmethod commit-to-file ((obj pc-settings)) "commits the current settings to the file" (format (clear *pc-temp-string-1*) "~S/pc-settings.gc" *pc-settings-folder*) @@ -141,11 +117,11 @@ ((-> obj letterbox?) (pc-set-letterbox (-> obj framebuffer-scissor-width) (-> obj framebuffer-scissor-height))) (else (pc-set-letterbox (-> obj framebuffer-width) (-> obj framebuffer-height)))) (pc-set-vsync (and (-> obj vsync?) - (or (= 'fullscreen (-> obj display-mode)) (>= (pc-get-active-display-refresh-rate) (-> obj target-fps))))) - (when (!= 'fullscreen (-> obj display-mode)) + (or (= 'fullscreen (pc-get-display-mode)) (>= (pc-get-active-display-refresh-rate) (-> obj target-fps))))) + (when (!= 'fullscreen (pc-get-display-mode)) (pc-set-frame-rate (-> obj target-fps))) ;; do game resolution - (if (= (-> obj display-mode) 'windowed) + (if (= (pc-get-display-mode) 'windowed) (pc-set-game-resolution (-> obj framebuffer-scissor-width) (-> obj framebuffer-scissor-height)) (pc-set-game-resolution (-> obj width) (-> obj height))) ;; set msaa sample rate. if invalid, just reset to 2. @@ -253,14 +229,14 @@ (defmethod get-current-game-width ((obj pc-settings)) "return the current width in pixels of the visible portion of the game" (cond - ((= (-> obj display-mode) 'windowed) + ((= (pc-get-display-mode) 'windowed) (if (-> obj letterbox?) (-> obj framebuffer-scissor-width) (-> obj framebuffer-width))) (else (-> obj width)))) (defmethod get-current-game-height ((obj pc-settings)) "return the current height in pixels of the visible portion of the game" (cond - ((= (-> obj display-mode) 'windowed) + ((= (pc-get-display-mode) 'windowed) (if (-> obj letterbox?) (-> obj framebuffer-scissor-height) (-> obj framebuffer-height))) (else (-> obj height)))) @@ -288,7 +264,6 @@ (-> obj aspect-ratio-auto?) (-> obj use-vis?) (-> obj letterbox?)) - (format *stdcon* "display-mode: ~A vsync? ~A~%" (-> obj display-mode) (-> obj vsync?)) (clear *pc-temp-string*)) (when *display-actor-bank* (draw-string-xy (string-format "Actor Bank: ~,,1m/~,,1m (~D)" @@ -463,8 +438,8 @@ (file-stream-close file)) (format 0 "pc settings file read: ~A~%" filename) ;; restore the windowed mode resolution properly - (when (= (-> obj display-mode) 'windowed) - (pc-set-window-size (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height)))) + (when (= (pc-get-display-mode) 'windowed) + (pc-set-window-size! (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height)))) #t) (defmethod handle-input-settings ((obj pc-settings) (file file-stream)) @@ -474,7 +449,22 @@ (("window-size") (set! (-> obj window-width) (file-stream-read-int file)) (set! (-> obj window-height) (file-stream-read-int file))) - (("game-size") (set! (-> obj width) (file-stream-read-int file)) (set! (-> obj height) (file-stream-read-int file))) + (("game-size") + ;; Check to see if the game-size is a valid resolution on this persons device + ;; on some machines, this has been proven to cause the black-screen issue https://github.com/open-goal/jak-project/issues/3563 + ;; Correlating with logs like: + ;; - OpenGL error 0x502 S8246 T824C: GL_INVALID_OPERATION error generated. Source and destination dimensions must be identical with the current filtering modes. + (let* ((saved-width (file-stream-read-int file)) + (saved-height (file-stream-read-int file)) + (supported-resolution? (pc-is-supported-resolution? saved-width saved-height))) + (cond + (supported-resolution? + (format 0 "[PC Settings]: Valid game-size resolution ~D x ~D~%" saved-width saved-height) + (set! (-> obj width) saved-width) + (set! (-> obj height) saved-height)) + (else + (pc-get-active-display-size (&-> obj width) (&-> obj height)) + (format 0 "[PC Settings]: Invalid game-size resolution ~D x ~D, defaulting to ~D x ~D~%" saved-width saved-height (-> obj width) (-> obj height)))))) (("msaa") (set! (-> obj gfx-msaa) (file-stream-read-int file))) (("aspect-state") ;; game aspect @@ -486,11 +476,12 @@ (set! (-> obj aspect-ratio-auto?) (file-stream-read-symbol file)) (unless (-> obj aspect-ratio-auto?) (set-aspect! obj (-> obj aspect-custom-x) (-> obj aspect-custom-y)))) - (("display-mode") - ;; force a display mode update - (set! (-> obj display-mode) #f) - (set-display-mode! obj (file-stream-read-symbol file) #t)) - (("monitor") (set-monitor! obj (file-stream-read-int file))) + ;; TODO - moved to C++, has to remain because settings parsing can't handle + ;; unexpected keys + (("display-mode") (file-stream-read-symbol file)) + ;; TODO - moved to C++, has to remain because settings parsing can't handle + ;; unexpected keys + (("monitor") (file-stream-read-int file)) (("letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file))) (("vsync") (set! (-> obj vsync?) (file-stream-read-symbol file))) (("font-scale") (set! (-> obj font-scale) (file-stream-read-float file))) @@ -548,6 +539,10 @@ (("controller-led-brightness") (set! (-> obj controller-led-brightness) (file-stream-read-float file))) (("controller-led-min-brightness") (set! (-> obj controller-led-min-brightness) (file-stream-read-float file))) (("controller-led-max-brightness") (set! (-> obj controller-led-max-brightness) (file-stream-read-float file))) + (("memcard-volume-sfx") (set! (-> obj memcard-volume-sfx) (file-stream-read-float file))) + (("memcard-volume-music") (set! (-> obj memcard-volume-music) (file-stream-read-float file))) + (("memcard-volume-dialog") (set! (-> obj memcard-volume-dialog) (file-stream-read-float file))) + (("memcard-vibration?") (set! (-> obj memcard-vibration?) (file-stream-read-symbol file))) ;; debug (("debug-font-scale") (set! (-> obj debug-font-scale) (file-stream-read-float file))) (("debug-font-scale-auto?") (set! (-> obj debug-font-scale-auto?) (file-stream-read-symbol file))) @@ -564,10 +559,8 @@ (-> obj aspect-custom-x) (-> obj aspect-custom-y) (-> obj aspect-ratio-auto?)) - (format file " (display-mode ~A)~%" (-> obj display-mode)) (format file " (window-size ~D ~D)~%" (-> obj window-width) (-> obj window-height)) (format file " (game-size ~D ~D)~%" (-> obj width) (-> obj height)) - (format file " (monitor ~D)~%" (-> obj monitor)) (format file " (letterbox ~A)~%" (-> obj letterbox?)) (format file " (vsync ~A)~%" (-> obj vsync?)) ;(format file " (font-scale ~f)~%" (-> obj font-scale)) @@ -622,6 +615,10 @@ (format file " (game-language ~D)~%" (get-game-language obj)) (format file " (subtitle-speaker ~A)~%" (-> obj subtitle-speaker?)) (format file " (territory ~D)~%" (-> obj territory)) + (format file " (memcard-volume-sfx ~f)~%" (-> obj memcard-volume-sfx)) + (format file " (memcard-volume-music ~f)~%" (-> obj memcard-volume-music)) + (format file " (memcard-volume-dialog ~f)~%" (-> obj memcard-volume-dialog)) + (format file " (memcard-vibration? ~A)~%" (-> obj memcard-vibration?)) 0) (defmethod write-to-file ((obj pc-settings) (filename string)) diff --git a/goal_src/jak1/pc/pckernel-h.gc b/goal_src/jak1/pc/pckernel-h.gc index 26fa7e89b9..5077ecb4d5 100644 --- a/goal_src/jak1/pc/pckernel-h.gc +++ b/goal_src/jak1/pc/pckernel-h.gc @@ -75,6 +75,8 @@ ;; how many entries the spool anim log has. only 164 are used in-game. (defconstant PC_SPOOL_LOG_LENGTH 170) +(define *PC-MIRROR-MODE-SET* #f) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; types and enums ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -123,11 +125,9 @@ (aspect-ratio-reciprocal float) ;; reciprocal of that (aspect-custom-x int) (aspect-custom-y int) - (display-mode symbol) ;; display mode. can be windowed, fullscreen or borderless (letterbox? symbol) ;; letterbox. #f = stretched (vsync? symbol) ;; vsync. (font-scale float) ;; font scaling. - (monitor int32) ;; index of which monitor to use when fullscreen or borderless ;; debug settings (os symbol) ;; windows, linux, macos (user symbol) ;; username. not system username, just debug thing. @@ -193,7 +193,12 @@ (discord-rpc? symbol) ;; enable discord rich presence integration (speedrunner-mode? symbol) ;; enable speedrunner mode (flava-hack int64) - ;; TODO - save/restore original settings (language/sound/etc) + ;; settings originally stored in the game save + ;; now stored in pc-settings + (memcard-volume-sfx float) + (memcard-volume-music float) + (memcard-volume-dialog float) + (memcard-vibration? symbol) ) (:methods (new (symbol type) _type_) @@ -215,12 +220,10 @@ (print-debug-misc (_type_) object) (draw (_type_ dma-buffer) object) (draw-memory (_type_ dma-buffer) symbol) - (set-display-mode! (_type_ symbol symbol) int) - (set-size! (_type_ int int symbol) none) + (set-window-size! (_type_ int int) none) (set-aspect! (_type_ int int) none) (set-aspect-ratio! (_type_ float) none) (set-frame-rate! (_type_ int symbol) int) - (set-monitor! (_type_ int) none) (set-game-setting! (_type_ symbol symbol) object) (get-game-setting (_type_ symbol) symbol) (set-game-language! (_type_ language-enum) language-enum) @@ -308,10 +311,7 @@ (defmethod reset-gfx ((obj pc-settings) (call-handlers symbol)) "Set the default graphics settings" - ;; temporarily "set" to windowed so we can change window size - ;; we set our actual target display mode later. - (set! (-> obj display-mode) 'windowed) - (set-size! obj PC_BASE_WIDTH PC_BASE_HEIGHT #f) + (set-window-size! obj PC_BASE_WIDTH PC_BASE_HEIGHT) (set-aspect! obj 4 3) (set-frame-rate! obj 60 call-handlers) (set! (-> obj use-vis?) #f) @@ -330,7 +330,6 @@ (max! (-> obj height) PC_MIN_HEIGHT) (format 0 "!!!! failed to get any screen resolutions !!!!"))) (format 0 "fullscreen resolution defaulted to ~D x ~D~%" (-> obj width) (-> obj height)) - (if (not *debug-segment*) (set-display-mode! obj 'borderless call-handlers) (set-display-mode! obj 'windowed call-handlers)) (set! (-> obj gfx-msaa) PC_DEFAULT_MSAA) ;; default msaa 0) @@ -420,7 +419,8 @@ `(debug-font-scale-factor *pc-settings*)) (defmacro fullscreen? () - `(symbol-member? (-> *pc-settings* display-mode) '(fullscreen borderless))) + `(or (= (pc-get-display-mode) 'fullscreen) + (= (pc-get-display-mode) 'borderless))) (defun bcd->dec ((bcd uint)) "Convert a number encoded in BCD to its decimal equivalent" diff --git a/goal_src/jak1/pc/pckernel-impl.gc b/goal_src/jak1/pc/pckernel-impl.gc index 3e61cd0222..d913cd9417 100644 --- a/goal_src/jak1/pc/pckernel-impl.gc +++ b/goal_src/jak1/pc/pckernel-impl.gc @@ -67,16 +67,17 @@ ;; The Jak 1 version of the pc-settings object. (deftype pc-settings-jak1 (pc-settings) - ((cheats pc-cheats) - (cheats-known pc-cheats) - (skip-movies? symbol) ;; if on, enable cutscene skipping - (subtitles? symbol) ;; if on, cutscene subtitles will show up - (text-language pc-language) ;; language for game text - (subtitle-language pc-language) ;; language for subtitles - (money-starburst? symbol) ;; add a starburst to the money - (extra-hud? symbol) ;; extra hud elements. - (secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets! - (scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?) + ((cheats pc-cheats) + (cheats-known pc-cheats) + (skip-movies? symbol) ;; if on, enable cutscene skipping + (subtitles? symbol) ;; if on, cutscene subtitles will show up + (text-language pc-language) ;; language for game text + (subtitle-language pc-language) ;; language for subtitles + (money-starburst? symbol) ;; add a starburst to the money + (extra-hud? symbol) ;; extra hud elements. + (secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets! + (scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?) + (memcard-play-hints? symbol) )) (define *pc-settings* (the pc-settings-jak1 #f)) @@ -131,6 +132,12 @@ (else)) (set! (-> obj money-starburst?) #f) (set! (-> obj extra-hud?) #f) + ;; original settings, minus 25 to be a bit more conservative + (set! (-> obj memcard-volume-sfx) 50.0) + (set! (-> obj memcard-volume-music) 40.0) + (set! (-> obj memcard-volume-dialog) 75.0) + (set! (-> obj memcard-vibration?) #t) + (set! (-> obj memcard-play-hints?) #t) 0) (defmethod reset-extra ((obj pc-settings-jak1) (call-handlers symbol)) diff --git a/goal_src/jak1/pc/pckernel.gc b/goal_src/jak1/pc/pckernel.gc index c5a4d20544..9b0fbae175 100644 --- a/goal_src/jak1/pc/pckernel.gc +++ b/goal_src/jak1/pc/pckernel.gc @@ -14,6 +14,16 @@ ;;;; methods ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defmethod initialize ((obj pc-settings-jak1)) + "initial initialize method to be run after allocating" + ((method-of-type pc-settings initialize) obj) + (set! (-> *setting-control* default sfx-volume) (-> obj memcard-volume-sfx)) + (set! (-> *setting-control* default music-volume) (-> obj memcard-volume-music)) + (set! (-> *setting-control* default dialog-volume) (-> obj memcard-volume-dialog)) + (set! (-> *setting-control* default vibration) (-> obj memcard-vibration?)) + (set! (-> *setting-control* default play-hints) (-> obj memcard-play-hints?)) + obj) + (defmethod set-game-setting! ((obj pc-settings-jak1) (setting symbol) (value symbol)) (case setting (('video-mode) @@ -129,7 +139,8 @@ (when (zero? (-> date stat)) (set-time-of-day (+ (the float (bcd->dec (-> date hour))) (/ (the float (bcd->dec (-> date minute))) 60)))))) (pc-set-gfx-hack (pc-gfx-hack no-tex) (logtest? (-> obj cheats) (pc-cheats no-tex))) - (if (pc-cheats? (-> obj cheats) mirror) + (if (or (pc-cheats? (-> obj cheats) mirror) + *PC-MIRROR-MODE-SET*) (sound-set-mirror-mode (sound-mirror-mode mirrored)) (sound-set-mirror-mode (sound-mirror-mode normal))) ;; run cheats end!!! @@ -433,6 +444,7 @@ (("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-language (file-stream-read-int file)))) (("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file)))) (("scenes-seen") (dotimes (i PC_SPOOL_LOG_LENGTH) (set! (-> obj scenes-seen i) (file-stream-read-int file)))) + (("memcard-play-hints?") (set! (-> obj memcard-play-hints?) (file-stream-read-symbol file))) (("secrets") (dosettings (file) (case-str *pc-temp-string* @@ -466,6 +478,7 @@ (format file " (subtitles? ~A)~%" (-> obj subtitles?)) (format file " (subtitle-language ~D)~%" (-> obj subtitle-language)) (format file " (text-language ~D)~%" (-> obj text-language)) + (format file " (memcard-play-hints? ~A)~%" (-> obj memcard-play-hints?)) #| (format file " (scenes-seen") (dotimes (i PC_SPOOL_LOG_LENGTH) diff --git a/goal_src/jak1/pc/progress-pc.gc b/goal_src/jak1/pc/progress-pc.gc index c39634babb..df48efbbfc 100644 --- a/goal_src/jak1/pc/progress-pc.gc +++ b/goal_src/jak1/pc/progress-pc.gc @@ -225,7 +225,10 @@ :name (text-id input-options) :scale #t :param3 (game-option-menu input-options)) - (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id play-hints) :scale #t) + (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id play-hints) :scale #t + :on-confirm + (lambda () + (set! (-> *setting-control* default play-hints) (-> *pc-settings* memcard-play-hints?)))) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id subtitles) :scale #t) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id hinttitles) :scale #t) (new 'static 'game-option :option-type (game-option-type language) :name (text-id language) :scale #t) @@ -260,7 +263,7 @@ :param3 (game-option-menu monitor) :option-disabled-func (lambda () - (= (-> *pc-settings* display-mode) 'windowed))) + (= (pc-get-display-mode) 'windowed))) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id vsync) :scale #t) (new 'static 'game-option @@ -297,7 +300,11 @@ :scale #t :param1 0.0 :param2 100.0 - :slider-step-size 1.0) + :slider-step-size 1.0 + :on-confirm + (lambda ((val object)) + (set! (-> *setting-control* default sfx-volume) (-> *pc-settings* memcard-volume-sfx)) + (none))) (new 'static 'game-option :option-type (game-option-type slider) @@ -305,7 +312,11 @@ :scale #t :param1 0.0 :param2 100.0 - :slider-step-size 1.0) + :slider-step-size 1.0 + :on-confirm + (lambda ((val object)) + (set! (-> *setting-control* default music-volume) (-> *pc-settings* memcard-volume-music)) + (none))) (new 'static 'game-option :option-type (game-option-type slider) @@ -313,7 +324,11 @@ :scale #t :param1 0.0 :param2 100.0 - :slider-step-size 1.0) + :slider-step-size 1.0 + :on-confirm + (lambda ((val object)) + (set! (-> *setting-control* default dialog-volume) (-> *pc-settings* memcard-volume-dialog)) + (none))) ;(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id music-fadein) :scale #t) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t))) @@ -371,7 +386,10 @@ :scale #t :option-disabled-func (lambda () - (not (pc-current-controller-has-rumble?)))) + (not (pc-current-controller-has-rumble?))) + :on-confirm + (lambda () + (set! (-> *setting-control* default vibration) (-> *pc-settings* memcard-vibration?)))) (new 'static 'game-option :option-type (game-option-type slider) @@ -1279,7 +1297,7 @@ (set! (-> option bind-info input-idx) i) (set! (-> option bind-info analog-min-range?) #t) (set! (-> option option-type) (game-option-type binding-assignment)) - (set! (-> option name-override) (-> *analog-bind-names* (* i 2))) + (set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *analog-bind-names* (* i 2)))) (set! (-> option scale) #t) (1+! (-> *temp-options* length))) (let ((option (-> *temp-options* (length *temp-options*)))) @@ -1290,7 +1308,7 @@ (set! (-> option bind-info input-idx) i) (set! (-> option bind-info analog-min-range?) #f) (set! (-> option option-type) (game-option-type binding-assignment)) - (set! (-> option name-override) (-> *analog-bind-names* (+ 1 (* i 2)))) + (set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *analog-bind-names* (+ 1 (* i 2))))) (set! (-> option scale) #t) (1+! (-> *temp-options* length))))) ;; Add Button bindings @@ -1305,7 +1323,7 @@ (set! (-> option bind-info input-idx) i) (set! (-> option bind-info analog-min-range?) #f) (set! (-> option option-type) (game-option-type binding-assignment)) - (set! (-> option name-override) (-> *button-bind-names* i)) + (set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *button-bind-names* i))) (set! (-> option scale) #t) (1+! (-> *temp-options* length)))) ;; We add a restore defaults button at the bottom of each binding menu @@ -1396,6 +1414,558 @@ ;;--------------------------- ;; function overrides +;; NOTE - the following is generated from ./scripts/gsrc/jak1-sprite-adjust.py +;; They are polynomials fit with manually adjusted values for all common aspect ratios +;; so they can make a decent approximation interpolating between + +(defun pc-sprite-adjust-left ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 20.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 4.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) -6.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) -10.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) -14.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) -16.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) -25.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) -26.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) -37.0) + (else + (+ 121.37227965381875 + (* -145.13874571806738 aspect-ratio) + (* 48.695824268929236 aspect-ratio aspect-ratio) + (* -5.737940185600177 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-right ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) -33.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) -6.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 18.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 26.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 29.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 45.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 46.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 65.0) + (else + (+ -205.4294994422315 + (* 245.07283711809043 aspect-ratio) + (* -81.04347133064093 aspect-ratio aspect-ratio) + (* 9.423126530695802 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-cross-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) -5.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 8.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 17.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 30.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 30.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 45.0) + (else + (+ -98.75041386103345 + (* 104.4004528706783 aspect-ratio) + (* -27.27525895954647 aspect-ratio aspect-ratio) + (* 2.6112419651912617 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-cross-y ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) -20.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 20.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 20.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0) + (else + (+ -92.55990871923132 + (* 104.71302956908977 aspect-ratio) + (* -32.46993312399963 aspect-ratio aspect-ratio) + (* 3.4672700107735115 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-square-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) -5.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 8.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 8.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 17.0) + (else + (+ -22.034620779370684 + (* 15.66980500404166 aspect-ratio) + (* 2.6395010789749374 aspect-ratio aspect-ratio) + (* -1.1122480459486384 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-square-y ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) -10.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 15.0) + (else + (+ -35.887413062108386 + (* 28.768844269882614 aspect-ratio) + (* -0.854904339304392 aspect-ratio aspect-ratio) + (* -0.9020647898186882 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-triangle-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0) + (else + (+ 9.074933988821043 + (* -16.012653345486786 aspect-ratio) + (* 8.413647131791468 aspect-ratio aspect-ratio) + (* -1.2341491172835792 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-triangle-y ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 5.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0) + (else + (+ 24.319264777517994 + (* -43.26989970602368 aspect-ratio) + (* 23.07604741978599 aspect-ratio aspect-ratio) + (* -3.494974989657488 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-circle-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 2.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 2.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0) + (else + (+ 7.769390144448719 + (* -13.422040271641388 aspect-ratio) + (* 6.780103459545601 aspect-ratio aspect-ratio) + (* -0.9064673601247457 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-circle-y ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) -7.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) -7.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0) + (else + (+ -32.088654921966715 + (* 56.69193997766507 aspect-ratio) + (* -29.856150879331594 aspect-ratio aspect-ratio) + (* 4.401442349782235 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-percent-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 12.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 12.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 18.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 18.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 25.0) + (else + (+ -46.209527361482614 + (* 59.19334582683605 aspect-ratio) + (* -17.978708435875035 aspect-ratio aspect-ratio) + (* 1.9546083242648873 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-autosave-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 10.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 15.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 18.0) + (else + (+ -25.454818080453748 + (* 28.58764000115764 aspect-ratio) + (* -5.122397663089315 aspect-ratio aspect-ratio) + (* 0.1450488213340339 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-orb-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 5.0) + (else + (+ -3.26385961093079 + (* 6.476532684613467 aspect-ratio) + (* -4.083859180614655 aspect-ratio aspect-ratio) + (* 0.819204392897082 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-orb-glow-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 4.0) + (else + (+ -2.6110876887446324 + (* 5.181226147690773 aspect-ratio) + (* -3.267087344491723 aspect-ratio aspect-ratio) + (* 0.6553635143176653 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-orb-text-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 10.0) + (else + (+ -6.52771922186158 + (* 12.953065369226934 aspect-ratio) + (* -8.16771836122931 aspect-ratio aspect-ratio) + (* 1.638408785794164 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-cell-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) -10.0) + (else + (+ 6.52771922186158 + (* -12.953065369226934 aspect-ratio) + (* 8.16771836122931 aspect-ratio aspect-ratio) + (* -1.638408785794164 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-cell-text-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 2.0) + (else + (+ -1.3055438443723162 + (* 2.5906130738453865 aspect-ratio) + (* -1.6335436722458616 aspect-ratio aspect-ratio) + (* 0.32768175715883263 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-buzzer-text-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) -5.0) + (else + (+ 3.26385961093079 + (* -6.476532684613467 aspect-ratio) + (* 4.083859180614655 aspect-ratio aspect-ratio) + (* -0.819204392897082 aspect-ratio aspect-ratio aspect-ratio))))) + +(defun pc-sprite-adjust-options-text-x ((aspect-ratio float)) + (cond + ((fequal-epsilon? aspect-ratio 1.0 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.25 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.5 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.6 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.78 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 1.85 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.33 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 2.35 0.01) 0.0) + ((fequal-epsilon? aspect-ratio 3.56 0.01) 3.0) + (else + (+ -1.9583157665584714 + (* 3.885919610768078 aspect-ratio) + (* -2.450315508368792 aspect-ratio aspect-ratio) + (* 0.491522635738249 aspect-ratio aspect-ratio aspect-ratio))))) + +(define *PC-CROSS-X-ADJUST* 0.0) +(define *PC-CROSS-Y-ADJUST* 0.0) +(define *PC-SQUARE-X-ADJUST* 0.0) +(define *PC-SQUARE-Y-ADJUST* 0.0) +(define *PC-TRIANGLE-X-ADJUST* 0.0) +(define *PC-TRIANGLE-Y-ADJUST* 0.0) +(define *PC-CIRCLE-X-ADJUST* 0.0) +(define *PC-CIRCLE-Y-ADJUST* 0.0) +(define *PC-PERCENT-X-ADJUST* 0.0) +(define *PC-AUTOSAVE-X-ADJUST* 0.0) +(define *PC-ORB-X-ADJUST* 0.0) +(define *PC-ORB-GLOW-X-ADJUST* 0.0) +(define *PC-ORB-TEXT-X-ADJUST* 0.0) +(define *PC-CELL-X-ADJUST* 0.0) +(define *PC-CELL-TEXT-X-ADJUST* 0.0) +(define *PC-BUZZER-TEXT-X-ADJUST* 0.0) +(define *PC-OPTIONS-TEXT-X-ADJUST* 0.0) + +(defmethod adjust-ratios ((this progress) (aspect symbol) (video-mode symbol)) + (case aspect + (('aspect4x3) + (set! (-> this sides-x-scale) 1.0) + (set! (-> this sides-y-scale) 13.0) + (set! (-> this left-x-offset) 0) + (set! (-> this right-x-offset) 0) + (set! (-> this button-scale) 1.0) + (set! (-> this slot-scale) 8192.0) + (set! (-> this small-orb-y-offset) 58) + (set! (-> this icons 5 scale-x) 0.008) + (set! (-> this icons 5 scale-y) -0.009) + (set! (-> this big-orb-y-offset) 243) + (set! (-> this icons 4 scale-x) 0.013) + (set! (-> this icons 4 scale-y) -0.015)) + (('aspect16x9) + (set! (-> this sides-x-scale) 1.2) + (set! (-> this sides-y-scale) 9.8) + (set! (-> this left-x-offset) -10) + (set! (-> this right-x-offset) 17) + (set! (-> this button-scale) 1.05) + (set! (-> this slot-scale) 6144.0) + (set! (-> this small-orb-y-offset) 59) + (set! (-> this icons 5 scale-x) 0.008) + (set! (-> this icons 5 scale-y) -0.0098) + (set! (-> this big-orb-y-offset) 255) + (set! (-> this icons 4 scale-x) 0.017) + (set! (-> this icons 4 scale-y) -0.0205))) + (when (not (-> *pc-settings* use-vis?)) + (format 0 "[PC] Adjusting sprite positioning, aspect-ratio: ~f~%" (-> *pc-settings* aspect-ratio)) + (set! (-> this left-x-offset) (the int (pc-sprite-adjust-left (-> *pc-settings* aspect-ratio)))) + (set! (-> this right-x-offset) (the int (pc-sprite-adjust-right (-> *pc-settings* aspect-ratio)))) + (set! *PC-CROSS-X-ADJUST* (pc-sprite-adjust-cross-x (-> *pc-settings* aspect-ratio))) + (set! *PC-CROSS-Y-ADJUST* (pc-sprite-adjust-cross-y (-> *pc-settings* aspect-ratio))) + (set! *PC-SQUARE-X-ADJUST* (pc-sprite-adjust-square-x (-> *pc-settings* aspect-ratio))) + (set! *PC-SQUARE-Y-ADJUST* (pc-sprite-adjust-square-y (-> *pc-settings* aspect-ratio))) + (set! *PC-TRIANGLE-X-ADJUST* (pc-sprite-adjust-triangle-x (-> *pc-settings* aspect-ratio))) + (set! *PC-TRIANGLE-Y-ADJUST* (pc-sprite-adjust-triangle-y (-> *pc-settings* aspect-ratio))) + (set! *PC-CIRCLE-X-ADJUST* (pc-sprite-adjust-circle-x (-> *pc-settings* aspect-ratio))) + (set! *PC-CIRCLE-Y-ADJUST* (pc-sprite-adjust-circle-y (-> *pc-settings* aspect-ratio))) + (set! *PC-PERCENT-X-ADJUST* (pc-sprite-adjust-percent-x (-> *pc-settings* aspect-ratio))) + (set! *PC-AUTOSAVE-X-ADJUST* (pc-sprite-adjust-autosave-x (-> *pc-settings* aspect-ratio))) + (set! *PC-ORB-X-ADJUST* (pc-sprite-adjust-orb-x (-> *pc-settings* aspect-ratio))) + (set! *PC-ORB-GLOW-X-ADJUST* (pc-sprite-adjust-orb-glow-x (-> *pc-settings* aspect-ratio))) + (set! *PC-ORB-TEXT-X-ADJUST* (pc-sprite-adjust-orb-text-x (-> *pc-settings* aspect-ratio))) + (set! *PC-CELL-X-ADJUST* (pc-sprite-adjust-cell-x (-> *pc-settings* aspect-ratio))) + (set! *PC-CELL-TEXT-X-ADJUST* (pc-sprite-adjust-cell-text-x (-> *pc-settings* aspect-ratio))) + (set! *PC-BUZZER-TEXT-X-ADJUST* (pc-sprite-adjust-buzzer-text-x (-> *pc-settings* aspect-ratio))) + (set! *PC-OPTIONS-TEXT-X-ADJUST* (pc-sprite-adjust-options-text-x (-> *pc-settings* aspect-ratio)))) + (when (= video-mode 'pal) + (set! (-> this icons 5 scale-y) (* 1.15 (-> this icons 5 scale-y))) + (set! (-> this icons 4 scale-x) (* 1.05 (-> this icons 4 scale-x))) + (set! (-> this icons 4 scale-y) (* (-> this icons 4 scale-y) (the-as float (if (= aspect 'aspect16x9) 1.18 1.15)))) + (+! (-> this big-orb-y-offset) (if (= aspect 'aspect16x9) 3 2))) + 0 + (none)) + +(defmethod draw-progress ((this progress)) + (let ((f30-0 (+ -409.0 (-> this particles 2 init-pos x) (* 0.8 (the float (-> this left-x-offset))))) + (s5-0 (if (or (-> this stat-transition) (nonzero? (-> this level-transition))) 0 (-> this transition-offset)))) + (let ((f28-0 (if (or (-> this stat-transition) (nonzero? (-> this level-transition))) 1.0 (-> this transition-percentage-invert)))) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-0 (-> s3-0 base))) + (let ((s2-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* game money)))) + (s2-0 *temp-string* + s3-0 + (the int (+ *PC-ORB-TEXT-X-ADJUST* 428.0 (the float s5-0) f30-0)) + (- 12 (the int (* 0.16666667 f30-0))) + (font-color default) + (font-flags shadow kerning large))) + (let ((s2-1 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* game fuel)))) + (s2-1 *temp-string* + s3-0 + (the int (+ *PC-CELL-TEXT-X-ADJUST* 456.0 (the float (adjust-pos s5-0 50)) f30-0)) + (- 48 (the int (* 0.125 f30-0))) + (font-color default) + (font-flags shadow kerning large))) + (let ((s2-2 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* fact buzzer)))) + (s2-2 *temp-string* + s3-0 + (the int (+ *PC-BUZZER-TEXT-X-ADJUST* 469.0 (the float (adjust-pos s5-0 100)) f30-0)) + 89 + (font-color default) + (font-flags shadow kerning large))) + (let ((a3-4 (-> s3-0 base))) + (let ((v1-20 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-20) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-20) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-20) 16))) + (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug) + s4-0 + (the-as (pointer dma-tag) a3-4)))) + (let ((s4-2 (new 'stack + 'font-context + *font-default-matrix* + (the int (+ *PC-OPTIONS-TEXT-X-ADJUST* (- 423.0 (the float (/ (-> this left-x-offset) 2))) f30-0 (the float (adjust-pos s5-0 150)))) + 131 + 0.0 + (font-color default) + (font-flags shadow kerning)))) + (let ((v1-29 s4-2)) (set! (-> v1-29 width) (the float 100))) + (let ((v1-30 s4-2)) (set! (-> v1-30 height) (the float 15))) + (let ((v1-31 s4-2)) (set! (-> v1-31 scale) 0.5)) + (set! (-> s4-2 flags) (font-flags shadow kerning large)) + (print-game-text (lookup-text! *common-text* (text-id options) #f) s4-2 #f 128 22) + (let ((v1-34 s4-2)) (set! (-> v1-34 width) (the float 160))) + (let ((v1-35 s4-2)) (set! (-> v1-35 height) (the float 22))) + (let ((v1-36 s4-2)) (set! (-> v1-36 scale) 1.3)) + (let ((a0-31 s4-2)) (set! (-> a0-31 color) (font-color progress-percent))) + (set! (-> s4-2 origin x) + (+ *PC-PERCENT-X-ADJUST* (- 435.0 (the float (if (< (-> *progress-process* 0 completion-percentage) 10.0) 93 80))) f30-0)) + (set! (-> s4-2 origin y) 180.0) + (set! (-> s4-2 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~2D%" (the int (-> *progress-process* 0 completion-percentage))) + (s3-3 *temp-string* s4-2 #f (the int (* 128.0 f28-0)) 22)))) + 0.0 + (let ((f28-1 (+ -94.0 (-> this particles 2 init-pos x))) + (s3-4 90) + (s4-3 224) + (s2-5 (/ s5-0 5)) + (f26-3 (-> this button-scale))) + ;; CROSS + (let ((f24-0 (* 182.04445 (- (/ -36.0 f26-3) (the float s2-5))))) + (set! (-> this particles 27 init-pos x) (+ *PC-CROSS-X-ADJUST* (the float (+ s3-4 (the int (* f28-1 (cos f24-0))))))) + (set! (-> this particles 27 init-pos y) (+ *PC-CROSS-Y-ADJUST* (the float (+ s4-3 (the int (* f28-1 (sin f24-0)))))))) + ;; SQUARE + (let ((f24-2 (* 182.04445 (- (/ -21.0 f26-3) (the float (adjust-pos s2-5 10)))))) + (set! (-> this particles 28 init-pos x) (+ *PC-SQUARE-X-ADJUST* (the float (+ s3-4 (the int (* f28-1 (cos f24-2))))))) + (set! (-> this particles 28 init-pos y) (+ *PC-SQUARE-Y-ADJUST* (the float (+ s4-3 (the int (* f28-1 (sin f24-2)))))))) + ;; TRIANGLE + (let ((f24-4 (* 182.04445 (- (/ -6.0 f26-3) (the float (adjust-pos s2-5 15)))))) + (set! (-> this particles 29 init-pos x) (+ *PC-TRIANGLE-X-ADJUST* (the float (+ s3-4 (the int (* f28-1 (cos f24-4))))))) + (set! (-> this particles 29 init-pos y) (+ *PC-TRIANGLE-Y-ADJUST* (the float (+ s4-3 (the int (* f28-1 (sin f24-4)))))))) + ;; CIRCLE + (let ((f26-5 (* 182.04445 (- (/ 9.0 f26-3) (the float (adjust-pos s2-5 20)))))) + (set! (-> this particles 30 init-pos x) (+ *PC-CIRCLE-X-ADJUST* (the float (+ s3-4 (the int (* f28-1 (cos f26-5))))))) + (set! (-> this particles 30 init-pos y) (+ *PC-CIRCLE-Y-ADJUST* (the float (+ s4-3 (the int (* f28-1 (sin f26-5))))))))) + (when *cheat-mode* + (let ((a0-46 "AUTO SAVE OFF")) + (if (-> *setting-control* current auto-save) (set! a0-46 "AUTO SAVE ON")) + (let* ((s3-5 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-4 (-> s3-5 base))) + (draw-string-xy a0-46 + s3-5 + (the int (+ *PC-AUTOSAVE-X-ADJUST* 430.0 f30-0)) + 200 + (font-color progress-memcard) + (font-flags shadow kerning middle)) + (let ((a3-9 (-> s3-5 base))) + (let ((v1-81 (the-as object (-> s3-5 base)))) + (set! (-> (the-as dma-packet v1-81) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-81) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-81) vif1) (new 'static 'vif-tag)) + (set! (-> s3-5 base) (&+ (the-as pointer v1-81) 16))) + (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug) + s4-4 + (the-as (pointer dma-tag) a3-9)))))) + (let ((a0-52 (-> this icons 5 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! a0-52 (- (y-angle a0-52) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))))) + (let* ((f28-2 (* 0.00024414062 (the float (-> *progress-process* 0 in-out-position)))) + (f30-1 (* 300.0 f28-2))) + (set! (-> this particles 18 init-pos x) + (+ *PC-ORB-GLOW-X-ADJUST* (the float (+ (the int (the float (adjust-pos s5-0 50))) 394 (the int f30-1) (-> this right-x-offset))))) + (set! (-> this particles 18 init-pos y) (the float (- 40 (the int (* 80.0 f28-2))))) + (set! (-> this icons 5 icon-x) + (+ (the int *PC-ORB-X-ADJUST*) (the int (the float (adjust-pos s5-0 50))) 393 (the int f30-1) (-> this right-x-offset))) + (set! (-> this icons 5 icon-y) (- (-> this small-orb-y-offset) (the int (* 80.0 f28-2)))) + (set! (-> this particles 16 init-pos x) + (+ *PC-CELL-X-ADJUST* (the float (+ (the int (the float (adjust-pos s5-0 100))) 425 (the int f30-1) (-> this right-x-offset))))) + (set! (-> this particles 16 init-pos y) (the float (- 112 (the int (* 60.0 f28-2))))) + (set! (-> this particles 17 init-pos x) + (the float + (+ (the int (the float (adjust-pos s5-0 150))) + 442 + (the int f30-1) + (the int (* 0.7 (the float (-> this right-x-offset))))))))) + (set! (-> this particles 17 init-pos y) 193.0) + 0 + (none)) + + (defun init-game-options ((obj progress)) "Set the options for all of the menus." ;; start off by making them all invalid @@ -1473,19 +2043,19 @@ (set! (-> *progress-state* video-mode-choice) (get-video-mode)) (set! (-> *progress-state* yes-no-choice) #f) ;; set variable pointers - (set! (-> *game-options* 1 value-to-modify) (&-> *setting-control* default play-hints)) + (set! (-> *game-options* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?)) (set! (-> *game-options* 2 value-to-modify) (&-> *setting-control* default language)) - (set! (-> *game-options-japan* 0 value-to-modify) (&-> *setting-control* default vibration)) - (set! (-> *game-options-japan* 1 value-to-modify) (&-> *setting-control* default play-hints)) - (set! (-> *game-options-demo* 0 value-to-modify) (&-> *setting-control* default vibration)) - (set! (-> *game-options-demo* 1 value-to-modify) (&-> *setting-control* default play-hints)) + (set! (-> *game-options-japan* 0 value-to-modify) (&-> *pc-settings* memcard-vibration?)) + (set! (-> *game-options-japan* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?)) + (set! (-> *game-options-demo* 0 value-to-modify) (&-> *pc-settings* memcard-vibration?)) + (set! (-> *game-options-demo* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?)) (set! (-> *graphic-options* 1 value-to-modify) (&-> *progress-state* aspect-ratio-choice)) (set! (-> *sound-options* 0 value-to-modify) (&-> *setting-control* default sfx-volume)) (set! (-> *sound-options* 1 value-to-modify) (&-> *setting-control* default music-volume)) (set! (-> *sound-options* 2 value-to-modify) (&-> *setting-control* default dialog-volume)) (set! (-> *yes-no-options* 0 value-to-modify) (&-> *progress-state* yes-no-choice)) ;; our options! - (set! (-> *game-options-pc* 1 value-to-modify) (&-> *setting-control* default play-hints)) + (set! (-> *game-options-pc* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?)) (set! (-> *game-options-pc* 2 value-to-modify) (&-> *pc-settings* subtitles?)) (set! (-> *game-options-pc* 3 value-to-modify) (&-> *pc-settings* hinttitles?)) (set! (-> *game-options-pc* 4 value-to-modify) (&-> *setting-control* default language)) @@ -1493,7 +2063,6 @@ (set! (-> *game-options-pc* 6 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *game-options-pc* 7 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *graphic-options-pc* 1 value-to-modify) (&-> *progress-carousell* int-backup)) - (set! (-> *graphic-options-pc* 2 value-to-modify) (&-> *pc-settings* monitor)) (set! (-> *graphic-options-pc* 3 value-to-modify) (&-> *pc-settings* vsync?)) (set! (-> *graphic-options-pc* 5 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *graphic-options-pc* 6 value-to-modify) (&-> *progress-carousell* int-backup)) @@ -1506,7 +2075,7 @@ (set! (-> *camera-options* 2 value-to-modify) (&-> *pc-settings* third-camera-h-inverted?)) (set! (-> *camera-options* 3 value-to-modify) (&-> *pc-settings* third-camera-v-inverted?)) ;; input options - (set! (-> *controller-options* 1 value-to-modify) (&-> *setting-control* default vibration)) + (set! (-> *controller-options* 1 value-to-modify) (&-> *pc-settings* memcard-vibration?)) (set! (-> *controller-options* 2 value-to-modify) (&-> *pc-settings* stick-deadzone)) (set! (-> *controller-options* 3 value-to-modify) (&-> *pc-settings* ignore-controller-win-unfocused?)) (set! (-> *controller-options* 4 value-to-modify) (&-> *pc-settings* controller-led-hp?)) @@ -1524,9 +2093,9 @@ (set! (-> *gfx-ps2-options* 2 value-to-modify) (&-> *pc-settings* ps2-parts?)) (set! (-> *gfx-ps2-options* 3 value-to-modify) (&-> *pc-settings* force-envmap?)) (set! (-> *gfx-ps2-options* 4 value-to-modify) (&-> *pc-settings* ps2-actor-vis?)) - (set! (-> *sound-options-pc* 0 value-to-modify) (&-> *setting-control* default sfx-volume)) - (set! (-> *sound-options-pc* 1 value-to-modify) (&-> *setting-control* default music-volume)) - (set! (-> *sound-options-pc* 2 value-to-modify) (&-> *setting-control* default dialog-volume)) + (set! (-> *sound-options-pc* 0 value-to-modify) (&-> *pc-settings* memcard-volume-sfx)) + (set! (-> *sound-options-pc* 1 value-to-modify) (&-> *pc-settings* memcard-volume-music)) + (set! (-> *sound-options-pc* 2 value-to-modify) (&-> *pc-settings* memcard-volume-dialog)) (dotimes (i (1- (-> *cheats* length))) (set! (-> *cheats* i value-to-modify) (&-> *progress-carousell* symbol-backup))) ;(set! (-> *sound-options-pc* 3 value-to-modify) (&-> *pc-settings* music-fadein?)) @@ -1934,7 +2503,7 @@ ;; resolution button. change resolution! (let ((newx (the int (-> options (-> obj option-index) param1))) (newy (the int (-> options (-> obj option-index) param2)))) - (set-size! *pc-settings* newx newy #t)) + (set-window-size! *pc-settings* newx newy)) (cpad-clear! 0 x) (cpad-clear! 0 circle) (sound-play "cursor-options") @@ -1952,7 +2521,7 @@ (commit-to-file *pc-settings*)) ((= (-> options (-> obj option-index) option-type) (game-option-type monitor)) ;; monitor button - (let ((monitor (the int (-> options (-> obj option-index) param1)))) (set-monitor! *pc-settings* monitor)) + (let ((monitor (the int (-> options (-> obj option-index) param1)))) (pc-set-display-id! monitor)) (cpad-clear! 0 x) (cpad-clear! 0 circle) (sound-play "cursor-options") @@ -2107,9 +2676,9 @@ (((game-option-type display-mode)) ;; same thing. (case (-> *progress-carousell* int-backup) - ((0) (set-display-mode! *pc-settings* 'windowed #t)) - ((1) (set-display-mode! *pc-settings* 'fullscreen #t)) - ((2) (set-display-mode! *pc-settings* 'borderless #t)))) + ((0) (pc-set-display-mode! 'windowed)) + ((1) (pc-set-display-mode! 'fullscreen)) + ((2) (pc-set-display-mode! 'borderless)))) (((game-option-type msaa)) (case (-> *progress-carousell* int-backup) ((0) (set! (-> *pc-settings* gfx-msaa) 1)) diff --git a/goal_src/jak2/engine/game/game-info.gc b/goal_src/jak2/engine/game/game-info.gc index ce7d32be76..eae06b5abc 100644 --- a/goal_src/jak2/engine/game/game-info.gc +++ b/goal_src/jak2/engine/game/game-info.gc @@ -1643,12 +1643,28 @@ ) (defmethod adjust-to-screen-flip ((this cpad-info)) - (when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + ;; og:preserve-this mirror mode flag + (when (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + *PC-MIRROR-MODE-SET*) (set! (-> this leftx) (- 255 (the-as int (-> this leftx)))) (set! (-> this rightx) (- 255 (the-as int (-> this rightx)))) - ) - 0 - ) + ;; while in the progress menu, invert left/right as well + (when *progress-process* + ;; right = 5th bit and 1st index for pressure + ;; left = 7th bit and 2nd index for pressure + (let ((right-pressed? (logtest? (-> this button0) (pad-buttons right))) + (right-pressure (-> this abutton 0)) + (left-pressed? (logtest? (-> this button0) (pad-buttons left))) + (left-pressure (-> this abutton 1))) + (when right-pressed? + (logclear! (-> this button0) (pad-buttons right)) + (logior! (-> this button0) (pad-buttons left))) + (when left-pressed? + (logclear! (-> this button0) (pad-buttons left)) + (logior! (-> this button0) (pad-buttons right))) + (set! (-> this abutton 0) left-pressure) + (set! (-> this abutton 1) right-pressure)))) + 0) (defmethod game-info-method-28 ((this game-info) (arg0 game-score) (arg1 float)) (when (!= arg1 0.0) diff --git a/goal_src/jak2/engine/game/game-save.gc b/goal_src/jak2/engine/game/game-save.gc index 17036d7d74..99d722c6a6 100644 --- a/goal_src/jak2/engine/game/game-save.gc +++ b/goal_src/jak2/engine/game/game-save.gc @@ -1103,21 +1103,22 @@ (let ((v1-0 (the-as object (-> arg0 tag)))) (while (< (the-as int v1-0) (the-as int (&-> arg0 tag 0 user-int8 (-> arg0 length)))) (case (-> (the-as (inline-array game-save-tag) v1-0) 0 elt-type) - (((game-save-elt sfx-volume)) - (set! (-> *setting-control* user-default sfx-volume) - (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) - ) - ) - (((game-save-elt music-volume)) - (set! (-> *setting-control* user-default music-volume) - (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) - ) - ) - (((game-save-elt dialog-volume)) - (set! (-> *setting-control* user-default dialog-volume) - (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) - ) - ) + ;; og:preserve-this Moved saving these settings to pc-settings + ;; (((game-save-elt sfx-volume)) + ;; (set! (-> *setting-control* user-default sfx-volume) + ;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) + ;; ) + ;; ) + ;; (((game-save-elt music-volume)) + ;; (set! (-> *setting-control* user-default music-volume) + ;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) + ;; ) + ;; ) + ;; (((game-save-elt dialog-volume)) + ;; (set! (-> *setting-control* user-default dialog-volume) + ;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0) + ;; ) + ;; ) (((game-save-elt language)) (set! (-> *setting-control* user-default language) (the-as language-enum (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64)) @@ -1133,16 +1134,16 @@ (the-as int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64)) ) ) - (((game-save-elt vibration)) - (set! (-> *setting-control* user-default vibration) - (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1) - ) - ) - (((game-save-elt subtitle)) - (set! (-> *setting-control* user-default subtitle) - (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1) - ) - ) + ;; (((game-save-elt vibration)) + ;; (set! (-> *setting-control* user-default vibration) + ;; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1) + ;; ) + ;; ) + ;; (((game-save-elt subtitle)) + ;; (set! (-> *setting-control* user-default subtitle) + ;; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1) + ;; ) + ;; ) (((game-save-elt camera-stick-dir)) (set! (-> *setting-control* user-default camera-stick-dir) (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1) @@ -1163,6 +1164,7 @@ (the int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)) ) ) + (else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now")) ) (set! v1-0 (&+ (the-as pointer v1-0) diff --git a/goal_src/jak2/engine/game/settings.gc b/goal_src/jak2/engine/game/settings.gc index 7db58045c9..e7b57ed03b 100644 --- a/goal_src/jak2/engine/game/settings.gc +++ b/goal_src/jak2/engine/game/settings.gc @@ -1215,6 +1215,7 @@ (set! (-> s5-0 display-dy) (-> s4-0 display-dy)) (set! (-> *video-params* display-dy) (* (/ (-> s4-0 display-dy) 2) 2)) ) + ;; og:preserve-this If this flag worked end-to-end (i believe it doesn't), mirror mode would come a bit easier (set! (-> *blit-displays-work* horizontal-flip-flag) (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) ) diff --git a/goal_src/jak2/engine/gfx/math-camera.gc b/goal_src/jak2/engine/gfx/math-camera.gc index 364bb36455..10131b6a2a 100644 --- a/goal_src/jak2/engine/gfx/math-camera.gc +++ b/goal_src/jak2/engine/gfx/math-camera.gc @@ -220,9 +220,11 @@ renderers that want a single matrix. ;; #xffffffff, which overflows the 24-bit z buffer. ;; cheating this by 1 bit seems to fix it. (#when PC_PORT - ;; #x4b002032 -> #x4b002031 - (set! (-> arg0 isometric vector 3 z) (the-as float (- (the-as int (-> arg0 isometric vector 3 z)) 1))) - ) + ;; #x4b002032 -> #x4b002031 + (set! (-> arg0 isometric vector 3 z) (the-as float (- (the-as int (-> arg0 isometric vector 3 z)) 1))) + ;; also do mirror game check here. + (when *PC-MIRROR-MODE-SET* + (*! (-> arg0 perspective vector 0 x) -1.))) ) (set! (-> arg0 isometric trans w) f30-0) (let ((f1-28 (-> arg0 perspective vector 0 x)) diff --git a/goal_src/jak2/engine/sound/gsound-h.gc b/goal_src/jak2/engine/sound/gsound-h.gc index 9452e31b8a..f7fdec9250 100644 --- a/goal_src/jak2/engine/sound/gsound-h.gc +++ b/goal_src/jak2/engine/sound/gsound-h.gc @@ -61,6 +61,8 @@ (iop-mem 48) (cancel-dgo 49) (set-stereo-mode 50) ;; sound-rpc-set-stereo-mode + ;; og:preserve-this mirror mode + (set-mirror 201) ) (defenum sound-group @@ -96,6 +98,11 @@ (unk) ) +(defenum sound-mirror-mode + :type uint8 + (normal) + (mirrored)) + (defenum stream-status :type uint32 :bitfield #t @@ -402,6 +409,10 @@ () ) +;; og:preserve-this added for mirror mode +(deftype sound-rpc-set-mirror-mode (sound-rpc-cmd) + ((mirror sound-mirror-mode))) + (deftype sound-rpc-union (structure) ((data uint32 20) @@ -426,6 +437,8 @@ (shutdown sound-rpc-shutdown :overlay-at (-> data 0)) (list-sounds sound-rpc-list-sounds :overlay-at (-> data 0)) (unload-music sound-rpc-unload-music :overlay-at (-> data 0)) + ;; og:preserve-this mirror mode + (mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0)) ) ) diff --git a/goal_src/jak2/engine/sound/gsound.gc b/goal_src/jak2/engine/sound/gsound.gc index 86b393ba1f..eddaf653bd 100644 --- a/goal_src/jak2/engine/sound/gsound.gc +++ b/goal_src/jak2/engine/sound/gsound.gc @@ -283,6 +283,19 @@ 0 ) +;; og:preserve-this mirror mode +(define *sound-current-mirror* (sound-mirror-mode normal)) + +;; og:preserve-this mirror mode +(defun sound-set-mirror-mode ((mode sound-mirror-mode)) + (when (!= mode *sound-current-mirror*) + (let ((cmd (the sound-rpc-set-mirror-mode (add-element *sound-loader-rpc*)))) + (set! (-> cmd command) (sound-command set-mirror)) + (set! (-> cmd mirror) mode)) + (call *sound-loader-rpc* (the-as uint 0) (the-as pointer 0) (the-as uint 0)) + (set! *sound-current-mirror* mode)) + (none)) + (define *sound-player-enable* #t) (defun swap-sound-buffers ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) diff --git a/goal_src/jak2/engine/target/target-turret.gc b/goal_src/jak2/engine/target/target-turret.gc index a045da93fb..7dd3d86b8c 100644 --- a/goal_src/jak2/engine/target/target-turret.gc +++ b/goal_src/jak2/engine/target/target-turret.gc @@ -1592,7 +1592,9 @@ (f30-1 (vector-vector-angle-safe s2-2 (vector-! (new 'stack-no-clear 'vector) s5-1 s3-1))) ) (let ((f0-10 (- (atan (-> s4-1 x) (-> s4-1 y))))) - (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + ;; og:preserve-this mirror mode + (if (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + *PC-MIRROR-MODE-SET*) (set! f0-10 (* -1.0 f0-10)) ) (set! (-> this arrow-angle) (deg-seek (-> this arrow-angle) f0-10 (* 65536.0 (seconds-per-frame)))) diff --git a/goal_src/jak2/kernel-defs.gc b/goal_src/jak2/kernel-defs.gc index 4c38fdf0d5..d3e5b4da06 100644 --- a/goal_src/jak2/kernel-defs.gc +++ b/goal_src/jak2/kernel-defs.gc @@ -203,11 +203,13 @@ (define-extern pc-get-os (function symbol)) (define-extern pc-get-window-size (function (pointer int64) (pointer int64) 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-fullscreen-display (function int none)) -(define-extern pc-set-display-mode (function symbol none)) +(define-extern pc-set-window-size! (function int int none)) +(define-extern pc-get-display-id (function int)) +(define-extern pc-set-display-id! (function int none)) +(define-extern pc-set-display-mode! (function symbol none)) (define-extern pc-get-num-resolutions (function int)) (define-extern pc-get-resolution (function int (pointer int64) (pointer int64) none)) +(define-extern pc-is-supported-resolution? (function int int symbol)) (define-extern pc-set-frame-rate (function int none)) (define-extern pc-set-vsync (function symbol none)) diff --git a/goal_src/jak2/pc/debug/default-menu-pc.gc b/goal_src/jak2/pc/debug/default-menu-pc.gc index 09a8b54734..757bebf666 100644 --- a/goal_src/jak2/pc/debug/default-menu-pc.gc +++ b/goal_src/jak2/pc/debug/default-menu-pc.gc @@ -799,8 +799,7 @@ (= (-> *pc-settings* territory) terr))) (defun dm-size-pick-func ((size pair)) - (set-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8) #t) - ) + (set-window-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8))) (defun dm-screen-shot-preset-pick-func ((args pair) (msg debug-menu-msg)) (let ((w (/ (the int (car args)) 8)) @@ -856,9 +855,9 @@ (function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y)))) ) (menu "Fullscreen" - (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) - (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) - (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t))) + (function "Windowed" #f ,(lambda () (pc-set-display-mode! 'windowed))) + (function "Fullscreen" #f ,(lambda () (pc-set-display-mode! 'fullscreen))) + (function "Borderless" #f ,(lambda () (pc-set-display-mode! 'borderless))) ) (menu "Sizes" (function "640 x 480" (640 480) dm-size-pick-func) diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index 9871f04e6a..4977b161c6 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -100,6 +100,7 @@ ;; other (controller-led-status? symbol) (speedrunner-mode-custom-bind uint32) + (memcard-subtitles? symbol) (text-language pc-language) ;; language for game text ) @@ -160,6 +161,12 @@ ) (else )) + + (set! (-> obj memcard-volume-sfx) 0.5) + (set! (-> obj memcard-volume-music) 0.4) + (set! (-> obj memcard-volume-dialog) 0.75) + (set! (-> obj memcard-vibration?) #t) + (set! (-> obj memcard-subtitles?) #f) 0) (defmethod reset-extra ((obj pc-settings-jak2) (call-handlers symbol)) diff --git a/goal_src/jak2/pc/pckernel.gc b/goal_src/jak2/pc/pckernel.gc index 4465b16a31..e8a6fb928f 100644 --- a/goal_src/jak2/pc/pckernel.gc +++ b/goal_src/jak2/pc/pckernel.gc @@ -314,12 +314,14 @@ ;;;; methods ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (defmethod initialize ((obj pc-settings-jak2)) "initial initialize method to be run after allocating" - (set! (-> obj music-unlocked) (new 'global 'bit-array (-> *music-player-tracks* length))) ((method-of-type pc-settings initialize) obj) + (set! (-> *setting-control* user-default sfx-volume) (-> obj memcard-volume-sfx)) + (set! (-> *setting-control* user-default music-volume) (-> obj memcard-volume-music)) + (set! (-> *setting-control* user-default dialog-volume) (-> obj memcard-volume-dialog)) + (set! (-> *setting-control* user-default vibration) (-> obj memcard-vibration?)) obj) (defmethod set-game-setting! ((obj pc-settings-jak2) (setting symbol) (value symbol)) @@ -594,6 +596,9 @@ (defmethod update-cheats ((obj pc-settings-jak2)) "run cheats." + ;; sync mirror mode cheat + (set! *PC-MIRROR-MODE-SET* (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))) + ;; run cheats here. ;;;;;;;;;;;;;;;;;;; @@ -635,6 +640,11 @@ (pc-set-gfx-hack (pc-gfx-hack no-tex) (pc-cheats? (-> obj cheats) no-textures)) + (if (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + *PC-MIRROR-MODE-SET*) + (sound-set-mirror-mode (sound-mirror-mode mirrored)) + (sound-set-mirror-mode (sound-mirror-mode normal))) + ;; run cheats end!!! ;;;;;;;;;;;;;;;;;;;; @@ -756,6 +766,7 @@ (("cheats-purchased") (set! (-> obj cheats-purchased) (the-as pc-cheats (file-stream-read-int file)))) (("cheats-unlocked") (set! (-> obj cheats-unlocked) (the-as pc-cheats (file-stream-read-int file)))) (("cheats-backup") (file-stream-read-int file)) ;; TODO - Don't remove this, parsing code can't handle unexpected keys + (("memcard-subtitles?") (set! (-> obj memcard-subtitles?) (file-stream-read-symbol file))) (("music-unlocked") (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) (bit-array<-int64 (-> obj music-unlocked) (* i 64) (file-stream-read-int file)) @@ -807,6 +818,7 @@ (format file " (cheats-revealed #x~x)~%" (-> obj cheats-revealed)) (format file " (cheats-purchased #x~x)~%" (-> obj cheats-purchased)) (format file " (cheats-unlocked #x~x)~%" (-> obj cheats-unlocked)) + (format file " (memcard-subtitles? ~A)~%" (-> obj memcard-subtitles?)) (format file " (music-unlocked") (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) diff --git a/goal_src/jak2/pc/progress/progress-pc.gc b/goal_src/jak2/pc/progress/progress-pc.gc index add2fabc8f..34485484a1 100644 --- a/goal_src/jak2/pc/progress/progress-pc.gc +++ b/goal_src/jak2/pc/progress/progress-pc.gc @@ -57,8 +57,8 @@ (set! (-> *progress-state* color-flash-counter) 0) (set! (-> *progress-state* game-options-item-selected) 0) (set! (-> *progress-state* game-options-item-picked) #f) - (set! (-> *progress-state* game-options-vibrations) (-> *setting-control* user-default vibration)) - (set! (-> *progress-state* game-options-subtitles) (-> *setting-control* user-default subtitle)) + (set! (-> *progress-state* game-options-vibrations) (-> *pc-settings* memcard-vibration?)) + (set! (-> *progress-state* game-options-subtitles) (-> *pc-settings* memcard-subtitles?)) (set! (-> *progress-state* game-options-language-index) (the-as int (-> *setting-control* user-default language)) ) @@ -81,7 +81,7 @@ (set! (-> obj sliding-off) 1.0) (set! (-> obj scanlines-alpha) 0.0) (set! (-> (the-as menu-on-off-game-vibrations-option (-> *game-options* options 0)) value-to-modify) - (&-> *setting-control* user-default vibration) + (&-> *pc-settings* memcard-vibration?) ) (set! (-> (the-as menu-on-off-game-subtitles-option (-> *game-options* options 1)) value-to-modify) (&-> *setting-control* user-default subtitle) @@ -93,10 +93,10 @@ (set! (-> (the-as menu-language-option (-> *game-options* options 2)) language-transition) #f) (set! (-> (the-as menu-language-option (-> *game-options* options 2)) language-x-offset) 0) (set! (-> (the-as menu-on-off-option (-> *game-options-japan* options 0)) value-to-modify) - (&-> *setting-control* user-default vibration) + (&-> *pc-settings* memcard-vibration?) ) (set! (-> (the-as menu-on-off-option (-> *game-options-demo* options 0)) value-to-modify) - (&-> *setting-control* user-default vibration) + (&-> *pc-settings* memcard-vibration?) ) (set! (-> (the-as menu-on-off-option (-> *graphic-options* options 2)) value-to-modify) (&-> *setting-control* user-default use-progressive-scan) @@ -104,15 +104,15 @@ (set! (-> (the-as menu-on-off-option (-> *graphic-title-options-pal* options 2)) value-to-modify) (&-> *setting-control* user-default use-progressive-scan) ) - (set! (-> (the-as menu-slider-option (-> *sound-options* options 0)) value-to-modify) - (&-> *setting-control* user-default sfx-volume) - ) - (set! (-> (the-as menu-slider-option (-> *sound-options* options 1)) value-to-modify) - (&-> *setting-control* user-default music-volume) - ) - (set! (-> (the-as menu-slider-option (-> *sound-options* options 2)) value-to-modify) - (&-> *setting-control* user-default dialog-volume) - ) + ;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 0)) value-to-modify) + ;; (&-> *pc-settings* memcard-volume-sfx) + ;; ) + ;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 1)) value-to-modify) + ;; (&-> *pc-settings* memcard-volume-music) + ;; ) + ;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 2)) value-to-modify) + ;; (&-> *pc-settings* memcard-volume-dialog) + ;; ) (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) task-line-index) 0) (set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0) @@ -183,7 +183,7 @@ (set! (-> obj current-options) *graphic-options-pc*) ) (('sound-options) - (set! (-> obj current-options) *sound-options*) + (set! (-> obj current-options) *sound-options-pc*) ) (('select-load 'select-save) (set! (-> obj current-options) *load-save-options*) @@ -842,7 +842,7 @@ ;; select ((cpad-pressed? 0 confirm) (cpad-clear! 0 confirm) - (set-size! *pc-settings* select-w select-h #t) + (set-window-size! *pc-settings* select-w select-h) (pc-settings-save) (pop-state arg0)) ;; exit diff --git a/goal_src/jak2/pc/progress/progress-static-pc.gc b/goal_src/jak2/pc/progress/progress-static-pc.gc index a9e0182e1b..8b9d3cda27 100644 --- a/goal_src/jak2/pc/progress/progress-static-pc.gc +++ b/goal_src/jak2/pc/progress/progress-static-pc.gc @@ -6,9 +6,6 @@ Additional PC port specific file for overriding/expanding the progress menu This gives us more freedom to write code how we want. |# -;; in jak 2, the options dont have to be all-caps anymore! -;; encode controller/display names - current bug waiting to happen - (define *title-pc* (new 'static 'menu-option-list :y-center #xc6 @@ -39,6 +36,52 @@ This gives us more freedom to write code how we want. ) ) +(define *sound-options-pc* + (progress-new-generic-scrolling-page (text-id progress-root-sound-options) + (new 'static 'menu-generic-slider-option + :name (text-id progress-sound-sfx-volume) + :min-value 0.0 + :max-value 1.0 + :step 0.01 + :show-decimal? #t + :get-value-fn (lambda () (-> *pc-settings* memcard-volume-sfx)) + :on-confirm (lambda ((val float)) + (set! (-> *pc-settings* memcard-volume-sfx) val) + (pc-settings-save) + (set! (-> *setting-control* user-default sfx-volume) val))) + (new 'static 'menu-generic-slider-option + :name (text-id progress-sound-music-volume) + :min-value 0.0 + :max-value 1.0 + :step 0.01 + :show-decimal? #t + :get-value-fn (lambda () (-> *pc-settings* memcard-volume-music)) + :on-confirm (lambda ((val float)) + (set! (-> *pc-settings* memcard-volume-music) val) + (pc-settings-save) + (set! (-> *setting-control* user-default music-volume) val))) + (new 'static 'menu-generic-slider-option + :name (text-id progress-sound-speech-volume) + :min-value 0.0 + :max-value 1.0 + :step 0.01 + :show-decimal? #t + :get-value-fn (lambda () (-> *pc-settings* memcard-volume-dialog)) + :on-confirm (lambda ((val float)) + (set! (-> *pc-settings* memcard-volume-dialog) val) + (pc-settings-save) + (set! (-> *setting-control* user-default dialog-volume) val))) + (new 'static 'menu-generic-carousel-option + :name (text-id progress-sound-format) + :get-max-size-fn (lambda () 3) + :get-item-label-fn (lambda ((index int)) + (case index + ((0) (lookup-text! *common-text* (text-id progress-sound-mono) #f)) + ((1) (lookup-text! *common-text* (text-id progress-sound-stereo) #f)) + ((2) (lookup-text! *common-text* (text-id progress-sound-surround) #f)))) + :get-item-index-fn (lambda () (-> *setting-control* user-default stereo-mode)) + :on-confirm (lambda ((index int) (the-progress progress)) (set! (-> *setting-control* user-default stereo-mode) index))))) + (define *options-pc* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 @@ -138,7 +181,10 @@ This gives us more freedom to write code how we want. :truthy-text (text-id progress-on) :falsey-text (text-id progress-off) :get-value-fn (lambda () (-> *setting-control* user-default vibration)) - :on-confirm (lambda ((val symbol)) (set! (-> *setting-control* user-default vibration) val))) + :on-confirm (lambda ((val symbol)) + (set! (-> *pc-settings* memcard-vibration?) val) + (pc-settings-save) + (set! (-> *setting-control* user-default vibration) val))) (new 'static 'menu-generic-slider-option :name (text-id progress-controller-options-analog-deadzone) :min-value 0.0 @@ -285,7 +331,10 @@ This gives us more freedom to write code how we want. :truthy-text (text-id progress-on) :falsey-text (text-id progress-off) :get-value-fn (lambda () (-> *setting-control* user-default subtitle)) - :on-confirm (lambda ((val symbol)) (set! (-> *setting-control* user-default subtitle) val)))) + :on-confirm (lambda ((val symbol)) + (set! (-> *pc-settings* memcard-subtitles?) val) + (pc-settings-save) + (set! (-> *setting-control* user-default subtitle) val)))) (defmacro game-options-pc-subtitle-language () `(new 'static 'menu-generic-carousel-option @@ -334,7 +383,6 @@ This gives us more freedom to write code how we want. :on-confirm (lambda ((index int) (the-progress progress)) (set! (-> *pc-settings* text-language) (the-as pc-language index)) ;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code) - ;; fix it eventually (load-level-text-files (the-as int (-> *pc-settings* text-language))) (pc-settings-save)))) @@ -427,7 +475,7 @@ This gives us more freedom to write code how we want. (define *graphic-options-pc* (progress-new-generic-scrolling-page (text-id progress-root-graphic-options) - ;; NOTE/TODO - this doesn't following the established generic menu pattern + ;; NOTE/TODO - this doesn't follow the established generic menu pattern ;; a generic scrolling list menu component should be created (similar to menu-generic-details-page) ;; so the code can be localized to functions instead of scattered around in a bunch of switch statements (new 'static 'menu-generic-to-resolutions-option @@ -436,7 +484,7 @@ This gives us more freedom to write code how we want. (push-and-set-state the-progress 'resolutions))) (new 'static 'menu-generic-carousel-option :name (text-id progress-graphics-display) - :get-item-index-fn (lambda () (-> *pc-settings* monitor)) + :get-item-index-fn (lambda () (pc-get-display-id)) :get-max-size-fn (lambda () (pc-get-display-count)) :get-item-label-fn (lambda ((index int)) (let ((name (pc-get-display-name index *pc-cpp-temp-string*))) @@ -445,9 +493,8 @@ This gives us more freedom to write code how we want. (string-format "Display ~D" index)) )) :on-confirm (lambda ((index int) (the-progress progress)) - (set-monitor! *pc-settings* index) - (pc-settings-save)) - :should-disable? (lambda () (nmember (the basic (-> *pc-settings* display-mode)) '(windowed #f)))) + (pc-set-display-id! index)) + :should-disable? (lambda () (or (= (pc-get-display-mode) 'windowed) (<= (pc-get-display-count) 1)))) (new 'static 'menu-generic-carousel-option :name (text-id progress-display-mode) :items (new 'static 'boxed-array :type text-id @@ -455,16 +502,15 @@ This gives us more freedom to write code how we want. (text-id progress-fullscreen) (text-id progress-borderless)) :get-item-index-fn (lambda () - (case (-> *pc-settings* display-mode) - (('windowed #f) 0) + (case (pc-get-display-mode) + (('windowed) 0) (('fullscreen) 1) - (('borderless) 2)) ) + (('borderless) 2))) :on-confirm (lambda ((index int) (the-progress progress)) (case index - ((0) (set-display-mode! *pc-settings* 'windowed #t)) - ((1) (set-display-mode! *pc-settings* 'fullscreen #t)) - ((2) (set-display-mode! *pc-settings* 'borderless #t))) - (pc-settings-save))) + ((0) (pc-set-display-mode! 'windowed)) + ((1) (pc-set-display-mode! 'fullscreen)) + ((2) (pc-set-display-mode! 'borderless))))) (new 'static 'menu-generic-carousel-option :name (text-id progress-aspect-ratio) :items (new 'static 'boxed-array :type text-id diff --git a/goal_src/jak3/engine/common-obs/cloth-art-h.gc b/goal_src/jak3/engine/common-obs/cloth-art-h.gc index c7a25ab30b..0527fa11e5 100644 --- a/goal_src/jak3/engine/common-obs/cloth-art-h.gc +++ b/goal_src/jak3/engine/common-obs/cloth-art-h.gc @@ -146,7 +146,7 @@ (deftype cloth-base (basic) () (:methods - (init! (_type_) int) - (cloth-base-method-10 (_type_ cloth-params handle) int) + (update! (_type_) int) + (setup-from-params! (_type_ cloth-params handle) int) ) ) diff --git a/goal_src/jak3/engine/common-obs/curves.gc b/goal_src/jak3/engine/common-obs/curves.gc index bf11617009..ab0c53d9aa 100644 --- a/goal_src/jak3/engine/common-obs/curves.gc +++ b/goal_src/jak3/engine/common-obs/curves.gc @@ -20,9 +20,19 @@ (define-extern particle-color-curve-white* curve-color-fast) (define-extern *trail-color-curve-red* curve-color-fast) +(defenum loop-behavior + :type uint64 + :bitfield #f + (wrap) + (clamp) + (b2) + (use-default) + ) + ;; DECOMP BEGINS (deftype float-pair (structure) + "Two floats. Specifies one point on a piecewise linear curve." ((first float) (second float) (x float :overlay-at first) @@ -32,6 +42,7 @@ (deftype float-pair-array (inline-array-class) + "Array of points used to make a piecewise linear curve." ((data float-pair :inline :dynamic) ) ) @@ -40,33 +51,44 @@ (set! (-> float-pair-array heap-base) (the-as uint 16)) (deftype curve2d (basic) + "Interface for evaluating a 2d curve. +The input is a float (x-position) and the output is a float (y-position). +The curve is over (0, 1). Values outside of the range are either clamped +or wrapped depending on the loop-behavior flag." () (:methods - (curve2d-method-9 (_type_ float int) float) + (evaluate (_type_ float loop-behavior) float) ) ) (deftype curve-color (basic) + "Interface for evaluating a color curve. The input is a float, representing +progress through the curve, and the result is a floating point rgba color." () (:methods - (curve-color-method-9 (_type_ float rgbaf int) rgbaf) + (evaluate (_type_ float rgbaf loop-behavior) rgbaf) ) ) (deftype curve2d-piecewise (curve2d) + "Implementation of 2d-curve for a piecewise linear curve. +Not particularly efficient - each evaluation needs to check each point." ((pts float-pair-array) - (default-loop-behavior uint64) + (default-loop-behavior loop-behavior) ) (:methods - (curve2d-piecewise-method-10 (_type_ int symbol int) none) + (allocate! (_type_ int symbol symbol) none) (curve2d-piecewise-method-11 (_type_) none) ) ) (deftype curve2d-fast (curve2d) + "Implementation of 2d piecewise linear curve which tries to be faster. +While it is faster, it places the huge restriction that you can only have 4 points. +Note that the xs should be negative here." ((xs vector :inline) (ys vector :inline) (one-over-x-deltas vector :inline) @@ -75,12 +97,16 @@ (defun rgbaf-lerp! ((arg0 rgbaf) (arg1 rgbaf) (arg2 rgbaf) (arg3 float)) + "Lerp all four components of rgba." (vector-lerp! arg0 arg1 arg2 arg3) (set! (-> arg0 w) (lerp (-> arg1 w) (-> arg2 w) arg3)) arg0 ) (deftype curve-color-fast (curve-color) + "Implementation of color curve which tries to be faster. +While it is faster, it again has the restriction that you only +get 4 piecewise sections." ((xs vector :inline) (ys vector 4 :inline) (one-over-x-deltas vector :inline) @@ -89,6 +115,8 @@ (deftype color-pair (structure) + "Single section of a piecewise linear color curve. +Unlike the fast version, this stores x values exactly like you'd expect." ((first float) (second rgbaf :inline) (x float :overlay-at first) @@ -98,6 +126,7 @@ (deftype color-pair-array (inline-array-class) + "Array of points for piecewise linear color curve." ((data color-pair :inline :dynamic) ) ) @@ -106,53 +135,53 @@ (set! (-> color-pair-array heap-base) (the-as uint 32)) (deftype curve-color-piecewise (curve-color) + "Implementation of curve-color." ((pts color-pair-array) - (default-loop-behavior uint64) + (default-loop-behavior loop-behavior) ) (:methods - (curve-color-piecewise-method-10 (_type_ int symbol uint) none) + (allocate! (_type_ int symbol symbol) none) ) ) -(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 int)) +(defmethod allocate! ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 symbol)) + "Allocate memory for points." (set! (-> this pts) ((method-of-type float-pair-array new) arg1 float-pair-array arg0)) - (set! (-> this default-loop-behavior) (the-as uint (if arg2 - 0 - 1 - ) - ) + (set! (-> this default-loop-behavior) (if arg2 + (loop-behavior wrap) + (loop-behavior clamp) + ) ) 0 (none) ) -(defmethod curve-color-piecewise-method-10 ((this curve-color-piecewise) (arg0 int) (arg1 symbol) (arg2 uint)) +(defmethod allocate! ((this curve-color-piecewise) (arg0 int) (arg1 symbol) (arg2 symbol)) + "Allocate memory for points." (set! (-> this pts) ((method-of-type color-pair-array new) arg1 color-pair-array arg0)) - (set! (-> this default-loop-behavior) (the-as uint (if arg2 - 0 - 1 - ) - ) + (set! (-> this default-loop-behavior) (if arg2 + (loop-behavior wrap) + (loop-behavior clamp) + ) ) 0 (none) ) -(defmethod curve-color-method-9 ((this curve-color-piecewise) (arg0 float) (arg1 rgbaf) (arg2 int)) +(defmethod evaluate ((this curve-color-piecewise) (arg0 float) (arg1 rgbaf) (arg2 loop-behavior)) + "Compute value of curve at the given position." (when (or (< 1.0 arg0) (< arg0 0.0)) - (if (= arg2 3) - (set! arg2 (the-as int (-> this default-loop-behavior))) - ) - (let ((v1-8 arg2)) - (cond - ((zero? v1-8) - (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) - ) - ((= v1-8 1) - (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) - ) + (if (= arg2 (loop-behavior use-default)) + (set! arg2 (-> this default-loop-behavior)) ) + (case arg2 + (((loop-behavior wrap)) + (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) + ) + (((loop-behavior clamp)) + (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) + ) ) ) (when (= arg0 0.0) @@ -175,20 +204,19 @@ (the-as rgbaf #f) ) -(defmethod curve2d-method-9 ((this curve2d-piecewise) (arg0 float) (arg1 int)) +(defmethod evaluate ((this curve2d-piecewise) (arg0 float) (arg1 loop-behavior)) + "Compute value of curve at the given position." (when (or (< 1.0 arg0) (< arg0 0.0)) - (if (= arg1 3) - (set! arg1 (the-as int (-> this default-loop-behavior))) - ) - (let ((v1-8 arg1)) - (cond - ((zero? v1-8) - (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) - ) - ((= v1-8 1) - (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) - ) + (if (= arg1 (loop-behavior use-default)) + (set! arg1 (-> this default-loop-behavior)) ) + (case arg1 + (((loop-behavior wrap)) + (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) + ) + (((loop-behavior clamp)) + (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) + ) ) ) (if (= arg0 0.0) @@ -210,7 +238,8 @@ ) ;; WARN: Return type mismatch number vs float. -(defun evaluate-curve-fast ((arg0 curve2d-fast) (arg1 rgbaf) (arg2 rgbaf)) +(defun evaluate-curve-fast ((arg0 curve2d-fast) (arg1 float)) + "Evaluate a curve2d-fast at the given value." (local-vars (v0-0 number)) (rlet ((acc :class vf) (vf0 :class vf) @@ -222,7 +251,7 @@ (vf29 :class vf) ) (init-vf0-vector) - (let ((a2-1 (new 'stack-no-clear 'vector)) + (let ((a2-0 (new 'stack-no-clear 'vector)) (v1-0 (new 'stack-no-clear 'vector)) ) (.mov vf27 arg1) @@ -234,10 +263,10 @@ (.add.x.vf vf28 vf24 vf27) (.mul.w.vf acc vf25 vf0) (.add.mul.vf vf29 vf28 vf26 acc) - (.svf (&-> a2-1 quad) vf28) + (.svf (&-> a2-0 quad) vf28) (.svf (&-> v1-0 quad) vf29) - (let ((a0-1 (-> a2-1 z)) - (a1-1 (-> a2-1 y)) + (let ((a0-1 (-> a2-0 z)) + (a1-1 (-> a2-0 y)) ) (nop!) (b! (>= (the-as int a0-1) 0) cfg-3 :delay (set! v0-0 (-> v1-0 z))) @@ -251,7 +280,8 @@ ) ;; WARN: Return type mismatch number vs float. -(defmethod curve2d-method-9 ((this curve2d-fast) (arg0 float) (arg1 int)) +(defmethod evaluate ((this curve2d-fast) (arg0 float) (arg1 loop-behavior)) + "Compute value of curve at the given position." (local-vars (v0-0 number)) (rlet ((acc :class vf) (vf0 :class vf) @@ -293,7 +323,8 @@ ) ) -(defun evaluate-color-curve-fast ((arg0 curve-color-fast) (arg1 rgbaf) (arg2 rgbaf)) +(defun evaluate-color-curve-fast ((arg0 curve-color-fast) (arg1 float) (arg2 rgbaf)) + "Evaluate a color-curve-fast at the given value." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -347,7 +378,8 @@ ) ) -(defmethod curve-color-method-9 ((this curve-color-fast) (arg0 float) (arg1 rgbaf) (arg2 int)) +(defmethod evaluate ((this curve-color-fast) (arg0 float) (arg1 rgbaf) (arg2 loop-behavior)) + "Compute value of curve at the given position." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -409,22 +441,21 @@ ) ) -;; WARN: Return type mismatch rgba vs int. (defun rgba<-rgbaf ((arg0 rgba) (arg1 rgbaf)) - (the-as int (copy-and-set-field - (copy-and-set-field - (copy-and-set-field - (copy-and-set-field arg0 r (the int (* 128.0 (-> arg1 x)))) - g - (the int (* 128.0 (-> arg1 y))) - ) - b - (the int (* 128.0 (-> arg1 z))) - ) - a - (the int (* 128.0 (-> arg1 w))) - ) - ) + "Convert rgbaf to rgba. Seems like the input rgba's value is not used in any way." + (copy-and-set-field + (copy-and-set-field + (copy-and-set-field + (copy-and-set-field arg0 r (the int (* 128.0 (-> arg1 x)))) + g + (the int (* 128.0 (-> arg1 y))) + ) + b + (the int (* 128.0 (-> arg1 z))) + ) + a + (the int (* 128.0 (-> arg1 w))) + ) ) (if #t @@ -456,7 +487,7 @@ (when (or (zero? *curve-linear-up-hold*) (!= loading-level global)) (set! *curve-linear-up-hold* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as int #f)) + (allocate! *curve-linear-up-hold* 2 'loading-level #f) ) (set! (-> *curve-linear-up-hold* pts data 0 first) 0.0) diff --git a/goal_src/jak3/engine/common-obs/elevator.gc b/goal_src/jak3/engine/common-obs/elevator.gc index b459f49d83..e5fd2e5e3c 100644 --- a/goal_src/jak3/engine/common-obs/elevator.gc +++ b/goal_src/jak3/engine/common-obs/elevator.gc @@ -642,9 +642,7 @@ (process-grab? *target* #f) ) (if (and (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) *target*) - ;; og:preserve-this not-yet-implemented - ;; (process-drawable-cloth-command *target* '(set-flags local-space-y)) - 0 + (process-drawable-cloth-command *target* '(set-flags local-space-y)) ) (if (>= (+ (current-time) (seconds -1)) (-> self sticky-player-last-ride-time)) (remove-setting! 'board) diff --git a/goal_src/jak3/engine/common-obs/scene-actor.gc b/goal_src/jak3/engine/common-obs/scene-actor.gc index 9a132ef4be..266369cd88 100644 --- a/goal_src/jak3/engine/common-obs/scene-actor.gc +++ b/goal_src/jak3/engine/common-obs/scene-actor.gc @@ -16,15 +16,15 @@ (defskelgroup skel-particleman particleman particleman-lod0-jg -1 ((particleman-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 10) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-darkjak-highres darkjak-highres darkjak-highres-lod0-jg -1 ((darkjak-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) - :shadow-joint-index 3 - :light-index 1 + :sort 1 + :origin-joint-index 3 :clothing (((mesh darkjak-highres-jakcfma0-skirt-cg) (gravity-constant (meters 16)) (wind-constant 0.5) @@ -308,7 +308,7 @@ ((crimson-guard-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) :shadow crimson-guard-highres-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-torn-highres torn-highres torn-highres-lod0-jg torn-highres-idle-ja @@ -406,21 +406,21 @@ (defskelgroup skel-palmpilot palmpilot palmpilot-lod0-jg -1 ((palmpilot-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-palmpilot-b palmpilot-b palmpilot-b-lod0-jg -1 ((palmpilot-b-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-sig-highres sig-highres sig-highres-lod0-jg sig-highres-idle-ja ((sig-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 5) :shadow sig-highres-shadow-mg - :origin-joint-index 3 - :shadow-joint-index 17 + :origin-joint-index 17 + :shadow-joint-index 3 ) (deftype sig-npc (process-taskable) @@ -778,7 +778,7 @@ (defskelgroup skel-jinx-highres jinx-highres jinx-highres-lod0-jg jinx-highres-idle-ja ((jinx-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 2.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (deftype jinx-npc (process-taskable) @@ -812,7 +812,7 @@ ((gun-npc-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1.5) :shadow gun-npc-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) (deftype gun-npc (process-taskable) @@ -856,7 +856,7 @@ ((tess-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) :shadow tess-highres-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) (deftype tess-npc (process-taskable) @@ -909,7 +909,7 @@ ((wlander-male-lod0-mg (meters 20)) (wlander-male-lod2-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) :shadow wlander-male-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) (deftype vin-npc (process-taskable) @@ -935,15 +935,15 @@ (defskelgroup skel-eco-crystal-dark eco-crystal-dark eco-crystal-dark-lod0-jg eco-crystal-dark-idle-ja ((eco-crystal-dark-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 0.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-keira-highres keira-highres keira-highres-lod0-jg keira-highres-idle-ja ((keira-highres-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3) :shadow keira-highres-shadow-mg - :origin-joint-index 4 - :shadow-joint-index 3 + :origin-joint-index 3 + :shadow-joint-index 4 ) (deftype keira-npc (process-taskable) @@ -980,13 +980,13 @@ ((hellcat-lod0-mg (meters 20)) (hellcat-lod0-mg (meters 40)) (hellcat-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 6.8) :shadow hellcat-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-kidmedallion kidmedallion kidmedallion-lod0-jg kidmedallion-idle-ja ((kidmedallion-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defun pre-intro-play () @@ -1027,16 +1027,33 @@ (none) ) -;; og:preserve-this -;; for some inexplicable reason, there is a lambda at the top level with skelgroups and a type definition -;; we just get rid of that and move everything to the top level -(defskelgroup skel-flut-wild flut-wild flut-wild-lod0-jg flut-wild-idle-ja - ((flut-wild-lod0-mg (meters 999999))) - :bounds (static-spherem 0 2 0 4) - :shadow flut-wild-shadow-mg - :shadow-joint-index 3 - :light-index 1 - ) +((lambda () + (let ((a0-0 + (new 'static 'skeleton-group + :name "skel-flut-wild" + :extra #f + :info #f + :art-group-name "flut-wild" + :bounds (new 'static 'vector :y 8192.0 :w 16384.0) + :version 8 + :shadow 2 + :origin-joint-index 3 + :sort 1 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-0 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-0 clothing length) (-> a0-0 clothing allocated-length)) + ) + (set! (-> a0-0 jgeo) 0) + (set! (-> a0-0 janim) 3) + (set! (-> a0-0 mgeo 0) 1) + (set! (-> a0-0 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-0) + ) + (deftype flut-npc (process-taskable) () @@ -1057,11 +1074,47 @@ (-> this draw art-group data 12) ) (else - (-> this draw art-group data 3) - ) + (-> this draw art-group data 3) + ) ) ) - + ; (type-new 'flut-npc process-taskable (the-as int (the-as uint #x2800a00118))) + ; (method-set! flut-npc 3 (lambda ((arg0 flut-npc)) + ; (when (not arg0) + ; (set! arg0 arg0) + ; (goto cfg-4) + ; ) + ; (let ((t9-0 (method-of-type process-taskable inspect))) + ; (t9-0 arg0) + ; ) + ; (label cfg-4) + ; arg0 + ; ) + ; ) + ; (method-set! flut-npc 37 (lambda ((arg0 flut-npc)) (case (-> arg0 task actor) + ; (((game-task-actor wascity-leaper)) + ; (-> arg0 draw art-group data 12) + ; ) + ; (else + ; (-> arg0 draw art-group data 3) + ; ) + ; ) + ; ) + ; ) + ; (method-set! + ; flut-npc + ; 35 + ; (lambda ((arg0 flut-npc)) + ; (initialize-skeleton + ; arg0 + ; (the-as skeleton-group (art-group-get-by-name *level* "skel-flut-wild" (the-as (pointer level) #f))) + ; (the-as pair 0) + ; ) + ; (set! (-> arg0 draw light-index) (the-as uint 30)) + ; 0 + ; (none) + ; ) + ; ) (defmethod init-skeleton! ((this flut-npc)) (initialize-skeleton this @@ -1071,577 +1124,406 @@ (set! (-> this draw light-index) (the uint 30)) (none) ) - -(defskelgroup skel-mhcity-de-tower-egg mhcity-de-tower-egg mhcity-de-tower-egg-lod0-jg mhcity-de-tower-egg-idle-ja - ((mhcity-de-tower-egg-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 10) - :shadow-joint-index 3 - ) -(defskelgroup skel-errol-effect errol-effect errol-effect-lod0-jg errol-effect-idle-ja - ((errol-effect-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 8) - :shadow-joint-index 3 - ) -(defskelgroup skel-errol errol errol-lod0-jg errol-idle-ja - ((errol-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 8) - :shadow-joint-index 6 - ) -(defskelgroup skel-snake-wheel-fma snake-wheel-fma snake-wheel-fma-lod0-jg snake-wheel-fma-idle-ja - ((snake-wheel-fma-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 10) - :shadow snake-wheel-fma-shadow-mg - :origin-joint-index 3 - :shadow-joint-index 3 - ) -(defskelgroup skel-ottsel-veger ottsel-veger ottsel-veger-lod0-jg ottsel-veger-idle-ja - ((ottsel-veger-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 2.5) - :shadow ottsel-veger-shadow-mg - :shadow-joint-index 3 - ) -(defskelgroup skel-ottsel-surfer ottsel-surfer ottsel-surfer-lod0-jg ottsel-surfer-idle-ja - ((ottsel-surfer-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 2.5) - :shadow ottsel-surfer-shadow-mg - :shadow-joint-index 3 - ) -(defskelgroup skel-ottsel-leader ottsel-leader ottsel-leader-lod0-jg ottsel-leader-idle-ja - ((ottsel-leader-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 2.5) - :shadow ottsel-leader-shadow-mg - :shadow-joint-index 3 - :clothing (((mesh ottsel-leader-leader-leaderskirt_fr-cg) - (gravity-constant (meters 12)) - (wind-constant 1.0) - (cloth-width 13) - (flags (cloth-flag use-wind double-sided flip-normals autogen-uvs)) - (tex-name "prec-leader-robe-01") - (tex-name2 "prec-leader-robe-01") - (tex-name3 "prec-leader-robe-01") - (cloth-thickness 1.0) - (initial-xform 3) - (drag 0.151) - (num-iterations 1) - (timestep-frequency 7) + (let ((a0-5 (new 'static 'skeleton-group + :name "skel-mhcity-de-tower-egg" + :extra #f + :info #f + :art-group-name "mhcity-de-tower-egg" + :bounds (new 'static 'vector :w 40960.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-5 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-5 clothing length) (-> a0-5 clothing allocated-length)) + ) + (set! (-> a0-5 jgeo) 0) + (set! (-> a0-5 janim) 2) + (set! (-> a0-5 mgeo 0) 1) + (set! (-> a0-5 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-5) + ) + (let ((a0-6 (new 'static 'skeleton-group + :name "skel-errol-effect" + :extra #f + :info #f + :art-group-name "errol-effect" + :bounds (new 'static 'vector :w 32768.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-6 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-6 clothing length) (-> a0-6 clothing allocated-length)) + ) + (set! (-> a0-6 jgeo) 0) + (set! (-> a0-6 janim) 2) + (set! (-> a0-6 mgeo 0) 1) + (set! (-> a0-6 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-6) + ) + (let ((a0-7 (new 'static 'skeleton-group + :name "skel-errol" + :extra #f + :info #f + :art-group-name "errol" + :bounds (new 'static 'vector :w 32768.0) + :version 8 + :origin-joint-index 6 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-7 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-7 clothing length) (-> a0-7 clothing allocated-length)) + ) + (set! (-> a0-7 jgeo) 0) + (set! (-> a0-7 janim) 2) + (set! (-> a0-7 mgeo 0) 1) + (set! (-> a0-7 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-7) + ) + (let ((a0-8 (new 'static 'skeleton-group + :name "skel-snake-wheel-fma" + :extra #f + :info #f + :art-group-name "snake-wheel-fma" + :bounds (new 'static 'vector :w 40960.0) + :version 8 + :shadow 2 + :shadow-joint-index 3 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-8 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-8 clothing length) (-> a0-8 clothing allocated-length)) + ) + (set! (-> a0-8 jgeo) 0) + (set! (-> a0-8 janim) 3) + (set! (-> a0-8 mgeo 0) 1) + (set! (-> a0-8 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-8) + ) + (let ((a0-9 (new 'static 'skeleton-group + :name "skel-ottsel-veger" + :extra #f + :info #f + :art-group-name "ottsel-veger" + :bounds (new 'static 'vector :w 10240.0) + :version 8 + :shadow 2 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-9 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-9 clothing length) (-> a0-9 clothing allocated-length)) + ) + (set! (-> a0-9 jgeo) 0) + (set! (-> a0-9 janim) 3) + (set! (-> a0-9 mgeo 0) 1) + (set! (-> a0-9 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-9) + ) + (let ((a0-10 (new 'static 'skeleton-group + :name "skel-ottsel-surfer" + :extra #f + :info #f + :art-group-name "ottsel-surfer" + :bounds (new 'static 'vector :w 10240.0) + :version 8 + :shadow 2 + :origin-joint-index 3 + :clothing #f + ) ) + ) + (when #f + (set! (-> a0-10 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-10 clothing length) (-> a0-10 clothing allocated-length)) + ) + (set! (-> a0-10 jgeo) 0) + (set! (-> a0-10 janim) 3) + (set! (-> a0-10 mgeo 0) 1) + (set! (-> a0-10 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-10) + ) + (let ((a0-11 (new 'static 'skeleton-group + :name "skel-ottsel-leader" + :extra #f + :info #f + :art-group-name "ottsel-leader" + :bounds (new 'static 'vector :w 10240.0) + :version 8 + :shadow 2 + :origin-joint-index 3 + :clothing #f + ) ) - ) -(defskelgroup skel-battle-amulet battle-amulet battle-amulet-lod0-jg battle-amulet-idle-ja - ((battle-amulet-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 2) - :shadow-joint-index 3 - ) -(defskelgroup skel-precursor precursor precursor-lod0-jg precursor-idle-ja - ((precursor-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 8.5) - :shadow-joint-index 3 - ) -(defskelgroup skel-comb-rail-rider-fma comb-rail-rider comb-rail-rider-lod0-jg comb-rail-rider-idle-ja - ((comb-rail-rider-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 10.5) - :shadow-joint-index 3 - ) -(defskelgroup skel-monk monk monk-lod0-jg monk-idle-ja - ((monk-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 4) - :shadow monk-shadow-mg - :origin-joint-index 3 - :shadow-joint-index 3 - ) -(defskelgroup skel-terraformer-fma terraformer-fma 0 2 - ((1 (meters 999999))) - :bounds (static-spherem 0 0 0 4) - :shadow-joint-index 3 - ) -(defskelgroup skel-rhino-fma rhino rhino-lod0-jg rhino-idle-ja - ((rhino-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 100) - :shadow-joint-index 3 - ) -(defskelgroup skel-neo-satellite-fma neo-satellite-fma neo-satellite-fma-lod0-jg neo-satellite-fma-idle-ja - ((neo-satellite-fma-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 10) - :shadow neo-satellite-fma-shadow-mg - :shadow-joint-index 3 - :global-effects 32 - ) -(defskelgroup skel-neo-satellite-break neo-satellite-break neo-satellite-break-lod0-jg neo-satellite-break-idle-ja - ((neo-satellite-break-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 500) - :shadow-joint-index 3 - :global-effects 32 - ) -(defskelgroup skel-talk-box talk-box talk-box-lod0-jg talk-box-idle-ja - ((talk-box-lod0-mg (meters 999999))) - :bounds (static-spherem 0 0 0 2) - :shadow-joint-index 3 - ) - -;; og:preserve-this -;; ((lambda () -;; (let ((a0-0 -;; (new 'static 'skeleton-group -;; :name "skel-flut-wild" -;; :extra #f -;; :info #f -;; :art-group-name "flut-wild" -;; :bounds (new 'static 'vector :y 8192.0 :w 16384.0) -;; :version 8 -;; :shadow 2 -;; :origin-joint-index 3 -;; :sort 1 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-0 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-0 clothing length) (-> a0-0 clothing allocated-length)) -;; ) -;; (set! (-> a0-0 jgeo) 0) -;; (set! (-> a0-0 janim) 3) -;; (set! (-> a0-0 mgeo 0) 1) -;; (set! (-> a0-0 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-0) -;; ) -;; (type-new 'flut-npc process-taskable (the-as int (the-as uint #x2800a00118))) -;; (method-set! flut-npc 3 (lambda ((arg0 flut-npc)) -;; (when (not arg0) -;; (set! arg0 arg0) -;; (goto cfg-4) -;; ) -;; (let ((t9-0 (method-of-type process-taskable inspect))) -;; (t9-0 arg0) -;; ) -;; (label cfg-4) -;; arg0 -;; ) -;; ) -;; (method-set! flut-npc 37 (lambda ((arg0 flut-npc)) (case (-> arg0 task actor) -;; (((game-task-actor wascity-leaper)) -;; (-> arg0 draw art-group data 12) -;; ) -;; (else -;; (-> arg0 draw art-group data 3) -;; ) -;; ) -;; ) -;; ) -;; (method-set! -;; flut-npc -;; 35 -;; (lambda ((arg0 flut-npc)) -;; (initialize-skeleton -;; arg0 -;; (the-as skeleton-group (art-group-get-by-name *level* "skel-flut-wild" (the-as (pointer level) #f))) -;; (the-as pair 0) -;; ) -;; (set! (-> arg0 draw light-index) (the-as uint 30)) -;; 0 -;; (none) -;; ) -;; ) -;; (let ((a0-5 (new 'static 'skeleton-group -;; :name "skel-mhcity-de-tower-egg" -;; :extra #f -;; :info #f -;; :art-group-name "mhcity-de-tower-egg" -;; :bounds (new 'static 'vector :w 40960.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-5 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-5 clothing length) (-> a0-5 clothing allocated-length)) -;; ) -;; (set! (-> a0-5 jgeo) 0) -;; (set! (-> a0-5 janim) 2) -;; (set! (-> a0-5 mgeo 0) 1) -;; (set! (-> a0-5 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-5) -;; ) -;; (let ((a0-6 (new 'static 'skeleton-group -;; :name "skel-errol-effect" -;; :extra #f -;; :info #f -;; :art-group-name "errol-effect" -;; :bounds (new 'static 'vector :w 32768.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-6 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-6 clothing length) (-> a0-6 clothing allocated-length)) -;; ) -;; (set! (-> a0-6 jgeo) 0) -;; (set! (-> a0-6 janim) 2) -;; (set! (-> a0-6 mgeo 0) 1) -;; (set! (-> a0-6 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-6) -;; ) -;; (let ((a0-7 (new 'static 'skeleton-group -;; :name "skel-errol" -;; :extra #f -;; :info #f -;; :art-group-name "errol" -;; :bounds (new 'static 'vector :w 32768.0) -;; :version 8 -;; :origin-joint-index 6 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-7 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-7 clothing length) (-> a0-7 clothing allocated-length)) -;; ) -;; (set! (-> a0-7 jgeo) 0) -;; (set! (-> a0-7 janim) 2) -;; (set! (-> a0-7 mgeo 0) 1) -;; (set! (-> a0-7 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-7) -;; ) -;; (let ((a0-8 (new 'static 'skeleton-group -;; :name "skel-snake-wheel-fma" -;; :extra #f -;; :info #f -;; :art-group-name "snake-wheel-fma" -;; :bounds (new 'static 'vector :w 40960.0) -;; :version 8 -;; :shadow 2 -;; :shadow-joint-index 3 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-8 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-8 clothing length) (-> a0-8 clothing allocated-length)) -;; ) -;; (set! (-> a0-8 jgeo) 0) -;; (set! (-> a0-8 janim) 3) -;; (set! (-> a0-8 mgeo 0) 1) -;; (set! (-> a0-8 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-8) -;; ) -;; (let ((a0-9 (new 'static 'skeleton-group -;; :name "skel-ottsel-veger" -;; :extra #f -;; :info #f -;; :art-group-name "ottsel-veger" -;; :bounds (new 'static 'vector :w 10240.0) -;; :version 8 -;; :shadow 2 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-9 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-9 clothing length) (-> a0-9 clothing allocated-length)) -;; ) -;; (set! (-> a0-9 jgeo) 0) -;; (set! (-> a0-9 janim) 3) -;; (set! (-> a0-9 mgeo 0) 1) -;; (set! (-> a0-9 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-9) -;; ) -;; (let ((a0-10 (new 'static 'skeleton-group -;; :name "skel-ottsel-surfer" -;; :extra #f -;; :info #f -;; :art-group-name "ottsel-surfer" -;; :bounds (new 'static 'vector :w 10240.0) -;; :version 8 -;; :shadow 2 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-10 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-10 clothing length) (-> a0-10 clothing allocated-length)) -;; ) -;; (set! (-> a0-10 jgeo) 0) -;; (set! (-> a0-10 janim) 3) -;; (set! (-> a0-10 mgeo 0) 1) -;; (set! (-> a0-10 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-10) -;; ) -;; (let ((a0-11 (new 'static 'skeleton-group -;; :name "skel-ottsel-leader" -;; :extra #f -;; :info #f -;; :art-group-name "ottsel-leader" -;; :bounds (new 'static 'vector :w 10240.0) -;; :version 8 -;; :shadow 2 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #t -;; (set! (-> a0-11 clothing) (new 'static 'boxed-array :type cloth-params :length 0 :allocated-length 1)) -;; (set! (-> a0-11 clothing 0) (new 'static 'cloth-params -;; :mesh 3 -;; :gravity-constant (meters 12) -;; :wind-constant 1.0 -;; :cloth-width #xd -;; :flags (cloth-flag use-wind double-sided flip-normals autogen-uvs) -;; :tex-name "prec-leader-robe-01" -;; :tex-name2 "prec-leader-robe-01" -;; :tex-name3 "prec-leader-robe-01" -;; :alt-tex-name #f -;; :alt-tex-name2 #f -;; :alt-tex-name3 #f -;; :cloth-thickness 1.0 -;; :initial-xform 3 -;; :drag 0.151 -;; :num-iterations 1 -;; :timestep-frequency 7 -;; ) -;; ) -;; (set! (-> a0-11 clothing length) (-> a0-11 clothing allocated-length)) -;; ) -;; (set! (-> a0-11 jgeo) 0) -;; (set! (-> a0-11 janim) 4) -;; (set! (-> a0-11 mgeo 0) 1) -;; (set! (-> a0-11 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-11) -;; ) -;; (let ((a0-12 (new 'static 'skeleton-group -;; :name "skel-battle-amulet" -;; :extra #f -;; :info #f -;; :art-group-name "battle-amulet" -;; :bounds (new 'static 'vector :w 8192.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-12 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-12 clothing length) (-> a0-12 clothing allocated-length)) -;; ) -;; (set! (-> a0-12 jgeo) 0) -;; (set! (-> a0-12 janim) 2) -;; (set! (-> a0-12 mgeo 0) 1) -;; (set! (-> a0-12 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-12) -;; ) -;; (let ((a0-13 (new 'static 'skeleton-group -;; :name "skel-precursor" -;; :extra #f -;; :info #f -;; :art-group-name "precursor" -;; :bounds (new 'static 'vector :w 34816.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-13 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-13 clothing length) (-> a0-13 clothing allocated-length)) -;; ) -;; (set! (-> a0-13 jgeo) 0) -;; (set! (-> a0-13 janim) 2) -;; (set! (-> a0-13 mgeo 0) 1) -;; (set! (-> a0-13 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-13) -;; ) -;; (let ((a0-14 (new 'static 'skeleton-group -;; :name "skel-comb-rail-rider-fma" -;; :extra #f -;; :info #f -;; :art-group-name "comb-rail-rider" -;; :bounds (new 'static 'vector :w 43008.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-14 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-14 clothing length) (-> a0-14 clothing allocated-length)) -;; ) -;; (set! (-> a0-14 jgeo) 0) -;; (set! (-> a0-14 janim) 3) -;; (set! (-> a0-14 mgeo 0) 1) -;; (set! (-> a0-14 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-14) -;; ) -;; (let ((a0-15 (new 'static 'skeleton-group -;; :name "skel-monk" -;; :extra #f -;; :info #f -;; :art-group-name "monk" -;; :bounds (new 'static 'vector :w 16384.0) -;; :version 8 -;; :shadow 2 -;; :shadow-joint-index 3 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-15 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-15 clothing length) (-> a0-15 clothing allocated-length)) -;; ) -;; (set! (-> a0-15 jgeo) 0) -;; (set! (-> a0-15 janim) 3) -;; (set! (-> a0-15 mgeo 0) 1) -;; (set! (-> a0-15 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-15) -;; ) -;; (let ((a0-16 (new 'static 'skeleton-group -;; :name "skel-terraformer-fma" -;; :extra #f -;; :info #f -;; :art-group-name "terraformer-fma" -;; :bounds (new 'static 'vector :w 16384.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-16 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-16 clothing length) (-> a0-16 clothing allocated-length)) -;; ) -;; (set! (-> a0-16 jgeo) 0) -;; (set! (-> a0-16 janim) 2) -;; (set! (-> a0-16 mgeo 0) 1) -;; (set! (-> a0-16 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-16) -;; ) -;; (let ((a0-17 (new 'static 'skeleton-group -;; :name "skel-rhino-fma" -;; :extra #f -;; :info #f -;; :art-group-name "rhino" -;; :bounds (new 'static 'vector :w 409600.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-17 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-17 clothing length) (-> a0-17 clothing allocated-length)) -;; ) -;; (set! (-> a0-17 jgeo) 4) -;; (set! (-> a0-17 janim) 7) -;; (set! (-> a0-17 mgeo 0) 5) -;; (set! (-> a0-17 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-17) -;; ) -;; (let ((a0-18 (new 'static 'skeleton-group -;; :name "skel-neo-satellite-fma" -;; :extra #f -;; :info #f -;; :art-group-name "neo-satellite-fma" -;; :bounds (new 'static 'vector :w 40960.0) -;; :version 8 -;; :shadow 2 -;; :origin-joint-index 3 -;; :clothing #f -;; :global-effects #x20 -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-18 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-18 clothing length) (-> a0-18 clothing allocated-length)) -;; ) -;; (set! (-> a0-18 jgeo) 0) -;; (set! (-> a0-18 janim) 3) -;; (set! (-> a0-18 mgeo 0) 1) -;; (set! (-> a0-18 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-18) -;; ) -;; (let ((a0-19 (new 'static 'skeleton-group -;; :name "skel-neo-satellite-break" -;; :extra #f -;; :info #f -;; :art-group-name "neo-satellite-break" -;; :bounds (new 'static 'vector :w 2048000.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; :global-effects #x20 -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-19 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-19 clothing length) (-> a0-19 clothing allocated-length)) -;; ) -;; (set! (-> a0-19 jgeo) 0) -;; (set! (-> a0-19 janim) 2) -;; (set! (-> a0-19 mgeo 0) 1) -;; (set! (-> a0-19 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-19) -;; ) -;; (let ((a0-20 (new 'static 'skeleton-group -;; :name "skel-talk-box" -;; :extra #f -;; :info #f -;; :art-group-name "talk-box" -;; :bounds (new 'static 'vector :w 8192.0) -;; :version 8 -;; :origin-joint-index 3 -;; :clothing #f -;; ) -;; ) -;; ) -;; (when #f -;; (set! (-> a0-20 clothing) (new 'static 'boxed-array :type cloth-params)) -;; (set! (-> a0-20 clothing length) (-> a0-20 clothing allocated-length)) -;; ) -;; (set! (-> a0-20 jgeo) 0) -;; (set! (-> a0-20 janim) 2) -;; (set! (-> a0-20 mgeo 0) 1) -;; (set! (-> a0-20 lod-dist 0) 4095996000.0) -;; (add-to-loading-level a0-20) -;; ) -;; (none) -;; ) -;; ) + ) + (when #t + (set! (-> a0-11 clothing) (new 'static 'boxed-array :type cloth-params :length 0 :allocated-length 1)) + (set! (-> a0-11 clothing 0) (new 'static 'cloth-params + :mesh 3 + :gravity-constant (meters 12) + :wind-constant 1.0 + :cloth-width #xd + :flags (cloth-flag use-wind double-sided flip-normals autogen-uvs) + :tex-name "prec-leader-robe-01" + :tex-name2 "prec-leader-robe-01" + :tex-name3 "prec-leader-robe-01" + :alt-tex-name #f + :alt-tex-name2 #f + :alt-tex-name3 #f + :cloth-thickness 1.0 + :initial-xform 3 + :drag 0.151 + :num-iterations 1 + :timestep-frequency 7 + ) + ) + (set! (-> a0-11 clothing length) (-> a0-11 clothing allocated-length)) + ) + (set! (-> a0-11 jgeo) 0) + (set! (-> a0-11 janim) 4) + (set! (-> a0-11 mgeo 0) 1) + (set! (-> a0-11 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-11) + ) + (let ((a0-12 (new 'static 'skeleton-group + :name "skel-battle-amulet" + :extra #f + :info #f + :art-group-name "battle-amulet" + :bounds (new 'static 'vector :w 8192.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-12 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-12 clothing length) (-> a0-12 clothing allocated-length)) + ) + (set! (-> a0-12 jgeo) 0) + (set! (-> a0-12 janim) 2) + (set! (-> a0-12 mgeo 0) 1) + (set! (-> a0-12 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-12) + ) + (let ((a0-13 (new 'static 'skeleton-group + :name "skel-precursor" + :extra #f + :info #f + :art-group-name "precursor" + :bounds (new 'static 'vector :w 34816.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-13 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-13 clothing length) (-> a0-13 clothing allocated-length)) + ) + (set! (-> a0-13 jgeo) 0) + (set! (-> a0-13 janim) 2) + (set! (-> a0-13 mgeo 0) 1) + (set! (-> a0-13 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-13) + ) + (let ((a0-14 (new 'static 'skeleton-group + :name "skel-comb-rail-rider-fma" + :extra #f + :info #f + :art-group-name "comb-rail-rider" + :bounds (new 'static 'vector :w 43008.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-14 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-14 clothing length) (-> a0-14 clothing allocated-length)) + ) + (set! (-> a0-14 jgeo) 0) + (set! (-> a0-14 janim) 3) + (set! (-> a0-14 mgeo 0) 1) + (set! (-> a0-14 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-14) + ) + (let ((a0-15 (new 'static 'skeleton-group + :name "skel-monk" + :extra #f + :info #f + :art-group-name "monk" + :bounds (new 'static 'vector :w 16384.0) + :version 8 + :shadow 2 + :shadow-joint-index 3 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-15 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-15 clothing length) (-> a0-15 clothing allocated-length)) + ) + (set! (-> a0-15 jgeo) 0) + (set! (-> a0-15 janim) 3) + (set! (-> a0-15 mgeo 0) 1) + (set! (-> a0-15 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-15) + ) + (let ((a0-16 (new 'static 'skeleton-group + :name "skel-terraformer-fma" + :extra #f + :info #f + :art-group-name "terraformer-fma" + :bounds (new 'static 'vector :w 16384.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-16 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-16 clothing length) (-> a0-16 clothing allocated-length)) + ) + (set! (-> a0-16 jgeo) 0) + (set! (-> a0-16 janim) 2) + (set! (-> a0-16 mgeo 0) 1) + (set! (-> a0-16 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-16) + ) + (let ((a0-17 (new 'static 'skeleton-group + :name "skel-rhino-fma" + :extra #f + :info #f + :art-group-name "rhino" + :bounds (new 'static 'vector :w 409600.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-17 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-17 clothing length) (-> a0-17 clothing allocated-length)) + ) + (set! (-> a0-17 jgeo) 4) + (set! (-> a0-17 janim) 7) + (set! (-> a0-17 mgeo 0) 5) + (set! (-> a0-17 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-17) + ) + (let ((a0-18 (new 'static 'skeleton-group + :name "skel-neo-satellite-fma" + :extra #f + :info #f + :art-group-name "neo-satellite-fma" + :bounds (new 'static 'vector :w 40960.0) + :version 8 + :shadow 2 + :origin-joint-index 3 + :clothing #f + :global-effects #x20 + ) + ) + ) + (when #f + (set! (-> a0-18 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-18 clothing length) (-> a0-18 clothing allocated-length)) + ) + (set! (-> a0-18 jgeo) 0) + (set! (-> a0-18 janim) 3) + (set! (-> a0-18 mgeo 0) 1) + (set! (-> a0-18 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-18) + ) + (let ((a0-19 (new 'static 'skeleton-group + :name "skel-neo-satellite-break" + :extra #f + :info #f + :art-group-name "neo-satellite-break" + :bounds (new 'static 'vector :w 2048000.0) + :version 8 + :origin-joint-index 3 + :clothing #f + :global-effects #x20 + ) + ) + ) + (when #f + (set! (-> a0-19 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-19 clothing length) (-> a0-19 clothing allocated-length)) + ) + (set! (-> a0-19 jgeo) 0) + (set! (-> a0-19 janim) 2) + (set! (-> a0-19 mgeo 0) 1) + (set! (-> a0-19 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-19) + ) + (let ((a0-20 (new 'static 'skeleton-group + :name "skel-talk-box" + :extra #f + :info #f + :art-group-name "talk-box" + :bounds (new 'static 'vector :w 8192.0) + :version 8 + :origin-joint-index 3 + :clothing #f + ) + ) + ) + (when #f + (set! (-> a0-20 clothing) (new 'static 'boxed-array :type cloth-params)) + (set! (-> a0-20 clothing length) (-> a0-20 clothing allocated-length)) + ) + (set! (-> a0-20 jgeo) 0) + (set! (-> a0-20 janim) 2) + (set! (-> a0-20 mgeo 0) 1) + (set! (-> a0-20 lod-dist 0) 4095996000.0) + (add-to-loading-level a0-20) + ) + (none) + ) + ) (defskelgroup skel-ottsel-daxpants ottsel-daxpants ottsel-daxpants-lod0-jg ottsel-daxpants-idle-ja ((ottsel-daxpants-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 2.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-ottsel-dummy ottsel-dummy ottsel-dummy-lod0-jg ottsel-dummy-idle-ja ((ottsel-dummy-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 2.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-ottsel-tess ottsel-tess ottsel-tess-lod0-jg ottsel-tess-idle-ja ((ottsel-tess-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 2.5) :shadow ottsel-tess-shadow-mg - :shadow-joint-index 3 + :origin-joint-index 3 ) diff --git a/goal_src/jak3/engine/common-obs/water.gc b/goal_src/jak3/engine/common-obs/water.gc index afe1d74b21..231acd69ea 100644 --- a/goal_src/jak3/engine/common-obs/water.gc +++ b/goal_src/jak3/engine/common-obs/water.gc @@ -67,7 +67,7 @@ (when (or (zero? *water-simple-alpha-curve-in*) (!= loading-level global)) (set! *water-simple-alpha-curve-in* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-in* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-in* 2 'loading-level #f) ) (set! (-> *water-simple-alpha-curve-in* pts data 0 first) 0.0) @@ -80,7 +80,7 @@ (when (or (zero? *growing-curve*) (!= loading-level global)) (set! *growing-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *growing-curve* 2 'loading-level (the-as int #f)) + (allocate! *growing-curve* 2 'loading-level #f) ) (set! (-> *growing-curve* pts data 0 first) 0.0) @@ -93,7 +93,7 @@ (when (or (zero? *water-simple-alpha-curve-fade-out*) (!= loading-level global)) (set! *water-simple-alpha-curve-fade-out* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-fade-out* 2 'loading-level #f) ) (set! (-> *water-simple-alpha-curve-fade-out* pts data 0 first) 0.0) @@ -106,7 +106,7 @@ (when (or (zero? *color-curve-tan-brown*) (!= loading-level global)) (set! *color-curve-tan-brown* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *color-curve-tan-brown* 2 'loading-level (the-as uint #f)) + (allocate! *color-curve-tan-brown* 2 'loading-level #f) ) (set! (-> *color-curve-tan-brown* pts data 0 first) 0.0) @@ -155,15 +155,13 @@ (set! (-> *water-wake-trail* uv-repeat-dist) 40960.0) -(set! (-> *water-wake-trail* lie-mode) (the-as uint 1)) +(set! (-> *water-wake-trail* lie-mode) (lie-mode appearance1)) (set! (-> *water-wake-trail* max-age) (seconds 3)) (if #f - (set! (-> *water-wake-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *water-wake-trail* tex-id) (the-as uint #x500800)) + (set! (-> *water-wake-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *water-wake-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) (set! (-> *water-wake-trail* width-curve) *growing-curve*) @@ -195,7 +193,7 @@ (let* ((v1-18 (estimate-light-trail-mem-usage (the-as uint (-> s5-0 max-num-crumbs)) - (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + (the-as uint (= (-> s5-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-0 (get-process *default-dead-pool* light-trail-tracker-water (+ v1-18 8192) 1)) diff --git a/goal_src/jak3/engine/draw/drawable-h.gc b/goal_src/jak3/engine/draw/drawable-h.gc index b8ebc2c281..1be8e51c49 100644 --- a/goal_src/jak3/engine/draw/drawable-h.gc +++ b/goal_src/jak3/engine/draw/drawable-h.gc @@ -6,11 +6,13 @@ ;; dgos: GAME (declare-type region-prim-list structure) +(declare-type draw-control structure) (define-extern sphere-cull "Is this sphere visible? Uses cached camera matrix registers, so use with care." (function vector symbol)) (define-extern sphere-in-view-frustum? (function sphere symbol)) (define-extern line-in-view-frustum? (function vector vector symbol)) (define-extern vis-cull (function int symbol)) +(define-extern calc-vu1-lights (function vu-lights draw-control symbol none)) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index 7b12469863..1e74c07dd8 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -1458,7 +1458,7 @@ (shadow-execute-all gp-0) ) (lightning-draw-all) - ;(prim-engine-execute) + (prim-engine-execute) (none) ) diff --git a/goal_src/jak3/engine/entity/entity-h.gc b/goal_src/jak3/engine/entity/entity-h.gc index 47318cab24..1256f196e9 100644 --- a/goal_src/jak3/engine/entity/entity-h.gc +++ b/goal_src/jak3/engine/entity/entity-h.gc @@ -192,7 +192,7 @@ that gets accessed by the accompanying process." (set! (-> actor-group heap-base) (the-as uint 8)) (deftype entity-info (basic) - ((ptype type) + ((ptype object) (pool symbol) (heap-size int32) ) diff --git a/goal_src/jak3/engine/entity/entity-table.gc b/goal_src/jak3/engine/entity/entity-table.gc index 9cdeb3277a..935455957a 100644 --- a/goal_src/jak3/engine/entity/entity-table.gc +++ b/goal_src/jak3/engine/entity/entity-table.gc @@ -5,278 +5,240 @@ ;; name in dgo: entity-table ;; dgos: GAME +;; these types don't exist, but are referenced in the entity table +(deftype sail-boat-a (process-drawable-reserved) + () + ) + +(deftype cty-window-a (process-drawable-reserved) + () + ) + +(deftype city-window-a (process-drawable-reserved) + () + ) + +(deftype cty-guard-turret (process-drawable-reserved) + () + ) + +(deftype cty-fruit-stand (process-drawable-reserved) + () + ) + +(deftype torn (process-drawable-reserved) + () + ) + ;; DECOMP BEGINS -;; TODO stub -(define *entity-info* (new 'static 'boxed-array :type entity-info - (new 'static 'entity-info - :ptype (type-ref factory-boss :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x8000 - ) - (new 'static 'entity-info - :ptype (type-ref flitter-spawner :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bubbles-path :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x8000 - ) - (new 'static 'entity-info - :ptype (type-ref desert-chase-ring :method-count 24) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bt-grunt :method-count 55) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bt-roboguard :method-count 47) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref w-parking-spot :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref min-elevator :method-count 52) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref tpl-bouncer :method-count 28) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref veger-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref seem-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref krimson-wall :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref kleever-catch-lizards :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref kleever-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref damus-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref nav-graph :method-count 45) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref tizard :method-count 36) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref ladder :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mh-centipede :method-count 43) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref dark-tower :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref curve-bubbles-Shape :method-count 15) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-tower-door :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-d :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-c :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-b :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grund-egg-a :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-de-tower-undervines :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-twitch-blade :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-claw-finger-small :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-small :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-large :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-door :method-count 33) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-puffer-large :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-puffer :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref searchlight :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref ctyn-lamp :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref burning-bush :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref sail-boat-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref barge :method-count 152) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref boat-manager :method-count 17) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref propa :method-count 33) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref city-window-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-window-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref parking-spot :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref security-wall :method-count 25) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-guard-turret :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-fruit-stand :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref fruit-stand :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref torn :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref neon-baron :method-count 17) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - ) - ) +(define *entity-info* + (new 'static 'boxed-array :type entity-info + (new 'static 'entity-info :ptype 'factory-boss :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref flitter-spawner :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bubbles-path :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x8000 + ) + (new 'static 'entity-info :ptype 'desert-chase-ring :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-grunt :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-roboguard :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref w-parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref min-elevator :method-count 52) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref tpl-bouncer :method-count 28) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'veger-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info :ptype 'seem-npc :pool '*16k-dead-pool* :heap-size #x20000) + (new 'static 'entity-info + :ptype (type-ref krimson-wall :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'kleever-catch-lizards :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'kleever-npc :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'damus-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info + :ptype (type-ref nav-graph :method-count 45) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref tizard :method-count 36) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype (type-ref ladder :method-count 27) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype 'mh-centipede :pool '*16k-dead-pool* :heap-size #x6000) + (new 'static 'entity-info :ptype 'dark-tower :pool '*16k-dead-pool* :heap-size #x5800) + (new 'static 'entity-info + :ptype (type-ref curve-bubbles-Shape :method-count 15) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-tower-door :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-d :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-c :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-b :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-a :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-de-tower-undervines :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-twitch-blade :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-claw-finger-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-large :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-door :method-count 33) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer-large :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref searchlight :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ctyn-lamp :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref burning-bush :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref sail-boat-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref barge :method-count 152) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref boat-manager :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref propa :method-count 33) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref city-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref security-wall :method-count 25) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-guard-turret :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-fruit-stand :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref fruit-stand :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref torn :method-count 218) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref neon-baron :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x10000 + ) + ) + ) +;; WARN: Return type mismatch basic vs entity-info. (defun entity-info-lookup ((arg0 type)) (the-as entity-info (cond ((nonzero? (-> arg0 method-table 13)) @@ -301,4 +263,4 @@ ) ) ) - ) \ No newline at end of file + ) diff --git a/goal_src/jak3/engine/game/main.gc b/goal_src/jak3/engine/game/main.gc index 398e8a77e5..ef05182270 100644 --- a/goal_src/jak3/engine/game/main.gc +++ b/goal_src/jak3/engine/game/main.gc @@ -1669,7 +1669,7 @@ (free-nodes *touching-list*) (prepare *collide-rider-pool*) (update-actor-hash) - ;; (blerc-init) + (blerc-init) ; (dma-send ; (the-as dma-bank #x10008000) ; (the-as uint (-> *collide-vif0-init* data)) diff --git a/goal_src/jak3/engine/gfx/foreground/eye-h.gc b/goal_src/jak3/engine/gfx/foreground/eye-h.gc index 619aa911d5..bf8e619fcf 100644 --- a/goal_src/jak3/engine/gfx/foreground/eye-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/eye-h.gc @@ -13,13 +13,6 @@ ;; DECOMP BEGINS -;; TODO: remove this - just a stub. -(defun find-free-eye-index ((a int) (b string) (c int)) - 0) -(defun get-eye-block ((a int) (c int)) - 0) - - (deftype eye (structure) "Data for a single eye." ((data vector 2 :inline) diff --git a/goal_src/jak3/engine/gfx/foreground/eye.gc b/goal_src/jak3/engine/gfx/foreground/eye.gc index 7c8458ec31..fd92bd5bc3 100644 --- a/goal_src/jak3/engine/gfx/foreground/eye.gc +++ b/goal_src/jak3/engine/gfx/foreground/eye.gc @@ -7,6 +7,28 @@ ;; DECOMP BEGINS +;; og:preserve-this +(defun fnv64 ((data pointer) (length int)) + "64-bit hash for strings. This is extremely unlikely to have collisions for all strings + in the game. (modern ND games rely on this and use this hash function as unique ID's for + strings." + (let* ((ret (the uint #xcbf29ce484222325)) + (ptr (the (pointer uint8) data)) + (end (&+ ptr length))) + (while (!= ptr end) + (set! ret (imul64 (logxor (-> ptr) ret) 1099511628211)) + (&+! ptr 1) + ) + ret + ) + ) + +(defun fnv64-string ((str string)) + (fnv64 (-> str data) (length str)) + ) + +(define *current-eye-merc-ctrl-name* (the string #f)) + (define *eye-work* (new 'static 'eye-work :sprite-tmpl (new 'static 'dma-gif-packet :dma-vif (new 'static 'dma-packet @@ -137,6 +159,10 @@ (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + ;; og:preserve-this: stash the hashed name of the merc-ctrl that will read these eyes: + (set! (-> (the (pointer uint64) v1-25) 6) + (fnv64-string *current-eye-merc-ctrl-name*) + ) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) (set-vector! @@ -425,6 +451,12 @@ (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + + ;; og:preserve-this: stash the hashed name of the merc-ctrl that will read these eyes: + (set! (-> (the (pointer uint64) v1-25) 6) + (fnv64-string *current-eye-merc-ctrl-name*) + ) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) (set-vector! @@ -680,6 +712,7 @@ (logtest? (-> (the-as process-drawable v1-7) skel status) (joint-control-status eye-anim)) (logtest? (-> (the-as process-drawable v1-7) draw status) (draw-control-status on-screen)) ) + (set! *current-eye-merc-ctrl-name* (-> (the process-drawable v1-7) draw mgeo name)) (when (-> s5-0 shaders) (when (not (paused?)) (cond diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc index 3cf75556a4..df2a90e6b1 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc @@ -645,10 +645,10 @@ (let ((v1-2 arg0)) (cond ((zero? v1-2) - (curve2d-method-9 arg3 (/ arg2 arg4) 3) + (evaluate arg3 (/ arg2 arg4) (loop-behavior use-default)) ) ((= v1-2 1) - (curve2d-method-9 arg3 arg1 3) + (evaluate arg3 arg1 (loop-behavior use-default)) ) ((= v1-2 2) (let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc b/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc index faaa0e1518..718b04a98a 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc @@ -5,6 +5,21 @@ ;; name in dgo: light-trails-h ;; dgos: GAME +(defenum lie-mode + :type uint64 + (appearance0) + (appearance1) + (appearance2) + (use-two-strips 3) + ) + +(defenum light-trail-decision + :type uint64 + (added 0) + (not-added 1) + (reset 2) + ) + ;; DECOMP BEGINS (deftype color-array (inline-array-class) @@ -32,8 +47,8 @@ (uv-mode uint64) (uv-repeat-dist float) (max-age time-frame) - (tex-id uint32) - (lie-mode uint64) + (tex-id texture-id) + (lie-mode lie-mode) (lie-vector vector :inline) (zbuffer? symbol) (use-tape-mode? symbol) @@ -59,33 +74,33 @@ (set! (-> breadcrumb-array heap-base) (the-as uint 16)) (deftype light-trail (basic) - ((crumb-array (array light-trail-breadcrumb)) + ((crumb-array (array uint8)) (crumb-size uint8) (crumb-count int16) (max-crumb-count int16) (appearance light-trail-composition) (start-marker uint64) (end-marker uint64) - (decision uint64) + (decision light-trail-decision) (total-distance-traveled float) (strip prim-strip) (strip2 prim-strip) (cache-vector vector 4 :inline) ) (:methods - (light-trail-method-9 (_type_ light-trail-composition int) none) - (light-trail-method-10 (_type_) none) - (light-trail-method-11 (_type_ vector time-frame) int) - (light-trail-method-12 (_type_) none) - (light-trail-method-13 (_type_) int) - (light-trail-method-14 (_type_) none) + (setup! (_type_ light-trail-composition int) none) + (reset! (_type_) none) + (add-crumb! (_type_ vector time-frame) int) + (build-prim-strip! (_type_) none) + (common-trans! (_type_) int) + (expire-old-points! (_type_) none) (light-trail-method-15 (_type_) none) - (add-vert! (_type_ prim-strip vector float float float) none) - (light-trail-method-17 (_type_ vector float float vector float) symbol) - (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) - (light-trail-method-19 (_type_ float int) none) + (add-vert-to-prim-strip! (_type_ prim-strip vector rgba float float) none) + (add-tri-pair-to-prim! (_type_ vector rgba float vector float) symbol) + (calc-vertex-pos! (_type_ light-trail-breadcrumb int vector vector) none) + (crumb-age-out-callback (_type_ float int) none) (reset-crumbs! (_type_) none) - (light-trail-method-21 (_type_ vector) none) + (replace-last-crumb! (_type_ vector) none) ) ) @@ -99,7 +114,7 @@ (deftype weapon-trail (light-trail) () (:methods - (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (add-crumb-with-offset (_type_ vector vector) light-trail-breadcrumb) (weapon-trail-method-23 (_type_ vector vector) none) ) ) @@ -114,8 +129,8 @@ (deftype tread-trail (light-trail) () (:methods - (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) - (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) + (add-crumb-with-offset (_type_ vector vector) none) + (tread-trail-method-23 (_type_ vector vector) none) ) ) @@ -149,11 +164,11 @@ die ) (:methods - (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) - (light-trail-tracker-method-17 (_type_ process-focusable) symbol) - (light-trail-tracker-method-18 (_type_ process-focusable) symbol) - (light-trail-tracker-method-19 (_type_) symbol) - (light-trail-tracker-method-20 (_type_ vector) none) + (get-tracked-object-pos (_type_ process-focusable vector) vector) + (should-track? (_type_ process-focusable) symbol) + (should-end? (_type_ process-focusable) symbol) + (should-draw? (_type_) symbol) + (add-crumb! (_type_ vector) none) ) ) @@ -183,13 +198,13 @@ (set! (-> self next-line-check-time) 0) (set! (-> self last-add-frame-val) (the-as uint 0)) (set! (-> self offscreen?) #f) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (when (-> arg0 track-immediately?) (let ((gp-1 (handle->process (-> self tracked-object)))) - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) - (light-trail-method-11 + (if (should-track? self (the-as process-focusable gp-1)) + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) (seconds 10000) ) ) @@ -206,7 +221,7 @@ (set! (-> self joint0) (-> arg0 joint0)) (set! (-> self joint1) (-> arg0 joint1)) (set! (-> self offscreen?) #f) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (go-virtual tracking) ) @@ -216,7 +231,7 @@ (set! (-> self offscreen?) #f) (set! (-> self next-line-check-time) 0) (set! (-> self last-add-frame-val) (the-as uint 0)) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (go-virtual tracking) ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc b/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc index 68f562bfe0..eb7238fb19 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc @@ -7,42 +7,36 @@ ;; DECOMP BEGINS -(defmethod light-trail-method-9 ((this light-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this light-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this appearance) arg0) (set! (-> this crumb-size) (the-as uint (max 16 (the-as int (-> this crumb-size))))) - (set! (-> this crumb-array) - (the-as - (array light-trail-breadcrumb) - (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size)))) - ) - ) + (set! (-> this crumb-array) (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size))))) (set! (-> this max-crumb-count) arg1) (set! (-> this crumb-count) 0) - (set! (-> this strip) - (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) - ) + (set! (-> this strip) (new 'process 'prim-strip (* arg1 2) (-> arg0 tex-id) (the-as string #f))) (set! (-> this strip2) #f) - (if (= (-> this appearance lie-mode) 3) - (set! (-> this strip2) - (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) - ) + (if (= (-> this appearance lie-mode) (lie-mode use-two-strips)) + (set! (-> this strip2) (new 'process 'prim-strip (* arg1 2) (-> arg0 tex-id) (the-as string #f))) ) - (light-trail-method-10 this) + (reset! this) 0 (none) ) ;; WARN: Return type mismatch float vs none. -(defmethod light-trail-method-10 ((this light-trail)) +(defmethod reset! ((this light-trail)) + "Clear all tracked crumbs." (set! (-> this crumb-count) 0) (set! (-> this start-marker) (the-as uint (current-time))) (set! (-> this end-marker) (the-as uint (current-time))) - (set! (-> this decision) (the-as uint 2)) + (set! (-> this decision) (light-trail-decision reset)) (set! (-> this total-distance-traveled) 0.0) (none) ) -(defmethod light-trail-method-11 ((this light-trail) (arg0 vector) (arg1 time-frame)) +(defmethod add-crumb! ((this light-trail) (arg0 vector) (arg1 time-frame)) + "Try adding a crumb, kicking out the oldest if there's not enough room. This may reject if it's too close to the previous." (local-vars (s3-0 int)) (with-pp (if (< (seconds 5000) arg1) @@ -56,7 +50,7 @@ ) (cond ((< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) (set! s3-0 1) (goto cfg-12) ) @@ -87,7 +81,7 @@ (set! f0-5 (- f2-0 f1-2)) ) (set! (-> a1-5 pos quad) (-> arg0 quad)) - (set! (-> a1-5 pos w) (the-as float (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) + (set! (-> a1-5 birth-time) (the-as uint (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) ) (mem-copy! (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (-> this crumb-count))) @@ -96,27 +90,33 @@ ) ) (+! (-> this crumb-count) 1) - (set! (-> this decision) (the-as uint 0)) + (set! (-> this decision) (light-trail-decision added)) (label cfg-12) s3-0 ) ) -(defmethod light-trail-method-21 ((this light-trail) (arg0 vector)) +(defmethod replace-last-crumb! ((this light-trail) (arg0 vector)) + "Similar to add-crumb, but will modify the last crumb instead of advancing." (with-pp (let ((v1-0 (-> this crumb-count))) 0.0 (cond ((zero? v1-0) - (light-trail-method-11 this arg0 (seconds 10000)) + (add-crumb! this arg0 (seconds 10000)) ) (else - (set! (-> this decision) (the-as uint 0)) - (let ((gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) - (let ((f0-1 (vector-vector-distance (the-as vector (&+ gp-0 0)) arg0))) + (set! (-> this decision) (light-trail-decision added)) + (let ((gp-0 (the-as + light-trail-breadcrumb + (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))) + ) + ) + ) + (let ((f0-1 (vector-vector-distance (-> gp-0 pos) arg0))) (+! (-> this total-distance-traveled) f0-1) (if (< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) ) ) (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) @@ -126,10 +126,10 @@ (if (-> this appearance use-tape-mode?) (set! f0-4 (- f2-0 f1-3)) ) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> arg0 quad)) - (set! (-> gp-0 3) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 birth-time) (the-as - light-trail-breadcrumb + uint (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) ) ) @@ -142,10 +142,11 @@ ) ) -(defmethod add-vert! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 float) (arg3 float) (arg4 float)) +(defmethod add-vert-to-prim-strip! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 rgba) (arg3 float) (arg4 float)) + "Add a single vertex to the prim." (let ((v1-3 (-> arg0 data (-> arg0 num-verts)))) (set! (-> v1-3 pos quad) (-> arg1 quad)) - (set! (-> v1-3 col) (the-as rgba arg2)) + (set! (-> v1-3 col) arg2) (set! (-> v1-3 stq x) arg3) (set! (-> v1-3 stq y) arg4) ) @@ -154,31 +155,74 @@ (none) ) -(defmethod light-trail-method-17 ((this light-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) +(defmethod add-tri-pair-to-prim! ((this light-trail) (arg0 vector) (arg1 rgba) (arg2 float) (arg3 vector) (arg4 float)) + "Add two vertices to the prim strip to add two triangles" (if (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) (return #f) ) (cond - ((= (-> this appearance lie-mode) 3) + ((= (-> this appearance lie-mode) (lie-mode use-two-strips)) (let ((s1-0 (new 'stack-no-clear 'vector))) (set! (-> s1-0 quad) (-> this cache-vector 0 quad)) (vector-normalize! s1-0 (* 0.5 arg2)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) + arg1 + arg4 + 1.0 + ) ) (let ((s1-1 (new 'stack-no-clear 'vector))) (set! (-> s1-1 quad) (-> this cache-vector 1 quad)) (vector-normalize! s1-1 (* 0.5 arg2)) - (add-vert! this (-> this strip2) (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) arg1 arg4 0.0) - (add-vert! this (-> this strip2) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip2) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip2) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) + arg1 + arg4 + 1.0 + ) ) ) (else (let ((s1-2 (new 'stack-no-clear 'vector))) (set! (-> s1-2 quad) (-> arg3 quad)) (vector-normalize! s1-2 (* 0.5 arg2)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) + arg1 + arg4 + 1.0 + ) ) ) ) @@ -226,7 +270,7 @@ (kmemclose) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (let ((v1-0 (new 'stack-no-clear 'vector))) (cond ((> (the-as uint arg1) 0) @@ -240,36 +284,35 @@ ) ) ) - (let ((a2-9 (-> this appearance lie-mode))) - (cond - ((= a2-9 1) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - ) - ((zero? a2-9) - (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) - ) - ((= a2-9 2) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (vector-cross! arg3 v1-0 arg3) - ) - ((= a2-9 3) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (set! (-> this cache-vector 0 quad) (-> arg3 quad)) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (vector-cross! arg3 v1-0 arg3) - (set! (-> this cache-vector 1 quad) (-> arg3 quad)) - ) - ) + (case (-> this appearance lie-mode) + (((lie-mode appearance1)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + ) + (((lie-mode appearance0)) + (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) + ) + (((lie-mode appearance2)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + ) + (((lie-mode use-two-strips)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (set! (-> this cache-vector 0 quad) (-> arg3 quad)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + (set! (-> this cache-vector 1 quad) (-> arg3 quad)) + ) ) ) (none) ) -(defmethod light-trail-method-12 ((this light-trail)) +(defmethod build-prim-strip! ((this light-trail)) + "Build the mesh for this light trail." (local-vars (sv-64 time-frame) (sv-72 uint) @@ -301,12 +344,14 @@ ) (while (>= s3-0 s4-0) (let* ((v1-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s4-0 -1))))) - (a1-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0)))) - (a0-6 (- (-> this start-marker) (the-as uint (-> a1-3 3)))) + (a1-3 (the-as object (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0))))) + (a0-6 (- (-> this start-marker) (-> (the-as light-trail-breadcrumb a1-3) birth-time))) ) - (when (and (>= a0-6 0) (< a0-6 (-> this appearance max-age))) + (when (and (>= (the-as int a0-6) 0) (< (the-as time-frame a0-6) (-> this appearance max-age))) (set! *total-length* - (+ *total-length* (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ a1-3 0)))) + (+ *total-length* + (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ (the-as (pointer uint8) a1-3) 0))) + ) ) (set! (-> *dist-cache-array* s4-0) *total-length*) ) @@ -328,7 +373,7 @@ (set! sv-128 (math-camera-pos)) (set! sv-132 (new 'stack-no-clear 'vector)) (set! (-> this strip num-verts) (the-as uint 0)) - (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip tex-id) (-> this appearance tex-id)) (cond ((not (-> this appearance zbuffer?)) (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) @@ -363,7 +408,7 @@ ) (when (-> this strip2) (set! (-> this strip2 num-verts) (the-as uint 0)) - (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip2 tex-id) (-> this appearance tex-id)) (cond ((not (-> this appearance zbuffer?)) (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) @@ -399,9 +444,13 @@ ) (countdown (s5-1 (-> s5-0 0)) (let* ((s3-1 s5-1) - (s4-1 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1))) + (s4-1 (the-as object (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1)))) ) - (set! sv-136 (/ (the float (+ (- (-> this start-marker) (the-as uint (-> s4-1 3))) sv-80)) (the float sv-64))) + (set! sv-136 + (/ (the float (+ (- (-> this start-marker) (-> (the-as light-trail-breadcrumb s4-1) birth-time)) sv-80)) + (the float sv-64) + ) + ) (when (or (< 1.0 sv-136) (< sv-136 0.0)) ) (when (and (>= 1.0 sv-136) (>= sv-136 0.0)) @@ -423,10 +472,10 @@ f28-0 f26-0 (-> this appearance alpha-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-140 (curve2d-method-9 (-> this appearance alpha-curve-1) sv-140 3)) + (set! sv-140 (evaluate (-> this appearance alpha-curve-1) sv-140 (loop-behavior use-default))) ) (when (-> this appearance alpha-curve-2) (set! sv-144 @@ -437,10 +486,10 @@ f28-0 f26-0 (-> this appearance alpha-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-144 (curve2d-method-9 (-> this appearance alpha-curve-2) sv-144 3)) + (set! sv-144 (evaluate (-> this appearance alpha-curve-2) sv-144 (loop-behavior use-default))) ) (when (-> this appearance width-curve) (set! sv-148 @@ -451,10 +500,10 @@ f28-0 f26-0 (-> this appearance width-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-148 (curve2d-method-9 (-> this appearance width-curve) sv-148 3)) + (set! sv-148 (evaluate (-> this appearance width-curve) sv-148 (loop-behavior use-default))) ) (set! sv-152 (compute-trail-scaled-t @@ -464,7 +513,7 @@ f28-0 f26-0 (-> this appearance uv-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) (when (or (< 1.0 sv-152) (< sv-152 0.0)) @@ -485,14 +534,14 @@ f28-0 f26-0 (-> this appearance color-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (curve-color-method-9 (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) 3) + (evaluate (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) (loop-behavior use-default)) ) ) (set! (-> sv-200 w) (* (-> sv-200 w) sv-192)) - (light-trail-method-18 this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) + (calc-vertex-pos! this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) (when (or (and (= (-> this appearance uv-mode) 3) (< sv-92 sv-152)) (and (!= (-> this appearance uv-mode) 3) (< sv-152 sv-92)) ) @@ -500,30 +549,34 @@ (set! (-> s2-0 3 z) (- sv-152)) (set! (-> s2-0 3 w) (- sv-92 (-> s2-0 3 z))) (set! (-> s2-0 4 x) (/ sv-92 (-> s2-0 3 w))) - (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ s4-1 0)) (-> s2-0 4 x)) + (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) (-> s2-0 4 x)) (rgbaf-lerp! (the-as rgbaf (-> s2-0 2)) sv-100 (the-as rgbaf sv-200) (-> s2-0 4 x)) (set! (-> s2-0 3 y) (lerp sv-96 sv-196 (-> s2-0 4 x))) (vector-lerp! (-> s2-0 1) sv-132 sv-204 (-> s2-0 4 x)) (set! (-> s2-0 3 x) (the-as float (rgba<-rgbaf (the-as rgba (-> s2-0 3 x)) (the-as rgbaf (-> s2-0 2))))) - (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 0.0) - (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 1.0) + (add-tri-pair-to-prim! this (-> s2-0 0) (the-as rgba (-> s2-0 3 x)) (-> s2-0 3 y) (-> s2-0 1) 0.0) + (add-tri-pair-to-prim! this (-> s2-0 0) (the-as rgba (-> s2-0 3 x)) (-> s2-0 3 y) (-> s2-0 1) 1.0) ) ) - (light-trail-method-17 + (add-tri-pair-to-prim! this - (the-as vector (&+ s4-1 0)) - (the-as float (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200))) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) + (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200)) sv-196 sv-204 sv-152 ) (when (> s3-1 0) (let ((v1-149 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ s3-1 -1))))) - (set! sv-88 (+ sv-88 (vector-vector-distance (the-as vector (&+ s4-1 0)) (the-as vector (&+ v1-149 0))))) + (set! sv-88 + (+ sv-88 + (vector-vector-distance (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) (the-as vector (&+ v1-149 0))) + ) + ) ) ) (set! sv-92 sv-152) - (set! (-> sv-104 quad) (-> (the-as vector (&+ s4-1 0)) quad)) + (set! (-> sv-104 quad) (-> (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) quad)) (set! sv-96 sv-196) (set! (-> sv-100 quad) (-> sv-200 quad)) (set! (-> sv-132 quad) (-> sv-204 quad)) @@ -535,22 +588,27 @@ (none) ) -(defmethod light-trail-method-19 ((this light-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this light-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." 0 (none) ) ;; WARN: Return type mismatch pointer vs none. -(defmethod light-trail-method-14 ((this light-trail)) +(defmethod expire-old-points! ((this light-trail)) + "Internal function to kill off points that are too old." (let ((s4-0 (new 'stack-no-clear 'light-trail-breadcrumb)) (s5-0 -1) ) (let ((s3-0 (-> this crumb-count))) (dotimes (s2-0 s3-0) - (let ((a1-0 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0))))) + (let ((a1-0 + (the-as light-trail-breadcrumb (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0)))) + ) + ) (cond - ((< (the-as uint (-> a1-0 3)) (-> this end-marker)) - (mem-copy! (the-as pointer s4-0) a1-0 16) + ((< (-> a1-0 birth-time) (-> this end-marker)) + (mem-copy! (the-as pointer s4-0) (the-as pointer a1-0) 16) (set! s5-0 s2-0) ) (else @@ -562,17 +620,19 @@ ) (label cfg-8) (when (>= s5-0 0) - (let ((s3-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1))))) - (s2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + (let ((s3-1 (the-as object (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1)))))) + (s2-1 + (the-as light-trail-breadcrumb (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + ) ) - (let* ((f0-1 (the float (- (-> this start-marker) (the-as uint (-> s3-1 3))))) - (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 pos w))))) + (let* ((f0-1 (the float (- (-> this start-marker) (-> (the-as light-trail-breadcrumb s3-1) birth-time)))) + (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 birth-time))))) (f30-0 (/ (- (the float (-> this appearance max-age)) f0-1) (- f1-1 f0-1))) ) - (light-trail-method-19 this f30-0 s5-0) - (vector-lerp! (the-as vector (&+ s2-1 0)) (the-as vector (&+ s3-1 0)) (-> s4-0 pos) f30-0) + (crumb-age-out-callback this f30-0 s5-0) + (vector-lerp! (-> s2-1 pos) (the-as vector (&+ (the-as (pointer uint8) s3-1) 0)) (-> s4-0 pos) f30-0) ) - (set! (-> s2-1 3) (the-as light-trail-breadcrumb (-> this end-marker))) + (set! (-> s2-1 birth-time) (-> this end-marker)) ) (when (> s5-0 0) (set! (-> this crumb-count) (- (-> this crumb-count) s5-0)) @@ -587,37 +647,36 @@ (none) ) -(defmethod light-trail-method-13 ((this light-trail)) +(defmethod common-trans! ((this light-trail)) + "Call this on each frame to handle max-age." (with-pp (if (<= (-> this crumb-count) 0) (return 0) ) - (let ((v1-3 (-> this decision))) - (cond - ((= v1-3 2) - (return 0) - ) - ((zero? v1-3) - (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) - (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) - (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) - (set! (-> this end-marker) v1-8) - (light-trail-method-14 this) - ) + (case (-> this decision) + (((light-trail-decision reset)) + (return 0) + ) + (((light-trail-decision added)) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) + (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) + (set! (-> this end-marker) v1-8) + (expire-old-points! this) ) ) - ((= v1-3 1) - (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) - (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) - (reset-crumbs! this) - (set! (-> this end-marker) (-> this start-marker)) - ) - (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) - (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) + (((light-trail-decision not-added)) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) + (reset-crumbs! this) + (set! (-> this end-marker) (-> this start-marker)) ) - ) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) ) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) 0 ) ) @@ -630,8 +689,8 @@ (defbehavior light-trail-tracker-common-post light-trail-tracker () (cond - ((light-trail-tracker-method-19 self) - (light-trail-method-12 (-> self trail)) + ((should-draw? self) + (build-prim-strip! (-> self trail)) ) (else (set! (-> self trail strip num-verts) (the-as uint 0)) @@ -651,26 +710,23 @@ (case (-> block param 0) (('add-crumb) (let ((a1-1 (handle->process (-> self tracked-object)))) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector)) - ) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector))) ) ) (('add-crumb-elapsed) (let ((a1-4 (handle->process (-> self tracked-object)))) - (light-trail-method-11 + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) (the-as time-frame (the int (the-as float (-> block param 1)))) ) ) ) (('add-crumb-pos) - (light-trail-tracker-method-20 self (the-as vector (-> block param 1))) + (add-crumb! self (the-as vector (-> block param 1))) ) (('replace-last-crumb) - (light-trail-method-21 (-> self trail) (the-as vector (-> block param 1))) + (replace-last-crumb! (-> self trail) (the-as vector (-> block param 1))) ) (('die) (go-virtual die) @@ -683,17 +739,14 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual die) ) (else - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) - ) + (if (should-track? self (the-as process-focusable gp-0)) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector))) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) 0 ) ) @@ -709,7 +762,7 @@ '() ) :trans (behavior () - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code (behavior () (until #f @@ -739,7 +792,7 @@ this ) -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) (let ((a0-2 (if (type? arg0 process-focusable) arg0 ) @@ -752,11 +805,11 @@ arg1 ) -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker) (arg0 process-focusable)) #t ) -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) (let ((a0-2 (if (type? arg0 process-focusable) arg0 ) @@ -775,7 +828,7 @@ ) ;; WARN: Return type mismatch object vs symbol. -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-water) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-water) (arg0 process-focusable)) (the-as symbol (and *target* (or (logtest? (water-flag touch-water) (-> *target* water flags)) (logtest? (-> *target* control status) (collide-status on-water)) ) @@ -783,11 +836,11 @@ ) ) -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker) (arg0 process-focusable)) (not arg0) ) -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-water) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker-water) (arg0 process-focusable)) (let ((v1-0 (if (type? arg0 process-focusable) arg0 ) @@ -815,14 +868,14 @@ ) ) -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-projectile) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker-projectile) (arg0 process-focusable)) (if (not arg0) (set! (-> this tracked-object) (the-as handle #f)) ) #f ) -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) (let ((a0-1 arg0)) (if a0-1 (set! (-> arg1 quad) (-> a0-1 root trans quad)) @@ -840,13 +893,10 @@ (go-virtual hang-on) ) (else - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) - ) + (if (should-track? self (the-as process-focusable gp-0)) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector))) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -864,7 +914,7 @@ (if (time-elapsed? (-> self state-time) (seconds 2)) (go-virtual die) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code sleep-code :post light-trail-tracker-common-post @@ -879,7 +929,7 @@ (if (time-elapsed? (-> self state-time) (seconds 2)) (go-virtual die) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code sleep-code :post light-trail-tracker-common-post @@ -898,7 +948,7 @@ (let ((a1-1 (-> block param 1)) (a2-1 (-> block param 2)) ) - (weapon-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + (add-crumb-with-offset (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) ) ) ) @@ -909,7 +959,7 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual hang-on) ) (else @@ -925,10 +975,10 @@ ) ) ) - (weapon-trail-method-22 (-> self trail) s5-0 a2-0) + (add-crumb-with-offset (-> self trail) s5-0 a2-0) ) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -942,7 +992,7 @@ :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (case message (('reset) - (light-trail-method-10 (-> self trail)) + (reset! (-> self trail)) ) (('notice) (case (-> block param 0) @@ -953,7 +1003,7 @@ (let ((a1-1 (-> block param 0)) (a2-1 (-> block param 1)) ) - (tread-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + (add-crumb-with-offset (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) ) ) ) @@ -964,7 +1014,7 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual die) ) (else @@ -973,7 +1023,7 @@ (setup-dma-and-tex (-> self trail strip) a1-2) ) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -983,26 +1033,28 @@ ) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) (none) ) -(defmethod light-trail-method-9 ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this crumb-size) (the-as uint 32)) (call-parent-method this arg0 arg1) (none) ) -;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. -(defmethod weapon-trail-method-22 ((this weapon-trail) (arg0 vector) (arg1 vector)) +;; WARN: Return type mismatch (pointer uint8) vs light-trail-breadcrumb. +(defmethod add-crumb-with-offset ((this weapon-trail) (arg0 vector) (arg1 vector)) + "Given two points, add the first and offset to a crumb." (let ((gp-0 (new 'stack-no-clear 'vector)) (v1-0 (new 'stack-no-clear 'vector)) ) (vector-! gp-0 arg1 arg0) (vector-float*! gp-0 gp-0 0.5) (vector+! v1-0 arg0 gp-0) - (let ((v1-1 (light-trail-method-11 this v1-0 (seconds 10000)))) + (let ((v1-1 (add-crumb! this v1-0 (seconds 10000)))) (the-as light-trail-breadcrumb (when (!= v1-1 1) @@ -1024,7 +1076,7 @@ ;; WARN: Return type mismatch object vs none. (defmethod weapon-trail-method-23 ((this weapon-trail) (arg0 vector) (arg1 vector)) - (local-vars (gp-0 (pointer light-trail-breadcrumb)) (f0-2 float)) + (local-vars (gp-0 weapon-trail-crumb) (f0-2 float)) (with-pp (let ((s4-0 (new 'stack-no-clear 'vector)) (s3-0 (new 'stack-no-clear 'vector)) @@ -1033,18 +1085,20 @@ 0.0 (cond ((zero? v1-0) - (weapon-trail-method-22 this arg0 arg1) + (add-crumb-with-offset this arg0 arg1) ) ((begin - (set! (-> this decision) (the-as uint 0)) - (set! gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + (set! (-> this decision) (light-trail-decision added)) + (set! gp-0 + (the-as weapon-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + ) (vector-! s4-0 arg1 arg0) (vector-float*! s4-0 s4-0 0.5) (vector+! s3-0 arg0 s4-0) - (set! f0-2 (vector-vector-distance (the-as vector (&+ gp-0 0)) s3-0)) + (set! f0-2 (vector-vector-distance (-> gp-0 pos) s3-0)) (< f0-2 40.96) ) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) ) (else (+! (-> this total-distance-traveled) f0-2) @@ -1055,11 +1109,11 @@ (if (-> this appearance use-tape-mode?) (set! f0-6 (- f2-0 f1-2)) ) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> s3-0 quad)) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 16)) pos quad) (-> s4-0 quad)) - (set! (-> gp-0 3) + (set! (-> gp-0 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 offset quad) (-> s4-0 quad)) + (set! (-> gp-0 birth-time) (the-as - light-trail-breadcrumb + uint (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-6)) ) ) @@ -1072,7 +1126,8 @@ ) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-19 ((this weapon-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this weapon-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) ) @@ -1081,7 +1136,8 @@ (none) ) -(defmethod light-trail-method-17 ((this weapon-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) +(defmethod add-tri-pair-to-prim! ((this weapon-trail) (arg0 vector) (arg1 rgba) (arg2 float) (arg3 vector) (arg4 float)) + "Add two vertices to the prim strip to add two triangles" (when (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) (format 0 "Out of stuff (~d)~%" (-> this strip allocated-num-verts)) (return #f) @@ -1089,14 +1145,28 @@ (vector-float*! arg3 arg3 arg2) (let ((s2-0 (new 'stack-no-clear 'vector))) (set! (-> s2-0 quad) (-> arg3 quad)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) + arg1 + arg4 + 1.0 + ) ) #f ) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (let ((v1-0 (new 'stack-no-clear 'vector))) (cond ((> (the-as uint arg1) 0) @@ -1115,14 +1185,16 @@ (none) ) -(defmethod light-trail-method-9 ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this crumb-size) (the-as uint 32)) (call-parent-method this arg0 arg1) (none) ) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-19 ((this tread-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this tread-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) ) @@ -1131,75 +1203,70 @@ (none) ) -;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. -(defmethod tread-trail-method-22 ((this tread-trail) (arg0 vector) (arg1 vector)) - (let ((v1-1 (light-trail-method-11 this arg0 (seconds 10000)))) - (the-as - light-trail-breadcrumb - (when (!= v1-1 1) - (let ((v0-1 - (the-as - object - (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) +;; WARN: Return type mismatch (pointer uint8) vs none. +(defmethod add-crumb-with-offset ((this tread-trail) (arg0 vector) (arg1 vector)) + (let ((v1-1 (add-crumb! this arg0 (seconds 10000)))) + (if (!= v1-1 1) + (set! (-> (the-as + light-trail-breadcrumb + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + pos + quad ) - ) + (-> arg1 quad) ) - (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> arg1 quad)) - v0-1 - ) ) - ) ) + (none) ) -;; WARN: Return type mismatch object vs light-trail-breadcrumb. +;; WARN: Return type mismatch object vs none. (defmethod tread-trail-method-23 ((this tread-trail) (arg0 vector) (arg1 vector)) (with-pp (let ((v1-0 (-> this crumb-count))) 0.0 - (the-as - light-trail-breadcrumb - (cond - ((zero? v1-0) - (tread-trail-method-22 this arg0 arg1) - ) - (else - (set! (-> this decision) (the-as uint 0)) - (let ((s5-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) - (let ((f0-1 (vector-vector-distance (the-as vector (&+ s5-0 0)) arg0))) - (+! (-> this total-distance-traveled) f0-1) - (if (< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) - ) + (cond + ((zero? v1-0) + (add-crumb-with-offset this arg0 arg1) + ) + (else + (set! (-> this decision) (light-trail-decision added)) + (let ((s5-0 + (the-as tread-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + ) ) - (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) - (f2-0 (the float (-> this appearance max-age))) - (f0-4 0.0) - ) - (if (-> this appearance use-tape-mode?) - (set! f0-4 (- f2-0 f1-3)) - ) - (set! (-> (the-as light-trail-breadcrumb (&+ s5-0 0)) pos quad) (-> arg0 quad)) - (set! (-> s5-0 3) - (the-as - light-trail-breadcrumb - (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) - ) + (let ((f0-1 (vector-vector-distance (-> s5-0 pos) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (light-trail-decision not-added)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (set! (-> s5-0 birth-time) + (the-as + uint + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) ) - ) - (let ((v0-0 (the-as object (&+ s5-0 16)))) - (set! (-> (the-as light-trail-breadcrumb v0-0) pos quad) (-> arg1 quad)) - v0-0 - ) + ) ) + (set! (-> s5-0 normal quad) (-> arg1 quad)) ) ) ) ) + (none) ) ) -(defmethod light-trail-tracker-method-19 ((this light-trail-tracker)) +(defmethod should-draw? ((this light-trail-tracker)) (let ((a1-0 (handle->process (-> this tracked-object)))) #t (let ((v1-4 #t)) @@ -1254,10 +1321,10 @@ ) ;; WARN: Return type mismatch uint vs none. -(defmethod light-trail-tracker-method-20 ((this light-trail-tracker) (arg0 vector)) +(defmethod add-crumb! ((this light-trail-tracker) (arg0 vector)) (if (zero? (mod (-> this last-add-frame-val) (-> this trail appearance frame-stagger))) - (light-trail-method-11 (-> this trail) arg0 (seconds 10000)) - (light-trail-method-21 (-> this trail) arg0) + (add-crumb! (-> this trail) arg0 (seconds 10000)) + (replace-last-crumb! (-> this trail) arg0) ) (+! (-> this last-add-frame-val) 1) (none) diff --git a/goal_src/jak3/engine/gfx/texture/texture-anim.gc b/goal_src/jak3/engine/gfx/texture/texture-anim.gc index ef687ec358..4f98a2b7b7 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-anim.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-anim.gc @@ -82,6 +82,7 @@ (set-clut-alpha 20) (copy-clut-alpha 21) (darkjak 22) + (darkjak-highres 23) (skull-gem 27) ;; same as jak 2 (default-water 28) (default-warp 29) @@ -486,7 +487,19 @@ (return #f) ) ((*darkjak-highres-texture-anim-array*) - (print-anim "*darkjak-highres-texture-anim-array*~%") + (with-dma-buffer-add-bucket ((dma-buf (-> *display* frames (-> *display* on-screen) global-buf)) + bucket + ) + (pc-texture-anim-flag start-anim-array dma-buf) + (pc-texture-anim-flag darkjak-highres dma-buf :qwc 1) + (let ((morph (-> anim-array array-data 0 frame-time)) + (vec (the vector (-> dma-buf base))) + ) + (set! (-> vec x) morph) + ) + (&+! (-> dma-buf base) 16) + (pc-texture-anim-flag finish-anim-array dma-buf) + ) (return #f) ) ((*skull-gem-texture-anim-array*) diff --git a/goal_src/jak3/engine/gfx/texture/texture.gc b/goal_src/jak3/engine/gfx/texture/texture.gc index b94275c493..42b0e92c5e 100644 --- a/goal_src/jak3/engine/gfx/texture/texture.gc +++ b/goal_src/jak3/engine/gfx/texture/texture.gc @@ -1383,7 +1383,7 @@ (+! (-> lev upload-size 8) (upload-vram-pages pool (-> pool segment-common) a2-1 (tex-upload-mode seg0-1-2) bucket) ) - (set! (-> lev upload-size 6) (upload-vram-pages-pris + (set! (-> lev upload-size 6) (upload-vram-pages-pris-pc pool (-> pool segment-common) a2-1 diff --git a/goal_src/jak3/engine/physics/cloth-h.gc b/goal_src/jak3/engine/physics/cloth-h.gc index 7666da53ca..17177e7833 100644 --- a/goal_src/jak3/engine/physics/cloth-h.gc +++ b/goal_src/jak3/engine/physics/cloth-h.gc @@ -117,10 +117,10 @@ (momentum vector :inline) ) (:methods - (calculate-wind! (_type_) none) - (verlet-particle-system-method-12 (_type_ float) none) - (verlet-particle-system-method-13 (_type_) none) - (verlet-particle-system-method-14 (_type_) none) + (accumulate-external-forces! (_type_) none) + (compute-verlet-step (_type_ float) none) + (run-one-iteration (_type_) none) + (reset! (_type_) none) (debug-draw (_type_) none) ) ) @@ -173,9 +173,9 @@ (:methods (initialize-cloth-system! (_type_ cloth-params) none) (debug-draw-spheres (_type_) none) - (cloth-system-method-18 (_type_) int) - (cloth-system-method-19 (_type_) none) - (cloth-system-method-20 (_type_) none) + (post-physics-update (_type_) int) + (enforce-constraints-1 (_type_) none) + (enforce-constraints-2 (_type_) none) (cloth-system-method-21 (_type_) none) (cloth-system-method-22 (_type_) none) (cloth-system-method-23 (_type_) none) @@ -189,9 +189,9 @@ (cloth-system-method-31 (_type_ current-position-info) none) (cloth-system-method-32 (_type_ vector int int current-position-info) none) (cloth-system-method-33 (_type_ vu-lights) none) - (cloth-system-method-34 (_type_) none) - (cloth-system-method-35 (_type_) none) - (cloth-system-method-36 (_type_) none) + (hide! (_type_) none) + (reset-locations (_type_) none) + (pre-physics-update (_type_) none) (cloth-system-cmd-handler (_type_ pair) none) ) ) diff --git a/goal_src/jak3/engine/physics/cloth.gc b/goal_src/jak3/engine/physics/cloth.gc index 6346724781..c969a7e4a8 100644 --- a/goal_src/jak3/engine/physics/cloth.gc +++ b/goal_src/jak3/engine/physics/cloth.gc @@ -7,20 +7,2130 @@ ;; DECOMP BEGINS -(defmethod cloth-base-method-10 ((this cloth-base) (a cloth-params) (b handle)) - (format 0 "unimplemented cloth-base-method-10~%") - 0) +(defmethod relocate ((this verlet-particle-system) (offset int)) + (if (nonzero? (-> this particles)) + (&+! (-> this particles) offset) + ) + (call-parent-method this offset) + ) + +(defmethod mem-usage ((this art-cloth-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 77 (-> usage length))) + (set! (-> usage data 76 name) "art-cloth-geo") + (+! (-> usage data 76 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 76 used) v1-6) + (+! (-> usage data 76 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this art-cloth-geo)) + (the-as int (+ (-> this type size) + (* (-> this length) 32) + (asize-of (-> this sphere-transforms)) + (asize-of (-> this disc-transforms)) + (asize-of (-> this anchor-transforms)) + ) + ) + ) + +(defmethod reset! ((this verlet-particle-system)) + "Reset to stationary/default state." + (set! (-> this accum-force quad) (the-as uint128 0)) + (dotimes (v1-1 (-> this particles length)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 v1-1)))) + (-> this particles data v1-1 pos quad) + ) + ) + 0 + (none) + ) + +(defmethod reset! ((this cloth-system)) + "Reset to stationary/default state." + (reset-locations this) + (when (> (-> this anchor-points length) 0) + (let ((v1-6 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> this anchor-points data)) + (the-as vector (-> this particles data (-> this anchor-points data 0 particle-index))) + ) + ) + ) + (dotimes (a0-4 (-> this particles length)) + (vector+! (the-as vector (-> this particles data a0-4)) (the-as vector (-> this particles data a0-4)) v1-6) + ) + ) + ) + (dotimes (s5-0 1) + (run-one-iteration this) + ) + (call-parent-method this) + (none) + ) + +(defmethod pre-physics-update ((this cloth-system)) + "Callback to update prior to running verlet integration. Can handle movement of the entire system in the world, for example" + 0 + (none) + ) + +;; WARN: Return type mismatch cloth-flag vs none. +(defmethod pre-physics-update ((this cloth-on-skeleton)) + "Callback to update prior to running verlet integration. Can handle movement of the entire system in the world, for example" + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (handle->process (-> this owner))) + ) + (when s4-0 + (cond + ((< -1 (-> this base-transform-index)) + (let* ((v1-4 s5-0) + (a3-0 (-> (the-as process-focusable s4-0) node-list data (-> this base-transform-index) bone transform)) + (a0-8 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-4 rvec quad) a0-8) + (set! (-> v1-4 uvec quad) a1-3) + (set! (-> v1-4 fvec quad) a2-0) + (set! (-> v1-4 trans quad) a3-1) + ) + ) + (else + (quaternion->matrix s5-0 (-> (the-as process-focusable s4-0) root quat)) + (set! (-> s5-0 trans quad) (-> (the-as process-focusable s4-0) root trans quad)) + ) + ) + (vector-normalize! (-> s5-0 fvec) 1.0) + (vector-normalize! (-> s5-0 uvec) 1.0) + (vector-normalize! (-> s5-0 rvec) 1.0) + (vector-float*! (-> s5-0 trans) (-> s5-0 trans) (/ 1.0 (-> s5-0 trans w))) + (set! (-> s5-0 trans w) 1.0) + (when (logtest? (cloth-flag local-space local-space-xyz local-space-y) (-> this flags)) + (let ((s4-1 (matrix-identity! (new 'stack-no-clear 'matrix)))) + (if (logtest? (cloth-flag local-space-y) (-> this flags)) + (set! (-> s4-1 trans y) (- (-> s5-0 trans y) (-> this last-owner-mat trans y))) + (vector-! (-> s4-1 trans) (-> s5-0 trans) (-> this last-owner-mat trans)) + ) + (when (logtest? (cloth-flag local-space) (-> this flags)) + (let ((s3-0 (matrix-identity! (new 'stack-no-clear 'matrix)))) + (vector-float*! (-> s3-0 trans) (-> s5-0 trans) -1.0) + (matrix*! s4-1 s4-1 s3-0) + (matrix-4x4-inverse! s3-0 (-> this last-owner-mat)) + (matrix*! s3-0 s3-0 s5-0) + (set! (-> s3-0 trans quad) (the-as uint128 0)) + (set! (-> s3-0 trans w) 1.0) + (matrix*! s4-1 s4-1 s3-0) + (matrix-identity! s3-0) + (set! (-> s3-0 trans quad) (-> s5-0 trans quad)) + (matrix*! s4-1 s4-1 s3-0) + ) + ) + (dotimes (s3-1 (-> this particles length)) + (set! (-> this particles data s3-1 pos w) 1.0) + (vector-matrix*! + (the-as vector (-> this particles data s3-1)) + (the-as vector (-> this particles data s3-1)) + s4-1 + ) + (set! (-> this particles data s3-1 pos w) 1.0) + (set! (-> this particles data s3-1 prev-pos w) 1.0) + (vector-matrix*! + (the-as vector (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 s3-1))) + (the-as vector (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 s3-1))) + s4-1 + ) + (set! (-> this particles data s3-1 prev-pos w) 1.0) + ) + ) + ) + (let ((a2-7 (-> this last-owner-mat)) + (v1-54 (-> s5-0 rvec quad)) + (a0-42 (-> s5-0 uvec quad)) + (a1-23 (-> s5-0 fvec quad)) + (a3-2 (-> s5-0 trans quad)) + ) + (set! (-> a2-7 rvec quad) v1-54) + (set! (-> a2-7 uvec quad) a0-42) + (set! (-> a2-7 fvec quad) a1-23) + (set! (-> a2-7 trans quad) a3-2) + ) + (logclear! (-> this flags) (cloth-flag local-space local-space-xyz local-space-y)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod reset! ((this cloth-on-skeleton)) + "Reset to stationary/default state." + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (handle->process (-> this owner))) + ) + (when s4-0 + (cond + ((< -1 (-> this base-transform-index)) + (let* ((v1-5 s5-0) + (a3-0 (-> (the-as process-focusable s4-0) node-list data (-> this base-transform-index) bone transform)) + (a0-8 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-8) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + (else + (quaternion->matrix s5-0 (-> (the-as process-focusable s4-0) root quat)) + (set! (-> s5-0 trans quad) (-> (the-as process-focusable s4-0) root trans quad)) + ) + ) + (dotimes (s4-1 (-> this particles length)) + (vector-matrix*! (the-as vector (-> this particles data s4-1)) (the-as vector (-> this mesh mesh s4-1)) s5-0) + (vector-float*! + (the-as vector (-> this particles data s4-1)) + (the-as vector (-> this particles data s4-1)) + (/ 1.0 (-> this particles data s4-1 pos w)) + ) + (set! (-> this particles data s4-1 pos w) 1.0) + ) + (let ((v1-24 0) + (a0-24 (+ (-> this particles length) -1)) + ) + (while (>= a0-24 v1-24) + (+! v1-24 1) + ) + ) + (let ((a0-25 (-> s5-0 trans))) + (set! (-> this last-owner-pos quad) (-> a0-25 quad)) + ) + ) + ) + (set! (-> this accum-force quad) (the-as uint128 0)) + (dotimes (v1-29 (-> this particles length)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 v1-29)))) + (-> this particles data v1-29 pos quad) + ) + ) + (none) + ) + +(defmethod relocate ((this cloth-system) (offset int)) + (if (nonzero? (-> this stick-constraints)) + (&+! (-> this stick-constraints) offset) + ) + (if (nonzero? (-> this disc-collision-constraints)) + (&+! (-> this disc-collision-constraints) offset) + ) + (if (nonzero? (-> this collision-constraints)) + (&+! (-> this collision-constraints) offset) + ) + (if (nonzero? (-> this anchor-points)) + (&+! (-> this anchor-points) offset) + ) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (if (nonzero? (-> this strip2)) + (&+! (-> this strip2) offset) + ) + (if (nonzero? (-> this strip3)) + (&+! (-> this strip3) offset) + ) + (call-parent-method this offset) + ) + +(defmethod relocate ((this cloth-on-skeleton) (offset int)) + (call-parent-method this offset) + ) + +(defmethod debug-draw ((this verlet-particle-system)) + (dotimes (s5-0 (-> this particles length)) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 583) + ) + (format (clear *temp-string*) "~d" s5-0) + (s4-0 + s3-0 + (the-as bucket-id s2-0) + *temp-string* + (the-as vector (-> this particles data s5-0)) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this cloth-system)) + (dotimes (s5-0 (-> this particles length)) + (let* ((a0-1 (/ s5-0 (-> this cloth-width))) + (v1-2 (mod s5-0 (-> this cloth-width))) + (s1-0 (cond + ((not (logtest? a0-1 1)) + (if (or (< v1-2 (/ (-> this cloth-width) 4)) (>= v1-2 (/ (* 3 (-> this cloth-width)) 4))) + 3 + 4 + ) + ) + ((or (< v1-2 (/ (-> this cloth-width) 4)) (>= v1-2 (/ (* 3 (-> this cloth-width)) 4))) + 7 + ) + (else + 6 + ) + ) + ) + (s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 583) + ) + (format (clear *temp-string*) "~d" s5-0) + (add-debug-sphere #t (the-as bucket-id s2-0) + (-> this particles data s5-0 pos) + (meters 0.02) + (static-rgba #x80 0 #x80 #x80) + ) + ; (s4-0 + ; s3-0 + ; (the-as bucket-id s2-0) + ; *temp-string* + ; (the-as vector (-> this particles data s5-0)) + ; (the-as font-color s1-0) + ; (the-as vector2h #f) + ; ) + ) + ) + 0 + (none) + ) + +(defmethod initialize-cloth-system! ((this cloth-system) (arg0 cloth-params)) + "Set up this cloth system with the given [[cloth-params]]." + (local-vars (sv-16 int) (sv-20 int) (sv-24 int) (sv-28 int)) + (if (or (zero? (-> this mesh)) (< (-> this mesh length) 4)) + (go process-drawable-art-error "cloth-mesh (art-cloth-geo)") + ) + (set! (-> this params) arg0) + (set! (-> this cloth-width) (the-as int (-> arg0 cloth-width))) + (set! (-> this cloth-height) (/ (the-as int (-> this mesh length)) (-> this cloth-width))) + (set! (-> this drag) (-> arg0 drag)) + (set! (-> this collision-constraints) + (new 'process 'collision-sphere-array (the-as int (-> arg0 num-sphere-constraints))) + ) + (set! (-> this disc-collision-constraints) + (new 'process 'collision-disc-array (the-as int (-> arg0 num-disc-constraints))) + ) + (set! (-> this anchor-points) (new 'process 'anchor-point-array (the-as int (-> arg0 num-anchor-points)))) + (set! (-> this wind-constant) (-> arg0 wind-constant)) + (set! (-> this gravity-constant) (-> arg0 gravity-constant)) + (set! (-> this thickness-scalar) (-> arg0 cloth-thickness)) + (set! (-> this flags) (-> arg0 flags)) + (set! (-> this timestep-frequency) (-> arg0 timestep-frequency)) + (set! (-> this secret-disable) (-> arg0 secret-disable)) + (when (<= (-> this mesh cloth-thickness length) 0) + ) + (if (logtest? (-> this flags) (cloth-flag flip-normals)) + (set! (-> this face-normal-scalar) -1.0) + (set! (-> this face-normal-scalar) 1.0) + ) + (set! (-> this particles) (new 'process 'particle-array (* (-> this cloth-width) (-> this cloth-height)))) + (if (not (and (nonzero? (-> this collision-constraints)) (and (nonzero? (-> this disc-collision-constraints)) + (nonzero? (-> this anchor-points)) + (nonzero? (-> this particles)) + ) + ) + ) + (go process-drawable-art-error "cloth-memory") + ) + (dotimes (v1-38 (-> this particles length)) + (set! (-> this particles data v1-38 pos quad) (-> this mesh mesh v1-38 pt quad)) + (set! (-> this particles data v1-38 mass-scale) 1.0) + ) + (set! sv-16 (* (+ (-> this cloth-width) -1) (-> this cloth-height))) + (set! sv-20 (* (+ (-> this cloth-height) -1) (-> this cloth-width))) + (set! sv-24 (+ (* (+ (-> this cloth-width) -2) 2) 2)) + (let ((v1-52 (* sv-24 (+ (-> this cloth-height) -1))) + (s4-0 (* (+ (-> this cloth-width) -2) (-> this cloth-height))) + ) + (set! sv-28 (+ s4-0 (* (-> this cloth-width) (+ (-> this cloth-height) -2)))) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (+! s4-0 (* (-> this cloth-height) 2)) + (set! sv-28 (+ sv-28 (* (-> this cloth-height) 2))) + ) + (set! sv-28 (max 0 sv-28)) + (let ((s3-1 (max 0 v1-52))) + (set! (-> this num-xy-constraints) (+ sv-16 sv-20)) + (set! (-> this num-diagonal-constraints) s3-1) + (if (zero? (-> this stick-constraints)) + (set! (-> this stick-constraints) (new 'process 'stick-constraint-array (+ sv-16 sv-20 s3-1 sv-28))) + ) + (let ((v1-62 0)) + (dotimes (a0-37 (-> this cloth-height)) + (dotimes (a1-20 (+ (-> this cloth-width) -1)) + (let ((a2-11 (+ a1-20 (* a0-37 (-> this cloth-width)))) + (a3-2 (-> this stick-constraints data v1-62)) + ) + (set! (-> a3-2 particle0) (the-as uint a2-11)) + (set! (-> a3-2 particle1) (the-as uint (+ a2-11 1))) + ) + (+! v1-62 1) + ) + ) + ) + (let ((v1-65 sv-16)) + (dotimes (a0-38 (+ (-> this cloth-height) -1)) + (dotimes (a1-24 (-> this cloth-width)) + (let ((a2-18 (+ a1-24 (* a0-38 (-> this cloth-width)))) + (a3-5 (-> this stick-constraints data v1-65)) + ) + (set! (-> a3-5 particle0) (the-as uint a2-18)) + (set! (-> a3-5 particle1) (the-as uint (+ a2-18 (-> this cloth-width)))) + ) + (+! v1-65 1) + ) + ) + ) + (let ((v1-69 (+ sv-16 sv-20))) + (dotimes (a0-40 (+ (-> this cloth-height) -1)) + (dotimes (a1-29 (-> this cloth-width)) + (let ((a2-24 (+ a1-29 (* a0-40 (-> this cloth-width)))) + (a3-8 (-> this stick-constraints data v1-69)) + ) + (when (< a1-29 (+ (-> this cloth-width) -1)) + (set! (-> a3-8 particle0) (the-as uint a2-24)) + (set! (-> a3-8 particle1) (the-as uint (+ (-> this cloth-width) 1 a2-24))) + (+! v1-69 1) + (set! a3-8 (-> this stick-constraints data v1-69)) + ) + (when (> a1-29 0) + (set! (-> a3-8 particle0) (the-as uint a2-24)) + (set! (-> a3-8 particle1) (the-as uint (+ (-> this cloth-width) -1 a2-24))) + (+! v1-69 1) + (-> this stick-constraints data v1-69) + ) + ) + ) + ) + ) + (let ((v1-74 (+ sv-16 sv-20 s3-1))) + (dotimes (a0-42 (-> this cloth-height)) + (dotimes (a1-34 (+ (-> this cloth-width) -2)) + (let ((a2-31 (+ a1-34 (* a0-42 (-> this cloth-width)))) + (a3-14 (-> this stick-constraints data v1-74)) + ) + (set! (-> a3-14 particle0) (the-as uint a2-31)) + (set! (-> a3-14 particle1) (the-as uint (+ a2-31 2))) + ) + (+! v1-74 1) + ) + ) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (dotimes (a0-48 (-> this cloth-height)) + (let ((a1-40 (+ (* (+ a0-48 1) (-> this cloth-width)) -3)) + (a2-38 (* a0-48 (-> this cloth-width))) + (a3-17 (-> this stick-constraints data v1-74)) + ) + (set! (-> a3-17 particle0) (the-as uint a1-40)) + (set! (-> a3-17 particle1) (the-as uint a2-38)) + ) + (let ((v1-75 (+ v1-74 1))) + (-> this stick-constraints data v1-75) + (let ((a1-46 (+ (* (+ a0-48 1) (-> this cloth-width)) -2)) + (a2-43 (+ (* a0-48 (-> this cloth-width)) 1)) + (a3-20 (-> this stick-constraints data v1-75)) + ) + (set! (-> a3-20 particle0) (the-as uint a1-46)) + (set! (-> a3-20 particle1) (the-as uint a2-43)) + ) + (set! v1-74 (+ v1-75 1)) + ) + (-> this stick-constraints data v1-74) + ) + ) + ) + (let ((v1-80 (+ sv-16 sv-20 s3-1 s4-0))) + (dotimes (a0-51 (+ (-> this cloth-height) -2)) + (dotimes (a1-51 (-> this cloth-width)) + (let ((a2-47 (+ a1-51 (* a0-51 (-> this cloth-width)))) + (a3-23 (-> this stick-constraints data v1-80)) + ) + (set! (-> a3-23 particle0) (the-as uint a2-47)) + (set! (-> a3-23 particle1) (the-as uint (+ a2-47 (* (-> this cloth-width) 2)))) + ) + (+! v1-80 1) + ) + ) + ) + ) + ) + (let ((s4-1 (* (if (logtest? (-> this flags) (cloth-flag double-sided)) + (+ (* (-> this cloth-width) 2) 1) + (+ (* 3 (+ (-> this cloth-width) -2)) 6) + ) + (+ (-> this cloth-height) -1) + ) + ) + ) + (if (zero? (-> this strip)) + (set! (-> this strip) + (new 'process 'prim-strip s4-1 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name)) + ) + ) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (when (zero? (-> this strip2)) + (set! (-> this strip2) + (new 'process 'prim-strip s4-1 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name2)) + ) + (set! (-> this strip2 num-verts) (the-as uint 0)) + 0 + ) + (when (zero? (-> this strip3)) + (let ((a2-53 (* (+ (* (-> this cloth-width) 2) (* (-> this cloth-height) 2)) 2))) + (set! (-> this strip3) + (new 'process 'prim-strip a2-53 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name3)) + ) + ) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + ) + ) + (set! (-> this strip num-verts) (the-as uint 0)) + 0 + (when (logtest? (-> this flags) (cloth-flag autogen-uvs)) + (dotimes (v1-115 (-> this particles length)) + (let ((a1-59 (mod v1-115 (-> this cloth-width))) + (a0-63 (/ v1-115 (-> this cloth-width))) + ) + (set! (-> this mesh mesh v1-115 u) (/ (the float a1-59) (the float (+ (-> this cloth-width) -1)))) + (set! (-> this mesh mesh v1-115 v) (- 1.0 (/ (the float a0-63) (the float (+ (-> this cloth-height) -1))))) + ) + (set! (-> this mesh mesh v1-115 v) (fmax 0.0 (fmin 1.0 (-> this mesh mesh v1-115 v)))) + ) + (dotimes (v1-118 (-> this cloth-width)) + (+ (-> this cloth-height) -1) + (set! (-> this mesh mesh v1-118 v) 0.99) + ) + ) + (logior! (-> this flags) (cloth-flag need-reset need-setup)) + (logior! (-> this flags) (cloth-flag active inited)) + (set! (-> this reset-count) 1) + 0 + (none) + ) + +(defmethod setup-from-params! ((this cloth-on-skeleton) (arg0 cloth-params) (arg1 handle)) + (if (logtest? (-> this flags) (cloth-flag inited)) + (return 0) + ) + (set! (-> this owner) arg1) + (set! (-> this num-iterations) (-> arg0 num-iterations)) + (let ((s4-0 (handle->process (-> this owner)))) + (when (and s4-0 (< -1 (-> arg0 mesh))) + (set! (-> this mesh) + (the-as art-cloth-geo (-> (the-as process-focusable s4-0) draw art-group data (-> arg0 mesh))) + ) + (when (or (not (-> this mesh)) (!= (-> this mesh type) art-cloth-geo)) + (if (logtest? (-> arg0 flags) (cloth-flag suppress-mesh-failure)) + (return 0) + (go process-drawable-art-error "cloth-mesh (art-cloth-geo)") + ) + ) + (set! (-> this base-transform-index) (-> arg0 initial-xform)) + (set! (-> arg0 num-anchor-points) + (the-as uint (max (-> this mesh anchor-transforms length) (the-as int (-> arg0 num-anchor-points)))) + ) + (set! (-> arg0 num-sphere-constraints) + (the-as uint (max (-> this mesh sphere-transforms length) (the-as int (-> arg0 num-sphere-constraints)))) + ) + (set! (-> arg0 num-disc-constraints) + (the-as uint (max (-> this mesh disc-transforms length) (the-as int (-> arg0 num-disc-constraints)))) + ) + (set! (-> this ball-collision-radius) (-> arg0 ball-collision-radius)) + (set! (-> this ball-collision-radius) (-> this ball-collision-radius)) + (dotimes (s3-0 (-> this mesh anchor-transforms length)) + (let ((s2-0 (-> this mesh anchor-transforms data s3-0))) + (when (< (-> s2-0 joint) 0) + (let ((v1-47 + (the-as + joint + (get-art-by-name-method (-> (the-as process-focusable s4-0) draw jgeo) (-> s2-0 joint-name) (the-as type #f)) + ) + ) + ) + (set! (-> s2-0 joint) (if v1-47 + (+ (-> v1-47 number) 1) + 0 + ) + ) + ) + ) + ) + ) + (dotimes (s3-1 (-> this mesh sphere-transforms length)) + (let ((s2-1 (-> this mesh sphere-transforms data s3-1))) + (when (< (-> s2-1 joint) 0) + (let ((v1-61 + (the-as + joint + (get-art-by-name-method (-> (the-as process-focusable s4-0) draw jgeo) (-> s2-1 joint-name) (the-as type #f)) + ) + ) + ) + (set! (-> s2-1 joint) (if v1-61 + (+ (-> v1-61 number) 1) + 0 + ) + ) + ) + ) + ) + ) + (dotimes (s3-2 (-> this mesh disc-transforms length)) + (let ((s2-2 (-> this mesh disc-transforms data s3-2))) + (when (< (-> s2-2 joint) 0) + (let ((v1-76 (the-as joint (get-art-by-name-method + (-> (the-as process-focusable s4-0) draw jgeo) + (the-as string (-> s2-2 joint-name)) + (the-as type #f) + ) + ) + ) + ) + (set! (-> s2-2 joint) (if v1-76 + (+ (-> v1-76 number) 1) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + (initialize-cloth-system! this arg0) + 0 + ) + +(defmethod run-one-iteration ((this verlet-particle-system)) + "Run one iteration of the system." + 0 + (none) + ) + +(defmethod update! ((this verlet-particle-system)) + (with-pp + (accumulate-external-forces! this) + (let ((v1-4 (- (current-time) (-> pp clock old-frame-counter)))) + (if (> (-> this timestep-frequency) 0) + (compute-verlet-step this (* 0.0033333334 (the float (-> this timestep-frequency)))) + (compute-verlet-step this (* 0.0033333334 (the float v1-4))) + ) + ) + ;; (debug-draw this) + 0 + ) + ) + +(defmethod update! ((this cloth-system)) + (if (not (logtest? (-> this flags) (cloth-flag active))) + (return 0) + ) + (when (logtest? (-> this flags) (cloth-flag need-setup)) + (cond + ((or (> (-> this reset-count) 0) (logtest? (-> this flags) (cloth-flag no-draw))) + (reset! this) + (+! (-> this reset-count) -1) + (set! (-> this reset-count) (max 0 (-> this reset-count))) + ) + (else + (reset! this) + (logclear! (-> this flags) (cloth-flag need-setup)) + (dotimes (s5-0 (-> this stick-constraints length)) + (let ((s4-0 (-> this stick-constraints data s5-0))) + 0.0 + (let ((f0-1 (vector-vector-distance + (the-as vector (-> this particles data (-> s4-0 particle0))) + (the-as vector (-> this particles data (-> s4-0 particle1))) + ) + ) + ) + (set! (-> s4-0 one-over-two-times-constraint-length) (/ 1.0 (* 2.0 f0-1))) + (set! (-> s4-0 constraint-length-sqd) (* f0-1 f0-1)) + (set! (-> s4-0 constraint-length-half) (* 0.5 f0-1)) + ) + ) + ) + ) + ) + ) + (when (and (logtest? (-> this flags) (cloth-flag need-reset)) + (not (logtest? (-> this flags) (cloth-flag need-setup))) + ) + (reset! this) + (if (> (-> this reset-count) 0) + (+! (-> this reset-count) -1) + (logclear! (-> this flags) (cloth-flag need-reset)) + ) + ) + (pre-physics-update this) + (call-parent-method this) + (reset-locations this) + (let ((s5-1 (-> this num-iterations))) + (if (logtest? (cloth-flag riding) (-> this flags)) + (+! s5-1 1) + ) + (dotimes (s4-1 s5-1) + (run-one-iteration this) + ) + ) + (when (and (> (the-as uint (-> this secret-disable)) 0) + (> (the-as uint (logand (-> *game-info* secrets) (-> this secret-disable))) 0) + ) + (hide! this) + (return 0) + ) + (post-physics-update this) + 0 + ) + +(defmethod update! ((this cloth-on-skeleton)) + (if (not (logtest? (cloth-flag hidden) (-> this flags))) + (logclear! (-> this flags) (cloth-flag no-draw)) + ) + (when (and (handle->process (-> this owner)) (= (-> (handle->process (-> this owner)) type) target)) + (let* ((s5-0 (handle->process (-> this owner))) + (a0-16 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when (and a0-16 (focus-test? (the-as process-focusable a0-16) teleporting)) + (set! (-> this reset-count) 1) + (logior! (-> this flags) (cloth-flag need-reset no-draw)) + ) + ) + ) + (let ((s5-1 (handle->process (-> this owner)))) + (if (and s5-1 + (nonzero? (-> (the-as process-focusable s5-1) draw)) + (logtest? (-> (the-as process-focusable s5-1) draw status) + (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) + ) + ) + (logior! (-> this flags) (cloth-flag no-draw)) + ) + (when (and s5-1 (nonzero? (-> (the-as process-focusable s5-1) draw))) + (let ((s4-0 (-> (the-as process-focusable s5-1) draw))) + (setup-dma-and-tex (-> this strip) s4-0) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (setup-dma-and-tex (-> this strip2) s4-0) + (setup-dma-and-tex (-> this strip3) s4-0) + ) + ) + ) + (when (< -1 (-> this base-transform-index)) + (let ((s5-2 (-> (the-as process-focusable s5-1) node-list data 3 bone transform trans))) + (let ((f0-0 12288.0)) + (when (< (* f0-0 f0-0) (vector-vector-distance-squared (-> this last-owner-pos) s5-2)) + ) + ) + (set! (-> this last-owner-pos quad) (-> s5-2 quad)) + ) + ) + ) + (call-parent-method this) + ) + +(defmethod accumulate-external-forces! ((this verlet-particle-system)) + "If this cloth system has the wind flag, calculate the wind force." + 0 + (none) + ) -(defmethod cloth-system-method-34 ((this cloth-system)) - (format 0 "unimplemented cloth-system-method-34~%") +(defmethod hide! ((this cloth-system)) + (logior! (-> this flags) (cloth-flag no-draw hidden)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) (none) ) -(defmethod cloth-system-cmd-handler ((this cloth-system) (cmds pair)) - (format 0 "unimplemented cloth-system-cmd-handler~%") +(defmethod accumulate-external-forces! ((this cloth-system)) + "If this cloth system has the wind flag, calculate the wind force." + (if (not (logtest? (-> this flags) (cloth-flag no-gravity))) + (vector-float*! (-> this accum-force) (new 'static 'vector :y -1.0) (-> this gravity-constant)) + ) + (if (logtest? (-> this flags) (cloth-flag use-momentum)) + (vector+float*! (-> this accum-force) (-> this accum-force) (-> this momentum) 1.0) + ) + (when (logtest? (-> this flags) (cloth-flag use-wind)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (cond + ((-> *setting-control* user-current global-wind) + (vector-float*! s5-0 (the-as vector (-> *setting-control* user-current global-wind)) (-> this wind-constant)) + ) + (else + (let ((v1-17 s5-0) + (a1-1 (-> this particles data)) + ) + (vector-float*! + v1-17 + (-> *wind-work* + wind-array + (logand (+ (the int (-> a1-1 0 pos x)) (the int (-> a1-1 0 pos z)) (-> *wind-work* wind-time)) 63) + ) + (* 2048.0 (-> this wind-constant) (-> *setting-control* user-current ambient-wind-scalar)) + ) + ) + ) + ) + (let* ((f0-11 (vector-normalize-ret-len! s5-0 1.0)) + (f0-12 (fmin 163840.0 f0-11)) + ) + (vector+float*! (-> this accum-force) (-> this accum-force) s5-0 f0-12) + ) + ) + ) + 0 (none) ) -(defmethod init! ((this cloth-base)) - ;; this looks more like run! than init to me. - 0) \ No newline at end of file +(defmethod compute-verlet-step ((this verlet-particle-system) (arg0 float)) + (let ((f0-1 (* arg0 arg0)) + (f1-1 (-> this drag)) + ) + (dotimes (v1-0 (-> this particles length)) + (let ((a2-1 (-> this particles data v1-0)) + (a1-4 (new 'stack-no-clear 'vector)) + ) + (let ((a3-0 (-> this accum-force))) + (vector-float*! a1-4 (-> a2-1 pos) (- 2.0 f1-1)) + (vector-! a1-4 a1-4 (vector-float*! (new 'stack-no-clear 'vector) (-> a2-1 prev-pos) (- 1.0 f1-1))) + (vector+float*! a1-4 a1-4 a3-0 f0-1) + ) + (set! (-> a2-1 prev-pos quad) (-> a2-1 pos quad)) + (set! (-> a2-1 pos quad) (-> a1-4 quad)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed load: (set! vf10 (l.vf (+ a2-8 32))) at op 59 +(defmethod enforce-constraints-1 ((this cloth-system)) + (local-vars (a1-8 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) 0.5) + (set! (-> v1-0 y) 0.5) + (set! (-> v1-0 z) 0.5) + (set! (-> v1-0 w) 0.5) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) 3.0) + (set! (-> a1-4 y) 3.0) + (set! (-> a1-4 z) 3.0) + (set! (-> a1-4 w) 3.0) + (.max.w.vf vf7 vf0 vf0) + (.lvf vf8 (&-> v1-0 quad)) + (.lvf vf12 (&-> a1-4 quad)) + ) + ) + (.sub.w.vf vf9 vf0 vf0) + (dotimes (v1-1 (-> this stick-constraints length)) + (let* ((a1-7 (-> this stick-constraints data v1-1)) + (a2-8 (-> this particles data (-> a1-7 particle0))) + (a3-5 (-> this particles data (-> a1-7 particle1))) + ) + (.lvf vf2 (&-> a2-8 pos quad)) + (.lvf vf3 (&-> a3-5 pos quad)) + (.lvf vf6 (&-> a1-7 vec quad)) + (.sub.vf vf4 vf3 vf2) + (.mul.vf vf5 vf4 vf4) + (.mul.z.vf acc vf7 vf5) + (.add.mul.y.vf acc vf7 vf5 acc) + (.add.mul.x.vf acc vf7 vf5 acc) + (.add.mul.z.vf vf5 vf7 vf6 acc) + (.mul.y.vf vf5 vf5 vf6) + (.div.vf Q vf6 vf5 :fsf #b0 :ftf #b0) + (.lvf vf10 (&+ a2-8 32)) + (.lvf vf11 (&+ a3-5 32)) + (.max.x.vf vf10 vf0 vf10 :mask #b111) + (.max.x.vf vf11 vf0 vf11 :mask #b111) + (.add.vf vf13 vf10 vf11) + (.sub.vf vf13 vf12 vf13) + (.mul.vf vf10 vf10 vf13) + (.mul.vf vf11 vf11 vf13) + (.wait.vf) + (.sub.vf vf5 vf8 Q) + (.mul.vf vf5 vf5 vf4) + (.mul.vf vf10 vf10 vf5) + (.add.vf vf2 vf2 vf10) + (.mul.vf vf11 vf11 vf5) + (.sub.vf vf3 vf3 vf11) + (.svf (&-> a2-8 pos quad) vf2) + (.svf (&-> a3-5 pos quad) vf3) + ) + (.mov a1-8 vf3) + ) + (none) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod enforce-constraints-2 ((this cloth-system)) + (dotimes (v1-0 (-> this stick-constraints length)) + (let* ((t0-0 (-> this stick-constraints data v1-0)) + (a1-5 (-> this particles data (-> t0-0 particle0))) + (a2-6 (-> this particles data (-> t0-0 particle1))) + (f0-1 (* 2.0 (-> t0-0 constraint-length-half))) + (a3-4 (vector-! (new 'stack-no-clear 'vector) (-> a2-6 pos) (-> a1-5 pos))) + ) + 0.0 + (let ((f1-2 (* f0-1 f0-1))) + 0.0 + 0.0 + (let* ((f1-4 (/ (+ f1-2 (vector-dot a3-4 a3-4)) (* 2.0 f0-1))) + (f0-3 (/ (- f1-4 f0-1) f1-4)) + ) + (vector-float*! a3-4 a3-4 (* 0.5 f0-3)) + ) + ) + (let ((f1-6 1.0) + (f0-5 -1.0) + ) + (cond + ((< (-> t0-0 particle0) (the-as uint 7)) + (set! f1-6 (* 0.0 f1-6)) + (set! f0-5 (* 2.0 f0-5)) + ) + ((< (-> t0-0 particle1) (the-as uint 7)) + (set! f1-6 (* 2.0 f1-6)) + (set! f0-5 (* 0.0 f0-5)) + ) + ) + (vector+float*! (-> a1-5 pos) (-> a1-5 pos) a3-4 f1-6) + (vector+float*! (-> a2-6 pos) (-> a2-6 pos) a3-4 f0-5) + ) + ) + ) + (none) + ) + +(defmethod-mips2c "(method 21 cloth-system)" 21 cloth-system) + +;; WARN: Return type mismatch symbol vs none. +(defmethod cloth-system-method-23 ((this cloth-system)) + (local-vars + (sv-32 int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 matrix) + (sv-68 verlet-particle) + (sv-72 verlet-particle) + (sv-76 verlet-particle) + (sv-80 verlet-particle) + (sv-144 vector) + (sv-148 vector) + (sv-152 float) + (sv-156 float) + (sv-160 vector) + (sv-164 float) + (sv-168 float) + (sv-208 vector) + (sv-212 float) + (sv-216 vector) + ) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 -1) + (set! sv-64 (new 'stack-no-clear 'matrix)) + (dotimes (s5-0 (+ (-> this cloth-height) -1)) + (dotimes (s4-0 (+ (-> this cloth-width) -1)) + (set! sv-68 (-> this particles data sv-32)) + (set! sv-72 (-> this particles data (+ sv-32 1))) + (set! sv-76 (-> this particles data (+ sv-32 (-> this cloth-width)))) + (set! sv-80 (-> this particles data (+ (-> this cloth-width) 1 sv-32))) + (set! sv-144 (vector-! (new 'stack-no-clear 'vector) (-> sv-80 pos) (-> sv-68 pos))) + (set! sv-148 (vector-! (new 'stack-no-clear 'vector) (-> sv-72 pos) (-> sv-76 pos))) + (set! sv-152 (the-as float 0.0)) + (set! sv-156 (the-as float 0.0)) + (set! sv-160 (new 'stack-no-clear 'vector)) + (set! sv-164 (the-as float 0.0)) + (vector-float*! sv-160 (-> sv-72 pos) (-> sv-72 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-68 pos) (-> sv-68 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-76 pos) (-> sv-76 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-80 pos) (-> sv-80 mass-scale)) + (vector-float*! sv-160 sv-160 0.25) + (set! sv-40 0) + (set! sv-56 -1) + (set! (-> sv-64 rvec quad) (the-as uint128 0)) + (dotimes (s3-0 (-> this collision-constraints length)) + (when (!= s3-0 sv-56) + (let ((v1-39 (-> this collision-constraints data s3-0))) + (set! sv-164 (the-as float 204.8)) + (set! sv-168 (the-as float 0.0)) + (set! sv-168 (+ (-> v1-39 r) (the-as float sv-164))) + (set! sv-208 (vector-! (new 'stack-no-clear 'vector) sv-160 (the-as vector v1-39))) + ) + (set! sv-212 (the-as float 0.0)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-212 (vector-dot sv-208 sv-208)) + (when (< sv-212 (* sv-168 sv-168)) + (vector-normalize-copy! sv-216 sv-208 sv-168) + (vector-! sv-216 sv-216 sv-208) + (when (and (> sv-40 0) (< (vector-dot sv-216 (the-as vector sv-64)) 0.0)) + ) + (vector+float*! (-> sv-68 pos) (-> sv-68 pos) sv-216 (-> sv-68 mass-scale)) + (vector+float*! (-> sv-72 pos) (-> sv-72 pos) sv-216 (-> sv-72 mass-scale)) + (vector+float*! (-> sv-76 pos) (-> sv-76 pos) sv-216 (-> sv-76 mass-scale)) + (vector+float*! (-> sv-80 pos) (-> sv-80 pos) sv-216 (-> sv-80 mass-scale)) + (vector+! sv-160 sv-160 sv-216) + (set! sv-40 (+ sv-40 1)) + ) + ) + ) + (set! sv-32 (+ sv-32 1)) + ) + (set! sv-32 (+ sv-32 1)) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod cloth-system-method-22 ((this cloth-system)) + (local-vars + (v1-25 float) + (v1-27 float) + (sv-16 sphere) + (sv-24 int) + (sv-32 verlet-particle) + (sv-36 verlet-particle) + (sv-40 verlet-particle) + (sv-44 verlet-particle) + (sv-96 vector) + (sv-100 vector) + (sv-104 float) + (sv-108 float) + (sv-112 vector) + (sv-116 float) + (sv-120 float) + (sv-160 float) + (sv-164 float) + (sv-168 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (dotimes (s5-0 (-> this collision-constraints length)) + (set! sv-16 (-> this collision-constraints data s5-0)) + (set! sv-24 0) + (dotimes (s4-0 (+ (-> this cloth-height) -1)) + (dotimes (s3-0 (+ (-> this cloth-width) -1)) + (set! sv-32 (-> this particles data sv-24)) + (set! sv-36 (-> this particles data (+ sv-24 1))) + (set! sv-40 (-> this particles data (+ sv-24 (-> this cloth-width)))) + (set! sv-44 (-> this particles data (+ (-> this cloth-width) 1 sv-24))) + (set! sv-96 (vector-! (new 'stack-no-clear 'vector) (-> sv-44 pos) (-> sv-32 pos))) + (set! sv-100 (vector-! (new 'stack-no-clear 'vector) (-> sv-36 pos) (-> sv-40 pos))) + (set! sv-104 (the-as float 0.0)) + (set! sv-108 (the-as float 0.0)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! sv-116 (the-as float 0.0)) + (.lvf vf1 (&-> sv-96 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-25 vf1) + (set! sv-104 v1-25) + (.lvf vf1 (&-> sv-100 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-27 vf1) + (set! sv-108 v1-27) + (if (< sv-108 sv-104) + (vector+float*! sv-112 (-> sv-32 pos) sv-96 0.5) + (vector+float*! sv-112 (-> sv-40 pos) sv-100 0.5) + ) + (set! sv-116 (the-as float 0.0)) + (set! sv-120 (the-as float 0.0)) + (set! sv-120 (-> sv-16 r)) + (set! sv-160 (the-as float (vector-! (new 'stack-no-clear 'vector) sv-112 (the-as vector sv-16)))) + (set! sv-164 (the-as float 0.0)) + (set! sv-168 (new 'stack-no-clear 'vector)) + (set! sv-164 (vector-dot (the-as vector sv-160) (the-as vector sv-160))) + (when (< sv-164 (* sv-120 sv-120)) + (vector-normalize-copy! sv-168 (the-as vector sv-160) sv-120) + (vector-! sv-168 sv-168 (the-as vector sv-160)) + (vector+! (-> sv-32 pos) (-> sv-32 pos) sv-168) + (vector+! (-> sv-36 pos) (-> sv-36 pos) sv-168) + (vector+! (-> sv-40 pos) (-> sv-40 pos) sv-168) + (vector+! (-> sv-44 pos) (-> sv-44 pos) sv-168) + ) + (set! sv-24 (+ sv-24 1)) + ) + (set! sv-24 (+ sv-24 1)) + ) + ) + (none) + ) + ) + +(defmethod run-one-iteration ((this cloth-system)) + "Run one iteration of the system." + (enforce-constraints-1 this) + (cloth-system-method-21 this) + (dotimes (v1-4 0) + (let* ((a0-6 (-> this disc-collision-constraints data v1-4)) + (a2-0 (-> a0-6 start-particle-index)) + (a3-0 (-> a0-6 end-particle-index)) + (a1-2 (max 0 (min a2-0 (+ (-> this particles length) -1)))) + ) + (if (< a3-0 0) + (set! a3-0 (+ (-> this particles length) -1)) + ) + (let ((a2-8 (max 0 (min a3-0 (+ (-> this particles length) -1))))) + (while (>= a2-8 a1-2) + (let ((a3-7 (-> this particles data a1-2 pos))) + 0.0 + (let ((t1-0 (new 'stack-no-clear 'vector)) + (t0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! t1-0 a3-7 (-> a0-6 origin)) + (let ((f0-2 (vector-dot t1-0 (-> a0-6 normal)))) + (when (< 0.0 f0-2) + (vector+float*! t0-7 a3-7 (-> a0-6 normal) (* -1.0 f0-2)) + (if (< (vector-length (vector-! (new 'stack-no-clear 'vector) t0-7 (-> a0-6 origin))) (-> a0-6 radius)) + (set! (-> a3-7 quad) (-> t0-7 quad)) + ) + ) + ) + ) + ) + (+! a1-2 1) + ) + ) + ) + ) + (dotimes (v1-7 (-> this anchor-points length)) + (set! (-> this particles data (-> this anchor-points data v1-7 particle-index) pos quad) + (-> this anchor-points data v1-7 anchor-pos quad) + ) + (set! (-> this particles data (-> this anchor-points data v1-7 particle-index) mass-scale) 0.0) + ) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (dotimes (v1-13 (-> this cloth-height)) + (let ((a0-19 (-> this particles data (+ (* v1-13 (-> this cloth-width)) -1 (-> this cloth-width)))) + (a1-20 (the-as object (&-> (-> this particles) _data (* (* 48 (-> this cloth-width)) v1-13)))) + ) + (set! (-> a0-19 mass-scale) 0.0) + (set! (-> a0-19 pos quad) (-> (the-as vector (&-> (the-as vector a1-20) x)) quad)) + (set! (-> a0-19 prev-pos quad) (-> (the-as vector (&-> (the-as vector a1-20) x)) quad)) + ) + ) + ) + (when (logtest? (-> this flags) (cloth-flag check-ground)) + (dotimes (v1-19 (-> this particles length)) + (let ((a0-25 (-> this particles data v1-19))) + (set! (-> a0-25 pos y) (fmax (-> a0-25 pos y) (-> this ground-constraint))) + ) + ) + ) + 0 + (none) + ) + +(defun get-neighboring-faces ((arg0 vector4w) (arg1 int) (arg2 int) (arg3 int) (arg4 int)) + (let ((v0-0 0)) + (when (and (< arg2 (+ arg4 -1)) (< arg1 (+ arg3 -1))) + (set! (-> arg0 data v0-0) (+ (* arg2 (+ arg3 -1)) arg1)) + (+! v0-0 1) + ) + (when (and (> arg2 0) (< arg1 (+ arg3 -1))) + (set! (-> arg0 data v0-0) (+ (* (+ arg2 -1) (+ arg3 -1)) arg1)) + (+! v0-0 1) + ) + (when (and (> arg2 0) (> arg1 0)) + (set! (-> arg0 data v0-0) (+ arg1 -1 (* (+ arg2 -1) (+ arg3 -1)))) + (+! v0-0 1) + ) + (when (and (< arg2 (+ arg4 -1)) (> arg1 0)) + (set! (-> arg0 data v0-0) (+ arg1 -1 (* arg2 (+ arg3 -1)))) + (+! v0-0 1) + ) + v0-0 + ) + ) + +(kmemopen global "cloth-buffers") + +(define *normal-array* (the-as (inline-array vector) (malloc 'global 6400))) + +(kmemclose) + +(defmethod cloth-system-method-27 ((this cloth-system) (arg0 vector) (arg1 int) (arg2 int) (arg3 current-position-info)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (new 'stack-no-clear 'vector4w))) + 0 + (let ((v1-1 (get-neighboring-faces s3-0 arg1 arg2 (-> this cloth-width) (-> this cloth-height)))) + (set! (-> arg0 quad) (the-as uint128 0)) + (dotimes (a0-3 v1-1) + (vector+! arg0 arg0 (-> *normal-array* (-> s3-0 data a0-3))) + ) + ) + ) + (let ((v1-4 arg0)) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-4 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-5 f0-0)) + (.mov vf3 a0-5) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> v1-4 quad) vf1) + ) + (if (-> arg3 face-normal-needs-flip?) + (vector-float*! arg0 arg0 -1.0) + ) + (vector-float*! arg0 arg0 (-> this face-normal-scalar)) + arg0 + ) + ) + +;; WARN: Return type mismatch int vs rgba. +(defun light-vertex ((arg0 current-position-info) (arg1 vector)) + (local-vars (v0-0 uint128) (v0-1 uint128) (v0-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg0 lights direction 0 quad)) + (.lvf vf2 (&-> arg0 lights direction 1 quad)) + (.lvf vf3 (&-> arg0 lights direction 2 quad)) + (.lvf vf4 (&-> arg0 lights color 0 quad)) + (.lvf vf5 (&-> arg0 lights color 1 quad)) + (.lvf vf6 (&-> arg0 lights color 2 quad)) + (.lvf vf7 (&-> arg0 lights ambient quad)) + (.lvf vf10 (&-> (-> arg0 scale) quad)) + (.lvf vf11 (&-> (-> arg0 clamp-col) quad)) + (.lvf vf8 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf8) + (.add.mul.y.vf acc vf2 vf8 acc) + (.add.mul.z.vf vf8 vf3 vf8 acc) + (.max.x.vf vf8 vf8 vf0) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf8 acc) + (.add.mul.y.vf acc vf5 vf8 acc) + (.add.mul.z.vf vf9 vf6 vf8 acc) + (.mul.x.vf vf9 vf9 vf10) + (.min.vf vf9 vf9 vf11) + (.ftoi.vf vf9 vf9) + (.mov v0-0 vf9) + (.ppach v0-1 (the-as uint128 0) v0-0) + (.ppacb v0-2 (the-as uint128 0) v0-1) + (the-as rgba v0-2) + ) + ) + +(defmethod cloth-system-method-28 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info)) + (local-vars + (sv-16 verlet-particle) + (sv-80 vector) + (sv-84 vector) + (sv-88 vector) + (sv-92 symbol) + (sv-112 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-16 (-> this particles data (+ arg0 (* arg1 (-> this cloth-width))))) + (set! sv-80 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) + (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index0))) 32) + ) + ) + (the-as vector sv-16) + ) + ) + (set! sv-84 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) + (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index1))) 32) + ) + ) + (the-as vector sv-16) + ) + ) + (set! sv-88 (new 'stack-no-clear 'vector)) + (set! sv-92 (the-as symbol #f)) + (vector-cross! sv-88 sv-80 sv-84) + (let ((a0-10 (-> arg2 cross-index0))) + (set! (-> arg2 cross-index0) (-> arg2 cross-index1)) + (set! (-> arg2 cross-index1) a0-10) + ) + (let ((s2-0 sv-88) + (s0-0 sv-16) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-112 s1-0) + (let ((v0-0 (math-camera-pos))) + (.lvf vf4 (&-> s0-0 pos quad)) + (.lvf vf5 (&-> v0-0 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-112 quad) vf6) + (let ((v1-12 (< 0.0 (vector-dot s1-0 s2-0)))) + (when (!= v1-12 (-> arg2 face-normal-needs-flip?)) + (set! (-> arg2 face-normal-needs-flip?) (not (-> arg2 face-normal-needs-flip?))) + (cloth-system-method-30 + this + (the-as int (-> arg2 last-2-x-index)) + (the-as int (-> arg2 last-2-y-index)) + arg2 + 1 + ) + (cloth-system-method-30 this (the-as int (-> arg2 last-x-index)) (the-as int (-> arg2 last-y-index)) arg2 1) + ) + ) + ) + (cloth-system-method-30 this arg0 arg1 arg2 0) + (none) + ) + ) + +(defmethod cloth-system-method-31 ((this cloth-system) (arg0 current-position-info)) + (let ((a0-1 (-> arg0 last-normal)) + (s5-0 (+ (-> arg0 current-vert-index) -1)) + ) + (let ((v1-1 (-> arg0 backside-normal))) + (vector+float*! + (the-as vector (+ (the-as uint (-> this strip2 data 0 pos)) (* s5-0 32))) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) (* s5-0 32))) + a0-1 + (-> this thickness-scalar) + ) + (set! (-> this strip2 data s5-0 col) (light-vertex arg0 v1-1)) + ) + (set! (-> this strip2 data s5-0 stq x) (-> this strip data s5-0 stq x)) + (set! (-> this strip2 data s5-0 stq y) (-> this strip data s5-0 stq y)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod cloth-system-method-32 ((this cloth-system) (arg0 vector) (arg1 int) (arg2 int) (arg3 current-position-info)) + (cond + ((> (-> this mesh cloth-thickness length) 0) + (let ((v1-5 (+ arg1 (* arg2 (-> this cloth-width))))) + 0.0 + (let ((f0-4 (* -1.0 + (-> this mesh thickness-scalar) + (-> this face-normal-scalar) + (the float (-> this mesh cloth-thickness data v1-5)) + ) + ) + ) + (vector-float*! (-> arg3 backside-normal) arg0 -1.0) + (vector-float*! arg0 arg0 f0-4) + ) + ) + ) + (else + (vector-float*! (-> arg3 backside-normal) arg0 -1.0) + (vector-float*! arg0 arg0 (* 204.8 + (/ (the float arg2) (the float (+ (-> this cloth-height) -1))) + (-> this thickness-scalar) + (-> this face-normal-scalar) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod cloth-system-method-30 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info) (arg3 int)) + (let ((s1-0 (+ arg0 (* arg1 (-> this cloth-width))))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> arg2 current-vert-index) 32))) + ) + (-> this particles data s1-0 pos quad) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq z) (the-as float arg3)) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (cloth-system-method-27 this s0-0 arg0 arg1 arg2) + (set! (-> this strip data (-> arg2 current-vert-index) col) (light-vertex arg2 s0-0)) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq x) (-> this mesh mesh s1-0 u)) + (set! (-> this strip data (-> arg2 current-vert-index) stq y) (-> this mesh mesh s1-0 v)) + ) + (when (zero? arg3) + (set! (-> arg2 last-2-x-index) (-> arg2 last-x-index)) + (set! (-> arg2 last-2-y-index) (-> arg2 last-y-index)) + (set! (-> arg2 last-x-index) (the-as uint arg0)) + (set! (-> arg2 last-y-index) (the-as uint arg1)) + ) + (+! (-> arg2 current-vert-index) 1) + (none) + ) + +(defmethod cloth-system-method-29 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info) (arg3 int)) + (let ((s2-0 (+ arg0 (* arg1 (-> this cloth-width))))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> arg2 current-vert-index) 32))) + ) + (-> this particles data s2-0 pos quad) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq z) (the-as float arg3)) + (let ((s1-0 (-> arg2 last-normal))) + (cloth-system-method-27 this s1-0 arg0 arg1 arg2) + (set! (-> this strip data (-> arg2 current-vert-index) col) (light-vertex arg2 s1-0)) + (set! (-> this strip data (-> arg2 current-vert-index) stq x) (-> this mesh mesh s2-0 u)) + (set! (-> this strip data (-> arg2 current-vert-index) stq y) (-> this mesh mesh s2-0 v)) + (cloth-system-method-32 this s1-0 arg0 arg1 arg2) + ) + ) + (let ((v0-3 (+ (-> arg2 current-vert-index) 1))) + (set! (-> arg2 current-vert-index) v0-3) + v0-3 + ) + ) + +(defmethod cloth-system-method-26 ((this cloth-system)) + (* (+ (-> this cloth-width) -1) (+ (-> this cloth-height) -1)) + (dotimes (v1-3 (+ (-> this cloth-height) -1)) + (dotimes (a1-2 (+ (-> this cloth-width) -1)) + (let* ((a2-0 a1-2) + (t1-0 (+ (* v1-3 (-> this cloth-width)) a2-0)) + (a2-1 (new 'stack-no-clear 'vector)) + (a3-2 (new 'stack-no-clear 'vector)) + (t0-4 (+ a1-2 (* v1-3 (+ (-> this cloth-width) -1)))) + ) + (vector-! + a2-1 + (the-as vector (-> this particles data t1-0)) + (the-as vector (-> this particles data (+ (-> this cloth-width) 1 t1-0))) + ) + (vector-! + a3-2 + (the-as vector (-> this particles data (+ t1-0 1))) + (the-as vector (-> this particles data (+ t1-0 (-> this cloth-width)))) + ) + (vector-cross! (-> *normal-array* t0-4) a2-1 a3-2) + ) + ) + ) + 0 + (none) + ) + +(defmethod cloth-system-method-33 ((this cloth-system) (lights vu-lights)) + (vu-lights<-light-group! lights (the-as light-group (-> *time-of-day-context* light-group))) + (none) + ) + +(defmethod cloth-system-method-33 ((this cloth-on-skeleton) (lights vu-lights)) + (let ((draw-ctrl (-> (the-as process-focusable (handle->process (-> this owner))) draw))) + (cond + ((logtest? (-> draw-ctrl global-effect) (draw-control-global-effect no-textures)) + (logclear! (-> this strip flags) (prim-flags texture-enable)) + (logclear! (-> this strip2 flags) (prim-flags texture-enable)) + (logclear! (-> this strip3 flags) (prim-flags texture-enable)) + ) + (else + (logior! (-> this strip flags) (prim-flags texture-enable)) + (logior! (-> this strip2 flags) (prim-flags texture-enable)) + (logior! (-> this strip3 flags) (prim-flags texture-enable)) + ) + ) + (calc-vu1-lights lights draw-ctrl #f) + ) + (none) + ) + +(defmethod cloth-system-method-25 ((this cloth-system)) + (local-vars (v0-1 texture-id) (v0-4 texture-id) (a0-72 int) (a0-74 int) (sv-224 int)) + (cond + ((and (not (logtest? (cloth-flag using-alt-tex) (-> this flags))) + (and (>= (-> *game-info* skill-total) 600.0) (-> this params alt-tex-name)) + ) + (logior! (-> this flags) (cloth-flag using-alt-tex)) + (set! (-> this strip tex-id) (lookup-texture-id-by-name (-> this params alt-tex-name) (the-as string #f))) + (set! v0-1 + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 tex-id) (lookup-texture-id-by-name (-> this params alt-tex-name2) (the-as string #f))) + (set! v0-1 (lookup-texture-id-by-name (-> this params alt-tex-name3) (the-as string #f))) + (set! (-> this strip3 tex-id) v0-1) + v0-1 + ) + ) + ) + ((and (logtest? (cloth-flag using-alt-tex) (-> this flags)) (< (-> *game-info* skill-total) 600.0)) + (logclear! (-> this flags) (cloth-flag using-alt-tex)) + (set! (-> this strip tex-id) (lookup-texture-id-by-name (-> this params tex-name) (the-as string #f))) + (set! v0-4 + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 tex-id) (lookup-texture-id-by-name (-> this params tex-name2) (the-as string #f))) + (set! v0-4 (lookup-texture-id-by-name (-> this params tex-name3) (the-as string #f))) + (set! (-> this strip3 tex-id) v0-4) + v0-4 + ) + ) + ) + ) + (when (logtest? (-> this flags) (cloth-flag no-draw)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + (return 0) + ) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip3 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip3 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip alpha) (new 'static 'gs-alpha)) + (set! (-> this strip2 alpha) (-> this strip alpha)) + (set! (-> this strip3 alpha) (-> this strip alpha)) + (set! (-> this strip clamp) (new 'static 'gs-clamp)) + (set! (-> this strip2 clamp) (new 'static 'gs-clamp)) + (set! (-> this strip3 clamp) (new 'static 'gs-clamp)) + (logior! (-> this strip flags) (prim-flags fog-enable)) + (logior! (-> this strip2 flags) (prim-flags fog-enable)) + (logior! (-> this strip3 flags) (prim-flags fog-enable)) + (cloth-system-method-26 this) + (let ((s5-0 (new 'stack-no-clear 'current-position-info))) + (let ((s4-0 0) + (s3-0 1) + (s2-0 1) + (s1-0 -1) + ) + (set! (-> s5-0 current-vert-index) (the-as uint 0)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (cloth-system-method-33 this (-> s5-0 lights)) + (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) + (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) + (dotimes (s0-0 (+ (-> this cloth-height) -1)) + (set! sv-224 0) + (while (< sv-224 (-> this cloth-width)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (cloth-system-method-29 this s4-0 s3-0 s5-0 0) + (cloth-system-method-31 this s5-0) + (cloth-system-method-29 this s4-0 (+ s3-0 s1-0) s5-0 0) + (cloth-system-method-31 this s5-0) + (+! s4-0 s2-0) + (set! sv-224 (+ sv-224 1)) + ) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq quad) + (-> this strip data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip2 data (-> s5-0 current-vert-index) stq quad) + (-> this strip2 data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip2 data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (+! (-> s5-0 current-vert-index) 1) + (set! s2-0 (* -1 s2-0)) + (set! s1-0 (* -1 s1-0)) + (+! s4-0 s2-0) + (if (< s1-0 0) + (+! s3-0 2) + ) + ) + ) + (set! (-> this strip num-verts) (-> s5-0 current-vert-index)) + (set! (-> this strip2 num-verts) (-> s5-0 current-vert-index)) + ) + 0 + (let ((v1-110 0)) + (let ((a0-67 1)) + (dotimes (a1-27 (-> this cloth-width)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-67 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-67 stq quad)) + (let ((v1-111 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-111 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-67 32)))) + ) + (set! (-> this strip3 data v1-111 stq quad) (-> this strip2 data a0-67 stq quad)) + (set! v1-110 (+ v1-111 1)) + ) + (+! a0-67 2) + ) + ) + (let ((a0-71 (* (-> this cloth-width) 2))) + (dotimes (a1-28 (+ (-> this cloth-height) -1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-71 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-71 stq quad)) + (set! (-> this strip3 data v1-110 stq z) 0.0) + (let ((v1-112 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-112 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-71 32)))) + ) + (set! (-> this strip3 data v1-112 stq quad) (-> this strip2 data a0-71 stq quad)) + (set! (-> this strip3 data v1-112 stq z) 0.0) + (set! v1-110 (+ v1-112 1)) + ) + (if (= (logand a1-28 1) 1) + (+! a0-71 (* (-> this cloth-width) 4)) + (+! a0-71 2) + ) + ) + (let ((a1-31 -2)) + (cond + ((= (logand (-> this cloth-height) 1) 1) + (set! a0-72 (- a0-71 (* (-> this cloth-width) 4))) + (set! a1-31 (* -1 a1-31)) + ) + (else + (set! a0-72 (+ a0-71 a1-31 a1-31)) + ) + ) + (dotimes (a2-44 (-> this cloth-width)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-72 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-72 stq quad)) + (let ((v1-113 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-113 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-72 32)))) + ) + (set! (-> this strip3 data v1-113 stq quad) (-> this strip2 data a0-72 stq quad)) + (set! v1-110 (+ v1-113 1)) + ) + (+! a0-72 a1-31) + ) + ) + ) + (if (not (logtest? (-> this cloth-height) 1)) + (set! a0-74 (+ a0-72 2)) + (set! a0-74 (+ a0-72 -2 1)) + ) + (dotimes (a1-38 (+ (-> this cloth-height) -1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-74 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-74 stq quad)) + (set! (-> this strip3 data v1-110 stq z) 0.0) + (let ((v1-114 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-114 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-74 32)))) + ) + (set! (-> this strip3 data v1-114 stq quad) (-> this strip2 data a0-74 stq quad)) + (set! (-> this strip3 data v1-114 stq z) 0.0) + (set! v1-110 (+ v1-114 1)) + ) + (if (not (logtest? (- (-> this cloth-height) (+ a1-38 1)) 1)) + (set! a0-74 (- a0-74 (* (-> this cloth-width) 4))) + (+! a0-74 -2) + ) + ) + (set! (-> this strip3 num-verts) (the-as uint v1-110)) + ) + 0 + ) + +(defmethod post-physics-update ((this cloth-system)) + (when (logtest? (-> this flags) (cloth-flag no-draw)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + (return 0) + ) + (if (logtest? (-> this flags) (cloth-flag double-sided)) + (cloth-system-method-25 this) + (cloth-system-method-24 this) + ) + ) + +(defmethod post-physics-update ((this cloth-on-skeleton)) + (let ((a1-0 (handle->process (-> this owner)))) + (if (and a1-0 (logtest? (-> (the-as process-focusable a1-0) draw status) (draw-control-status on-screen))) + (call-parent-method this) + ) + ) + ) + +(defmethod cloth-system-method-24 ((this cloth-system)) + (local-vars (sv-16 int) (sv-24 int) (sv-32 int) (sv-40 int)) + (cloth-system-method-26 this) + (set! sv-16 0) + (set! sv-24 1) + (set! sv-32 1) + (set! sv-40 -1) + (let ((s5-0 (new 'stack-no-clear 'current-position-info))) + (set! (-> s5-0 current-vert-index) (the-as uint 0)) + (set! (-> s5-0 last-x-index) (the-as uint -1)) + (set! (-> s5-0 last-y-index) (the-as uint -1)) + (set! (-> s5-0 last-2-x-index) (the-as uint -1)) + (set! (-> s5-0 last-2-y-index) (the-as uint -1)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) + (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) + (vu-lights<-light-group! (-> s5-0 lights) (the-as light-group (-> *time-of-day-context* light-group))) + (dotimes (s4-0 (+ (-> this cloth-height) -1)) + (let* ((a0-17 (+ sv-16 (/ (+ sv-32 -1) 2) (* (+ sv-24 (/ (+ sv-40 -1) 2)) (+ (-> this cloth-width) -1)))) + (s3-0 (-> *normal-array* a0-17)) + (s1-0 (-> this particles data (+ sv-16 (* sv-24 (-> this cloth-width))))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s2-0 (the-as vector s1-0) (math-camera-pos)) + (set! (-> s5-0 face-normal-needs-flip?) (< 0.0 (vector-dot s2-0 s3-0))) + ) + (cloth-system-method-30 this sv-16 sv-24 s5-0 0) + (cloth-system-method-30 this sv-16 (+ sv-24 sv-40) s5-0 0) + (set! (-> s5-0 cross-index0) 2) + (set! (-> s5-0 cross-index1) 1) + (set! sv-16 (+ sv-16 sv-32)) + (let ((s3-1 1) + (s2-1 (+ (-> this cloth-width) -1)) + ) + (while (>= s2-1 s3-1) + (cloth-system-method-28 this sv-16 sv-24 s5-0) + (cloth-system-method-28 this sv-16 (+ sv-24 sv-40) s5-0) + (set! sv-16 (+ sv-16 sv-32)) + (+! s3-1 1) + ) + ) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq quad) + (-> this strip data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (+! (-> s5-0 current-vert-index) 1) + (set! sv-32 (* -1 sv-32)) + (set! sv-40 (* -1 sv-40)) + (set! sv-16 (+ sv-16 sv-32)) + (if (< sv-40 0) + (set! sv-24 (+ sv-24 2)) + ) + ) + (set! (-> this strip num-verts) (-> s5-0 current-vert-index)) + ) + 0 + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod reset-locations ((this cloth-on-skeleton)) + (let ((s5-0 (handle->process (-> this owner)))) + (when (nonzero? (-> this mesh anchor-transforms)) + (dotimes (s4-0 (-> this mesh anchor-transforms length)) + (set! (-> this anchor-points data s4-0 particle-index) + (the-as uint (-> this mesh anchor-transforms data s4-0 constraint-index)) + ) + (cond + (s5-0 + (let ((a2-0 + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh anchor-transforms data s4-0 joint) + bone + transform + ) + ) + ) + (vector-matrix*! + (the-as vector (-> this anchor-points data s4-0)) + (the-as vector (-> this mesh anchor-transforms data s4-0)) + a2-0 + ) + ) + (vector-float*! + (the-as vector (-> this anchor-points data s4-0)) + (the-as vector (-> this anchor-points data s4-0)) + (/ 1.0 (-> this anchor-points data s4-0 anchor-pos w)) + ) + (set! (-> this anchor-points data s4-0 anchor-pos w) 1.0) + ) + (else + (set! (-> this anchor-points data s4-0 anchor-pos quad) + (-> this mesh anchor-transforms data s4-0 offset quad) + ) + ) + ) + ) + ) + (when (nonzero? (-> this mesh sphere-transforms)) + (dotimes (s4-1 (-> this mesh sphere-transforms length)) + (cond + (s5-0 + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this collision-constraints data s4-1 quad)) + (set! (-> s3-0 w) 1.0) + (vector-matrix*! + s3-0 + (the-as vector (-> this mesh sphere-transforms data s4-1)) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh sphere-transforms data s4-1 joint) + bone + transform + ) + ) + (vector-float*! s3-0 s3-0 (/ 1.0 (-> s3-0 w))) + (set! (-> this collision-constraints data s4-1 x) (-> s3-0 x)) + (set! (-> this collision-constraints data s4-1 y) (-> s3-0 y)) + (set! (-> this collision-constraints data s4-1 z) (-> s3-0 z)) + ) + ) + (else + (set! (-> this collision-constraints data s4-1 quad) (-> this mesh sphere-transforms data s4-1 offset quad)) + ) + ) + (set! (-> this collision-constraints data s4-1 r) (-> this mesh sphere-transforms data s4-1 radius)) + ) + ) + (when (nonzero? (-> this mesh disc-transforms)) + (dotimes (s4-2 (-> this mesh disc-transforms length)) + (cond + (s5-0 + (vector-matrix*! + (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) + (the-as vector (-> this mesh disc-transforms data s4-2)) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh disc-transforms data s4-2 joint) + bone + transform + ) + ) + (vector-rotate*! + (the-as vector (-> this disc-collision-constraints data s4-2)) + (the-as vector (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2))) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh disc-transforms data s4-2 joint) + bone + transform + ) + ) + ) + (else + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) + ) + (-> this mesh disc-transforms data s4-2 offset quad) + ) + (set! (-> this disc-collision-constraints data s4-2 normal quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2)))) + ) + ) + ) + (set! (-> this disc-collision-constraints data s4-2 radius) (-> this mesh disc-transforms data s4-2 radius)) + (set! (-> this disc-collision-constraints data s4-2 start-particle-index) + (-> this mesh disc-transforms data s4-2 start-particle-index) + ) + (set! (-> this disc-collision-constraints data s4-2 end-particle-index) + (-> this mesh disc-transforms data s4-2 end-particle-index) + ) + ) + ) + ) + (none) + ) + +(defmethod reset-locations ((this cloth-system)) + 0 + (none) + ) + +(define *once* #f) + +(defmethod debug-draw-spheres ((this cloth-system)) + (dotimes (s5-0 (-> this collision-constraints length)) + (add-debug-sphere + #t + (bucket-id debug) + (-> this collision-constraints data s5-0) + (-> this collision-constraints data s5-0 r) + *color-cyan* + ) + (format *stdcon* "Transform ~d, size ~f~%" s5-0 (* 0.00024414062 (-> this collision-constraints data s5-0 r))) + ) + (dotimes (s5-1 (-> this disc-collision-constraints length)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s5-1))) + (-> this disc-collision-constraints data s5-1 radius) + *color-red* + ) + ) + 0 + (none) + ) + +(define *cloth-fade-alpha* (new 'static 'gs-alpha :b #x1 :d #x1)) + +;; WARN: Return type mismatch symbol vs int. +(defmethod cloth-system-method-25 ((this cloth-on-skeleton)) + (call-parent-method this) + (let ((proc (handle->process (-> this owner)))) + (the-as int (when (and proc (nonzero? (-> (the-as process-drawable proc) draw))) + (let ((draw-ctrl (-> (the-as process-focusable proc) draw))) + (let ((fade (-> draw-ctrl force-fade))) + (when (logtest? (-> draw-ctrl status) (draw-control-status force-fade)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip alpha) *cloth-fade-alpha*) + (dotimes (a0-14 (the-as int (-> this strip num-verts))) + (set! (-> this strip data a0-14 col a) fade) + ) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 alpha) *cloth-fade-alpha*) + (set! (-> this strip3 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip3 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip3 alpha) *cloth-fade-alpha*) + (dotimes (a0-25 (the-as int (-> this strip2 num-verts))) + (set! (-> this strip2 data a0-25 col a) fade) + ) + (dotimes (a0-28 (the-as int (-> this strip3 num-verts))) + (set! (-> this strip3 data a0-28 col a) fade) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod accumulate-external-forces! ((this cloth-on-skeleton)) + "If this cloth system has the wind flag, calculate the wind force." + (when (logtest? (-> this flags) (cloth-flag use-parent-momentum)) + (let ((proc (handle->process (-> this owner)))) + (if proc + (set! (-> this momentum quad) (-> (the-as process-drawable proc) root transv quad)) + ) + ) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch int vs cloth-flag. +(defun symbol->cloth-flags ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as cloth-flag (cond + ((= v1-0 'local-space) + #x40000 + ) + ((= v1-0 'local-space-xyz) + #x80000 + ) + ((= v1-0 'local-space-y) + #x100000 + ) + ((= v1-0 'riding) + #x10000 + ) + (else + 0 + ) + ) + ) + ) + ) + +(defmethod cloth-system-cmd-handler ((this cloth-system) (command pair)) + (let ((msg (-> command car))) + (case msg + (('scene-reset-frame) + (if (logtest? (cloth-flag use-old-resets) (-> this flags)) + (logior! (-> this flags) (cloth-flag need-reset)) + (logior! (-> this flags) (cloth-flag local-space)) + ) + ) + (('set-flags 'clear-flags) + (let ((flags (cloth-flag))) + (let* ((s3-0 (-> command cdr)) + (a0-9 (-> (the-as pair s3-0) car)) + ) + (while (not (null? s3-0)) + (set! flags (logior (the-as cloth-flag flags) (symbol->cloth-flags (the-as symbol a0-9)))) + (set! s3-0 (-> (the-as pair s3-0) cdr)) + (set! a0-9 (-> (the-as pair s3-0) car)) + ) + ) + (if (= msg 'set-flags) + (logior! (-> this flags) flags) + (logclear! (-> this flags) flags) + ) + ) + ) + (('hide) + (hide! this) + ) + (('show) + (logclear! (-> this flags) (cloth-flag hidden)) + ) + (('wind-strength) + (set! (-> this wind-constant) (command-get-float (-> (the-as pair (-> command cdr)) car) 0.0)) + ) + (('reset) + (logior! (-> this flags) (cloth-flag need-reset)) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/process-drawable/process-drawable.gc b/goal_src/jak3/engine/process-drawable/process-drawable.gc index 64dde55087..af9c9cdc5d 100644 --- a/goal_src/jak3/engine/process-drawable/process-drawable.gc +++ b/goal_src/jak3/engine/process-drawable/process-drawable.gc @@ -414,7 +414,7 @@ (let ((proc (handle->process (-> gp-0 s4-0)))) (when proc (dotimes (i (-> (the-as process-drawable proc) draw cloth-instances length)) - (init! (-> (the-as process-drawable proc) draw cloth-instances i)) + (update! (-> (the-as process-drawable proc) draw cloth-instances i)) ) ) ) @@ -919,7 +919,7 @@ (set! (-> this draw cloth-instances length) (-> this draw cloth-instances allocated-length)) (dotimes (s4-4 (-> arg0 clothing length)) (set! (-> this draw cloth-instances s4-4) (new 'process 'cloth-on-skeleton)) - (cloth-base-method-10 (-> this draw cloth-instances s4-4) (-> arg0 clothing s4-4) (process->handle this)) + (setup-from-params! (-> this draw cloth-instances s4-4) (-> arg0 clothing s4-4) (process->handle this)) ) ) (logior! (-> this draw global-effect) (-> arg0 global-effects)) @@ -2273,7 +2273,7 @@ ) (dotimes (i (-> proc draw cloth-instances length)) (if (not arg1) - (cloth-system-method-34 (-> proc draw cloth-instances i)) + (hide! (-> proc draw cloth-instances i)) (logclear! (-> proc draw cloth-instances i flags) (cloth-flag hidden)) ) ) diff --git a/goal_src/jak3/engine/scene/scene.gc b/goal_src/jak3/engine/scene/scene.gc index 4f3437b253..b61d1ec1cf 100644 --- a/goal_src/jak3/engine/scene/scene.gc +++ b/goal_src/jak3/engine/scene/scene.gc @@ -905,8 +905,6 @@ (defstate wait (scene-player) :virtual #t :enter (behavior ((arg0 symbol)) - (format 0 "scene-player: skipping scene~%") - (set! (-> self aborted?) #t) (set-time! (-> self state-time)) (if (= (-> *game-info* demo-state) 101) (set-setting! 'audio-language #f 0.0 5) @@ -1158,7 +1156,6 @@ ) ) ) - (not (-> self aborted?)) ) (set-blackout-frames (seconds 0.1)) (suspend) @@ -1549,7 +1546,6 @@ (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) #t ) - (none) ) false-func ) @@ -1577,10 +1573,6 @@ ) ) ) - (#when PC_PORT ;; og:preserve-this until overlord2 is done - (backup-load-state-and-set-cmds *load-state* (-> self anim command-list)) - (restore-load-state-and-cleanup *load-state*) - ) (if (and (-> self wait) *target* (focus-test? *target* grabbed)) (go-virtual release) ) diff --git a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc index 12138ec3a7..d366c28f3b 100644 --- a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc @@ -321,7 +321,7 @@ ) -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-blue-3) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-blue-3) (arg0 process-focusable)) #f ) @@ -351,15 +351,13 @@ (set! (-> *blue-shot-trail* uv-repeat-dist) 163840.0) -(set! (-> *blue-shot-trail* lie-mode) (the-as uint 0)) +(set! (-> *blue-shot-trail* lie-mode) (lie-mode appearance0)) (set! (-> *blue-shot-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *blue-shot-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *blue-shot-trail* tex-id) (the-as uint #x500f00)) + (set! (-> *blue-shot-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *blue-shot-trail* tex-id) (new 'static 'texture-id :index #xf :page #x5)) ) (set! (-> *blue-shot-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) @@ -407,7 +405,7 @@ (set! (-> s5-0 track-immediately?) #t) (let* ((v1-30 (estimate-light-trail-mem-usage (the-as uint (-> s5-0 max-num-crumbs)) - (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + (the-as uint (= (-> s5-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-0 (get-process *default-dead-pool* light-trail-tracker-blue-3 (+ v1-30 8192) 1)) @@ -670,7 +668,6 @@ (spawn-projectile gun-blue-shot-3 sv-148 (ppointer->process (-> sv-144 gun)) *default-dead-pool*) ) -;; WARN: Return type mismatch symbol vs none. (defun draw-beam-segment () #f ) @@ -1005,7 +1002,7 @@ (when (or (zero? *uv-loop-curve*) (!= loading-level global)) (set! *uv-loop-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *uv-loop-curve* 2 'loading-level (the-as int #t)) + (allocate! *uv-loop-curve* 2 'loading-level #t) ) (set! (-> *uv-loop-curve* pts data 0 first) 0.0) diff --git a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc index d4a190ff97..d203d33968 100644 --- a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc @@ -844,7 +844,7 @@ (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) 0.0 (let* ((f0-3 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this blur-time)))) - (f0-4 (curve2d-method-9 (-> this blur-curve) f0-3 3)) + (f0-4 (evaluate (-> this blur-curve) f0-3 (loop-behavior use-default))) (f0-5 (- 1.0 f0-4)) ) (blit-displays-work-method-17 @@ -866,7 +866,7 @@ 0.0 0.0 (let ((f0-4 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this flash-time))))) - (curve-color-method-9 (-> this fade-curve) f0-4 (the-as rgbaf gp-0) 3) + (evaluate (-> this fade-curve) f0-4 (the-as rgbaf gp-0) (loop-behavior use-default)) ) (set! (-> gp-0 x) (* 255.0 (-> gp-0 x))) (set! (-> gp-0 y) (* 255.0 (-> gp-0 y))) @@ -1303,8 +1303,8 @@ 0.0 0.0 (let ((f30-0 1.0) - (f28-0 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 3)) - (f26-1 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 3)) + (f28-0 (evaluate *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 (loop-behavior use-default))) + (f26-1 (evaluate *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 (loop-behavior use-default))) ) (when (time-elapsed? (-> self state-time) (seconds 5)) (let ((f30-1 (* 0.00066666666 (the float (+ (- (seconds -5) (-> self state-time)) (current-time)))))) diff --git a/goal_src/jak3/engine/target/gun/gun-part.gc b/goal_src/jak3/engine/target/gun/gun-part.gc index 50658fcced..a788130826 100644 --- a/goal_src/jak3/engine/target/gun/gun-part.gc +++ b/goal_src/jak3/engine/target/gun/gun-part.gc @@ -835,7 +835,7 @@ gun (when (or (zero? *curve-linear-up-red*) (!= loading-level global)) (set! *curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-linear-up-red* pts data 0 first) 0.0) @@ -872,15 +872,13 @@ gun (set! (-> *red-shot-3-trail* uv-repeat-dist) 16384000.0) -(set! (-> *red-shot-3-trail* lie-mode) (the-as uint 0)) +(set! (-> *red-shot-3-trail* lie-mode) (lie-mode appearance0)) (set! (-> *red-shot-3-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *red-shot-3-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *red-shot-3-trail* tex-id) (the-as uint #x100300)) + (set! (-> *red-shot-3-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *red-shot-3-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *red-shot-3-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) @@ -903,7 +901,7 @@ gun (when (or (zero? *curve-yellow2-shot-alpha*) (!= loading-level global)) (set! *curve-yellow2-shot-alpha* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-yellow2-shot-alpha* 21 'loading-level (the-as int #f)) + (allocate! *curve-yellow2-shot-alpha* 21 'loading-level #f) ) (set! (-> *curve-yellow2-shot-alpha* pts data 0 first) 0.0) @@ -1039,15 +1037,13 @@ gun (set! (-> *yellow-shot-2-trail* uv-repeat-dist) 20480.0) -(set! (-> *yellow-shot-2-trail* lie-mode) (the-as uint 0)) +(set! (-> *yellow-shot-2-trail* lie-mode) (lie-mode appearance0)) (set! (-> *yellow-shot-2-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *yellow-shot-2-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *yellow-shot-2-trail* tex-id) (the-as uint #x501e00)) + (set! (-> *yellow-shot-2-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *yellow-shot-2-trail* tex-id) (new 'static 'texture-id :index #x1e :page #x5)) ) (set! (-> *yellow-shot-2-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) @@ -3864,7 +3860,7 @@ gun (when (or (zero? *gun-dark-3-nuke-fade-curve*) (!= loading-level global)) (set! *gun-dark-3-nuke-fade-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve* 5 'loading-level (the-as uint #f)) + (allocate! *gun-dark-3-nuke-fade-curve* 5 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 first) 0.0) @@ -3923,7 +3919,7 @@ gun (when (or (zero? *gun-dark-3-nuke-blur-curve*) (!= loading-level global)) (set! *gun-dark-3-nuke-blur-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve* 4 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-blur-curve* 4 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-blur-curve* pts data 0 first) 0.0) @@ -3948,7 +3944,7 @@ gun (when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-x*) (!= loading-level global)) (set! *gun-dark-3-nuke-mushroom-size-curve-x* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 0 first) 0.0) @@ -3961,7 +3957,7 @@ gun (when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-y*) (!= loading-level global)) (set! *gun-dark-3-nuke-mushroom-size-curve-y* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 0 first) 0.0) @@ -4210,7 +4206,7 @@ gun (when (or (zero? *gun-dark-3-nuke-fade-curve-small*) (!= loading-level global)) (set! *gun-dark-3-nuke-fade-curve-small* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve-small* 5 'loading-level (the-as uint #f)) + (allocate! *gun-dark-3-nuke-fade-curve-small* 5 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 first) 0.0) @@ -4269,7 +4265,7 @@ gun (when (or (zero? *gun-dark-3-nuke-blur-curve-small*) (!= loading-level global)) (set! *gun-dark-3-nuke-blur-curve-small* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve-small* 4 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-blur-curve-small* 4 'loading-level #f) ) (set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 0 first) 0.0) diff --git a/goal_src/jak3/engine/target/gun/gun-red-shot.gc b/goal_src/jak3/engine/target/gun/gun-red-shot.gc index 574eb9787a..0d7f4c3a39 100644 --- a/goal_src/jak3/engine/target/gun/gun-red-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-red-shot.gc @@ -150,7 +150,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-28 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-28 8192) 1)) @@ -1356,7 +1356,7 @@ (when (or (zero? *impact-blur*) (!= loading-level global)) (set! *impact-blur* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *impact-blur* 3 'loading-level (the-as int #f)) + (allocate! *impact-blur* 3 'loading-level #f) ) (set! (-> *impact-blur* pts data 0 first) 0.0) @@ -1373,7 +1373,7 @@ (when (or (zero? *shockwave-blur-red-2*) (!= loading-level global)) (set! *shockwave-blur-red-2* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *shockwave-blur-red-2* 5 'loading-level (the-as int #f)) + (allocate! *shockwave-blur-red-2* 5 'loading-level #f) ) (set! (-> *shockwave-blur-red-2* pts data 0 first) 0.0) @@ -1488,7 +1488,7 @@ (adjust-warp-radius-and-alpha self) (let ((f0-14 (-> self current-stage-t))) 0.0 - (let* ((f0-16 (- 1.0 (curve2d-method-9 *impact-blur* f0-14 3))) + (let* ((f0-16 (- 1.0 (evaluate *impact-blur* f0-14 (loop-behavior use-default)))) (f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength))))) ) (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f) @@ -1966,7 +1966,7 @@ (while (-> self child) (let ((f0-11 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) 0.0 - (let* ((f0-13 (- 1.0 (curve2d-method-9 *impact-blur* f0-11 1))) + (let* ((f0-13 (- 1.0 (evaluate *impact-blur* f0-11 (loop-behavior clamp)))) (f0-14 (lerp f0-13 1.0 f30-1)) ) (set! (-> *display* force-sync) (the-as uint 2)) diff --git a/goal_src/jak3/engine/target/target-death.gc b/goal_src/jak3/engine/target/target-death.gc index 2edde8d109..944b8253af 100644 --- a/goal_src/jak3/engine/target/target-death.gc +++ b/goal_src/jak3/engine/target/target-death.gc @@ -424,7 +424,7 @@ (case (-> self ext-geo) (((target-geo jakc)) (dotimes (s5-1 (-> gp-1 clothing length)) - (cloth-base-method-10 (-> self draw cloth-instances s5-1) (-> gp-1 clothing s5-1) (process->handle self)) + (setup-from-params! (-> self draw cloth-instances s5-1) (-> gp-1 clothing s5-1) (process->handle self)) (logior! (-> self draw cloth-instances s5-1 flags) (cloth-flag need-reset active)) ) ) diff --git a/goal_src/jak3/game.gp b/goal_src/jak3/game.gp index 7ab31948d1..766c047422 100644 --- a/goal_src/jak3/game.gp +++ b/goal_src/jak3/game.gp @@ -492,8 +492,9 @@ "WASSTAD4" "WASSTAD5" "WASSTAD6" "WASTOAD" "WASTURT") ;; Jak 3 has no MUS files -;; (copy-mus-files "" "TWEAKVAL") - +(defstep :in "$ISO/RES/TWEAKVAL.MUS" + :tool 'copy + :out '("$OUT/iso/TWEAKVAL.MUS")) ;;;;;;;;;;;;;;;;;;;;; ;; Text ;;;;;;;;;;;;;;;;;;;;; @@ -531,6 +532,7 @@ "$OUT/iso/7COMMON.TXT" "$OUT/iso/0SUBTI2.TXT" "$OUT/iso/VAGDIR.AYB" + "$OUT/iso/TWEAKVAL.MUS" ,@(reverse *all-vis*) ,@(reverse *all-str*) ,@(reverse *all-sbk*) diff --git a/goal_src/jak3/kernel-defs.gc b/goal_src/jak3/kernel-defs.gc index 8e8ad2cc14..3b9e958ef8 100644 --- a/goal_src/jak3/kernel-defs.gc +++ b/goal_src/jak3/kernel-defs.gc @@ -206,11 +206,13 @@ (define-extern pc-get-os (function symbol)) (define-extern pc-get-window-size (function (pointer int64) (pointer int64) 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-fullscreen-display (function int none)) -(define-extern pc-set-display-mode (function symbol none)) +(define-extern pc-set-window-size! (function int int none)) +(define-extern pc-get-display-id (function int)) +(define-extern pc-set-display-id! (function int none)) +(define-extern pc-set-display-mode! (function symbol none)) (define-extern pc-get-num-resolutions (function int)) (define-extern pc-get-resolution (function int (pointer int64) (pointer int64) none)) +(define-extern pc-is-supported-resolution? (function int int symbol)) (define-extern pc-set-frame-rate (function int none)) (define-extern pc-set-vsync (function symbol none)) diff --git a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs.gc b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs.gc index 214f725d0b..194eeb87d2 100644 --- a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs.gc +++ b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs.gc @@ -1300,7 +1300,7 @@ (let* ((f0-0 0.9) (f1-1 (* 0.0033333334 (the float (current-time)))) (f0-1 (/ (- f1-1 (* (the float (the int (/ f1-1 f0-0))) f0-0)) f0-0)) - (f0-2 (curve2d-method-9 *curve-linear-up-down* f0-1 3)) + (f0-2 (evaluate *curve-linear-up-down* f0-1 (loop-behavior use-default))) (f0-3 (sin (lerp -16384.0 16384.0 f0-2))) (f0-4 (+ 1.0 f0-3)) (f0-5 (* 0.5 f0-4)) diff --git a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc index 5f9237e227..c72446819d 100644 --- a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc +++ b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc @@ -1336,7 +1336,7 @@ (when (or (zero? *grunt-jump-curve*) (!= loading-level global)) (set! *grunt-jump-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *grunt-jump-curve* 3 'loading-level (the-as int #t)) + (allocate! *grunt-jump-curve* 3 'loading-level #t) ) (set! (-> *grunt-jump-curve* pts data 0 first) 0.0) @@ -1395,7 +1395,7 @@ ) (let ((f0-15 f30-0)) 0.0 - (let* ((f0-16 (curve2d-method-9 *grunt-jump-curve* f0-15 3)) + (let* ((f0-16 (evaluate *grunt-jump-curve* f0-15 (loop-behavior use-default))) (f0-17 (* f0-16 f0-16)) (f0-18 (lerp (-> this jump-height-percentage-start) (-> this jump-height-percentage-end) f0-17)) (f0-20 (- (* 2.0 f0-18) (* f0-18 f0-18))) @@ -1527,7 +1527,7 @@ (when (or (zero? *grunt-dists*) (!= loading-level global)) (set! *grunt-dists* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *grunt-dists* 5 'loading-level (the-as int #t)) + (allocate! *grunt-dists* 5 'loading-level #t) ) (set! (-> *grunt-dists* pts data 0 first) 0.0) @@ -1617,7 +1617,7 @@ (vector-float*! gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) - (curve2d-method-9 *grunt-dists* f26-0 3) + (evaluate *grunt-dists* f26-0 (loop-behavior use-default)) ) (vector+float*! (-> self root trans) (-> self root trans) gp-0 1.0) ) @@ -1636,7 +1636,7 @@ (let* ((f26-1 (ja-frame-num 0)) (f0-27 (/ f26-1 (the float (ja-num-frames 0)))) (gp-1 (new-stack-vector0)) - (f28-2 (curve2d-method-9 *curve-linear-up-down* f0-27 3)) + (f28-2 (evaluate *curve-linear-up-down* f0-27 (loop-behavior use-default))) ) (vector-float*! gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) @@ -1735,6 +1735,121 @@ ) ) +;; TODO +; ;; ERROR: failed type prop at 0: Could not figure out load: (set! v1 (l.d (+ a0 220))) +; ;; ERROR: Unsupported inline assembly instruction kind - [sllv a1, v1, r0] +; (defun grunt-part-callback ((a0-0 bt-grunt)) +; (local-vars +; (v0-1 none) +; (v0-2 none) +; (v0-3 none) +; (v1-0 none) +; (v1-1 none) +; (v1-3 none) +; (v1-4 none) +; (v1-5 none) +; (v1-6 none) +; (v1-7 none) +; (v1-9 none) +; (v1-10 none) +; (v1-11 none) +; (a0-1 none) +; (a1-0 none) +; (a1-1 none) +; (a1-2 none) +; (a1-3 none) +; (a1-4 none) +; (a1-5 none) +; (a1-6 none) +; (a1-7 none) +; (a2-0 none) +; (a2-1 none) +; (a2-2 none) +; (a2-3 none) +; (a2-4 none) +; (a2-5 none) +; (a2-6 none) +; (a2-7 none) +; (a2-8 none) +; (a3-0 none) +; (a3-1 none) +; (t0-0 none) +; (t0-1 none) +; (t1-0 none) +; (t9-0 none) +; (t9-1 none) +; (sp-0 none) +; (f0-0 none) +; (f0-1 none) +; ) +; (with-pp +; (when (begin +; (and (begin (set! v1-0 (the-as none (l.d (+ a0-0 220)))) (set! a1-0 (the-as none (subu-s7 v1-0))) (nonzero? a1-0)) +; (begin +; (if (begin +; (.sllv a1-2 v1-0 r0) +; (set! a2-0 (the-as none (l.wu a1-2))) +; (set! a1-3 (the-as none (l.w (+ a2-0 40)))) +; (set! v1-1 (the-as none (sra v1-0 32))) +; (= v1-1 a1-3) +; ) +; (set! a1-1 (the-as none a2-0)) +; ) +; (set! v1-2 (the-as none a1-1)) +; ) +; ) +; a1-1 +; ) +; (and (begin (set! v1-3 (the-as none (l.wu (+ a1-1 68)))) v1-3) (begin +; (set! v1-5 (the-as none (l.wu (+ a1-1 68)))) +; (set! v1-6 (the-as none (l.wu v1-5))) +; (set! a2-1 (the-as none 'riding-idle-ship)) +; (set! v1-4 (the-as none (= v1-6 a2-1))) +; ) +; ) +; (cond +; ((not v1-4) +; (set! v1-7 (the-as none (l.wu (+ a0-0 -4)))) +; (set! t9-0 (the-as none (l.wu (+ v1-7 56)))) +; (call!) +; (set! v1-8 (the-as none v0-1)) +; (set! t9-1 (the-as none enter-state)) +; (set! v1-9 (the-as none empty-state)) +; (s.w! (+ s6-0 68) v1-9) +; (call!) +; ) +; (else +; (set! v1-10 (the-as none (+ sp-0 16))) +; (set! a2-2 (the-as none (l.wu (+ a1-1 124)))) +; (set! a2-3 (the-as none (+ a2-2 12))) +; (set! a2-4 (the-as none (l.q a2-3))) +; (s.q! v1-10 a2-4) +; (set! a1-4 (the-as none (l.wu (+ a1-1 128)))) +; (set! a1-5 (the-as none (l.wu (+ a1-4 28)))) +; (set! a1-6 (the-as none (+ a1-5 0))) +; (set! a2-5 (the-as none v1-10)) +; (set! a3-0 (the-as none v1-10)) +; (set! t0-0 (the-as none (+ a1-6 16))) +; (set! t1-0 (the-as none #x45a66666)) +; (set! f0-0 (the-as none (gpr->fpr t1-0))) +; (set! a2-6 (the-as none (vecplusfloattimes a2-5 a3-0 t0-0 f0-0))) +; (set! a2-7 (the-as none v1-10)) +; (set! a3-1 (the-as none v1-10)) +; (set! a1-7 (the-as none (+ a1-6 32))) +; (set! t0-1 (the-as none #x4599999a)) +; (set! f0-1 (the-as none (gpr->fpr t0-1))) +; (set! a2-8 (the-as none (vecplusfloattimes a2-7 a3-1 a1-7 f0-1))) +; (set! a0-1 (the-as none (l.wu (+ a0-0 124)))) +; (set! v0-3 (the-as none (+ a0-1 12))) +; (set! v1-11 (the-as none (l.q v1-10))) +; (s.q! v0-3 v1-11) +; ) +; ) +; ) +; (ret-none) +; ) +; ) + (defmethod bt-grunt-method-54 ((this bt-grunt) (arg0 vector)) (let ((v1-2 (-> this node-list data 0 bone transform))) (set! (-> arg0 quad) (-> this root trans quad)) @@ -1866,7 +1981,7 @@ ) ) ) - (+! (-> self root trans y) (* 409.6 (curve2d-method-9 *grunt-idle-shift* f0-2 3))) + (+! (-> self root trans y) (* 409.6 (evaluate *grunt-idle-shift* f0-2 (loop-behavior use-default)))) ) ) :code (behavior ((arg0 symbol)) @@ -1951,7 +2066,7 @@ (let ((f28-1 (ja-frame-num 0))) (let* ((f0-15 (/ f28-1 (the float (ja-num-frames 0)))) (gp-1 (new-stack-vector0)) - (f26-0 (curve2d-method-9 *curve-linear-up-down* f0-15 3)) + (f26-0 (evaluate *curve-linear-up-down* f0-15 (loop-behavior use-default))) ) (vector-float*! gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) diff --git a/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc b/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc index 94e7b2628a..9ea4cca237 100644 --- a/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc +++ b/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc @@ -536,7 +536,7 @@ (when (or (zero? *bt-height-adjust*) (!= loading-level global)) (set! *bt-height-adjust* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-height-adjust* 4 'loading-level (the-as int #t)) + (allocate! *bt-height-adjust* 4 'loading-level #t) ) (set! (-> *bt-height-adjust* pts data 0 first) 0.0) @@ -574,7 +574,7 @@ (set! f0-7 (* f0-7 f0-7)) ) ) - (let* ((f0-8 (curve2d-method-9 *bt-height-adjust* f0-7 3)) + (let* ((f0-8 (evaluate *bt-height-adjust* f0-7 (loop-behavior use-default))) (f0-9 (lerp (-> this start-path-height-offset) (-> this dest-path-height-offset) f0-8)) ) (set! (-> this path-height-vel) (* (- f0-9 (-> this path-height-offset)) (-> pp clock frames-per-second))) @@ -1770,7 +1770,7 @@ (when (or (zero? *bt-clamp-curve-x*) (!= loading-level global)) (set! *bt-clamp-curve-x* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-clamp-curve-x* 7 'loading-level (the-as int #t)) + (allocate! *bt-clamp-curve-x* 7 'loading-level #t) ) (set! (-> *bt-clamp-curve-x* pts data 0 first) 0.0) @@ -1803,7 +1803,7 @@ (when (or (zero? *bt-accel-curve*) (!= loading-level global)) (set! *bt-accel-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-accel-curve* 4 'loading-level (the-as int #t)) + (allocate! *bt-accel-curve* 4 'loading-level #t) ) (set! (-> *bt-accel-curve* pts data 0 first) 0.0) @@ -1935,8 +1935,12 @@ ) (set! (-> this y-boost-scalar) (fmax 0.0 (fmin 2.5 (-> this y-boost-scalar)))) (set! (-> this x-boost-scalar) (fmax 0.0 (fmin 2.5 (-> this x-boost-scalar)))) - (set! (-> this rotyv) (* (-> this rotyv) (curve2d-method-9 *bt-accel-curve* (-> this y-boost-scalar) 2))) - (set! (-> this rotxv) (* (-> this rotxv) (curve2d-method-9 *bt-accel-curve* (-> this x-boost-scalar) 2))) + (set! (-> this rotyv) + (* (-> this rotyv) (evaluate *bt-accel-curve* (-> this y-boost-scalar) (loop-behavior b2))) + ) + (set! (-> this rotxv) + (* (-> this rotxv) (evaluate *bt-accel-curve* (-> this x-boost-scalar) (loop-behavior b2))) + ) (set! (-> this rotxv) (* 0.8 (-> this rotxv))) (+! (-> this roty) (* (-> this rotyv) (seconds-per-frame))) (+! (-> this rotx) (* (-> this rotxv) (seconds-per-frame))) diff --git a/goal_src/jak3/levels/city/hijack/kg-vehicles.gc b/goal_src/jak3/levels/city/hijack/kg-vehicles.gc index 0f12b40205..4f003c0e78 100644 --- a/goal_src/jak3/levels/city/hijack/kg-vehicles.gc +++ b/goal_src/jak3/levels/city/hijack/kg-vehicles.gc @@ -19,7 +19,7 @@ (when (or (zero? *hijack-suck-curve*) (!= loading-level global)) (set! *hijack-suck-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *hijack-suck-curve* 4 'loading-level (the-as int #t)) + (allocate! *hijack-suck-curve* 4 'loading-level #t) ) (set! (-> *hijack-suck-curve* pts data 0 first) 0.0) @@ -44,7 +44,7 @@ (let* ((f1-0 (the float (-> *game-info* sub-task-list (game-task-node city-hijack-vehicle-escape) death-count))) (f0-2 (fmax 0.0 (fmin 15.0 f1-0))) ) - (set! f30-0 (curve2d-method-9 *hijack-suck-curve* f0-2 2)) + (set! f30-0 (evaluate *hijack-suck-curve* f0-2 (loop-behavior b2))) ) ) f30-0 diff --git a/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc b/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc index 74bf4903c0..e1335da4e1 100644 --- a/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc +++ b/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc @@ -3019,7 +3019,7 @@ (set! (-> this sprites 1 color w) 0) (let ((f0-11 (* 0.011111111 (the float (- (current-time) (-> this spike-time)))))) 0.0 - (let ((f0-12 (curve2d-method-9 *hud-boost-curve* f0-11 3))) + (let ((f0-12 (evaluate *hud-boost-curve* f0-11 (loop-behavior use-default)))) (set! (-> this tt-current) (lerp (-> this tt-prev) (-> this tt-next) f0-12)) ) ) @@ -3039,7 +3039,7 @@ (f0-23 (lerp 1.0 0.3 f28-2)) (f1-16 (* 0.0033333334 (the float (current-time)))) (f0-24 (/ (- f1-16 (* (the float (the int (/ f1-16 f0-23))) f0-23)) f0-23)) - (f1-18 (* f28-2 (curve2d-method-9 *curve-linear-up-down* f0-24 3))) + (f1-18 (* f28-2 (evaluate *curve-linear-up-down* f0-24 (loop-behavior use-default)))) (f28-3 (fmax 0.0 (fmin 1.0 f1-18))) ) (set! (-> this sprites 3 color x) (the int (lerp 128.0 192.0 f28-3))) diff --git a/goal_src/jak3/levels/city/port/attack/h-torpedo.gc b/goal_src/jak3/levels/city/port/attack/h-torpedo.gc index 1c37ee6163..f4a8ea0a87 100644 --- a/goal_src/jak3/levels/city/port/attack/h-torpedo.gc +++ b/goal_src/jak3/levels/city/port/attack/h-torpedo.gc @@ -56,7 +56,7 @@ (when (or (zero? *growing-curve-torpedo*) (!= loading-level global)) (set! *growing-curve-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *growing-curve-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *growing-curve-torpedo* 2 'loading-level #f) ) (set! (-> *growing-curve-torpedo* pts data 0 first) 0.0) @@ -69,7 +69,7 @@ (when (or (zero? *water-simple-alpha-curve-fade-out-torpedo*) (!= loading-level global)) (set! *water-simple-alpha-curve-fade-out-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-fade-out-torpedo* 2 'loading-level #f) ) (set! (-> *water-simple-alpha-curve-fade-out-torpedo* pts data 0 first) 0.0) @@ -82,7 +82,7 @@ (when (or (zero? *color-curve-tan-brown-torpedo*) (!= loading-level global)) (set! *color-curve-tan-brown-torpedo* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *color-curve-tan-brown-torpedo* 2 'loading-level (the-as uint #f)) + (allocate! *color-curve-tan-brown-torpedo* 2 'loading-level #f) ) (set! (-> *color-curve-tan-brown-torpedo* pts data 0 first) 0.0) @@ -107,7 +107,7 @@ (when (or (zero? *water-simple-alpha-curve-in-torpedo*) (!= loading-level global)) (set! *water-simple-alpha-curve-in-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-in-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-in-torpedo* 2 'loading-level #f) ) (set! (-> *water-simple-alpha-curve-in-torpedo* pts data 0 first) 0.0) @@ -144,15 +144,13 @@ (set! (-> *torpedo-wake-trail* uv-repeat-dist) 81920.0) -(set! (-> *torpedo-wake-trail* lie-mode) (the-as uint 1)) +(set! (-> *torpedo-wake-trail* lie-mode) (lie-mode appearance1)) (set! (-> *torpedo-wake-trail* max-age) (seconds 0.3)) (if #f - (set! (-> *torpedo-wake-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *torpedo-wake-trail* tex-id) (the-as uint #x500800)) + (set! (-> *torpedo-wake-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *torpedo-wake-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) (set! (-> *torpedo-wake-trail* width-curve) *growing-curve-torpedo*) @@ -1468,13 +1466,13 @@ ) -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-torpedo) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-torpedo) (arg0 process-focusable)) (let ((v1-0 arg0)) (and (-> (the-as htorpedo v1-0) on-water?) (< (-> v1-0 root trans y) 20480.0)) ) ) -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-torpedo) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-torpedo) (arg0 process-focusable) (arg1 vector)) (let ((v1-0 arg0)) (when v1-0 (set! (-> arg1 quad) (-> v1-0 root trans quad)) @@ -1525,7 +1523,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-34 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-torpedo (+ v1-34 8192) 1)) diff --git a/goal_src/jak3/levels/city/protect/assault-enemies.gc b/goal_src/jak3/levels/city/protect/assault-enemies.gc index 2434fe2681..8b5020cec4 100644 --- a/goal_src/jak3/levels/city/protect/assault-enemies.gc +++ b/goal_src/jak3/levels/city/protect/assault-enemies.gc @@ -1465,15 +1465,13 @@ (set! (-> *assault-bombbot-trail* uv-repeat-dist) 4096000.0) -(set! (-> *assault-bombbot-trail* lie-mode) (the-as uint 0)) +(set! (-> *assault-bombbot-trail* lie-mode) (lie-mode appearance0)) (set! (-> *assault-bombbot-trail* max-age) (seconds 0.1)) (if #f - (set! (-> *assault-bombbot-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *assault-bombbot-trail* tex-id) (the-as uint #x100300)) + (set! (-> *assault-bombbot-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *assault-bombbot-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *assault-bombbot-trail* width-curve) (the-as curve2d-piecewise *curve-assault-bombbot-shot-width*)) @@ -1520,15 +1518,13 @@ (set! (-> *assault-bombbot-trail-2* uv-repeat-dist) 4096000.0) -(set! (-> *assault-bombbot-trail-2* lie-mode) (the-as uint 0)) +(set! (-> *assault-bombbot-trail-2* lie-mode) (lie-mode appearance0)) (set! (-> *assault-bombbot-trail-2* max-age) (seconds 0.1)) (if #f - (set! (-> *assault-bombbot-trail-2* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *assault-bombbot-trail-2* tex-id) (the-as uint #x100300)) + (set! (-> *assault-bombbot-trail-2* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *assault-bombbot-trail-2* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *assault-bombbot-trail-2* width-curve) @@ -1639,7 +1635,7 @@ (set! (-> gp-0 track-immediately?) #t) (let* ((v1-11 (estimate-light-trail-mem-usage (the-as uint (-> gp-0 max-num-crumbs)) - (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + (the-as uint (= (-> gp-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-11 8192) 1)) @@ -1659,7 +1655,7 @@ (set! (-> gp-0 appearance) *assault-bombbot-trail-2*) (let* ((v1-20 (estimate-light-trail-mem-usage (the-as uint (-> gp-0 max-num-crumbs)) - (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + (the-as uint (= (-> gp-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-20 8192) 1)) diff --git a/goal_src/jak3/levels/city/protect/assault-task.gc b/goal_src/jak3/levels/city/protect/assault-task.gc index c2bebe758c..8b27286ee4 100644 --- a/goal_src/jak3/levels/city/protect/assault-task.gc +++ b/goal_src/jak3/levels/city/protect/assault-task.gc @@ -143,7 +143,7 @@ (when (or (zero? *port-assault-blur-curve*) (!= loading-level global)) (set! *port-assault-blur-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *port-assault-blur-curve* 4 'loading-level (the-as int #t)) + (allocate! *port-assault-blur-curve* 4 'loading-level #t) ) (set! (-> *port-assault-blur-curve* pts data 0 first) 0.0) diff --git a/goal_src/jak3/levels/desert/chase/wcar-catapult.gc b/goal_src/jak3/levels/desert/chase/wcar-catapult.gc index 110b1a25a9..3a29d45e4b 100644 --- a/goal_src/jak3/levels/desert/chase/wcar-catapult.gc +++ b/goal_src/jak3/levels/desert/chase/wcar-catapult.gc @@ -1342,7 +1342,7 @@ (when (or (zero? *v-catapult-shot-impact-blur*) (!= loading-level global)) (set! *v-catapult-shot-impact-blur* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *v-catapult-shot-impact-blur* 3 'loading-level (the-as int #f)) + (allocate! *v-catapult-shot-impact-blur* 3 'loading-level #f) ) (set! (-> *v-catapult-shot-impact-blur* pts data 0 first) 0.0) diff --git a/goal_src/jak3/levels/desert/hover/des-beast.gc b/goal_src/jak3/levels/desert/hover/des-beast.gc index 221e8b2593..fe51b17ed4 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast.gc @@ -28,7 +28,7 @@ (when (or (zero? *curve-beast-linear-up-red*) (!= loading-level global)) (set! *curve-beast-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-beast-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-beast-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-beast-linear-up-red* pts data 0 first) 0.0) @@ -88,15 +88,13 @@ (set! (-> *beast-grenade-trail* uv-repeat-dist) 16384000.0) -(set! (-> *beast-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *beast-grenade-trail* lie-mode) (lie-mode appearance0)) (set! (-> *beast-grenade-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *beast-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *beast-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *beast-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *beast-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *beast-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-trail*)) @@ -946,7 +944,7 @@ (set! (-> s5-1 track-immediately?) #t) (let* ((v1-22 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-22 8192) 1)) diff --git a/goal_src/jak3/levels/desert/hover/mh-flyer.gc b/goal_src/jak3/levels/desert/hover/mh-flyer.gc index cf5a9a2ff2..07b0f3b810 100644 --- a/goal_src/jak3/levels/desert/hover/mh-flyer.gc +++ b/goal_src/jak3/levels/desert/hover/mh-flyer.gc @@ -33,7 +33,7 @@ (when (or (zero? *mh-flyer-curve-linear-up-red*) (!= loading-level global)) (set! *mh-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *mh-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *mh-flyer-curve-linear-up-red* 2 'loading-level #f) ) (set! (-> *mh-flyer-curve-linear-up-red* pts data 0 first) 0.0) @@ -93,15 +93,13 @@ (set! (-> *mh-flyer-missile-trail* uv-repeat-dist) 16384000.0) -(set! (-> *mh-flyer-missile-trail* lie-mode) (the-as uint 0)) +(set! (-> *mh-flyer-missile-trail* lie-mode) (lie-mode appearance0)) (set! (-> *mh-flyer-missile-trail* max-age) (seconds 1)) (if #f - (set! (-> *mh-flyer-missile-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *mh-flyer-missile-trail* tex-id) (the-as uint #x100300)) + (set! (-> *mh-flyer-missile-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *mh-flyer-missile-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *mh-flyer-missile-trail* width-curve) @@ -476,7 +474,7 @@ (set! (-> s5-5 track-immediately?) #t) (let* ((v0-8 (estimate-light-trail-mem-usage (the-as uint (-> s5-5 max-num-crumbs)) - (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + (the-as uint (= (-> s5-5 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-8 8192) 1)) diff --git a/goal_src/jak3/levels/desert/rescue/desert-rescue.gc b/goal_src/jak3/levels/desert/rescue/desert-rescue.gc index 583b02d319..1765dbb0d7 100644 --- a/goal_src/jak3/levels/desert/rescue/desert-rescue.gc +++ b/goal_src/jak3/levels/desert/rescue/desert-rescue.gc @@ -1071,15 +1071,13 @@ (set! (-> *transport-tread-settings* uv-repeat-dist) 20480.0) -(set! (-> *transport-tread-settings* lie-mode) (the-as uint 0)) +(set! (-> *transport-tread-settings* lie-mode) (lie-mode appearance0)) (set! (-> *transport-tread-settings* max-age) (seconds 20)) (if "tread-marks" - (set! (-> *transport-tread-settings* tex-id) - (the-as uint (lookup-texture-id-by-name "tread-marks" (the-as string #f))) - ) - (set! (-> *transport-tread-settings* tex-id) (the-as uint #x100300)) + (set! (-> *transport-tread-settings* tex-id) (lookup-texture-id-by-name "tread-marks" (the-as string #f))) + (set! (-> *transport-tread-settings* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *transport-tread-settings* width-curve) (the-as curve2d-piecewise *curve-unity*)) @@ -1170,14 +1168,12 @@ (vector+float*! s2-0 s2-0 (-> v1-4 fvec) -27852.8) (vector+float*! s3-0 s2-0 (-> v1-4 rvec) -14131.2) (vector+float*! s5-0 s2-0 (-> v1-4 rvec) 14131.2) - (set! (-> *transport-tread-settings* tex-id) - (the-as uint (lookup-texture-id-by-name "tread-marks" (the-as string #f))) - ) + (set! (-> *transport-tread-settings* tex-id) (lookup-texture-id-by-name "tread-marks" (the-as string #f))) (set! (-> s3-0 y) (probe-ground2 this s3-0 s4-0)) (+! (-> s3-0 y) 409.6) (let ((v1-11 (the-as tread-trail-tracker (handle->process (-> this tread1))))) (if (zero? (mod (-> this tread-last-spawn-index) (-> this tread-frequency))) - (tread-trail-method-22 (-> v1-11 trail) s3-0 s4-0) + (add-crumb-with-offset (-> v1-11 trail) s3-0 s4-0) (tread-trail-method-23 (-> v1-11 trail) s3-0 s4-0) ) ) @@ -1185,7 +1181,7 @@ (+! (-> s5-0 y) 409.6) (let ((v1-21 (the-as tread-trail-tracker (handle->process (-> this tread2))))) (if (zero? (mod (-> this tread-last-spawn-index) (-> this tread-frequency))) - (tread-trail-method-22 (-> v1-21 trail) s5-0 s4-0) + (add-crumb-with-offset (-> v1-21 trail) s5-0 s4-0) (tread-trail-method-23 (-> v1-21 trail) s5-0 s4-0) ) ) @@ -1389,7 +1385,7 @@ (let* ((v1-64 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-2 (get-process *default-dead-pool* tread-trail-tracker (+ v1-64 8192) 1)) @@ -1410,7 +1406,7 @@ (let* ((v1-73 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-3 (get-process *default-dead-pool* tread-trail-tracker (+ v1-73 8192) 1)) @@ -2477,11 +2473,11 @@ :code sleep-code ) -(defmethod task-manager-method-25 ((this task-manager-desert-rescue)) - (send-event (handle->process (-> this current-passenger)) 'die-fast) - (call-parent-method this) - (none) - ) +; (defmethod task-manager-method-25 ((this task-manager-desert-rescue)) +; (send-event (handle->process (-> this current-passenger)) 'die-fast) +; (call-parent-method this) +; (none) +; ) (defstate finish-task (task-manager-desert-rescue) :virtual #t @@ -2525,11 +2521,10 @@ (none) ) -;; og:preserve-this duplicate -; (defmethod task-manager-method-25 ((this task-manager-desert-rescue)) -; (call-parent-method this) -; (none) -; ) +(defmethod task-manager-method-25 ((this task-manager-desert-rescue)) + (call-parent-method this) + (none) + ) (defmethod task-manager-desert-rescue-method-45 ((this task-manager-desert-rescue) (arg0 int)) (let ((v1-0 arg0)) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc index 695382ebb5..ad63a831a0 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc @@ -93,15 +93,13 @@ (set! (-> *wheel-trail-info* uv-repeat-dist) 8192.0) -(set! (-> *wheel-trail-info* lie-mode) (the-as uint 0)) +(set! (-> *wheel-trail-info* lie-mode) (lie-mode appearance0)) (set! (-> *wheel-trail-info* max-age) (seconds 3)) (if #f - (set! (-> *wheel-trail-info* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *wheel-trail-info* tex-id) (the-as uint #x100300)) + (set! (-> *wheel-trail-info* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *wheel-trail-info* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *wheel-trail-info* width-curve) (the-as curve2d-piecewise *curve-unity*)) @@ -132,37 +130,205 @@ (deftype tire-trail (light-trail) () (:methods - (tire-trail-method-22 (_type_) none) - (tire-trail-method-23 (_type_) none) + (add-crumb-with-offset-and-uu (_type_ vector vector float) none) + (tire-trail-method-23 (_type_ vector vector float) none) ) ) ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this tire-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this tire-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) (none) ) -(defmethod light-trail-method-9 ((this tire-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this tire-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this crumb-size) (the-as uint 32)) (call-parent-method this arg0 arg1) (none) ) +;; WARN: Return type mismatch float vs none. +(defmethod add-crumb-with-offset-and-uu ((this tire-trail) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((v1-1 (add-crumb! this arg0 (seconds 10000)))) + (when (!= v1-1 1) + (let ((v1-4 (the-as + tire-trail-crumb + (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) + ) + ) + ) + (set! (-> v1-4 offset quad) (-> arg1 quad)) + (set! (-> v1-4 uu) arg2) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod tire-trail-method-23 ((this tire-trail) (arg0 vector) (arg1 vector) (arg2 float)) + (local-vars (s5-0 tire-trail-crumb) (f0-1 float)) + (with-pp + (let ((v1-0 (-> this crumb-count))) + 0.0 + (cond + ((zero? v1-0) + (add-crumb-with-offset-and-uu this arg0 arg1 arg2) + ) + ((begin + (set! (-> this decision) (light-trail-decision added)) + (set! s5-0 + (the-as tire-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + ) + (set! f0-1 (vector-vector-distance (-> s5-0 pos) arg0)) + (< f0-1 40.96) + ) + (set! (-> this decision) (light-trail-decision not-added)) + ) + (else + (+! (-> this total-distance-traveled) f0-1) + (let ((f1-2 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-5 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-5 (- f2-0 f1-2)) + ) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (set! (-> s5-0 offset quad) (-> arg1 quad)) + (set! (-> s5-0 birth-time) + (the-as + uint + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-5)) + ) + ) + ) + (set! (-> s5-0 uu) arg2) + ) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod crumb-age-out-callback ((this tire-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." + (let* ((s5-0 (the-as tire-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1)))) + (s4-0 + (the-as tire-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) + ) + (f30-0 (-> s5-0 uu)) + ) + (vector-lerp! (-> s5-0 offset) (-> s4-0 offset) (-> s5-0 offset) arg0) + (set! (-> s5-0 uu) (lerp (-> s4-0 uu) f30-0 arg0)) + ) + (none) + ) + +(defmethod add-tri-pair-to-prim! ((this tire-trail) (arg0 vector) (arg1 rgba) (arg2 float) (arg3 vector) (arg4 float)) + "Add two vertices to the prim strip to add two triangles" + (when (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) + (format 0 "Out of stuff (~d)~%" (-> this strip allocated-num-verts)) + (return #f) + ) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (vector+! (-> s3-0 rvec) arg0 arg3) + (vector-! (-> s3-0 uvec) arg0 arg3) + (add-vert-to-prim-strip! this (-> this strip) (-> s3-0 rvec) arg1 arg4 0.0) + (add-vert-to-prim-strip! this (-> this strip) (-> s3-0 uvec) arg1 arg4 1.0) + ) + #f + ) + +(deftype tire-trail-tracker (light-trail-tracker) + ((trail tire-trail :override) + ) + ) + + +(defbehavior tire-trail-tracker-init-by-other tire-trail-tracker ((arg0 light-trail-tracker-spawn-params)) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'tire-trail)) + (set! (-> self offscreen?) #f) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (change-parent self *rigid-body-queue-manager*) + (go-virtual tracking) + ) + +(defstate tracking (tire-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + (reset! (-> self trail)) + ) + (('die) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (let ((v1-1 (handle->process (-> self tracked-object)))) + (cond + (v1-1 + (if (and v1-1 (nonzero? (-> (the-as process-drawable v1-1) draw))) + (setup-dma-and-tex (-> self trail strip) (-> (the-as process-drawable v1-1) draw)) + ) + (common-trans! (-> self trail)) + ) + (else + (go-virtual die) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; WARN: Return type mismatch process vs tire-trail-tracker. +(defun spawn-tire-trail-tracker ((arg0 process) (arg1 light-trail-tracker-spawn-params)) + (let ((v1-2 (+ (estimate-light-trail-mem-usage (the-as uint (-> arg1 max-num-crumbs)) (the-as uint #f)) + (* (-> arg1 max-num-crumbs) 16) + ) + ) + (s4-0 (the-as process #f)) + ) + (let* ((s3-0 (get-process *default-dead-pool* tire-trail-tracker (+ v1-2 1024) 1)) + (v1-3 (when s3-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s3-0 arg0 "tire-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 tire-trail-tracker-init-by-other arg1) + (-> s3-0 ppointer) + ) + ) + ) + (if v1-3 + (set! s4-0 (-> v1-3 0)) + ) + ) + (the-as tire-trail-tracker s4-0) + ) + ) + (defmethod wvehicle-method-195 ((this wvehicle)) - ; TODO trail tracker stuff - ; (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) - ; (set! (-> s5-0 tracked-obj) (process->handle this)) - ; (set! (-> s5-0 max-num-crumbs) 80) - ; (set! (-> s5-0 appearance) *wheel-trail-info*) - ; (dotimes (s4-0 (-> this info physics-model wheel-count)) - ; (when (not (handle->process (-> this wheel s4-0 tread-tracker))) - ; (set! (-> *wheel-trail-info* tex-id) (the-as uint (-> this wheel s4-0 info tread-tid))) - ; (set! (-> this wheel s4-0 tread-tracker) (process->handle (spawn-tire-trail-tracker this s5-0))) - ; ) - ; ) - ; ) + (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-0 tracked-obj) (process->handle this)) + (set! (-> s5-0 max-num-crumbs) 80) + (set! (-> s5-0 appearance) *wheel-trail-info*) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (when (not (handle->process (-> this wheel s4-0 tread-tracker))) + (set! (-> *wheel-trail-info* tex-id) (-> this wheel s4-0 info tread-tid)) + (set! (-> this wheel s4-0 tread-tracker) (process->handle (spawn-tire-trail-tracker this s5-0))) + ) + ) + ) 0 (none) ) @@ -539,7 +705,7 @@ ) ) ) - (set! (-> *wheel-trail-info* tex-id) (the-as uint (-> s1-0 tread-tid))) + (set! (-> *wheel-trail-info* tex-id) (-> s1-0 tread-tid)) ) (let ((s1-1 (handle->process (-> s2-0 tread-tracker)))) (when s1-1 @@ -569,35 +735,24 @@ (cond ((>= (- (-> s5-0 cur-time) (-> s2-0 tread-time)) (the-as uint 50)) (set! (-> s2-0 tread-time) (-> s5-0 cur-time)) - (let* ((a0-42 (-> (the-as process-focusable s1-1) root)) - (t9-13 (method-of-object a0-42 y-angle)) - ) + (add-crumb-with-offset-and-uu + (-> (the-as tire-trail-tracker s1-1) trail) (-> s5-0 surface-pos) (-> s5-0 offset) - 0 - (t9-13 a0-42) + 0.0 ) ) (else - (let* ((a0-43 (-> (the-as process-focusable s1-1) root)) - (t9-14 (method-of-object a0-43 global-y-angle-to-point)) - (a1-29 (-> s5-0 surface-pos)) - ) - (-> s5-0 offset) - 0 - (t9-14 a0-43 a1-29) - ) + (tire-trail-method-23 (-> (the-as tire-trail-tracker s1-1) trail) (-> s5-0 surface-pos) (-> s5-0 offset) 0.0) ) ) (when (not (logtest? (-> s2-0 flags) 2)) (+! (-> s5-0 surface-pos y) -2048.0) - (let* ((a0-44 (-> (the-as process-focusable s1-1) root)) - (t9-15 (method-of-object a0-44 y-angle)) - ) + (add-crumb-with-offset-and-uu + (-> (the-as tire-trail-tracker s1-1) trail) (-> s5-0 surface-pos) (-> s5-0 zero-offset) - 0 - (t9-15 a0-44) + 0.0 ) (set! (-> s2-0 tread-time) (+ (-> s5-0 cur-time) -50)) ) @@ -606,22 +761,18 @@ (when (logtest? (-> s2-0 flags) 2) (set! (-> s2-0 tread-time) (-> s5-0 cur-time)) (+! (-> s5-0 surface-pos y) -2048.0) - (let* ((a0-45 (-> (the-as process-focusable s1-1) root)) - (t9-16 (method-of-object a0-45 y-angle)) - ) + (add-crumb-with-offset-and-uu + (-> (the-as tire-trail-tracker s1-1) trail) (-> s5-0 surface-pos) (-> s5-0 zero-offset) - 0 - (t9-16 a0-45) + 0.0 ) (+! (-> s5-0 surface-pos y) 2048.0) - (let* ((a0-46 (-> (the-as process-focusable s1-1) root)) - (t9-17 (method-of-object a0-46 y-angle)) - ) + (add-crumb-with-offset-and-uu + (-> (the-as tire-trail-tracker s1-1) trail) (-> s5-0 surface-pos) (-> s5-0 offset) - 0 - (t9-17 a0-46) + 0.0 ) (set! (-> s2-0 tread-time) (+ (-> s5-0 cur-time) -50)) ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc index 5feff8cf50..2c4a94b02f 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc @@ -894,7 +894,7 @@ (when (or (zero? *curve-toad-linear-up-red*) (!= loading-level global)) (set! *curve-toad-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-toad-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-toad-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-toad-linear-up-red* pts data 0 first) 0.0) @@ -954,15 +954,13 @@ (set! (-> *toad-grenade-trail* uv-repeat-dist) 16384000.0) -(set! (-> *toad-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *toad-grenade-trail* lie-mode) (lie-mode appearance0)) (set! (-> *toad-grenade-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *toad-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *toad-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *toad-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *toad-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *toad-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-toad-trail*)) diff --git a/goal_src/jak3/levels/factory/factory-manager.gc b/goal_src/jak3/levels/factory/factory-manager.gc index c8f283eaee..30233164f4 100644 --- a/goal_src/jak3/levels/factory/factory-manager.gc +++ b/goal_src/jak3/levels/factory/factory-manager.gc @@ -42,7 +42,7 @@ ) -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-vehicle) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-vehicle) (arg0 process-focusable)) #f ) @@ -72,15 +72,13 @@ (set! (-> *factory-fighter-trail* uv-repeat-dist) 16384000.0) -(set! (-> *factory-fighter-trail* lie-mode) (the-as uint 0)) +(set! (-> *factory-fighter-trail* lie-mode) (lie-mode appearance0)) (set! (-> *factory-fighter-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *factory-fighter-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *factory-fighter-trail* tex-id) (the-as uint #x100300)) + (set! (-> *factory-fighter-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *factory-fighter-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *factory-fighter-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) @@ -1167,7 +1165,7 @@ (let* ((v1-38 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-vehicle (+ v1-38 8192) 1)) diff --git a/goal_src/jak3/levels/forest/forest-kill-plants.gc b/goal_src/jak3/levels/forest/forest-kill-plants.gc index 4e72dbc86b..d67bd31061 100644 --- a/goal_src/jak3/levels/forest/forest-kill-plants.gc +++ b/goal_src/jak3/levels/forest/forest-kill-plants.gc @@ -196,15 +196,13 @@ (set! (-> *eco-green-trail* uv-repeat-dist) 102399.99) -(set! (-> *eco-green-trail* lie-mode) (the-as uint 3)) +(set! (-> *eco-green-trail* lie-mode) (lie-mode use-two-strips)) (set! (-> *eco-green-trail* max-age) (seconds 2)) (if #f - (set! (-> *eco-green-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *eco-green-trail* tex-id) (the-as uint #x500800)) + (set! (-> *eco-green-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *eco-green-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) (set! (-> *eco-green-trail* width-curve) (the-as curve2d-piecewise *eco-width-curve*)) @@ -231,11 +229,11 @@ ;; WARN: Return type mismatch object vs symbol. -(defmethod light-trail-tracker-method-17 ((this eco-green-trail-tracker) (arg0 process-focusable)) +(defmethod should-track? ((this eco-green-trail-tracker) (arg0 process-focusable)) (the-as symbol (and *target* (focus-test? *target* board) (< 0.0 (-> *target* fact eco-green)))) ) -(defmethod light-trail-tracker-method-16 ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) (if *target* (vector<-cspace! arg1 (-> *target* node-list data 37)) ) @@ -357,7 +355,7 @@ (let* ((v1-62 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* eco-green-trail-tracker (+ v1-62 8192) 1)) diff --git a/goal_src/jak3/levels/glider/glider-ring.gc b/goal_src/jak3/levels/glider/glider-ring.gc index bff26def1d..e17529591a 100644 --- a/goal_src/jak3/levels/glider/glider-ring.gc +++ b/goal_src/jak3/levels/glider/glider-ring.gc @@ -14,7 +14,7 @@ (when (or (zero? *curve-glider-ring-linear-up-red*) (!= loading-level global)) (set! *curve-glider-ring-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-glider-ring-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-glider-ring-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-glider-ring-linear-up-red* pts data 0 first) 0.0) @@ -74,15 +74,13 @@ (set! (-> *glider-ring-trail* uv-repeat-dist) 16384000.0) -(set! (-> *glider-ring-trail* lie-mode) (the-as uint 0)) +(set! (-> *glider-ring-trail* lie-mode) (lie-mode appearance0)) (set! (-> *glider-ring-trail* max-age) (seconds 1)) (if #f - (set! (-> *glider-ring-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *glider-ring-trail* tex-id) (the-as uint #x100300)) + (set! (-> *glider-ring-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *glider-ring-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *glider-ring-trail* width-curve) (the-as curve2d-piecewise *curve-glider-ring-linear-trail*)) @@ -108,7 +106,7 @@ ) -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) #f ) @@ -691,7 +689,7 @@ (let* ((v1-64 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-glider-ring (+ v1-64 8192) 1)) diff --git a/goal_src/jak3/levels/mine/mine-platforms.gc b/goal_src/jak3/levels/mine/mine-platforms.gc index 854e312086..e20f5509f2 100644 --- a/goal_src/jak3/levels/mine/mine-platforms.gc +++ b/goal_src/jak3/levels/mine/mine-platforms.gc @@ -339,7 +339,7 @@ (when (or (zero? *drill-loop-mid-curve*) (!= loading-level global)) (set! *drill-loop-mid-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *drill-loop-mid-curve* 3 'loading-level (the-as int #t)) + (allocate! *drill-loop-mid-curve* 3 'loading-level #t) ) (set! (-> *drill-loop-mid-curve* pts data 0 first) 0.0) @@ -365,7 +365,7 @@ (let ((f0-3 (* 0.07692308 (+ -15.0 f30-0)))) 0.0 0.0 - (let* ((f26-0 (curve2d-method-9 *drill-loop-mid-curve* f0-3 3)) + (let* ((f26-0 (evaluate *drill-loop-mid-curve* f0-3 (loop-behavior use-default))) (f28-0 (lerp -0.5 0.25 f26-0)) ) (sound-play-by-name @@ -393,7 +393,7 @@ (let ((f0-15 (* 0.055555556 (+ -28.0 f30-0)))) 0.0 0.0 - (let* ((f26-1 (curve2d-method-9 *drill-loop-mid-curve* f0-15 3)) + (let* ((f26-1 (evaluate *drill-loop-mid-curve* f0-15 (loop-behavior use-default))) (f28-1 (lerp -0.5 0.25 f26-1)) ) (sound-play-by-name diff --git a/goal_src/jak3/levels/mine/prebot-setup.gc b/goal_src/jak3/levels/mine/prebot-setup.gc index 42c47138b2..0d8e224188 100644 --- a/goal_src/jak3/levels/mine/prebot-setup.gc +++ b/goal_src/jak3/levels/mine/prebot-setup.gc @@ -502,7 +502,7 @@ (when (or (zero? *prebot-sword-color-curve*) (!= loading-level global)) (set! *prebot-sword-color-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *prebot-sword-color-curve* 2 'loading-level (the-as uint #t)) + (allocate! *prebot-sword-color-curve* 2 'loading-level #t) ) (set! (-> *prebot-sword-color-curve* pts data 0 first) 0.0) @@ -527,7 +527,7 @@ (when (or (zero? *prebot-sword-white-red-curve*) (!= loading-level global)) (set! *prebot-sword-white-red-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *prebot-sword-white-red-curve* 3 'loading-level (the-as uint #t)) + (allocate! *prebot-sword-white-red-curve* 3 'loading-level #t) ) (set! (-> *prebot-sword-white-red-curve* pts data 0 first) 0.0) @@ -595,15 +595,15 @@ (set! (-> *prebot-sword-color-array* uv-repeat-dist) 40960.0) -(set! (-> *prebot-sword-color-array* lie-mode) (the-as uint 0)) +(set! (-> *prebot-sword-color-array* lie-mode) (lie-mode appearance0)) (set! (-> *prebot-sword-color-array* max-age) (seconds 0.3)) (if #f (set! (-> *prebot-sword-color-array* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (lookup-texture-id-by-name (the-as string #f) (the-as string #f)) ) - (set! (-> *prebot-sword-color-array* tex-id) (the-as uint #x100300)) + (set! (-> *prebot-sword-color-array* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *prebot-sword-color-array* width-curve) (the-as curve2d-piecewise *prebot-sword-width-curve*)) @@ -681,12 +681,10 @@ (set! (-> s5-1 joint0) 3) (set! (-> s5-1 joint1) 5) (set! (-> s5-1 appearance) *prebot-sword-color-array*) - (set! (-> *prebot-sword-color-array* tex-id) - (the-as uint (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) - ) + (set! (-> *prebot-sword-color-array* tex-id) (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) (let* ((v1-43 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* weapon-trail-tracker (+ v1-43 8192) 1)) diff --git a/goal_src/jak3/levels/stadium/rublcst-scenes.gc b/goal_src/jak3/levels/stadium/rublcst-scenes.gc index 357888c151..5065a95b38 100644 --- a/goal_src/jak3/levels/stadium/rublcst-scenes.gc +++ b/goal_src/jak3/levels/stadium/rublcst-scenes.gc @@ -30,6 +30,8 @@ :anim "palace-ruins-attack-res-a" :parts 3 :command-list '((0 (fadein (frame-time-30 10)) (send-event *target* 'draw-vehicle #f)) + ;; og:preserve-this added to reset texture morph + (1 (apply ,(lambda :behavior scene-player () (set-darkjak-highres-texture-morph! 0.0)))) (160 (part-tracker "group-rubble-missile" entity diff --git a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc index 99890fd97d..cb0869a647 100644 --- a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc +++ b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc @@ -305,15 +305,13 @@ (set! (-> *bb-timer-chase-trail* uv-repeat-dist) 163840.0) -(set! (-> *bb-timer-chase-trail* lie-mode) (the-as uint 0)) +(set! (-> *bb-timer-chase-trail* lie-mode) (lie-mode appearance0)) (set! (-> *bb-timer-chase-trail* max-age) (seconds 4)) (if #f - (set! (-> *bb-timer-chase-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *bb-timer-chase-trail* tex-id) (the-as uint #x100300)) + (set! (-> *bb-timer-chase-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *bb-timer-chase-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *bb-timer-chase-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) @@ -404,12 +402,12 @@ ((-> self start-tracking?) (when (time-elapsed? (-> self time-offset) (seconds 0.05)) (set-time! (-> self time-offset)) - (when (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (when (should-track? self (the-as process-focusable gp-1)) (set! (-> self trail start-marker) (the-as uint 0)) (set! (-> self trail end-marker) (the-as uint 0)) - (light-trail-method-11 + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) 0 ) ) @@ -432,7 +430,7 @@ :post light-trail-tracker-common-post ) -(defmethod light-trail-tracker-method-19 ((this timer-chase-trail)) +(defmethod should-draw? ((this timer-chase-trail)) #t ) @@ -445,13 +443,13 @@ (set! (-> gp-1 tracked-obj) (process->handle self)) (set! (-> gp-1 appearance) *bb-timer-chase-trail*) (set! (-> *bb-timer-chase-trail* tex-id) - (the-as uint (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f))) + (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f)) ) (set! (-> gp-1 max-num-crumbs) 500) (set! (-> gp-1 track-immediately?) #f) (let* ((v1-18 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-0 (get-process *default-dead-pool* timer-chase-trail (+ v1-18 8192) 1)) diff --git a/goal_src/jak3/levels/wascity/dm-flyer.gc b/goal_src/jak3/levels/wascity/dm-flyer.gc index ac2f6a1c69..4be6c1f2f4 100644 --- a/goal_src/jak3/levels/wascity/dm-flyer.gc +++ b/goal_src/jak3/levels/wascity/dm-flyer.gc @@ -35,7 +35,7 @@ (when (or (zero? *dm-flyer-curve-linear-up-red*) (!= loading-level global)) (set! *dm-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *dm-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *dm-flyer-curve-linear-up-red* 2 'loading-level #f) ) (set! (-> *dm-flyer-curve-linear-up-red* pts data 0 first) 0.0) @@ -95,15 +95,13 @@ (set! (-> *dm-flyer-missile-trail* uv-repeat-dist) 16384000.0) -(set! (-> *dm-flyer-missile-trail* lie-mode) (the-as uint 0)) +(set! (-> *dm-flyer-missile-trail* lie-mode) (lie-mode appearance0)) (set! (-> *dm-flyer-missile-trail* max-age) (seconds 1)) (if #f - (set! (-> *dm-flyer-missile-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *dm-flyer-missile-trail* tex-id) (the-as uint #x100300)) + (set! (-> *dm-flyer-missile-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *dm-flyer-missile-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *dm-flyer-missile-trail* width-curve) @@ -572,7 +570,7 @@ (set! (-> s5-5 track-immediately?) #t) (let* ((v0-12 (estimate-light-trail-mem-usage (the-as uint (-> s5-5 max-num-crumbs)) - (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + (the-as uint (= (-> s5-5 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-12 8192) 1)) diff --git a/goal_src/jak3/levels/wascity/maker-projectile.gc b/goal_src/jak3/levels/wascity/maker-projectile.gc index 3e8ea8e3b2..4fc10fb159 100644 --- a/goal_src/jak3/levels/wascity/maker-projectile.gc +++ b/goal_src/jak3/levels/wascity/maker-projectile.gc @@ -29,7 +29,7 @@ (when (or (zero? *curve-maker-linear-up-red*) (!= loading-level global)) (set! *curve-maker-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-maker-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-maker-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-maker-linear-up-red* pts data 0 first) 0.0) @@ -89,15 +89,13 @@ (set! (-> *maker-grenade-trail* uv-repeat-dist) 16384000.0) -(set! (-> *maker-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *maker-grenade-trail* lie-mode) (lie-mode appearance0)) (set! (-> *maker-grenade-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *maker-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *maker-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *maker-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *maker-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *maker-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-maker-grenade-linear-trail*)) @@ -873,7 +871,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-32 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-32 8192) 1)) diff --git a/goal_src/jak3/levels/wascity/wasdef-manager.gc b/goal_src/jak3/levels/wascity/wasdef-manager.gc index f50017292e..e8947f495f 100644 --- a/goal_src/jak3/levels/wascity/wasdef-manager.gc +++ b/goal_src/jak3/levels/wascity/wasdef-manager.gc @@ -407,7 +407,7 @@ (when (or (zero? *curve-maker-entry-linear-up-red*) (!= loading-level global)) (set! *curve-maker-entry-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-maker-entry-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-maker-entry-linear-up-red* 2 'loading-level #f) ) (set! (-> *curve-maker-entry-linear-up-red* pts data 0 first) 0.0) @@ -467,15 +467,13 @@ (set! (-> *maker-entry-trail* uv-repeat-dist) 16384000.0) -(set! (-> *maker-entry-trail* lie-mode) (the-as uint 0)) +(set! (-> *maker-entry-trail* lie-mode) (lie-mode appearance0)) (set! (-> *maker-entry-trail* max-age) (seconds 0.5)) (if #f - (set! (-> *maker-entry-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *maker-entry-trail* tex-id) (the-as uint #x100300)) + (set! (-> *maker-entry-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *maker-entry-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) (set! (-> *maker-entry-trail* width-curve) (the-as curve2d-piecewise *curve-maker-entry-linear-trail*)) @@ -2367,7 +2365,7 @@ (let* ((v1-104 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-104 8192) 1)) diff --git a/goal_src/jak3/pc/debug/default-menu-pc.gc b/goal_src/jak3/pc/debug/default-menu-pc.gc index ad78516779..14b045f63e 100644 --- a/goal_src/jak3/pc/debug/default-menu-pc.gc +++ b/goal_src/jak3/pc/debug/default-menu-pc.gc @@ -791,7 +791,7 @@ (= (-> *pc-settings* territory) terr))) (defun dm-size-pick-func ((size pair)) - (set-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8) #t) + (set-window-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8)) ) (defun dm-screen-shot-preset-pick-func ((args pair) (msg debug-menu-msg)) @@ -848,9 +848,9 @@ (function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y)))) ) (menu "Fullscreen" - (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) - (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) - (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t))) + (function "Windowed" #f ,(lambda () (pc-set-display-mode! 'windowed))) + (function "Fullscreen" #f ,(lambda () (pc-set-display-mode! 'fullscreen))) + (function "Borderless" #f ,(lambda () (pc-set-display-mode! 'borderless))) ) (menu "Sizes" (function "640 x 480" (640 480) dm-size-pick-func) diff --git a/goalc/compiler/compilation/Static.cpp b/goalc/compiler/compilation/Static.cpp index d20c8b75cc..5d9dfe87a9 100644 --- a/goalc/compiler/compilation/Static.cpp +++ b/goalc/compiler/compilation/Static.cpp @@ -216,7 +216,7 @@ void Compiler::compile_static_structure_inline(const goos::Object& form, structure->add_pointer_record(field_offset, sr.reference(), sr.reference()->get_addr_offset()); } else if (sr.is_type()) { - if (field_info.type != TypeSpec("type")) { + if (field_info.type != TypeSpec("type") && field_info.type != TypeSpec("object")) { throw_compiler_error(form, "Cannot put a type reference in a field with type {}", field_info.type.print()); } diff --git a/scripts/ci/lint-characters.py b/scripts/ci/lint-characters.py index adfc35ba27..6c4cfc2b25 100644 --- a/scripts/ci/lint-characters.py +++ b/scripts/ci/lint-characters.py @@ -42,7 +42,12 @@ "–": "-", "​": "", "„": ",,", - "”": "\"" + "”": "\"", + " ": " ", + "!": "!", + "(": "(", + ")": ")", + "。": "." } # TODO - check for korean text @@ -83,7 +88,13 @@ "–": "-", "​": "", "„": ",,", - "”": "\"" + "”": "\"", + " ": " ", + "!": "!", + "(": "(", + ")": ")", + "〜": "~", + "。": "." } # fmt: on @@ -145,6 +156,7 @@ def lint_jak1_characters(text): character, text ) ) + # text = jak1_replace_character(text, pos, "?") invalid_characters_found = True pos = pos + 1 else: @@ -258,6 +270,7 @@ def lint_jak2_characters(text): character, text ) ) + # text = jak2_replace_character(text, pos, "?") invalid_characters_found = True pos = pos + 1 else: diff --git a/scripts/gsrc/jak1-sprite-adjustments.py b/scripts/gsrc/jak1-sprite-adjustments.py new file mode 100644 index 0000000000..45f8b49d25 --- /dev/null +++ b/scripts/gsrc/jak1-sprite-adjustments.py @@ -0,0 +1,279 @@ +import numpy as np +import matplotlib.pyplot as plt +from numpy.polynomial.polynomial import Polynomial + +# 1:1 - 1.00 - 500x500 +# 5:4 - 1.25 - 640x512 +# 4:3 - 1.33 - 640x480 +# 3:2 - 1.50 - 480x320 +# 16:10 - 1.60 - 640x400 +# 16:9 - 1.78 - 640x360 +# 1.85:1 - 1.85 - 640x346 +# 21:9 - 2.33 - 640x274 +# 2.35:1 - 2.35 - 640x272 +# 2.39:1 - 2.39 - 640x267 +# 32:9 - 3.56 - 1280x360 + +# (ml "progress-pc") +# (pc-set-window-size 500 500) +# (set! (-> *progress-process* 0 left-x-offset) 20) +# (set! (-> *progress-process* 0 right-x-offset) 20) +# (set! *PC-CROSS-X-ADJUST* -20.0) +# (set! *PC-CROSS-Y-ADJUST* -20.0) +# (set! *PC-SQUARE-X-ADJUST* -20.0) +# (set! *PC-SQUARE-Y-ADJUST* -20.0) + +values = [ + { + 'aspect': 1.00, + 'left': 20, + 'right': -33, + 'cross-x': -20.0, + 'cross-y': -20.0, + 'square-x': -5.0, + 'square-y': -10.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 0.0, + 'autosave-x': 0.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.25, + 'left': 4, + 'right': -6, + 'cross-x': -5.0, + 'cross-y': 0.0, + 'square-x': 0.0, + 'square-y': 0.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 0.0, + 'autosave-x': 0.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.33, + 'left': 0, + 'right': 0, + 'cross-x': 0.0, + 'cross-y': 0.0, + 'square-x': 0.0, + 'square-y': 0.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 0.0, + 'autosave-x': 0.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.5, + 'left': -6, + 'right': 12, + 'cross-x': 5.0, + 'cross-y': 0.0, + 'square-x': 5.0, + 'square-y': 0.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 12.0, + 'autosave-x': 10.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.60, + 'left': -10, + 'right': 18, + 'cross-x': 8.0, + 'cross-y': 5.0, + 'square-x': 5.0, + 'square-y': 0.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 12.0, + 'autosave-x': 10.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.78, + 'left': -14, + 'right': 26, + 'cross-x': 15.0, + 'cross-y': 10.0, + 'square-x': 8.0, + 'square-y': 10.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 15.0, + 'autosave-x': 10.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 1.85, + 'left': -16, + 'right': 29, + 'cross-x': 17.0, + 'cross-y': 10.0, + 'square-x': 8.0, + 'square-y': 10.0, + 'triangle-x': 0.0, + 'triangle-y': 0.0, + 'circle-x': 0.0, + 'circle-y': 0.0, + 'percent-x': 15.0, + 'autosave-x': 10.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 2.33, + 'left': -25, + 'right': 45, + 'cross-x': 30.0, + 'cross-y': 20.0, + 'square-x': 15.0, + 'square-y': 15.0, + 'triangle-x': 2.0, + 'triangle-y': 5.0, + 'circle-x': 2.0, + 'circle-y': -7.0, + 'percent-x': 18.0, + 'autosave-x': 15.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 2.35, + 'left': -26, + 'right': 46, + 'cross-x': 30.0, + 'cross-y': 20.0, + 'square-x': 15.0, + 'square-y': 15.0, + 'triangle-x': 2.0, + 'triangle-y': 5.0, + 'circle-x': 2.0, + 'circle-y': -7.0, + 'percent-x': 18.0, + 'autosave-x': 15.0, + 'orb-x': 0.0, + 'orb-glow-x': 0.0, + 'orb-text-x': 0.0, + 'cell-x': 0.0, + 'cell-text-x': 0.0, + 'buzzer-text-x': 0.0, + 'options-text-x': 0.0 + }, + { + 'aspect': 3.56, + 'left': -37, + 'right': 65, + 'cross-x': 45.0, + 'cross-y': 25.0, + 'square-x': 17.0, + 'square-y': 15.0, + 'triangle-x': 3.0, + 'triangle-y': 5.0, + 'circle-x': 5.0, + 'circle-y': -10.0, + 'percent-x': 25.0, + 'autosave-x': 18.0, + 'orb-x': 5.0, + 'orb-glow-x': 4.0, + 'orb-text-x': 10.0, + 'cell-x': -10.0, + 'cell-text-x': 2.0, + 'buzzer-text-x': -5.0, + 'options-text-x': 3.0 + }, +] + +adjustments = [ + 'left', 'right', 'cross-x', 'cross-y', 'square-x', 'square-y', 'triangle-x', 'triangle-y', 'circle-x', 'circle-y', 'percent-x', 'autosave-x', 'orb-x', 'orb-glow-x', 'orb-text-x', 'cell-x', 'cell-text-x', 'buzzer-text-x', 'options-text-x' +] + +aspect_ratio_values = [] +for dataset in values: + aspect_ratio_values.append(dataset['aspect']) +aspect_ratios = np.array(aspect_ratio_values) + +def check_return_value(aspect_ratio, coefs): + return coefs[0] + coefs[1] * aspect_ratio + coefs[2] * aspect_ratio**2 + +for adjust in adjustments: + # collect the values + data_values = [] + for dataset in values: + data_values.append(dataset[adjust]) + np_values = np.array(data_values) + # polynomial regression to interpolate between values + poly = Polynomial.fit(aspect_ratios, np_values, 3) + coefficients = poly.convert().coef + # produce a goal function to represent this polynomial + # if the aspect-ratio is close within a threshold we use that + function_string = "" + function_string += f"(defun pc-sprite-adjust-{adjust} ((aspect-ratio float))\n" + function_string += f" (cond\n" + for aspect_ratio, value in zip(aspect_ratios, data_values): + function_string += f" ((fequal-epsilon? aspect-ratio {aspect_ratio} 0.01) {value:.1f})\n" + function_string += f" (else\n (+ {coefficients[0]}\n (* {coefficients[1]} aspect-ratio)\n (* {coefficients[2]} aspect-ratio aspect-ratio)\n (* {coefficients[3]} aspect-ratio aspect-ratio aspect-ratio)))))\n" + print(function_string) + \ No newline at end of file diff --git a/test/decompiler/reference/jak1/engine/target/target2_REF.gc b/test/decompiler/reference/jak1/engine/target/target2_REF.gc index 3d39faf8b7..6bfab8884e 100644 --- a/test/decompiler/reference/jak1/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target2_REF.gc @@ -144,7 +144,7 @@ (x-offset int32) ) (:methods - (dumb-15 (_type_) none) + (spawn-particles! (_type_) none) ) (:states hud-coming-in @@ -257,7 +257,7 @@ ;; definition for method 14 of type first-person-hud ;; INFO: Return type mismatch int vs none. -(defmethod dumb-15 ((this first-person-hud)) +(defmethod spawn-particles! ((this first-person-hud)) (dotimes (s5-0 (-> this nb-of-particles)) (set! (-> this particles s5-0 pos x) (+ -256.0 (-> this particles s5-0 init-pos x))) (set! (-> this particles s5-0 pos y) @@ -322,7 +322,7 @@ ) ) :post (behavior () - (dumb-15 self) + (spawn-particles! self) ) ) @@ -355,7 +355,7 @@ ) ) :post (behavior () - (dumb-15 self) + (spawn-particles! self) ) ) diff --git a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc index 6e3ccc2fff..c023049da1 100644 --- a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc +++ b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc @@ -38,31 +38,31 @@ ;; definition for method 118 of type enemy (defmethod rnd-float-range ((this enemy) (low float) (high float)) "@param low The lower bound of the range (inclusive) -@param high The upper bound of the range (exclusive) -@returns A random float in the specified range" + @param high The upper bound of the range (exclusive) + @returns A random float in the specified range" (+ low (* (rand-vu) (- high low))) ) ;; definition for method 119 of type enemy (defmethod rnd-int-count ((this enemy) (high int)) "@param high The upper bound of the range (exclusive) -@returns a random integer in the range 0 to `high` -@see [[rand-vu]]" + @returns a random integer in the range 0 to `high` + @see [[rand-vu]]" (the int (* (rand-vu) (the float high))) ) ;; definition for method 121 of type enemy (defmethod rnd-int-range ((this enemy) (low int) (high int)) "@param low The lower bound of the range (inclusive) -@param high The upper bound of the range (exclusive) -@returns A random integer in the specified range" + @param high The upper bound of the range (exclusive) + @returns A random integer in the specified range" (+ low (the int (* (rand-vu) (the float (+ (- 1 low) high))))) ) ;; definition for method 122 of type enemy (defmethod rnd-percent? ((this enemy) (chance float)) "@param chance The value to compare ([[>=]]) with the result from [[rand-vu]]. -@returns If `chance` is greater than the random draw" + @returns If `chance` is greater than the random draw" (>= chance (rand-vu)) ) @@ -202,7 +202,7 @@ ;; definition for method 59 of type enemy (defmethod get-penetrate-info ((this enemy)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (penetrated-by-all&hit-points->penetrated-by (-> this penetrated-by-all) (-> this hit-points)) ) @@ -303,9 +303,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((self enemy)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) (set-time! (-> self last-draw-time)) ) @@ -803,7 +803,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod look-at-target! ((this enemy) (arg0 enemy-flag)) "Logic for looking at the target that is locked on, sets some flags and adjusts the neck to look at the target if available -@param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" + @param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" (case arg0 (((enemy-flag look-at-focus)) (logclear! (-> this enemy-flags) (enemy-flag look-at-move-dest)) @@ -846,7 +846,7 @@ ;; definition for method 126 of type enemy (defmethod enemy-above-ground? ((this enemy) (arg0 collide-query) (arg1 vector) (arg2 collide-spec) (arg3 float) (arg4 float) (arg5 float)) "@returns if the enemy is above the ground or not -@see [[above-ground?]]" + @see [[above-ground?]]" (above-ground? (-> this root) arg0 arg1 arg2 arg3 arg4 arg5) ) @@ -1060,7 +1060,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod set-enemy-info! ((this enemy) (arg0 enemy-info)) "In addition to setting the `enemy-info`, also init the `neck-joint` if applicable from it -@param info Set `enemy-info` accordingly" + @param info Set `enemy-info` accordingly" (set! (-> this enemy-info) arg0) (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) (set! (-> this neck) @@ -1291,11 +1291,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this enemy) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-enemy-collision! this) (process-drawable-from-entity! this arg0) (init-enemy! this) @@ -1351,10 +1351,10 @@ This commonly includes things such as: ;; definition for method 98 of type enemy (defmethod in-aggro-range? ((this enemy) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" #t ) @@ -1528,8 +1528,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs enemy-aware. (defmethod update-target-awareness! ((this enemy) (arg0 process-focusable) (arg1 enemy-best-focus)) "Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets `aware` and related fields as well! -@TODO - flesh out docs -@returns the value that sets `aware`" + @TODO - flesh out docs + @returns the value that sets `aware`" (let ((f30-0 (vector-vector-distance (get-trans arg0 0) (-> this root trans))) (s3-1 #f) (s2-0 #f) @@ -1673,7 +1673,7 @@ This commonly includes things such as: ;; INFO: Used lq/sq (defmethod general-event-handler ((this enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (s5-5 rgbaf) (sv-432 process) (sv-448 event-message-block)) (cond ((= arg2 'track) diff --git a/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc b/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc index ca8461557b..92204347f7 100644 --- a/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc +++ b/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc @@ -123,7 +123,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod play-communicator-speech! ((this talker-speech-class)) "Plays the provided [[talker-speech-class]] -@TODO - understand the array from [[game-info]] better" + @TODO - understand the array from [[game-info]] better" (set! (-> *game-info* unknown-pad6 (+ (* (-> this speech) 2) 1)) (the-as uint #xffff)) 0 (none) diff --git a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc index 95e592a904..50b4aaf3e1 100644 --- a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc @@ -141,10 +141,10 @@ ;; definition for method 10 of type align-control (defmethod align! ((this align-control) (options align-opts) (x float) (y float) (z float)) "As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled -using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0> - -@returns the `root` of the [[process-drawable]] after the method returns -@see [[process-drawable::16]]" + using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0> + + @returns the `root` of the [[process-drawable]] after the method returns + @see [[process-drawable::16]]" (when (not (logtest? (-> this flags) (align-flags disabled))) (let* ((process (-> this process)) (method-call (method-of-object process apply-alignment)) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-interface_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-interface_REF.gc index ab2ebd38c5..7d2f8f98e1 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-interface_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-interface_REF.gc @@ -41,9 +41,9 @@ ;; definition for function camera-pos (defun camera-pos () "Returns the `trans` vector from whatever is first determined to exist: -- [[*camera-combiner*]] -- [[*math-camera*]] -- else, [[*camera-dummy-vector*]]" + - [[*camera-combiner*]] + - [[*math-camera*]] + - else, [[*camera-dummy-vector*]]" (cond (*camera-combiner* (-> *camera-combiner* trans) diff --git a/test/decompiler/reference/jak2/engine/common_objs/base-plat_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/base-plat_REF.gc index 91d083fab3..968611d174 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/base-plat_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/base-plat_REF.gc @@ -43,7 +43,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this base-plat)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." 0 (none) ) @@ -64,8 +64,8 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch int vs none. (defmethod start-bouncing! ((this base-plat)) "Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce -and translate the platform via the `smush` -@see [[smush-control]]" + and translate the platform via the `smush` + @see [[smush-control]]" (activate! (-> this smush) -1.0 60 150 1.0 1.0 (-> self clock)) (set-time! (-> this bounce-time)) (set! (-> this bouncing) #t) @@ -81,8 +81,8 @@ and translate the platform via the `smush` ;; WARN: new jak 2 until loop case, check carefully (defbehavior plat-code base-plat () "After calling [[transform-post]] for 2 consecutive frames, put the process to sleep if it's not bouncing -otherwise, continue bouncing...forever! -@see [[transform-post]]" + otherwise, continue bouncing...forever! + @see [[transform-post]]" (transform-post) (suspend) (transform-post) @@ -105,9 +105,9 @@ otherwise, continue bouncing...forever! ;; INFO: Used lq/sq (defbehavior plat-trans base-plat () "If the platform is `bouncing`, move the platform accordingly with the [[smush-control]] -- If the amplitude of the `smush` has hit `0.0` then stop bouncing - -If we aren't bouncing however, TODO - CSHAPE" + - If the amplitude of the `smush` has hit `0.0` then stop bouncing + + If we aren't bouncing however, TODO - CSHAPE" (rider-trans) (cond ((-> self bouncing) @@ -160,7 +160,7 @@ If we aren't bouncing however, TODO - CSHAPE" ;; WARN: Return type mismatch none vs object. (defbehavior plat-event base-plat ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) "Handles platform related events. Presently all this does is: -- if `event-type` is [['bonk]], then call [[base-plat:29]]" + - if `event-type` is [['bonk]], then call [[base-plat:29]]" (case event-type (('bonk) (start-bouncing! self) @@ -226,9 +226,9 @@ If we aren't bouncing however, TODO - CSHAPE" ;; WARN: Return type mismatch symbol vs object. (defbehavior eco-door-event-handler eco-door ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) "If the `event-type` is `'trigger`, flip the `locked` flag on the door -and play the respective sound - -@unused - likely a leftover from Jak 1" + and play the respective sound + + @unused - likely a leftover from Jak 1" (case event-type (('trigger) (set! (-> self locked) (not (-> self locked))) @@ -380,7 +380,7 @@ eco-door-event-handler ;; WARN: Return type mismatch int vs none. (defmethod lock-according-to-task! ((this eco-door)) "If the associated subtask is completed, lock the door if [[eco-door-flags:0]] is set -otherwise, lock it if [[eco-door-flags:0]] is set" + otherwise, lock it if [[eco-door-flags:0]] is set" (when (-> this state-actor) (if (logtest? (-> this state-actor extra perm status) (entity-perm-status subtask-complete)) (set! (-> this locked) (logtest? (-> this flags) (eco-door-flags ecdf01))) @@ -427,11 +427,11 @@ otherwise, lock it if [[eco-door-flags:0]] is set" ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this eco-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (eco-door-method-25 this) (process-drawable-from-entity! this arg0) (let ((door-scale (res-lump-float (-> this entity) 'scale :default 1.0))) diff --git a/test/decompiler/reference/jak2/engine/common_objs/basebutton_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/basebutton_REF.gc index 42b48bd867..6b90c81115 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/basebutton_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/basebutton_REF.gc @@ -291,9 +291,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod send-event! ((this basebutton) (event-type symbol)) "Prepares an [[event-message-block]] using the provided type to send an event to: -- the `notify-actor` -- every [[entity-actor]] in the `actor-group` array -@see [[entity-actor]]" + - the `notify-actor` + - every [[entity-actor]] in the `actor-group` array + @see [[entity-actor]]" (when event-type (let ((event (new 'stack-no-clear 'event-message-block))) (set! (-> event from) (process->ppointer self)) @@ -427,11 +427,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this basebutton) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (reset! this) (set! (-> this button-id) -1) diff --git a/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc index e578f3bf24..1a26437caf 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc @@ -175,11 +175,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this blocking-plane) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) (f30-0 (res-lump-float (-> this entity) 'height :default 122880.0)) ) diff --git a/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc index 0c161301a5..cbda00792d 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc @@ -1345,11 +1345,11 @@ ;; definition for method 11 of type eco-yellow (defmethod init-from-entity! ((this eco-yellow) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type eco-yellow) (-> *FACT-bank* eco-single-inc)) (none) ) @@ -1375,11 +1375,11 @@ This commonly includes things such as: ;; definition for method 11 of type eco-red (defmethod init-from-entity! ((this eco-red) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type eco-red) (-> *FACT-bank* eco-single-inc)) (none) ) @@ -1405,11 +1405,11 @@ This commonly includes things such as: ;; definition for method 11 of type eco-blue (defmethod init-from-entity! ((this eco-blue) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type eco-blue) (-> *FACT-bank* eco-single-inc)) (none) ) @@ -1435,11 +1435,11 @@ This commonly includes things such as: ;; definition for method 11 of type eco-green (defmethod init-from-entity! ((this eco-green) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type eco-green) (-> *FACT-bank* eco-single-inc)) (none) ) @@ -1465,11 +1465,11 @@ This commonly includes things such as: ;; definition for method 11 of type health (defmethod init-from-entity! ((this health) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type health) (-> *FACT-bank* health-default-inc)) (none) ) @@ -1520,11 +1520,11 @@ This commonly includes things such as: ;; definition for method 11 of type eco-pill (defmethod init-from-entity! ((this eco-pill) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-common this arg0 (pickup-type eco-pill-green) (-> *FACT-bank* health-small-inc)) (none) ) @@ -1749,11 +1749,11 @@ This commonly includes things such as: ;; definition for method 11 of type money (defmethod init-from-entity! ((this money) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (initialize-allocations this) (process-drawable-from-entity! this (-> this entity)) (initialize-options this 0 1024.0 (the-as fact-info #f)) @@ -2393,11 +2393,11 @@ This commonly includes things such as: ;; definition for method 11 of type trick-point (defmethod init-from-entity! ((this trick-point) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (initialize-allocations this) (process-drawable-from-entity! this (-> this entity)) (initialize-options this 0 1024.0 (the-as fact-info #f)) @@ -2713,11 +2713,11 @@ This commonly includes things such as: ;; definition for method 11 of type eco (defmethod init-from-entity! ((this eco) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((v1-1 (res-lump-value (-> this entity) 'eco-info uint128 :time -1000000000.0))) (set! (-> this type) (cond ((= (the-as uint v1-1) 3) diff --git a/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc index bd60bce3a2..3258d46c3e 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc @@ -145,7 +145,7 @@ ;; WARN: Return type mismatch object vs ambient-sound. (defmethod set-and-get-ambient-sound! ((this conveyor)) "So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]] -and return it as well. Otherwise, set it to `0`" + and return it as well. Otherwise, set it to `0`" (let ((actor-options (res-lump-value (-> this entity) 'options actor-option :time -1000000000.0))) (the-as ambient-sound @@ -429,11 +429,11 @@ and return it as well. Otherwise, set it to `0`" ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this conveyor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (reset-root! this) (process-drawable-from-entity! this arg0) (initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0)) diff --git a/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc index 5ceca90b3b..f00cadff9e 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc @@ -1168,11 +1168,11 @@ ;; definition for method 11 of type crate (defmethod init-from-entity! ((this crate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (crate-init! this arg0) (skel-init! this) (crate-method-38 this) @@ -1471,7 +1471,3 @@ This commonly includes things such as: #f ) ) - - - - diff --git a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc index a85eddd5de..3f2ccaf59c 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc @@ -136,10 +136,10 @@ ;; definition for method 43 of type elevator (defmethod move-between-points ((this elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" #f ) @@ -183,11 +183,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-defaults! ((this elevator)) "Initializes default settings related to the [[elevator]]: -- `elevator-xz-threshold` -- `elevator-y-threshold` -- `elevator-start-pos` -- `elevator-move-rate` -- `elevator-flags`" + - `elevator-xz-threshold` + - `elevator-y-threshold` + - `elevator-start-pos` + - `elevator-move-rate` + - `elevator-flags`" (let ((entity (-> this entity))) (set! (-> this params xz-threshold) ((method-of-object entity get-property-value-float) entity @@ -252,8 +252,8 @@ ;; definition for function ease-value-in-out (defun ease-value-in-out ((value float) (step-amount float)) "TODO - the math in this function is full of duplication and isn't totally clear -but if the name is to be believed, it's to slow a values grow at the beginning and end of it's range -which is obviously useful for an elevator." + but if the name is to be believed, it's to slow a values grow at the beginning and end of it's range + which is obviously useful for an elevator." (let* ((step step-amount) (f4-0 (- 1.0 step-amount)) (f3-0 (/ step (- 1.0 f4-0))) @@ -421,13 +421,13 @@ which is obviously useful for an elevator." ;; INFO: Used lq/sq (defmethod find-closest-point-in-path! ((this elevator) (arg0 vector) (arg1 (pointer float)) (arg2 symbol) (arg3 symbol)) "Finds and sets the provided [[path-step]]'s `next-pos` field to the vertex index in the path which is closest to -the provided [[vector]] - -@param vec The point at which distance calculations are based off -@param! next-step If a point is found, `next-pos` will be set to the correct point -@param arg2 TODO -@param arg3 TODO -@returns [[#t]] if a point in the path was found" + the provided [[vector]] + + @param vec The point at which distance calculations are based off + @param! next-step If a point is found, `next-pos` will be set to the correct point + @param arg2 TODO + @param arg3 TODO + @returns [[#t]] if a point in the path was found" (local-vars (path-point vector)) (let ((elev-params (-> this params)) (smallest-dist 0.0) @@ -494,8 +494,8 @@ the provided [[vector]] ;; WARN: Return type mismatch int vs none. (defmethod move-to-next-point! ((this elevator)) "If the [[*target*]] is in a valid state and there is a point to transition to in the elevator's path -do so. -@see [[elevator::47]]" + do so. + @see [[elevator::47]]" (local-vars (zero float)) (let ((target *target*)) (when (and target @@ -765,9 +765,9 @@ do so. ;; WARN: Return type mismatch int vs none. (defmethod calc-dist-between-points! ((this elevator) (path-point-x int) (path-point-y int)) "Calculates the distance between two points in the elevator's path. - -@param path-point-x The index of the first point in the distance calculation, and where `next-pos` and `dist` are stored in the `path-seq` array -@param path-point-y The second point in the distance calculation" + + @param path-point-x The index of the first point in the distance calculation, and where `next-pos` and `dist` are stored in the `path-seq` array + @param path-point-y The second point in the distance calculation" (set! (-> this path-seq data path-point-x next-pos) (the float path-point-y)) (let ((point-x (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float path-point-x) 'interp)) (point-y (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float path-point-y) 'interp)) @@ -791,7 +791,7 @@ do so. ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." 0 (none) ) @@ -832,11 +832,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this elevator) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-32 float) (sv-36 path-control) (sv-40 target)) (init-plat-collision! this) (process-drawable-from-entity! this entity) diff --git a/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc index e5ba29499f..7f9fe7fd25 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc @@ -242,11 +242,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this swingpole) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" "Copy defaults from the entity." (stack-size-set! (-> this main-thread) 128) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -343,11 +343,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this process-hidden) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" "Copy defaults from the entity." (process-entity-status! this (entity-perm-status dead) #t) (go (method-of-object this die)) @@ -2050,11 +2050,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this med-res-level) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 128) (let ((s4-0 (res-lump-struct arg0 'art-name structure)) (s3-0 (res-lump-struct (-> this entity) 'level structure)) @@ -2137,11 +2137,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 string)) (stack-size-set! (-> this main-thread) 128) (logior! (-> this mask) (process-mask ambient)) @@ -2783,11 +2783,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this launcher) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 128) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) diff --git a/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc index 5fbaa8c30b..2bdc9866bf 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/plat_REF.gc @@ -74,7 +74,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this plat)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." 0 (none) ) @@ -89,9 +89,9 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 36 of type plat (defmethod plat-path-sync ((this plat)) "If the `sync` period is greater than `0` then transition the state to [[plat::35]] -otherwise, [[plat::34]] - -@see [[sync-eased]]" + otherwise, [[plat::34]] + + @see [[sync-eased]]" (cond ((logtest? (-> this path flags) (path-control-flag not-found)) (go (method-of-object this plat-idle)) @@ -166,11 +166,11 @@ otherwise, [[plat::34]] ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this plat) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask platform)) (init-plat-collision! this) (process-drawable-from-entity! this entity) diff --git a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc index 4a5bd2ae5e..cf7695bad5 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc @@ -90,9 +90,9 @@ ;; definition for method 36 of type projectile (defmethod handle-proj-hit! ((this projectile) (arg0 process) (arg1 event-message-block)) "When a projectile hits something, first deal damage via [[projectile::37]] -and increment the projectiles hit count. - -If we've met or exceeded the projectiles maximum allowed hits, switch to the [[projectile::impact]] state" + and increment the projectiles hit count. + + If we've met or exceeded the projectiles maximum allowed hits, switch to the [[projectile::impact]] state" (when (-> this attack-mode) (let ((a2-1 (-> arg1 param 0))) (when (deal-damage! this arg0 (the-as event-message-block a2-1)) diff --git a/test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc index 1a04d33844..442a17042d 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/rigid-body-plat_REF.gc @@ -551,11 +551,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-from-entity! ((this rigid-body-platform) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask platform)) (allocate-and-init-cshape this) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc index fdcb49b547..706121e06e 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc @@ -608,11 +608,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this judge) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (setup-collision this) (init this) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc index ddd1009bec..eff269e7d3 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/water-anim_REF.gc @@ -682,11 +682,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this water-anim) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (water-anim-method-27 this) (reset-root! this) (water-anim-init! this) diff --git a/test/decompiler/reference/jak2/engine/debug/history_REF.gc b/test/decompiler/reference/jak2/engine/debug/history_REF.gc index 0951e52bad..7cfa1e29ac 100644 --- a/test/decompiler/reference/jak2/engine/debug/history_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/history_REF.gc @@ -174,9 +174,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod clear-history-entries! ((this history)) "Iterates through each [[history-elt]] in the `elt` dynamic array -For each entry: -- clear `timestamp` -- clear `record-tag`" + For each entry: + - clear `timestamp` + - clear `record-tag`" (set! (-> this alloc-index) 0) (countdown (v1-0 (-> this allocated-length)) (let ((a1-3 (-> this elts v1-0))) @@ -199,10 +199,10 @@ For each entry: ;; WARN: new jak 2 until loop case, check carefully (defmethod clear-record-tags! ((this history) (arg0 history-channel) (arg1 uint) (arg2 uint)) "First grab the latest [[history-elt]] at `alloc-index` -1. update it's `channel`, `record-id` and `owner` from the provided args -2. - if it's `record-tag` is zero -- return it -- otherwise, iterate through all `elts` until one is found that does not match it's `timestamp` -- if not `0` out the `record-tag` for that elt and continue iteration" + 1. update it's `channel`, `record-id` and `owner` from the provided args + 2. - if it's `record-tag` is zero -- return it + - otherwise, iterate through all `elts` until one is found that does not match it's `timestamp` + - if not `0` out the `record-tag` for that elt and continue iteration" (let* ((t1-0 (-> this alloc-index)) (v1-0 (-> this elts)) (v0-0 (-> v1-0 t1-0)) @@ -253,9 +253,9 @@ For each entry: ;; definition for method 10 of type history-iterator (defmethod update-entries! ((this history-iterator)) "Iterate through each [[history-elt]] in [[*history*]] -- If we hit the end set `done?` to true -- If the `timestamp` on the elt, minus the current framecounter exceeds `max-age`, we are also done, return #f -- However if we find an elt who's `owner` matches the iterator's, break out early returning that `elt`" + - If we hit the end set `done?` to true + - If the `timestamp` on the elt, minus the current framecounter exceeds `max-age`, we are also done, return #f + - However if we find an elt who's `owner` matches the iterator's, break out early returning that `elt`" (let ((v1-0 *history*) (a1-2 (-> *display* base-clock frame-counter)) ) diff --git a/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc b/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc index b52aa45131..7018b29984 100644 --- a/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/memory-usage_REF.gc @@ -64,9 +64,9 @@ ;; definition for function mem-size (defun mem-size ((data basic) (inspect-usage? symbol) (arg2 int)) "@param data The [[basic]] to call `mem-usage` on -@param inspect-usage? Set to [[#t]] if `inspect` should be called on the resulting [[memory-usage-block]] -@param arg2 TODO - unsure, some sort of bitfield -@returns The total memory footprint of the provided [[basic]]" + @param inspect-usage? Set to [[#t]] if `inspect` should be called on the resulting [[memory-usage-block]] + @param arg2 TODO - unsure, some sort of bitfield + @returns The total memory footprint of the provided [[basic]]" (let ((block (new 'stack 'memory-usage-block))) (mem-usage data block arg2) (if inspect-usage? @@ -79,11 +79,11 @@ ;; definition for method 14 of type level (defmethod compute-memory-usage! ((this level) (force? symbol)) "Calculates the memory usage of the level, returns and stores the [[memory-usage-block]] -in `mem-usage-block` as well as the total size in `mem-usage` - -@param force? - Will re-compute the usage if set to [[#t]], even if `mem-usage` has been set to a non-zero value -@returns The [[memory-usage-block]] representing the footprint of the level -@see [[memory-usage-block::10]]" + in `mem-usage-block` as well as the total size in `mem-usage` + + @param force? - Will re-compute the usage if set to [[#t]], even if `mem-usage` has been set to a non-zero value + @returns The [[memory-usage-block]] representing the footprint of the level + @see [[memory-usage-block::10]]" (if (zero? (-> this mem-usage-block)) (set! (-> this mem-usage-block) (new 'debug 'memory-usage-block)) ) diff --git a/test/decompiler/reference/jak2/engine/debug/nav/mysql-nav-graph_REF.gc b/test/decompiler/reference/jak2/engine/debug/nav/mysql-nav-graph_REF.gc index 1a9d2bb90d..b932133a38 100644 --- a/test/decompiler/reference/jak2/engine/debug/nav/mysql-nav-graph_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/nav/mysql-nav-graph_REF.gc @@ -311,7 +311,7 @@ ;; definition for method 13 of type mysql-nav-graph (defmethod alloc-new-node! ((this mysql-nav-graph)) "Allocates a new `[[mysql-nav-node]]`, if `node-array`'s `length` exceeds `3000` return `-1` -otherwise, return the new size of the array" + otherwise, return the new size of the array" (cond ((>= (-> this node-array length) 3000) (format #t "mysql-nav-graph : nodes buffer too small, increase NAV_GRAPH_EDITOR_NODE_COUNT~%") @@ -336,7 +336,7 @@ otherwise, return the new size of the array" ;; definition for method 14 of type mysql-nav-graph (defmethod alloc-new-edge! ((this mysql-nav-graph)) "Allocates a new `[[mysql-nav-edge]]`, if `edge-array`'s `length` exceeds `5000` return `-1` -otherwise, return the new size of the array" + otherwise, return the new size of the array" (cond ((>= (-> this edge-array length) 5000) (format #t "mysql-nav-graph : edges buffer too small, increase NAV_GRAPH_EDITOR_EDGE_COUNT~%") @@ -361,7 +361,7 @@ otherwise, return the new size of the array" ;; definition for method 15 of type mysql-nav-graph (defmethod indexof-visnode ((this mysql-nav-graph) (edge-id int) (node-id int)) "Returns the index in the `visnode-array` whom's [[mysql-nav-visnode]] has the provided `runtime-edge-id` and `runtime-node-id` -if none exist, return `-1`" + if none exist, return `-1`" (dotimes (v1-0 (-> this visnode-array length)) (let ((a3-2 (-> this visnode-array data v1-0))) (if (and (= (-> a3-2 runtime-edge-id) edge-id) (= (-> a3-2 runtime-node-id) node-id)) @@ -375,9 +375,9 @@ if none exist, return `-1`" ;; definition for method 16 of type mysql-nav-graph (defmethod alloc-new-visnode! ((this mysql-nav-graph) (edge-id int) (node-id int)) "Potentially allocates a new `[[mysql-nav-visnode]]`: -- if `visnode-array`'s `length` exceeds `3000` return `-1` -- otherwise, if the node already exists, TODO -- if the node does not already exist, create it!" + - if `visnode-array`'s `length` exceeds `3000` return `-1` + - otherwise, if the node already exists, TODO + - if the node does not already exist, create it!" (cond ((>= (-> this visnode-array length) 3000) (format #t "mysql-nav-graph : visnodes buffer too small, increase NAV_GRAPH_EDITOR_VISNODE_COUNT~%") @@ -777,7 +777,7 @@ if none exist, return `-1`" ;; definition for method 11 of type mysql-nav-graph (defmethod indexof-nav-node ((this mysql-nav-graph) (node-id int)) "Iterate through the `node-array` and return the index for the first [[mysql-nav-node]] whom's `nav_node_id` matches the provided id -returns `-1` if none is found" + returns `-1` if none is found" (dotimes (v1-0 (-> this node-array length)) (if (= node-id (-> (the-as mysql-nav-node (-> this node-array data v1-0)) nav_node_id)) (return v1-0) @@ -789,7 +789,7 @@ returns `-1` if none is found" ;; definition for method 12 of type mysql-nav-graph (defmethod indexof-nav-edge ((this mysql-nav-graph) (edge-id int)) "Iterate through the `edge-array` and return the index for the first [[mysql-nav-edge]] whom's `nav_edge_id` matches the provided id -returns `-1` if none is found" + returns `-1` if none is found" (dotimes (v1-0 (-> this edge-array length)) (if (= edge-id (-> (the-as mysql-nav-edge (-> this edge-array data v1-0)) nav_edge_id)) (return v1-0) diff --git a/test/decompiler/reference/jak2/engine/debug/sampler_REF.gc b/test/decompiler/reference/jak2/engine/debug/sampler_REF.gc index 7fc346e6e1..4cc1470963 100644 --- a/test/decompiler/reference/jak2/engine/debug/sampler_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/sampler_REF.gc @@ -30,8 +30,8 @@ ;; WARN: Return type mismatch int vs none. (defun-debug sampler-start () "Reset the [[timer-bank]] EE registers. -- If [[*sampler-mem*]] is undefined, allocate 16.7MB in the debug segment -- and when [[*sampler-mem*]] is defined, initialize the [[timer-bank]] fully. Reset [[*sampler-count*]] to 0 as well" + - If [[*sampler-mem*]] is undefined, allocate 16.7MB in the debug segment + - and when [[*sampler-mem*]] is defined, initialize the [[timer-bank]] fully. Reset [[*sampler-count*]] to 0 as well" (set! (-> (the-as timer-bank #x10000000) mode) (new 'static 'timer-mode)) (set! (-> (the-as timer-bank #x10000000) count) (the-as uint 0)) (set! (-> (the-as timer-bank #x10000000) comp) *sampler-compare*) diff --git a/test/decompiler/reference/jak2/engine/debug/viewer_REF.gc b/test/decompiler/reference/jak2/engine/debug/viewer_REF.gc index 0d4df6c825..66e76f961c 100644 --- a/test/decompiler/reference/jak2/engine/debug/viewer_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/viewer_REF.gc @@ -218,11 +218,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this viewer) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! *viewer* this) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/engine/dma/dma-disasm_REF.gc b/test/decompiler/reference/jak2/engine/dma/dma-disasm_REF.gc index 2412765ae8..92e30ed7b5 100644 --- a/test/decompiler/reference/jak2/engine/dma/dma-disasm_REF.gc +++ b/test/decompiler/reference/jak2/engine/dma/dma-disasm_REF.gc @@ -513,9 +513,9 @@ ;; INFO: Used lq/sq (defun disasm-dma-list ((arg0 dma-packet) (arg1 symbol) (arg2 symbol) (arg3 symbol) (arg4 int)) "Print out an entire DMA list. -If mode is #t, print vif tags too. If mode is 'details, also print data unpacked by vif-tags. -If verbose is #t, print out the addresses of each tag, and total size statistics. -If expected size is negative, it is ignored. Otherwise, only disassemble this much dma data." + If mode is #t, print vif tags too. If mode is 'details, also print data unpacked by vif-tags. + If verbose is #t, print out the addresses of each tag, and total size statistics. + If expected size is negative, it is ignored. Otherwise, only disassemble this much dma data." (local-vars (sv-16 object) (sv-32 dma-packet) diff --git a/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc b/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc index 99cc84ba38..84eaabc9e3 100644 --- a/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc +++ b/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc @@ -218,10 +218,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod collect-regions ((this drawable) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) "Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count -@param area-of-interest The area defined by a sphere that we care about overlaps -@param _count The amount of [[drawable]]s in the object to enumerate through -@param! region-list Stores the overlapping regions and a count for how many were found -@returns none" + @param area-of-interest The area defined by a sphere that we care about overlaps + @param _count The amount of [[drawable]]s in the object to enumerate through + @param! region-list Stores the overlapping regions and a count for how many were found + @returns none" 0 (none) ) diff --git a/test/decompiler/reference/jak2/engine/entity/actor-link-h_REF.gc b/test/decompiler/reference/jak2/engine/entity/actor-link-h_REF.gc index ac07fdb353..3549c6f5bf 100644 --- a/test/decompiler/reference/jak2/engine/entity/actor-link-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/actor-link-h_REF.gc @@ -26,7 +26,7 @@ ;; INFO: Used lq/sq (defun entity-actor-count ((arg0 res-lump) (arg1 symbol)) "Get the number of entities that this res references under the name. -This works on more than just next/prev." + This works on more than just next/prev." (local-vars (sv-16 res-tag)) (set! sv-16 (new 'static 'res-tag)) (if (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16)) @@ -95,8 +95,8 @@ and use it for entity lookups." ;; definition for method 0 of type actor-link-info (defmethod new actor-link-info ((allocation symbol) (type-to-make type) (arg0 process) (arg1 symbol)) "Set up an actor-link-info for the given process. -The entity of this process should be the entity-actor -that will get this actor-link-info." + The entity of this process should be the entity-actor + that will get this actor-link-info." (let* ((a0-1 (-> arg0 entity)) (s4-0 (entity-actor-lookup a0-1 'next-actor 0)) (a0-2 (-> arg0 entity)) @@ -152,7 +152,7 @@ that will get this actor-link-info." ;; definition for method 16 of type actor-link-info (defmethod apply-function-forward ((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object)) "Iterate forward through actors, and apply this function. Starts at (-> this next) -If the function returns truthy, stop iterating." + If the function returns truthy, stop iterating." (let ((s3-0 (-> this next))) (while s3-0 (if (arg0 s3-0 arg1) @@ -167,7 +167,7 @@ If the function returns truthy, stop iterating." ;; definition for method 17 of type actor-link-info (defmethod apply-function-reverse ((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object)) "Iterate backward through actors and apply function. -If the function returns truth, stop iterating." + If the function returns truth, stop iterating." (let ((s3-0 (-> this prev))) (while s3-0 (if (arg0 s3-0 arg1) @@ -323,7 +323,7 @@ If the function returns truth, stop iterating." ;; definition for method 9 of type actor-link-info (defmethod get-matching-actor-type-mask ((this actor-link-info) (arg0 type)) "Iterate through _all_ actors that are part of this actor list. -If the nth actor is type matching-type, then set the nth bit of the result." + If the nth actor is type matching-type, then set the nth bit of the result." (let ((s3-0 (-> this process entity)) (s5-0 0) ) diff --git a/test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc b/test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc index 8a18575877..46d68c2736 100644 --- a/test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/entity-table_REF.gc @@ -192,10 +192,10 @@ ;; WARN: Return type mismatch basic vs entity-info. (defun entity-info-lookup ((arg0 type)) "Given a type, return the [[entity-info]] from [[*entity-info*]] whos type -matches the `ptype` field. Set's `method 13` on said type that returns the `length` -off the [[entity-info]] - -If nothing matches, set `method 13` to `#f` and return `#f`" + matches the `ptype` field. Set's `method 13` on said type that returns the `length` + off the [[entity-info]] + + If nothing matches, set `method 13` to `#f` and return `#f`" (the-as entity-info (cond ((nonzero? (-> arg0 method-table 13)) (-> arg0 method-table 13) diff --git a/test/decompiler/reference/jak2/engine/entity/res_REF.gc b/test/decompiler/reference/jak2/engine/entity/res_REF.gc index 4895d6a6b5..e380589b79 100644 --- a/test/decompiler/reference/jak2/engine/entity/res_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/res_REF.gc @@ -116,16 +116,16 @@ ;; WARN: Return type mismatch int vs res-tag-pair. (defmethod lookup-tag-idx ((this res-lump) (arg0 symbol) (arg1 symbol) (arg2 float)) "Look up the index of the tag containing with the given name and timestamp. -Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits. -Depending on the mode, they may be the same, or they may be two tags that you should interpolate -between, if the exact time was not found. - -@param name-sym should be the name of the thing you want. -@param time is for the timestamp you want. -If mode = 'base, then both the indices are the same and the timestamp is ignored. -If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found). -If mode = 'exact, then it requires an exact timestamp match and both indices are the same. -If things go wrong, returns a negative number." + Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits. + Depending on the mode, they may be the same, or they may be two tags that you should interpolate + between, if the exact time was not found. + + @param name-sym should be the name of the thing you want. + @param time is for the timestamp you want. + If mode = 'base, then both the indices are the same and the timestamp is ignored. + If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found). + If mode = 'exact, then it requires an exact timestamp match and both indices are the same. + If things go wrong, returns a negative number." (local-vars (t4-1 int)) (when (or (= arg0 'id) (= arg0 'aid) @@ -227,9 +227,9 @@ If things go wrong, returns a negative number." ;; INFO: Used lq/sq (defmethod make-property-data ((this res-lump) (arg1 float) (tag-pair res-tag-pair) (arg3 pointer)) "Returns (a pointer to) the value data of a property with the tag-pair. -If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time -with the result written into buf. buf must have enough space to copy all of the data. -Otherwise, simply returns an address to the resource binary." + If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time + with the result written into buf. buf must have enough space to copy all of the data. + Otherwise, simply returns an address to the resource binary." (rlet ((vf1 :class vf) (vf2 :class vf) (vf3 :class vf) @@ -420,10 +420,10 @@ Otherwise, simply returns an address to the resource binary." (arg5 pointer) ) "Returns an address to a given property's data at a specific time stamp, or default on error. -@param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp. -@param default is the default result returned in the case of an error. -@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f -@param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode." + @param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f + @param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode." (let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2))) (cond ((< (the-as int s3-0) 0) @@ -452,11 +452,11 @@ Otherwise, simply returns an address to the resource binary." (arg5 pointer) ) "Returns a given struct property's value at a specific time stamp, or default on error. -@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. -@param default is the default result returned in the case of an error. -@param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f. -@param buf-addr is an address to the data buffer used to write interpolated data to. -It must have enough space! Only necessary for 'interp mode." + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." (let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2))) (cond ((< (the-as int s3-0) 0) @@ -491,11 +491,11 @@ It must have enough space! Only necessary for 'interp mode." (arg5 pointer) ) "Returns a given value property's value at a specific time stamp, or default on error. -@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. -@param default is the default result returned in the case of an error. -@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f. -@param buf-addr is an address to the data buffer used to write interpolated data to. -It must have enough space! Only necessary for 'interp mode." + @param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp. + @param default is the default result returned in the case of an error. + @param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f. + @param buf-addr is an address to the data buffer used to write interpolated data to. + It must have enough space! Only necessary for 'interp mode." (let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2))) (cond ((< (the-as int a2-1) 0) @@ -677,10 +677,10 @@ It must have enough space! Only necessary for 'interp mode." ;; INFO: Used lq/sq (defmethod allocate-data-memory-for-tag! ((this res-lump) (arg0 res-tag)) "Find space for the data described by arg0 in this. -Returns a tag with data-offset set correctly for this res-lump. -If the lump already contains memory for the given tag, and it is big enough, -it will be reused. Alignment will be at least 8 bytes. -If the input tag has elt-count = 0, it will return a tag for elt-count = 1." + Returns a tag with data-offset set correctly for this res-lump. + If the lump already contains memory for the given tag, and it is big enough, + it will be reused. Alignment will be at least 8 bytes. + If the input tag has elt-count = 0, it will return a tag for elt-count = 1." (local-vars (resource-mem pointer)) (let* ((tag-pair (lookup-tag-idx this (-> arg0 name) 'exact (-> arg0 key-frame))) (existing-tag (-> this tag (-> tag-pair lo))) @@ -746,8 +746,8 @@ If the input tag has elt-count = 0, it will return a tag for elt-count = 1." ;; definition for method 17 of type res-lump (defmethod add-data! ((this res-lump) (tag res-tag) (arg2 pointer)) "Given a tag and a pointer to its data, copy it to this res-lump. -This doesn't seem to do the right thing if the given tag is a non-inline tag -with > 1 element." + This doesn't seem to do the right thing if the given tag is a non-inline tag + with > 1 element." (let ((a0-2 (allocate-data-memory-for-tag! this tag))) (when a0-2 (let* ((v1-2 this) @@ -787,7 +787,7 @@ with > 1 element." ;; INFO: Used lq/sq (defmethod get-curve-data! ((this res-lump) (arg0 curve) (arg1 symbol) (arg2 symbol) (arg3 float)) "Read curve data and write it to curve-target. Return #t if both -control points and knots data was succesfully read, #f otherwise." + control points and knots data was succesfully read, #f otherwise." (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((s5-0 #f)) (set! sv-16 (new 'static 'res-tag)) diff --git a/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc b/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc index 8ebe16a5ec..49659dc660 100644 --- a/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc @@ -249,7 +249,7 @@ ;; WARN: disable def twice: 23. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod intersects-line-segment? ((this bounding-box) (arg0 vector) (arg1 vector)) "Check intersection in xz plane, using liang-barsky. Not sure if this actually -a useful check or not..." + a useful check or not..." (let ((f28-0 (- (-> arg1 x) (-> arg0 x))) (f30-0 (- (-> arg1 z) (-> arg0 z))) ) diff --git a/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc b/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc index 5aaae676cb..180f6daa10 100644 --- a/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc @@ -4,7 +4,7 @@ ;; definition for function vector-flatten! (defun vector-flatten! ((arg0 vector) (arg1 vector) (arg2 vector)) "Get the projection of src onto a plane with the given normal -The normal should have magnitude 1.0." + The normal should have magnitude 1.0." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -51,11 +51,11 @@ The normal should have magnitude 1.0." ;; definition for function vector-reflect-flat! (defun vector-reflect-flat! ((arg0 vector) (arg1 vector) (arg2 vector)) "This is a weird one. It doesn't care about the value of src dot normal -and it effectively replaces the component of src normal to the plane with -the plane's normal. I think this requires src/normal to both be unit vectors -in order to make sense. -NOTE: src should point from positive halfspace to negative otherwise it -doesn't work." + and it effectively replaces the component of src normal to the plane with + the plane's normal. I think this requires src/normal to both be unit vectors + in order to make sense. + NOTE: src should point from positive halfspace to negative otherwise it + doesn't work." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -130,8 +130,8 @@ doesn't work." ;; definition for function vector-segment-distance-point! (defun vector-segment-distance-point! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) "Compute the distance from a point to the closest point on the line segment. -arg0 is the point. arg1/arg2 are the endpoints of the line segment. -arg3 is an optional output closest point." + arg0 is the point. arg1/arg2 are the endpoints of the line segment. + arg3 is an optional output closest point." (local-vars (v0-0 float) (v1-0 float) (v1-1 float)) (rlet ((acc :class vf) (Q :class vf) @@ -204,7 +204,7 @@ arg3 is an optional output closest point." ;; INFO: Used lq/sq (defun vector-line-distance ((arg0 vector) (arg1 vector) (arg2 vector)) "Weird function: given a point arg1, and an infinite line connecting arg2 and arg1, compute the distance -from arg0 to that line." + from arg0 to that line." (let* ((a1-3 (vector-normalize! (vector-! (new-stack-vector0) arg2 arg1) 1.0)) (gp-1 (vector-! (new-stack-vector0) arg0 arg1)) (f0-1 (vector-dot a1-3 gp-1)) @@ -405,7 +405,7 @@ from arg0 to that line." ;; definition for function forward-up->inv-matrix (defun forward-up->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) "Create a matrix representing an inverse transform where arg1 is forward (+z) -and arg2 is up (+y). Will use the pitch of forward." + and arg2 is up (+y). Will use the pitch of forward." (forward-down->inv-matrix arg0 arg1 (vector-negate! (new 'stack-no-clear 'vector) arg2)) ) @@ -413,7 +413,7 @@ and arg2 is up (+y). Will use the pitch of forward." ;; INFO: Used lq/sq (defun forward-up-nopitch->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) "Create a matrix representing an inverse transform where arg1 is forward (+z) -and arg2 is up (+y). Will not use the pitch of forward." + and arg2 is up (+y). Will not use the pitch of forward." (forward-down-nopitch->inv-matrix arg0 arg1 (vector-negate! (new-stack-vector0) arg2)) ) @@ -454,7 +454,7 @@ and arg2 is up (+y). Will not use the pitch of forward." ;; INFO: Used lq/sq (defun quaternion-from-two-vectors-partial! ((arg0 quaternion) (arg1 vector) (arg2 vector) (arg3 float)) "Create a quaternion representing the rotation between two vectors, -doing arg3 fraction of the total rotation." + doing arg3 fraction of the total rotation." (let* ((s5-0 (vector-cross! (new-stack-vector0) arg1 arg2)) (f0-0 (vector-length s5-0)) (f1-1 (+ 1.0 (* arg3 (+ -1.0 (vector-dot arg1 arg2))))) @@ -543,7 +543,7 @@ doing arg3 fraction of the total rotation." ;; INFO: Used lq/sq (defun matrix-from-two-vectors-max-angle! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float)) "Create a rotation matrix representing the rotation between two vectors, -allowing at most a rotation of arg3 degrees." + allowing at most a rotation of arg3 degrees." (let ((s4-1 (vector-normalize! (vector-cross! (new-stack-vector0) arg2 arg1) 1.0)) (f30-0 (vector-dot arg1 arg2)) (f28-0 (cos arg3)) @@ -569,10 +569,10 @@ allowing at most a rotation of arg3 degrees." ;; definition for function matrix-from-two-vectors-smooth! (defun matrix-from-two-vectors-smooth! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int)) "This function can help smoothly rotate from a current heading vector to a target one. -It returns a rotation to move arg1 closer to arg2, subject to two different speed limits. -arg3 is a rotations-per-frame rate. This limit takes frame rate into account (when lagging, the rotation is larger) -arg4 is a 'slow down when getting close to the end' limit. -This is used in rotate-toward-orientation, which is much improved from jak 1." + It returns a rotation to move arg1 closer to arg2, subject to two different speed limits. + arg3 is a rotations-per-frame rate. This limit takes frame rate into account (when lagging, the rotation is larger) + arg4 is a 'slow down when getting close to the end' limit. + This is used in rotate-toward-orientation, which is much improved from jak 1." (let* ((s5-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0)) (f0-1 (vector-dot arg1 arg2)) (f0-2 (acos f0-1)) @@ -587,7 +587,7 @@ This is used in rotate-toward-orientation, which is much improved from jak 1." ;; definition for function matrix-from-two-vectors-the-long-way-smooth! (defun matrix-from-two-vectors-the-long-way-smooth! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int)) "Same as above, but rotates you away from the target. -Note that the 'near the end' smoothing will apply when you're near the target." + Note that the 'near the end' smoothing will apply when you're near the target." (let* ((s5-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0)) (f0-1 (vector-dot arg1 arg2)) (f0-3 (- (acos f0-1))) @@ -610,7 +610,7 @@ Note that the 'near the end' smoothing will apply when you're near the target." ;; definition for function matrix-from-two-vectors-max-angle-partial! (defun matrix-from-two-vectors-max-angle-partial! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float)) "Create a rotation matrix representing the given fraction of the rotation between two heading vectors, -rotating by at most the given angle." + rotating by at most the given angle." (let* ((s4-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0)) (f28-0 (vector-dot arg1 arg2)) (f30-0 (cos arg3)) @@ -1049,8 +1049,8 @@ rotating by at most the given angle." ;; definition for function point-in-plane-<-point+normal! (defun point-in-plane-<-point+normal! ((arg0 vector) (arg1 vector) (arg2 vector)) "Very strange function. Takes a plane, in point-normal form, then returns some other point on that plane. -It will move 1m in two of {x, y, z} directions. The direction not moved in is the one which is closest to point-in-triangle-cross -in the same direction of the normal (this prevent moving huge distances for nearly vertical planes for example)." + It will move 1m in two of {x, y, z} directions. The direction not moved in is the one which is closest to point-in-triangle-cross + in the same direction of the normal (this prevent moving huge distances for nearly vertical planes for example)." (let ((f0-3 (+ (* (-> arg2 x) (-> arg1 x)) (* (-> arg2 y) (-> arg1 y)) (* (-> arg2 z) (-> arg1 z))))) (set! (-> arg0 w) 1.0) (let ((f1-7 (fabs (-> arg2 x))) @@ -1509,12 +1509,12 @@ in the same direction of the normal (this prevent moving huge distances for near ;; ERROR: Unsupported inline assembly instruction kind - [sll v1, v1, 4] (defun curve-evaluate! ((arg0 vector) (arg1 float) (arg2 (inline-array vector)) (arg3 int) (arg4 (pointer float)) (arg5 int)) "Evaluate a curve. -arg0 is the output -arg1 is the input. -arg2 is control vertices. -arg3 is the number of control vertices. -arg4 is the knot points. -arg5 is the number of knots." + arg0 is the output + arg1 is the input. + arg2 is control vertices. + arg3 is the number of control vertices. + arg4 is the knot points. + arg5 is the number of knots." (local-vars (v1-7 int) (v1-8 int) (v1-10 float) (s3-0 int)) (rlet ((acc :class vf) (vf0 :class vf) diff --git a/test/decompiler/reference/jak2/engine/geometry/path_REF.gc b/test/decompiler/reference/jak2/engine/geometry/path_REF.gc index a44676026a..efa5dd8958 100644 --- a/test/decompiler/reference/jak2/engine/geometry/path_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/path_REF.gc @@ -73,8 +73,8 @@ ;; definition for method 18 of type curve-control (defmethod total-distance ((this curve-control)) "Will lazily calculate and set the [[curve]]'s `length` -@returns total path length of the [[curve]] -@see [[curve-length]]" + @returns total path length of the [[curve]] + @see [[curve-length]]" (let ((f0-0 (-> this curve length))) (when (= f0-0 0.0) (set! f0-0 (curve-length (-> this curve))) @@ -88,16 +88,16 @@ ;; INFO: Used lq/sq (defmethod get-point-in-path! ((this path-control) (ret vector) (idx float) (search-type symbol)) "Depending on the value of `idx`, the result can be quite different: -- if `idx` is less than `0.0` - return the first vertex in the path -- if `idx` is greater than the number of vertices in the path, return the last vertex -- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex -- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex -using the fractional component of `idx` as the interpolant, return this result - -@param! ret The [[vector]] that is used to hold the return value -@param idx Either the vertex index or also partially the interpolant in a LERP -@param search-type The only recognized value is `exact` -@returns Either a distinct vertex along the path, or some fractional point between two vertices" + - if `idx` is less than `0.0` - return the first vertex in the path + - if `idx` is greater than the number of vertices in the path, return the last vertex + - if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex + - otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex + using the fractional component of `idx` as the interpolant, return this result + + @param! ret The [[vector]] that is used to hold the return value + @param idx Either the vertex index or also partially the interpolant in a LERP + @param search-type The only recognized value is `exact` + @returns Either a distinct vertex along the path, or some fractional point between two vertices" (let ((num-vertices (-> this curve num-cverts)) (vert-idx (the float (the int idx))) ) @@ -148,20 +148,20 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 14 of type path-control (defmethod get-point-at-percent-along-path! ((this path-control) (ret vector) (percent float) (search-type symbol)) "@param! ret The [[vector]] that is used to hold the return value -@param percent The percentage along the path -@param search-type The only recognized value is `exact` -@returns the point closest to some arbitrary percentage along the path -@see [[path-control::10]]" + @param percent The percentage along the path + @param search-type The only recognized value is `exact` + @returns the point closest to some arbitrary percentage along the path + @see [[path-control::10]]" (get-point-in-path! this ret (* percent (the float (+ (-> this curve num-cverts) -1))) search-type) ) ;; definition for method 14 of type curve-control (defmethod get-point-at-percent-along-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) "@param! ret The [[vector]] that is used to hold the return value -@param percent The percentage along the path -@param search-type The only recognized value is `exact` -@returns the point closest to some arbitrary percentage along the path -@see [[path-control::10]]" + @param percent The percentage along the path + @param search-type The only recognized value is `exact` + @returns the point closest to some arbitrary percentage along the path + @see [[path-control::10]]" (if (not (logtest? (-> this flags) (path-control-flag not-found))) (curve-evaluate! arg0 @@ -178,16 +178,16 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 10 of type curve-control (defmethod get-point-in-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) "Depending on the value of `idx`, the result can be quite different: -- if `idx` is less than `0.0` - return the first vertex in the path -- if `idx` is greater than the number of vertices in the path, return the last vertex -- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex -- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex -using the fractional component of `idx` as the interpolant, return this result - -@param! ret The [[vector]] that is used to hold the return value -@param idx Either the vertex index or also partially the interpolant in a LERP -@param search-type The only recognized value is `exact` -@returns Either a distinct vertex along the path, or some fractional point between two vertices" + - if `idx` is less than `0.0` - return the first vertex in the path + - if `idx` is greater than the number of vertices in the path, return the last vertex + - if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex + - otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex + using the fractional component of `idx` as the interpolant, return this result + + @param! ret The [[vector]] that is used to hold the return value + @param idx Either the vertex index or also partially the interpolant in a LERP + @param search-type The only recognized value is `exact` + @returns Either a distinct vertex along the path, or some fractional point between two vertices" (if (not (logtest? (-> this flags) (path-control-flag not-found))) (curve-evaluate! arg0 @@ -204,15 +204,15 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 26 of type path-control (defmethod displacement-between-two-points! ((this path-control) (ret vector) (idx float) (mag float)) "Return value can differ quite a bit: -- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]] -- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path: -- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1` -- else, the result is between the second last vertex and the last - -@param! ret The [[vector]] that is used to hold the return value -@param idx The vertex index -@param mag The magnitude to scale the resulting displacement vector by -@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]" + - If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]] + - Otherwise, find the scaled (by `mag`) displacement vector between two points in the path: + - If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1` + - else, the result is between the second last vertex and the last + + @param! ret The [[vector]] that is used to hold the return value + @param idx The vertex index + @param mag The magnitude to scale the resulting displacement vector by + @returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]" (let ((num-vertices (-> this curve num-cverts)) (vert-idx (the float (the int idx))) ) @@ -234,17 +234,17 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 12 of type path-control (defmethod displacement-between-two-points-copy! ((this path-control) (ret vector) (idx float) (mag float)) "Calls [[path-control::26]] with the provided args -@see [[path-control::26]]" + @see [[path-control::26]]" (displacement-between-two-points! this ret idx mag) ) ;; definition for method 15 of type path-control (defmethod displacement-between-points-at-percent-scaled! ((this path-control) (ret vector) (percent float) (mag float)) "Calls [[path-control::12], with the `idx` at a given percent along the path -@param ret The [[vector]] that is used to hold the return value -@param percent The percentage along the path to find the first index -@param mag Multiplied by the number of points in the path and scales the resulting vector -@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path" + @param ret The [[vector]] that is used to hold the return value + @param percent The percentage along the path to find the first index + @param mag Multiplied by the number of points in the path and scales the resulting vector + @returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path" (displacement-between-two-points-copy! this ret @@ -256,10 +256,10 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 13 of type path-control (defmethod displacement-between-two-points-normalized! ((this path-control) (ret vector) (idx float)) "Calls [[path-control::26], with the provided `idx` -@param! ret The [[vector]] the result is stored within -@param idx The vertex index -@returns The resulting displacement vector, normalized -@see [[path-control::26]]" + @param! ret The [[vector]] the result is stored within + @param idx The vertex index + @returns The resulting displacement vector, normalized + @see [[path-control::26]]" (displacement-between-two-points! this ret idx 1.0) (vector-normalize! ret 1.0) ) @@ -267,11 +267,11 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 16 of type path-control (defmethod displacement-between-points-at-percent-normalized! ((this path-control) (ret vector) (percent float)) "Calls [[path-control::13], with the `idx` at a given percent along the path -@param! ret The [[vector]] the result is stored within -@param percent The percentage along the path -@returns The resulting displacement vector, normalized -@see [[path-control::13]] -@see [[path-control::14]]" + @param! ret The [[vector]] the result is stored within + @param percent The percentage along the path + @returns The resulting displacement vector, normalized + @see [[path-control::13]] + @see [[path-control::14]]" (displacement-between-two-points-normalized! this ret @@ -282,15 +282,15 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 26 of type curve-control (defmethod displacement-between-two-points! ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) "Return value can differ quite a bit: -- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]] -- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path: -- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1` -- else, the result is between the second last vertex and the last - -@param! ret The [[vector]] that is used to hold the return value -@param idx The vertex index -@param mag The magnitude to scale the resulting displacement vector by -@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]" + - If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]] + - Otherwise, find the scaled (by `mag`) displacement vector between two points in the path: + - If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1` + - else, the result is between the second last vertex and the last + + @param! ret The [[vector]] that is used to hold the return value + @param idx The vertex index + @param mag The magnitude to scale the resulting displacement vector by + @returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]" (when (not (logtest? (-> this flags) (path-control-flag not-found))) (let ((s4-0 (new 'stack-no-clear 'vector))) (curve-evaluate! @@ -338,21 +338,21 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 15 of type curve-control (defmethod displacement-between-points-at-percent-scaled! ((this curve-control) (ret vector) (idx float) (mag float)) "Calls [[path-control::12], with the `idx` at a given percent along the path -@param ret The [[vector]] that is used to hold the return value -@param percent The percentage along the path to find the first index -@param mag Multiplied by the number of points in the path and scales the resulting vector -@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path" + @param ret The [[vector]] that is used to hold the return value + @param percent The percentage along the path to find the first index + @param mag Multiplied by the number of points in the path and scales the resulting vector + @returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path" (displacement-between-two-points! this ret idx mag) ) ;; definition for method 16 of type curve-control (defmethod displacement-between-points-at-percent-normalized! ((this curve-control) (ret vector) (percent float)) "Calls [[path-control::13], with the `idx` at a given percent along the path -@param! ret The [[vector]] the result is stored within -@param percent The percentage along the path -@returns The resulting displacement vector, normalized -@see [[path-control::13]] -@see [[path-control::14]]" + @param! ret The [[vector]] the result is stored within + @param percent The percentage along the path + @returns The resulting displacement vector, normalized + @see [[path-control::13]] + @see [[path-control::14]]" (displacement-between-two-points! this ret percent 0.01) (vector-normalize! ret 1.0) ) @@ -371,8 +371,8 @@ using the fractional component of `idx` as the interpolant, return this result ;; INFO: Used lq/sq (defmethod get-furthest-point-on-path ((this path-control) (point vector)) "@param point The point to calculate distance from -@returns the `vertex-idx.interpolant` value to the point on the path furthest away from the `point` -@see [[path-control::10]]" + @returns the `vertex-idx.interpolant` value to the point on the path furthest away from the `point` + @see [[path-control::10]]" (let ((curr-point (new 'stack-no-clear 'vector)) (next-point (new 'stack-no-clear 'vector)) (given-point (new 'stack-no-clear 'vector)) @@ -407,8 +407,8 @@ using the fractional component of `idx` as the interpolant, return this result ;; definition for method 23 of type path-control (defmethod get-path-percentage-at-furthest-point ((this path-control) (point vector)) "@param point The point to calculate distance from -@returns the percentage of path completion from the point on the path furthest away from the `point` -@see [[path-control::14]]" + @returns the percentage of path completion from the point on the path furthest away from the `point` + @see [[path-control::14]]" (/ (get-furthest-point-on-path this point) (the float (+ (-> this curve num-cverts) -1))) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/lights_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/lights_REF.gc index 31a497b237..61ef59419b 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/lights_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/lights_REF.gc @@ -7,11 +7,11 @@ ;; definition for function light-slerp (defun light-slerp ((light-out light) (light-a light) (light-b light) (alpha float)) "Linearly interpolate between two [[light]]s -@param! light-out The resultant -@param light-a One of the two lights -@param light-b One of the two lights -@param alpha Clamped to between `0.0` and `1.0` -@returns The interpolated [[light]]" + @param! light-out The resultant + @param light-a One of the two lights + @param light-b One of the two lights + @param alpha Clamped to between `0.0` and `1.0` + @returns The interpolated [[light]]" (let ((clamped-alpha (fmax 0.0 (fmin 1.0 alpha)))) (vector-lerp! (-> light-out color) (-> light-a color) (-> light-b color) clamped-alpha) (vector-deg-slerp (-> light-out direction) (-> light-a direction) (-> light-b direction) clamped-alpha) @@ -27,11 +27,11 @@ ;; definition for function light-group-slerp (defun light-group-slerp ((light-group-out light-group) (light-group-a light-group) (light-group-b light-group) (alpha float)) "Linearly interpolate between two [[light-groups]]s by calling [[light-slerp]] on each respective collection of lights -@param light-group-out The resultant -@param light-group-a One of the two [[light-group]]s -@param light-group-b One of the two [[light-group]]s -@param alpha -@returns The linearly interpolated [[light-group]]" + @param light-group-out The resultant + @param light-group-a One of the two [[light-group]]s + @param light-group-b One of the two [[light-group]]s + @param alpha + @returns The linearly interpolated [[light-group]]" (dotimes (group-idx 4) (light-slerp (-> light-group-out lights group-idx) @@ -46,11 +46,11 @@ ;; definition for function light-group-process! (defun light-group-process! ((vu-lights vu-lights) (light-group light-group) (vec1 vector) (vec2 vector)) "Unused, needlessly calls [[rotate-y<-vector+vector]] on the two [[vector]]s and calls [[vu-lights<-light-group!]] -@param vu-lights -@param light-group -@param vec1 -@param vec2 -@returns [[none]]" + @param vu-lights + @param light-group + @param vec1 + @param vec2 + @returns [[none]]" (rotate-y<-vector+vector vec2 vec1) (vu-lights<-light-group! vu-lights light-group) (none) @@ -62,8 +62,8 @@ ;; definition for function vu-lights-default! (defun vu-lights-default! ((lights vu-lights)) "Setups up a default [[vu-lights]] instance -@param! lights -@returns [[vu-lights]]" + @param! lights + @returns [[vu-lights]]" (set-vector! (-> lights ambient) 0.3 0.3 0.3 1.0) (set-vector! (-> lights color 0) 1.0 1.0 1.0 1.0) (set-vector! (-> lights color 1) 0.2 0.2 0.2 1.0) @@ -78,10 +78,10 @@ ;; WARN: Return type mismatch pointer vs none. (defun-debug init-light-hash () "Initializes the global [[*light-hash*]]. -- Bucket array allocates `4096` bytes. (enough for 16,384 entries) -- Index array allocates `65536` bytes. -- Light sphere array allocates `16384` bytes. (enough for 256 light spheres) -@returns [[light-hash]]" + - Bucket array allocates `4096` bytes. (enough for 16,384 entries) + - Index array allocates `65536` bytes. + - Light sphere array allocates `16384` bytes. (enough for 256 light spheres) + @returns [[light-hash]]" (when (not *light-hash*) (set! *light-hash* (new 'loading-level 'light-hash)) (set! (-> *light-hash* num-lights) (the-as uint 0)) @@ -111,7 +111,7 @@ ;; WARN: Return type mismatch int vs none. (defun-debug reset-light-hash ((arg0 light-hash)) "Resets the global [[*light-hash*]] back to having `0` lights, indicies, and buckets. -@returns [[none]]" + @returns [[none]]" (set! (-> *light-hash* num-lights) (the-as uint 0)) (set! (-> *light-hash* num-indices) (the-as uint 0)) (set! (-> *light-hash* num-buckets) (the-as uint 0)) @@ -201,9 +201,9 @@ ;; definition for function lookup-light-sphere-by-name (defun lookup-light-sphere-by-name ((name string) (hash light-hash)) "Search through a given [[light-hash]]'s lights to find the one that matches the given name -@param name The name to look for -@param hash The hash to search through -@returns Either the [[light]] or [[#f]]" + @param name The name to look for + @param hash The hash to search through + @returns Either the [[light]] or [[#f]]" (when (and hash (nonzero? hash)) (dotimes (num-lights (the-as int (-> hash num-lights))) (let ((light (-> hash light-sphere-array num-lights))) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/ripple_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/ripple_REF.gc index 65d1958316..53e1672245 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/ripple_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/ripple_REF.gc @@ -49,9 +49,9 @@ ;; WARN: Return type mismatch int vs none. (defun ripple-make-request ((waveform ripple-wave) (effect merc-effect)) "Iterate through [[*ripple-globals*]] `requests` looking for the one that matches the provided `effect` -If NOT found, append a new [[ripple-request]] with the providded `effect` and `waveform` to the end of the `requests`. - -NOTE: There can only be 16 effects at a given time, NOOP if already at that limit!" + If NOT found, append a new [[ripple-request]] with the providded `effect` and `waveform` to the end of the `requests`. + + NOTE: There can only be 16 effects at a given time, NOOP if already at that limit!" (let ((v1-1 (-> *ripple-globals* count)) (a2-1 (-> *ripple-globals* requests)) (a3-0 0) @@ -107,10 +107,10 @@ NOTE: There can only be 16 effects at a given time, NOOP if already at that limi ;; WARN: Return type mismatch int vs none. (defun ripple-execute () "Iterate through [[*ripple-globals*]] requests, from the end to index `0` -For each request, if it has a `waveform` create the wave-table via `ripple-create-wave-table` -Then for each `waveform` apply the `effect` using `ripple-apply-wave-table` - -Once completed, all `requests` have been processed and the `count` is reset to `0`" + For each request, if it has a `waveform` create the wave-table via `ripple-create-wave-table` + Then for each `waveform` apply the `effect` using `ripple-apply-wave-table` + + Once completed, all `requests` have been processed and the `count` is reset to `0`" (when (-> *ripple-globals* count) (ripple-execute-init) (let ((gp-0 0) diff --git a/test/decompiler/reference/jak2/engine/gfx/hw/video_REF.gc b/test/decompiler/reference/jak2/engine/gfx/hw/video_REF.gc index 061e247680..742d6d90c8 100644 --- a/test/decompiler/reference/jak2/engine/gfx/hw/video_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/hw/video_REF.gc @@ -5,11 +5,11 @@ ;; WARN: Return type mismatch int vs none. (defun set-video-mode ((tv-format symbol)) "Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]] -`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1` - -Will also set a bunch of common settings related to profiling and the camera to finalize the switch - -@param tv-format Recognizes `ntsc` and `pal`" + `ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1` + + Will also set a bunch of common settings related to profiling and the camera to finalize the switch + + @param tv-format Recognizes `ntsc` and `pal`" (case tv-format (('ntsc) (set! (-> *setting-control* user-default display-dx) 0) @@ -49,7 +49,7 @@ Will also set a bunch of common settings related to profiling and the camera to ;; WARN: Return type mismatch int vs none. (defun set-aspect-ratio ((aspect symbol)) "Set [[*video-params*]] aspect-ratio related settings based on the mode provided. -@param aspect Recognizes `aspect4x3` and `aspect16x9`" + @param aspect Recognizes `aspect4x3` and `aspect16x9`" (case aspect (('aspect4x3) (set! (-> *video-params* relative-x-scale) 1.0) @@ -74,7 +74,7 @@ Will also set a bunch of common settings related to profiling and the camera to ;; WARN: Return type mismatch int vs none. (defun set-progressive-scan ((val symbol)) "Flip the progressive scan setting flag depending on the value provided -@param val The value to set the progressive scan flag to" + @param val The value to set the progressive scan flag to" (set! (-> *setting-control* user-default use-progressive-scan) val) 0 (none) diff --git a/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc b/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc index 928d668b5d..a24cd23d18 100644 --- a/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc @@ -53,7 +53,7 @@ Without this corrector, the fogginess of the world would change as the FOV chang ;; ERROR: Failed store: (s.w! (+ a0-43 12) a1-11) at op 465 (defun update-math-camera ((arg0 math-camera) (arg1 symbol) (arg2 symbol) (arg3 float)) "Compute some one-time camera constants. -These should only change when changing aspect ratio." + These should only change when changing aspect ratio." (local-vars (sv-16 float)) (set! (-> arg0 x-ratio) (tan (* 0.5 arg3))) (if (= arg2 'aspect4x3) @@ -285,8 +285,8 @@ These should only change when changing aspect ratio." ;; INFO: Used lq/sq (defun move-target-from-pad ((arg0 transform) (arg1 int)) "Unused function to adjust trans based on inputs from the pad. -This function must be extremely old because it takes a non-quaternion transform, -and all [[target]] stuff uses quaternions." + This function must be extremely old because it takes a non-quaternion transform, + and all [[target]] stuff uses quaternions." (let ((s4-0 (new-stack-vector0))) (set! (-> s4-0 x) (cond ((cpad-hold? arg1 circle) @@ -350,8 +350,8 @@ and all [[target]] stuff uses quaternions." ;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping] (defun transform-point-vector! ((arg0 vector) (arg1 vector)) "Apply camera transformation to a point. Return true if it is visible or not. -This returns the point in GS coords, but as float instead of int, so it's -not really useful. See [[transform-point-qword!]] for more details." + This returns the point in GS coords, but as float instead of int, so it's + not really useful. See [[transform-point-qword!]] for more details." (local-vars (v1-2 int)) (rlet ((acc :class vf) (Q :class vf) @@ -401,7 +401,7 @@ not really useful. See [[transform-point-qword!]] for more details." ;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping] (defun transform-point-qword! ((arg0 vector4w) (arg1 vector)) "Apply camera transformation to point, returning fixed point 28.4 position -that can be given to the GS directly." + that can be given to the GS directly." (local-vars (v1-2 int)) (rlet ((acc :class vf) (Q :class vf) @@ -532,8 +532,8 @@ that can be given to the GS directly." ;; WARN: Return type mismatch symbol vs none. (defun init-for-transform ((arg0 matrix)) "Sets up VU0 registers with camera info. -This is probably a very old function and it's only used by camera debug. -It stashes some data in vector float registers that must be there before calling transform-float-point." + This is probably a very old function and it's only used by camera debug. + It stashes some data in vector float registers that must be there before calling transform-float-point." (local-vars (v1-14 float)) (rlet ((vf1 :class vf) (vf17 :class vf) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc index e896c93484..7f193187cf 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc @@ -94,8 +94,8 @@ ;; WARN: Return type mismatch pointer vs none. (defun init-overide-table ((table mood-table)) "Similar to [[init-mood-table]], does the bare minimum to setup the given [[mood-table]] -@param! table The table to initialize -@returns [[none]]" + @param! table The table to initialize + @returns [[none]]" (set! (-> table mood-fog-table) (new 'debug 'mood-fog-table)) (set! (-> table mood-color-table) (new 'debug 'mood-color-table)) (set! (-> table mood-channel-group) *no-cloud-mood-channel-group*) @@ -260,7 +260,7 @@ ;; WARN: Return type mismatch object vs none. (defun desaturate-mood-colors ((arg0 float) (arg1 float) (arg2 float)) "Unused - Generate GOAL code for a new [[*overide-mood-color-table*]] definition that desaturates the color -Apply said overrides to the [[*overide-table*]]" + Apply said overrides to the [[*overide-table*]]" (mem-copy! (the-as pointer (-> *overide-table* mood-color-table)) (the-as pointer *no-cloud-mood-color-table*) @@ -366,7 +366,7 @@ Apply said overrides to the [[*overide-table*]]" ;; WARN: Return type mismatch object vs none. (defun desaturate-mood-fog ((arg0 (pointer mood-fog-table)) (arg1 float) (arg2 float)) "Unused - Generate GOAL code for a new [[*overide-mood-fog-table*]] definition that desaturates the fog color -Apply said overrides to the [[*overide-table*]]" + Apply said overrides to the [[*overide-table*]]" (mem-copy! (the-as pointer (-> *overide-table* mood-fog-table)) arg0 384) (dotimes (data-idx 8) (let ((fog-data (-> *overide-table* mood-fog-table data data-idx))) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables_REF.gc index 3fd54f34dc..f36db8fee9 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables_REF.gc @@ -827,8 +827,8 @@ ;; WARN: Return type mismatch symbol vs none. (defun init-mood-control ((ctrl mood-control)) "Given a [[mood-control]] initialize and set it up with default settings -@param! ctrl The [[mood-control]] -@returns [[none]]" + @param! ctrl The [[mood-control]] + @returns [[none]]" (set! (-> ctrl mood-fog-table) (new 'global 'mood-fog-table)) (set! (-> ctrl mood-color-table) (new 'global 'mood-color-table)) (set! (-> ctrl mood-channel-group) (new 'global 'mood-channel-group)) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc index 74d8f5f4e4..ef07fcabe7 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc @@ -1269,9 +1269,9 @@ ;; WARN: Return type mismatch int vs sound-id. (defmethod play-or-stop-lightning! ((this mood-control) (arg0 sound-spec) (arg1 vector)) "Handles playing/stopping of the lightning sound -- Plays the lightning sound if we are not loading and `lightning-id` is zero -- Stops the lightning sound first if `lightning-id` is non-zero -Returns the current value of `lightning-id`" + - Plays the lightning sound if we are not loading and `lightning-id` is zero + - Stops the lightning sound first if `lightning-id` is non-zero + Returns the current value of `lightning-id`" (vector+! (new 'stack-no-clear 'vector) arg1 (math-camera-pos)) (the-as sound-id (cond ((or (load-in-progress? *level*) (movie?)) @@ -1684,8 +1684,8 @@ Returns the current value of `lightning-id`" ;; WARN: Return type mismatch int vs none. (defmethod update-mood-weather! ((this mood-control) (cloud-target float) (fog-target float) (cloud-speed float) (fog-speed float)) "Set the `target-interp` and `speed-interp` for the clouds and fog -If `*-speed` is 0.0, use the `*-target` args to set `current-interp` -See [[mood-weather]]" + If `*-speed` is 0.0, use the `*-target` args to set `current-interp` + See [[mood-weather]]" (set! (-> this target-interp cloud) cloud-target) (set! (-> this target-interp fog) fog-target) (set! (-> this speed-interp cloud) cloud-speed) @@ -1704,7 +1704,7 @@ See [[mood-weather]]" ;; WARN: Return type mismatch int vs none. (defmethod update-mood-range! ((this mood-control) (min-cloud float) (max-cloud float) (min-fog float) (max-fog float)) "Set the minimum and maximum ranges of clouds and fog -See [[mood-range]]" + See [[mood-range]]" (set! (-> this range min-cloud) min-cloud) (set! (-> this range max-cloud) max-cloud) (set! (-> this range min-fog) min-fog) @@ -1717,7 +1717,7 @@ See [[mood-range]]" ;; WARN: Return type mismatch int vs none. (defmethod set-time-for-random-weather! ((this mood-control) (arg0 float) (arg1 float)) "Set the `time-until-random`'s cloud and fog values -See [[mood-weather]]" + See [[mood-weather]]" (set! (-> this time-until-random cloud) arg0) (set! (-> this time-until-random fog) arg1) 0 diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture-h_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture-h_REF.gc index 745f4d67cf..d96cc1069d 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture-h_REF.gc @@ -265,8 +265,8 @@ Each texture page has 3 segments - smaller number segments have higher detail mi ;; definition for function texture-mip->segment (defun texture-mip->segment ((arg0 int) (arg1 int)) "Figure out which segment of a tpage a given mip level of a texture will be in. -arg0 is the mip level, arg1 is the total number of mips. -Higher mip level is lower detail." + arg0 is the mip level, arg1 is the total number of mips. + Higher mip level is lower detail." (if (>= 2 arg1) (+ (- -1 arg0) arg1) (max 0 (- 2 arg0)) diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc index fa3d9d424a..2804277b35 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture_REF.gc @@ -65,7 +65,7 @@ ;; definition for function texture-qwc (defun texture-qwc ((w int) (h int) (tex-format gs-psm)) "Get the number of quadwords needed for a given texture size and format. -Does not consider weird PS2 memory layout stuff." + Does not consider weird PS2 memory layout stuff." (let ((v1-0 (texture-bpp tex-format))) (/ (+ (* (* w h) v1-0) 127) 128) ) @@ -74,7 +74,7 @@ Does not consider weird PS2 memory layout stuff." ;; definition for function physical-address (defun physical-address ((addr pointer)) "Strip off high 8-bits of a pointer, to bypass the uncached memory mappings. -This gives an address suitable for DMAing from main memory." + This gives an address suitable for DMAing from main memory." (logand #xfffffff addr) ) @@ -82,8 +82,8 @@ This gives an address suitable for DMAing from main memory." ;; WARN: Return type mismatch symbol vs none. (defun dma-buffer-add-ref-texture ((dma-buf dma-buffer) (tex-data-ptr pointer) (width int) (height int) (tex-fmt gs-psm)) "Upload a texture, by reference. Doesn't copy the texture into the DMA buffer - just a reference, -so it is up to the user to make sure the texture is valid during DMA time. -Doesn't set up GIF for receiving textures." + so it is up to the user to make sure the texture is valid during DMA time. + Doesn't set up GIF for receiving textures." (let ((padr (physical-address tex-data-ptr)) (qwc-remaining (texture-qwc width height tex-fmt)) ) @@ -295,9 +295,9 @@ Doesn't set up GIF for receiving textures." ;; definition for function gs-blocks-used (defun gs-blocks-used ((w int) (h int) (tex-format gs-psm)) "Get the number of blocks used by a texture. -If the texture isn't an even number of pages, the partially completed -page will be counted as the largest used block. -(gaps in this page are counted as used)" + If the texture isn't an even number of pages, the partially completed + page will be counted as the largest used block. + (gaps in this page are counted as used)" (let* ((s4-0 (gs-page-width tex-format)) (v1-0 (gs-page-height tex-format)) (a0-6 (* (/ (+ s4-0 -1 w) s4-0) s4-0)) @@ -435,7 +435,7 @@ page will be counted as the largest used block. ;; definition for method 9 of type texture-page (defmethod remove-data-from-heap ((this texture-page) (heap kheap)) "Bump the kheap pointer to discard this texture data. All metadata is kept. -This is only safe to use if the last thing on the kheap is this texture." + This is only safe to use if the last thing on the kheap is this texture." (set! (-> heap current) (-> this segment 0 block-data)) this ) @@ -443,8 +443,8 @@ This is only safe to use if the last thing on the kheap is this texture." ;; definition for function texture-page-default-allocate (defun texture-page-default-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int)) "Texture allocation function for textures that permanently live in VRAM. -The texture data is immediately uploaded, then discarded from the heap. -This should only be called during startup." + The texture data is immediately uploaded, then discarded from the heap. + This should only be called during startup." (dotimes (seg 3) (let ((vram-loc (allocate-vram-words! pool (the-as int (-> tpage segment seg size))))) (relocate-dests! tpage vram-loc seg) @@ -470,8 +470,8 @@ This should only be called during startup." ;; definition for function texture-page-common-allocate (defun texture-page-common-allocate ((pool texture-pool) (page texture-page) (heap kheap) (page-id int)) "Texture allocation function for textures that share the common segment. -The texture remains in RAM, and is uploaded to VRAM as needed as part -of the main drawing DMA chain." + The texture remains in RAM, and is uploaded to VRAM as needed as part + of the main drawing DMA chain." (let ((s5-0 (-> pool segment-common dest))) (dotimes (s4-0 3) (relocate-dests! page (the-as int s5-0) s4-0) @@ -485,8 +485,8 @@ of the main drawing DMA chain." ;; definition for function texture-page-font-allocate (defun texture-page-font-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int)) "Texture allocation function for font. This temporarily stores them in the common segment, -removes them from RAM. This is a bit of hack. Later font setup code expects the font texture -to be in common, and they will eventually be moved into the upper 8-bits of the depth buffer." + removes them from RAM. This is a bit of hack. Later font setup code expects the font texture + to be in common, and they will eventually be moved into the upper 8-bits of the depth buffer." (texture-page-common-allocate pool tpage heap tpage-id) (upload-now! tpage (tex-upload-mode seg0-1-2)) (remove-data-from-heap tpage heap) @@ -668,7 +668,7 @@ to be in common, and they will eventually be moved into the upper 8-bits of the ;; definition for function texture-page-common-boot-allocate (defun texture-page-common-boot-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int)) "Allocator function for texture loaded at startup time. -For jak 3, this seems to always do default-allocate (permanently in vram?)" + For jak 3, this seems to always do default-allocate (permanently in vram?)" (let ((common-page-slot-id (get-common-page-slot-by-id pool tpage-id))) (cond ((>= common-page-slot-id 0) @@ -753,9 +753,9 @@ For jak 3, this seems to always do default-allocate (permanently in vram?)" (bucket bucket-id) ) "Add DMA to upload a texture page. Will only upload the portion of data that is not already present in VRAM. -This is the old Jak 1 background texture uploading system, which had this near/far concept -for different mip levels. By jak 2, the background system switched to masks and uses -the -pris variant of this function." + This is the old Jak 1 background texture uploading system, which had this near/far concept + for different mip levels. By jak 2, the background system switched to masks and uses + the -pris variant of this function." (local-vars (data-ptr pointer) (vram-ptr uint) @@ -903,10 +903,10 @@ the -pris variant of this function." (arg4 (pointer int32)) ) "Similar to upload-vram-pages, but skips the near/far mode and instead uses masks. -The foreground/background renderers will generate masks telling us which textures are used. -This lets us skip uploading entire textures, or mip levels that won't need. -(side note: this optimization is what causes many of the texturing issues in pcsx2, -where the ps2 and pcsx2 disagree on the mip level to use.)" + The foreground/background renderers will generate masks telling us which textures are used. + This lets us skip uploading entire textures, or mip levels that won't need. + (side note: this optimization is what causes many of the texturing issues in pcsx2, + where the ps2 and pcsx2 disagree on the mip level to use.)" (local-vars (data-ptr pointer) (vram-ptr uint) @@ -1614,8 +1614,8 @@ where the ps2 and pcsx2 disagree on the mip level to use.)" ;; WARN: Return type mismatch int vs none. (defmethod setup-font-texture ((this texture-pool)) "Set up the font texture. In normal use, the font texture is allocated, and currently uploaded to, the common segment. -This function copies that to the unused upper 8-bits of the depth buffer, and sets up the font -renderer to point to that address." + This function copies that to the unused upper 8-bits of the depth buffer, and sets up the font + renderer to point to that address." (local-vars (sv-16 int) (sv-20 int)) (let ((s3-0 (-> this font-palette))) (set! sv-16 (-> this cur)) @@ -1762,9 +1762,9 @@ renderer to point to that address." ;; definition for method 7 of type texture-page (defmethod relocate ((this texture-page) (loading-heap kheap) (name (pointer uint8))) "Handle a texture page that has been loaded by the linker. -This must run in the linker, since we sometimes kick out textures from the loading heap, which -requires no more allocations made after the texture, and the only time is right after the linker -does the allocation for this GOAL object file." + This must run in the linker, since we sometimes kick out textures from the loading heap, which + requires no more allocations made after the texture, and the only time is right after the linker + does the allocation for this GOAL object file." (cond ((or (not this) (not (file-info-correct-version? (-> this info) (file-kind tpage) 0))) (the-as texture-page #f) @@ -1811,9 +1811,9 @@ does the allocation for this GOAL object file." ;; definition for function relocate-later (defun relocate-later () "Unused in jak 2 and likely unsed in jak 3. Feature to postpone some texture copying until -a later frame. This is only used in cases when texture data must be memcpy'd in RAM, to patch up a hole left -by some data that is now permanently in VRAM, and no longer needed. -Note that Jak2/Jak3 don't have this problem since level textures are now never permanent" + a later frame. This is only used in cases when texture data must be memcpy'd in RAM, to patch up a hole left + by some data that is now permanently in VRAM, and no longer needed. + Note that Jak2/Jak3 don't have this problem since level textures are now never permanent" (let ((gp-0 *texture-relocate-later*)) (let ((s5-0 (-> gp-0 entry)) (s4-0 (-> gp-0 page)) @@ -1834,9 +1834,9 @@ Note that Jak2/Jak3 don't have this problem since level textures are now never p ;; definition for function texture-page-login (defun texture-page-login ((id texture-id) (alloc-func (function texture-pool texture-page kheap int texture-page)) (heap kheap)) "'Login' (initialize) a texture page with the pool. -This has a trick - it doesn't actually require you to pass a texture-page object - instead you pass an ID. -If the texture was loaded at all, it will already be known to the texture pool, and this function will do nothing. -However, if the texture is not present, it will be loaded through a call to `loado`, for use in development." + This has a trick - it doesn't actually require you to pass a texture-page object - instead you pass an ID. + If the texture was loaded at all, it will already be known to the texture pool, and this function will do nothing. + However, if the texture is not present, it will be loaded through a call to `loado`, for use in development." (when (and (nonzero? (-> id page)) (< (-> id page) (the-as uint (-> *texture-page-dir* length)))) (let ((s5-0 (-> *texture-page-dir* entries (-> id page)))) (when (not (-> s5-0 page)) @@ -1984,7 +1984,7 @@ However, if the texture is not present, it will be loaded through a call to `loa ;; definition for function link-texture-by-id (defun link-texture-by-id ((id texture-id) (shader adgif-shader)) "Add this adgif shader to the linked list of shaders associated with the given texture ID. -Will allocate the link array if it's not already." + Will allocate the link array if it's not already." (when (not (or (zero? (-> id page)) (>= (-> id page) (the-as uint (-> *texture-page-dir* length))))) (let ((s4-0 (-> *texture-page-dir* entries (-> id page)))) (if (not (-> s4-0 link)) @@ -2082,8 +2082,8 @@ Will allocate the link array if it's not already." ;; definition for function adgif-shader-login (defun adgif-shader-login ((shader adgif-shader)) "set up an adgif shader with the texture-pool, so it points to the right vram address. -Will remap textures through the level remap table. -If texture is missing, will load it on debug hardware." + Will remap textures through the level remap table. + If texture is missing, will load it on debug hardware." (when (logtest? (-> shader link-test) (link-test-flags needs-log-in)) (logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9)) (set! (-> shader texture-id) (level-remap-texture (-> shader texture-id))) @@ -2119,7 +2119,7 @@ If texture is missing, will load it on debug hardware." ;; definition for function adgif-shader-login-no-remap (defun adgif-shader-login-no-remap ((shader adgif-shader)) "Set up an adgif shader with the texture-pool, so it points to the right vram adress. -This does not do level tpage remapping, so the texture should be one that's not loaded in a combine level tpage." + This does not do level tpage remapping, so the texture should be one that's not loaded in a combine level tpage." (when (logtest? (-> shader link-test) (link-test-flags needs-log-in)) (logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9)) (link-texture-by-id (-> shader texture-id) shader) @@ -2149,9 +2149,9 @@ This does not do level tpage remapping, so the texture should be one that's not ;; definition for function adgif-shader-login-fast (defun adgif-shader-login-fast ((shader adgif-shader)) "Set up an adgif shader with the texture-pool, so it points to the right vram address. -Will remap through the level table, so can be used to refer to textures inside 'squashed' -level tpages. -Will not load texture if it is missing." + Will remap through the level table, so can be used to refer to textures inside 'squashed' + level tpages. + Will not load texture if it is missing." (when (logtest? (-> shader link-test) (link-test-flags needs-log-in)) (logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9)) (set! (-> shader texture-id) (level-remap-texture (-> shader texture-id))) @@ -2182,8 +2182,8 @@ Will not load texture if it is missing." ;; definition for function adgif-shader-login-no-remap-fast (defun adgif-shader-login-no-remap-fast ((shader adgif-shader)) "Set up an adgif shader with the texture-pool, so it points to the right vram address. -Will not remap through the level tpage table. -Will not load texture if it is missing." + Will not remap through the level tpage table. + Will not load texture if it is missing." (when (logtest? (-> shader link-test) (link-test-flags needs-log-in)) (logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9)) (let ((v1-4 (-> shader texture-id))) @@ -2219,7 +2219,7 @@ Will not load texture if it is missing." ;; definition for function adgif-shader<-texture-simple! (defun adgif-shader<-texture-simple! ((shader adgif-shader) (tex texture)) "Simple adgif-shader to texture, just sets vram address and format stuff. -Intended for use with fancy texture stuff that will later set the other regs." + Intended for use with fancy texture stuff that will later set the other regs." (set! (-> shader tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) (set! (-> shader tex0 tfx) 0) (if tex diff --git a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc index 3819761f78..2791006ce6 100644 --- a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc @@ -496,10 +496,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod collect-regions ((this bsp-header) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) "Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count -@param area-of-interest The area defined by a sphere that we care about overlaps -@param _count The amount of [[drawable]]s in the object to enumerate through -@param! region-list Stores the overlapping regions and a count for how many were found -@returns none" + @param area-of-interest The area defined by a sphere that we care about overlaps + @param _count The amount of [[drawable]]s in the object to enumerate through + @param! region-list Stores the overlapping regions and a count for how many were found + @returns none" (let ((s3-0 (-> this region-trees))) (dotimes (s2-0 (-> s3-0 length)) (collect-regions (-> s3-0 s2-0) arg0 arg1 arg2) diff --git a/test/decompiler/reference/jak2/engine/level/region_REF.gc b/test/decompiler/reference/jak2/engine/level/region_REF.gc index eefc115b56..3ad1c451aa 100644 --- a/test/decompiler/reference/jak2/engine/level/region_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/region_REF.gc @@ -47,10 +47,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod collect-regions ((this drawable-region-prim) (area-of-interest sphere) (_count int) (region-list region-prim-list)) "Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count -@param area-of-interest The area defined by a sphere that we care about overlaps -@param _count The amount of [[drawable]]s in the object to enumerate through -@param! region-list Stores the overlapping regions and a count for how many were found -@returns none" + @param area-of-interest The area defined by a sphere that we care about overlaps + @param _count The amount of [[drawable]]s in the object to enumerate through + @param! region-list Stores the overlapping regions and a count for how many were found + @returns none" (dotimes (count _count) (when (spheres-overlap? area-of-interest (the-as sphere (-> this bsphere))) (set! (-> region-list items (-> region-list num-items)) this) @@ -66,10 +66,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod collect-regions ((this drawable-inline-array-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) "Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count -@param area-of-interest The area defined by a sphere that we care about overlaps -@param _count The amount of [[drawable]]s in the object to enumerate through -@param! region-list Stores the overlapping regions and a count for how many were found -@returns none" + @param area-of-interest The area defined by a sphere that we care about overlaps + @param _count The amount of [[drawable]]s in the object to enumerate through + @param! region-list Stores the overlapping regions and a count for how many were found + @returns none" (collect-regions (the-as drawable-region-prim (-> this data)) arg0 (-> this length) arg2) 0 (none) @@ -79,10 +79,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod collect-regions ((this drawable-tree-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) "Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count -@param area-of-interest The area defined by a sphere that we care about overlaps -@param _count The amount of [[drawable]]s in the object to enumerate through -@param! region-list Stores the overlapping regions and a count for how many were found -@returns none" + @param area-of-interest The area defined by a sphere that we care about overlaps + @param _count The amount of [[drawable]]s in the object to enumerate through + @param! region-list Stores the overlapping regions and a count for how many were found + @returns none" (collect-regions (-> this data2 0) arg0 (-> this length) arg2) 0 (none) @@ -162,10 +162,10 @@ ;; WARN: Function (method 9 region-prim-area) has a return type of none, but the expression builder found a return statement. (defmethod track-entered-region! ((this region-prim-area) (region-sphere drawable-region-sphere)) "Enumerates through the objects `region-enter-list`, if we find the provided `region`, do nothing and exit -otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and increment `region-enter-count` - -@param region-sphere Defines the region in question -@returns nothing" + otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and increment `region-enter-count` + + @param region-sphere Defines the region in question + @returns nothing" (let ((regions-entered (-> this region-enter-count))) (let ((region (-> region-sphere region))) (countdown (idx regions-entered) @@ -187,10 +187,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and in ;; WARN: Function (method 10 region-prim-area) has a return type of none, but the expression builder found a return statement. (defmethod track-exited-region! ((this region-prim-area) (arg0 drawable-region-sphere)) "Enumerates through the objects `region-exit-list`, if we find the provided `region`, do nothing and exit -otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and increment `region-exit-count` - -@param region-sphere Defines the region in question -@returns nothing" + otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and increment `region-exit-count` + + @param region-sphere Defines the region in question + @returns nothing" (let ((regions-exited (-> this region-exit-count))) (let ((region (-> arg0 region))) (countdown (idx regions-exited) @@ -212,10 +212,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and inc ;; WARN: Function (method 11 region-prim-area) has a return type of none, but the expression builder found a return statement. (defmethod track-inside-region! ((this region-prim-area) (arg0 drawable-region-sphere)) "Enumerates through the objects `region-inside-list`, if we find the provided `region`, do nothing and exit -otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and increment `region-inside-count` - -@param region-sphere Defines the region in question -@returns nothing" + otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and increment `region-inside-count` + + @param region-sphere Defines the region in question + @returns nothing" (let ((regions-inside (-> this region-inside-count))) (let ((region (-> arg0 region))) (countdown (idx regions-inside) @@ -237,10 +237,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and i ;; WARN: Function (method 12 region-prim-area) has a return type of none, but the expression builder found a return statement. (defmethod track-start-region! ((this region-prim-area) (arg0 drawable-region-sphere)) "Enumerates through the objects `region-start-list`, if we find the provided `region`, do nothing and exit -otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and increment `region-start-count` - -@param region-sphere Defines the region in question -@returns nothing" + otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and increment `region-start-count` + + @param region-sphere Defines the region in question + @returns nothing" (let ((regions-started (-> this region-start-count))) (let ((region (-> arg0 region))) (countdown (idx regions-started) diff --git a/test/decompiler/reference/jak2/engine/load/file-io_REF.gc b/test/decompiler/reference/jak2/engine/load/file-io_REF.gc index c6d1ddaf8c..3a547ddd0f 100644 --- a/test/decompiler/reference/jak2/engine/load/file-io_REF.gc +++ b/test/decompiler/reference/jak2/engine/load/file-io_REF.gc @@ -41,7 +41,7 @@ ;; definition for function file-stream-read-string (defun file-stream-read-string ((fs file-stream) (str string)) "Fill a string with data from a file stream. -Note: this function does not work." + Note: this function does not work." (clear str) (file-stream-read fs (-> str data) (length fs)) str @@ -97,13 +97,13 @@ Note: this function does not work." ;; definition for function make-file-name (defun make-file-name ((arg0 file-kind) (arg1 string) (arg2 int) (arg3 symbol)) "Get a file name to open a file with the given kind and name. -The art-group-version argument can be used to override the version -of the art-group. Set it to 0 or less to use the default version. -Similar to MakeFileName in C. -Note: file type enum is different between C and GOAL. -File versions should match those in versions.h. -Uses a single *file-temp-string* buffer, shared with make-vfile-name. -arg3 is unused." + The art-group-version argument can be used to override the version + of the art-group. Set it to 0 or less to use the default version. + Similar to MakeFileName in C. + Note: file type enum is different between C and GOAL. + File versions should match those in versions.h. + Uses a single *file-temp-string* buffer, shared with make-vfile-name. + arg3 is unused." (clear *file-temp-string*) (cond ((= arg0 (file-kind dir-tpage)) @@ -150,7 +150,7 @@ arg3 is unused." ;; definition for function make-vfile-name (defun make-vfile-name ((kind file-kind) (name string)) "Make virtual? file name. This makes a name that the kernel knows how to -handle in a specific way. This function is not used." + handle in a specific way. This function is not used." (clear *file-temp-string*) (cond ((= kind (file-kind level-bt)) @@ -166,7 +166,7 @@ handle in a specific way. This function is not used." ;; definition for function file-info-correct-version? (defun file-info-correct-version? ((arg0 file-info) (arg1 file-kind) (arg2 int)) "Check if the version and kind in the info is valid. The `version-override` can specify a -non-default version, or set to 0 for the default version." + non-default version, or set to 0 for the default version." (let* ((s5-0 (cond ((zero? arg2) (case arg1 diff --git a/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc b/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc index f9920b189c..50df6762e1 100644 --- a/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc +++ b/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc @@ -147,8 +147,8 @@ ;; definition for function str-load-status (defun str-load-status ((maxlen-out (pointer int32))) "Get the status of the most recent load. -Return 'busy if in progress, 'error if failed, or 'complete. -If 'complete, returns the maxlen value from the IOP." + Return 'busy if in progress, 'error if failed, or 'complete. + If 'complete, returns the maxlen value from the IOP." (if (check-busy *load-str-rpc*) (return 'busy) ) @@ -372,7 +372,7 @@ If 'complete, returns the maxlen value from the IOP." ;; definition for function find-temp-buffer (defun find-temp-buffer ((size int)) "Unused function to find some temporary leftover space in DMA buffer. -Unused since jak 1, and checks the same buffer twice??" + Unused since jak 1, and checks the same buffer twice??" (let ((gp-0 (+ (/ size 16) 2))) (cond ((< (the-as uint gp-0) diff --git a/test/decompiler/reference/jak2/engine/math/euler_REF.gc b/test/decompiler/reference/jak2/engine/math/euler_REF.gc index ee061a6362..b316429222 100644 --- a/test/decompiler/reference/jak2/engine/math/euler_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/euler_REF.gc @@ -97,7 +97,7 @@ ;; definition for function matrix->eul (defun matrix->eul ((arg0 euler-angles) (arg1 matrix) (arg2 int)) "Convert matrix to euler angles with given order flag. -Not clear how this works if the matrix has more than just a rotation." + Not clear how this works if the matrix has more than just a rotation." 0 0 0 diff --git a/test/decompiler/reference/jak2/engine/math/math_REF.gc b/test/decompiler/reference/jak2/engine/math/math_REF.gc index 789db0943c..c2d9a8c16a 100644 --- a/test/decompiler/reference/jak2/engine/math/math_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/math_REF.gc @@ -4,7 +4,7 @@ ;; definition for function truncate (defun truncate ((arg0 float)) "Round (toward zero) to an integer. -@param arg0 float to truncate" + @param arg0 float to truncate" (the float (the int arg0)) ) @@ -324,8 +324,8 @@ ;; definition for function seek-ease (defun seek-ease ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) "Move arg0 toward arg1, and slow down before reaching the end. -When farther than arg3 away, move by at most arg2. -When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but no lower than arg4." + When farther than arg3 away, move by at most arg2. + When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but no lower than arg4." (let ((f2-0 (- arg1 arg0))) (when (>= arg3 (fabs f2-0)) (set! arg2 (* arg2 (- 1.0 (/ (- arg3 (fabs f2-0)) arg3)))) @@ -350,9 +350,9 @@ When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but ;; definition for function seek-ease-in-out (defun seek-ease-in-out ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 float)) "Move arg0 toward arg2, and slow down at the start and end. -When within arg4 of arg1 (at the beginning of movement), ramp up speed, with a minimum speed of arg6 -When within arg5 of arg2 (at the end of movement), ramp down speed, with a minimum speed of arg5 -Normally, move at most arg3" + When within arg4 of arg1 (at the beginning of movement), ramp up speed, with a minimum speed of arg6 + When within arg5 of arg2 (at the end of movement), ramp down speed, with a minimum speed of arg5 + Normally, move at most arg3" (let ((f2-0 (- arg2 arg0))) (let ((f4-1 (- arg0 arg1))) (when (>= arg4 (fabs f4-1)) @@ -391,7 +391,7 @@ Normally, move at most arg3" ;; definition (debug) for function lerp-scale-old (defun-debug lerp-scale-old ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) "Linearly remap arg2 in [arg3, arg4] to [arg0, arg1]. -This is the jak 1 implementation, which I claimed was a bad implementation..." + This is the jak 1 implementation, which I claimed was a bad implementation..." (let ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- arg2 arg3) (- arg4 arg3)))))) (+ (* (- 1.0 f0-1) arg0) (* f0-1 arg1)) ) @@ -497,8 +497,8 @@ This is the jak 1 implementation, which I claimed was a bad implementation..." ;; ERROR: Inline assembly instruction marked with TODO - [TODO.VRGET] (defun rand-vu-nostep () "Get the number currently in the random generator. -This will be equal to the last call of (rand-vu). -This will not update the random generator." + This will be equal to the last call of (rand-vu). + This will not update the random generator." (local-vars (v0-0 float)) (rlet ((vf0 :class vf) (vf1 :class vf) @@ -548,7 +548,7 @@ This will not update the random generator." ;; WARN: new jak 2 until loop case, check carefully (defun rand-vu-int-count-excluding ((arg0 int) (arg1 int)) "Get an integer in the range [0, arg0). -If bit n is set in arg1, exclude this value from being returned." + If bit n is set in arg1, exclude this value from being returned." (let ((s4-0 0) (s5-0 0) ) @@ -591,7 +591,7 @@ If bit n is set in arg1, exclude this value from being returned." ;; WARN: new jak 2 until loop case, check carefully (defun rand-vu-int-range-exclude ((arg0 int) (arg1 int) (arg2 int)) "Get an integer in the range [0, arg0), excluding arg2. -Note that this doesn't use bits like rand-vu-int-count-excluding." + Note that this doesn't use bits like rand-vu-int-count-excluding." (until #f (let ((v1-0 (rand-vu-int-range arg0 arg1))) (if (!= v1-0 arg2) @@ -676,7 +676,7 @@ Note that this doesn't use bits like rand-vu-int-count-excluding." ;; definition for function smooth-step (defun smooth-step ((arg0 float)) "Interpolate between 0, 1 with a cubic polynomial. -These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0." + These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0." (cond ((>= 0.0 arg0) 0.0 @@ -693,9 +693,9 @@ These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0." ;; definition for function smooth-interp (defun smooth-interp ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) "Remap arg2 from (arg3, arg4) to (arg0, arg1), using cubic interpolation. -Satisfies: -- f(arg3) = arg0 -- f(arg4) = arg1 -- f'(arg3) = f'(arg4) = 0" + Satisfies: + - f(arg3) = arg0 + - f(arg4) = arg1 + - f'(arg3) = f'(arg4) = 0" (+ arg0 (* (- arg1 arg0) (smooth-step (/ (- arg2 arg3) (- arg4 arg3))))) ) diff --git a/test/decompiler/reference/jak2/engine/math/matrix_REF.gc b/test/decompiler/reference/jak2/engine/math/matrix_REF.gc index 5253f69a1b..135926b503 100644 --- a/test/decompiler/reference/jak2/engine/math/matrix_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/matrix_REF.gc @@ -2,7 +2,6 @@ (in-package goal) ;; definition for method 3 of type matrix -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this matrix)) (format #t "[~8x] matrix~%" this) (format @@ -34,7 +33,6 @@ ) ;; definition for method 3 of type matrix3 -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this matrix3)) (format #t "[~8x] matrix3~%" this) (format #t "~T[~F] [~F] [~F]~%" (-> this vector 0 x) (-> this vector 0 y) (-> this vector 0 z)) @@ -76,7 +74,7 @@ ;; definition for function matrix+! (defun matrix+! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) "Set dst = src1 + src2. It is okay for any arguments to be the same data. -This is not an efficient implementation." + This is not an efficient implementation." (dotimes (v1-0 16) (set! (-> arg0 data v1-0) (+ (-> arg1 data v1-0) (-> arg2 data v1-0))) ) @@ -86,7 +84,7 @@ This is not an efficient implementation." ;; definition for function matrix-! (defun matrix-! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) "Set dst = src1 - src1. It is okay for any arugments to be the same data. -This is not an efficient implementation." + This is not an efficient implementation." (dotimes (v1-0 16) (set! (-> arg0 data v1-0) (- (-> arg1 data v1-0) (-> arg2 data v1-0))) ) @@ -96,7 +94,7 @@ This is not an efficient implementation." ;; definition for function matrix*! (defun matrix*! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) "Set dst = src1 * src2. It is okay for any arguments to be the same data. -This is a moderately efficient implementation." + This is a moderately efficient implementation." (rlet ((acc :class vf) (vf10 :class vf) (vf11 :class vf) @@ -147,8 +145,8 @@ This is a moderately efficient implementation." ;; INFO: Used lq/sq (defun matrixp*! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) "Set dst = src1 * src2. NOTE: this function is a wrapper around matrix*! -that adds no additional functionality. It seems to be a leftover from -a time when matrix*! wasn't safe to use in place. This is unused." + that adds no additional functionality. It seems to be a leftover from + a time when matrix*! wasn't safe to use in place. This is unused." (let ((s5-0 (new-stack-matrix0))) (matrix*! s5-0 arg1 arg2) (set! (-> arg0 quad 0) (-> s5-0 quad 0)) @@ -215,7 +213,7 @@ a time when matrix*! wasn't safe to use in place. This is unused." ;; INFO: Used lq/sq (defun vector3s-matrix*! ((arg0 vector3s) (arg1 vector3s) (arg2 matrix)) "Set dst to be ([src 1.0] * mat).xyz. Doesn't touch the w of dst. -dst and vec can be the same memory" + dst and vec can be the same memory" (let ((s5-0 (new-stack-vector0))) (set-vector! s5-0 (-> arg1 x) (-> arg1 y) (-> arg1 z) 1.0) (vector-matrix*! s5-0 s5-0 arg2) @@ -230,7 +228,7 @@ dst and vec can be the same memory" ;; INFO: Used lq/sq (defun vector3s-rotate*! ((arg0 vector3s) (arg1 vector3s) (arg2 matrix)) "Set dst to vec rotated by the rotation in the homogeneous transform mat. -mat should not have a scale/shear (the upper 3x3 should be a pure rotation)." + mat should not have a scale/shear (the upper 3x3 should be a pure rotation)." (let ((s5-0 (new-stack-vector0))) (set-vector! s5-0 (-> arg1 x) (-> arg1 y) (-> arg1 z) 1.0) (vector-rotate*! s5-0 s5-0 arg2) @@ -283,7 +281,7 @@ mat should not have a scale/shear (the upper 3x3 should be a pure rotation)." ;; definition for function matrix-inverse-of-rot-trans! (defun matrix-inverse-of-rot-trans! ((arg0 matrix) (arg1 matrix)) "Set dst = src^-1, assuming src is a homogeneous tranform with only rotation/translation. -NOTE: THIS FUNCTION REQUIRES dst != src" + NOTE: THIS FUNCTION REQUIRES dst != src" (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -320,7 +318,7 @@ NOTE: THIS FUNCTION REQUIRES dst != src" ;; ERROR: Bad vector register dependency: vf5 (defun matrix-4x4-inverse! ((arg0 matrix) (arg1 matrix)) "Invert a 4x4 matrix. This assumes that the input is a homogeneous transform. -Src and dst can be the same." + Src and dst can be the same." (rlet ((acc :class vf) (Q :class vf) (vf0 :class vf) @@ -484,7 +482,7 @@ Src and dst can be the same." ;; INFO: Used lq/sq (defun matrix-translate+! ((arg0 matrix) (arg1 matrix) (arg2 vector)) "Add the given translation to the translation of homogenous transform mat src -and store in dst. It is okay for dst = src." + and store in dst. It is okay for dst = src." (set! (-> arg0 trans x) (+ (-> arg1 trans x) (-> arg2 x))) (set! (-> arg0 trans y) (+ (-> arg1 trans y) (-> arg2 y))) (set! (-> arg0 trans z) (+ (-> arg1 trans z) (-> arg2 z))) @@ -500,7 +498,7 @@ and store in dst. It is okay for dst = src." ;; INFO: Used lq/sq (defun matrix-scale! ((arg0 matrix) (arg1 vector)) "Set dst to a homogenous transform with only a scale. The x,y,z components -of scale become the x,y,z scaling factors" + of scale become the x,y,z scaling factors" (set! (-> arg0 quad 0) (the-as uint128 0)) (set! (-> arg0 quad 1) (the-as uint128 0)) (set! (-> arg0 quad 2) (the-as uint128 0)) @@ -515,8 +513,8 @@ of scale become the x,y,z scaling factors" ;; definition for function scale-matrix! (defun scale-matrix! ((arg0 matrix) (arg1 vector) (arg2 matrix)) "Scale an existing matrix. Okay for dst = src. The scaling is applied per row. -This means the x component of scale is used to scale the first row of src. -The w component of scale is used." + This means the x component of scale is used to scale the first row of src. + The w component of scale is used." (rlet ((vf4 :class vf) (vf5 :class vf) (vf6 :class vf) @@ -544,7 +542,7 @@ The w component of scale is used." ;; INFO: Used lq/sq (defun matrix-inv-scale! ((arg0 matrix) (arg1 vector)) "Set dst to a homogeneous transform with only a scale. -The x,y,z components of scale are inverted and used as the x,y,z scaling factors" + The x,y,z components of scale are inverted and used as the x,y,z scaling factors" (set! (-> arg0 quad 0) (the-as uint128 0)) (set! (-> arg0 quad 1) (the-as uint128 0)) (set! (-> arg0 quad 2) (the-as uint128 0)) @@ -559,7 +557,7 @@ The x,y,z components of scale are inverted and used as the x,y,z scaling factors ;; definition for function column-scale-matrix! (defun column-scale-matrix! ((arg0 matrix) (arg1 vector) (arg2 matrix)) "Scale an existing matrix. Okay for dst = src. The scaling is applied column-wise. -Meaning the x component of scale will scale the first column of src." + Meaning the x component of scale will scale the first column of src." (rlet ((vf4 :class vf) (vf5 :class vf) (vf6 :class vf) @@ -768,7 +766,7 @@ Meaning the x component of scale will scale the first column of src." ;; definition for function matrix-rotate-yxy! (defun matrix-rotate-yxy! ((arg0 matrix) (arg1 vector)) "Rotate. I believe in yxy order? Compared to the other rotations, this one -is quite a bit more optimized and avoid repeated trig operations." + is quite a bit more optimized and avoid repeated trig operations." (let ((a2-0 (new 'stack-no-clear 'vector)) (s5-0 (new 'stack-no-clear 'vector)) (s4-0 (new 'stack-no-clear 'vector)) @@ -1139,7 +1137,7 @@ is quite a bit more optimized and avoid repeated trig operations." ;; definition for function matrix-3x3-inverse! (defun matrix-3x3-inverse! ((arg0 matrix) (arg1 matrix)) "Compute the inverse of a 3x3 matrix. Not very efficient. -Requires src != dst." + Requires src != dst." (let ((f0-0 (matrix-3x3-determinant arg1))) (set! (-> arg0 vector 0 x) (/ (- (* (-> arg1 vector 1 y) (-> arg1 vector 2 z)) (* (-> arg1 vector 1 z) (-> arg1 vector 2 y))) f0-0) @@ -1175,7 +1173,7 @@ Requires src != dst." ;; definition for function matrix-3x3-inverse-transpose! (defun matrix-3x3-inverse-transpose! ((arg0 matrix) (arg1 matrix)) "Invert and transpose. -Requires dst != src." + Requires dst != src." (let ((f0-0 (matrix-3x3-determinant arg1))) (set! (-> arg0 vector 0 x) (/ (- (* (-> arg1 vector 1 y) (-> arg1 vector 2 z)) (* (-> arg1 vector 1 z) (-> arg1 vector 2 y))) f0-0) @@ -1371,7 +1369,7 @@ Requires dst != src." ;; definition for function matrix-4x4-inverse-transpose! (defun matrix-4x4-inverse-transpose! ((arg0 matrix) (arg1 matrix)) "Invert and transpose an entire 4x4. I think has no restrictions, other than dst != src. Unused. -The answer is wrong. The determinant function is wrong." + The answer is wrong. The determinant function is wrong." (let ((f0-0 (matrix-4x4-determinant arg1))) (let ((f9-0 (-> arg1 vector 1 y)) (f2-0 (-> arg1 vector 1 z)) @@ -1716,7 +1714,7 @@ The answer is wrong. The determinant function is wrong." ;; INFO: Used lq/sq (defun matrix->quat ((arg0 matrix) (arg1 quaternion)) "Convert matrix to quaternion, works for matrix with scale. -unlike matrix->quaternion." + unlike matrix->quaternion." (let ((s5-0 (new 'stack-no-clear 'matrix))) (let* ((a2-0 arg0) (v1-0 (-> a2-0 quad 0)) diff --git a/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc b/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc index af7b756bed..88453cd20e 100644 --- a/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc @@ -2,7 +2,6 @@ (in-package goal) ;; definition for method 3 of type quaternion -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this quaternion)) (format #t "[~8x] quaternion~%" this) (format #t "~T[~F] [~F] [~F] [~F]~%" (-> this x) (-> this y) (-> this z) (-> this w)) @@ -184,8 +183,8 @@ ;; ERROR: Bad vector register dependency: vf2 (defun quaternion-conjugate! ((arg0 quaternion) (arg1 quaternion)) "Set arg0 to the conjugate of arg1 (negate only ijk). -If arg1 is normalized, this is equivalent to the inverse -NOTE: this gives you the inverse rotation." + If arg1 is normalized, this is equivalent to the inverse + NOTE: this gives you the inverse rotation." (rlet ((vf1 :class vf) (vf2 :class vf) ) @@ -290,7 +289,7 @@ NOTE: this gives you the inverse rotation." ;; ERROR: Bad vector register dependency: vf3 (defun quaternion-inverse! ((arg0 quaternion) (arg1 quaternion)) "Invert a quaternion. The inverse will satisfy q * q^-1 = identity, even if q is not normalized. -If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!" + If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!" (rlet ((acc :class vf) (Q :class vf) (vf0 :class vf) @@ -371,9 +370,9 @@ If your quaternion is normalized, it is faster/more accurate to do quaternion-co ;; definition for function quaternion-right-mult-matrix! (defun quaternion-right-mult-matrix! ((arg0 matrix) (arg1 quaternion)) "Place quaternion coefficients into a matrix. -You can convert a quaternion to a matrix by taking the product of this -right-mult and left-mult matrix, but this method is not used. -Instead, quaternion->matrix is a more efficient implementation." + You can convert a quaternion to a matrix by taking the product of this + right-mult and left-mult matrix, but this method is not used. + Instead, quaternion->matrix is a more efficient implementation." (let ((f3-0 (-> arg1 x)) (f2-0 (-> arg1 y)) (f1-0 (-> arg1 z)) @@ -659,7 +658,7 @@ Instead, quaternion->matrix is a more efficient implementation." ;; definition for function quaternion-slerp! (defun quaternion-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float)) "Real quaternion slerp. Spherical-linear interpolation is a nice way to interpolate -between quaternions." + between quaternions." (local-vars (v1-15 float)) (rlet ((acc :class vf) (vf1 :class vf) @@ -725,8 +724,8 @@ between quaternions." ;; definition for function quaternion-pseudo-slerp! (defun quaternion-pseudo-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float)) "This is a bad interpolation between quaternions. It lerps then normalizes. -It will behave extremely poorly for 180 rotations. -It is unused." + It will behave extremely poorly for 180 rotations. + It is unused." (rlet ((acc :class vf) (vf1 :class vf) (vf2 :class vf) @@ -760,7 +759,7 @@ It is unused." ;; definition for function quaternion-pseudo-seek (defun quaternion-pseudo-seek ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float)) "Seek one quaternion toward another. Not using real slerp, so this is only good if the quaternions -are pretty similar." + are pretty similar." (let ((s3-0 (new 'stack-no-clear 'quaternion))) (let ((s5-0 (new 'stack-no-clear 'quaternion))) (quaternion-copy! s3-0 arg2) diff --git a/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc b/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc index 17fd8dd063..b5b27ada05 100644 --- a/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/transformq-h_REF.gc @@ -112,14 +112,14 @@ As a result, this type has a lot of weird methods and extra stuff hidden in it." ;; definition for method 23 of type trsqv (defmethod global-y-angle-to-point ((this trsqv) (arg0 vector)) "Get the angle in the xz plane from the position of this trsqv to the point arg0 -(ignores our current yaw)." + (ignores our current yaw)." (vector-y-angle (vector-! (new 'stack-no-clear 'vector) arg0 (-> this trans))) ) ;; definition for method 24 of type trsqv (defmethod relative-y-angle-to-point ((this trsqv) (arg0 vector)) "Get the y angle between the current orientation and arg0 -(how much we'd have to yaw to point at arg0)." + (how much we'd have to yaw to point at arg0)." (deg-diff (y-angle this) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) arg0 (-> this trans)))) ) diff --git a/test/decompiler/reference/jak2/engine/math/trigonometry_REF.gc b/test/decompiler/reference/jak2/engine/math/trigonometry_REF.gc index 776bf5166e..03d112e732 100644 --- a/test/decompiler/reference/jak2/engine/math/trigonometry_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/trigonometry_REF.gc @@ -15,7 +15,7 @@ ;; definition for function deg- (defun deg- ((arg0 float) (arg1 float)) "Compute arg0-arg1, unwrapped, using rotation units. -Result should be in the range (-180, 180)" + Result should be in the range (-180, 180)" (the float (sar (- (shl (the int arg0) 48) (shl (the int arg1) 48)) 48)) ) @@ -195,9 +195,9 @@ Result should be in the range (-180, 180)" ;; definition for function vector-sin-rad! (defun vector-sin-rad! ((arg0 vector) (arg1 vector)) "Taylor series approximation of sine on all 4 elements in a vector. -Inputs should be in radians, in -pi to pi. -Somehow their coefficients are a little bit off. -Like the first coefficient, which should obviously be 1, is not quite 1." + Inputs should be in radians, in -pi to pi. + Somehow their coefficients are a little bit off. + Like the first coefficient, which should obviously be 1, is not quite 1." (rlet ((acc :class vf) (vf1 :class vf) (vf10 :class vf) @@ -239,7 +239,7 @@ Like the first coefficient, which should obviously be 1, is not quite 1." ;; ERROR: Bad vector register dependency: vf2 (defun vector-cos-rad! ((arg0 vector) (arg1 vector)) "Compute the cosine of all 4 vector elements. -Radians, with no wrapping. Uses taylor series with 4 coefficients." + Radians, with no wrapping. Uses taylor series with 4 coefficients." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -272,8 +272,8 @@ Radians, with no wrapping. Uses taylor series with 4 coefficients." ;; ERROR: Bad vector register dependency: vf14 (defun vector-sincos-rad! ((arg0 vector) (arg1 vector) (arg2 vector)) "Compute the sine and cosine of each element of src, storing it in dst-sin and dst-cos. -This is more efficient than separate calls to sin and cos. -Inputs should be radians in -pi to pi." + This is more efficient than separate calls to sin and cos. + Inputs should be radians in -pi to pi." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -331,7 +331,7 @@ Inputs should be radians in -pi to pi." ;; WARN: Return type mismatch float vs none. (defun vector-rad<-vector-deg! ((out vector) (in vector)) "Convert a vector in rotation units to radians, and unwrap. -Input can be anything, output will be -2pi to pi." + Input can be anything, output will be -2pi to pi." (local-vars (v0-0 float) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128)) (rlet ((vf1 :class vf) (vf2 :class vf) @@ -357,7 +357,7 @@ Input can be anything, output will be -2pi to pi." ;; WARN: Return type mismatch float vs int. (defun vector-rad<-vector-deg/2! ((out vector) (in vector)) "Divide the input by two, and then convert from rotation units to radians, unwrapping. -Not sure why this really needs to be separate the from previous function..." + Not sure why this really needs to be separate the from previous function..." (local-vars (v0-0 float) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128)) (rlet ((vf1 :class vf) (vf2 :class vf) @@ -438,7 +438,7 @@ Not sure why this really needs to be separate the from previous function..." ;; definition for function sign (defun sign ((arg0 float)) "Similar to above, but returns 0 if input is 0. -But is more complicated." + But is more complicated." (cond ((< 0.0 arg0) 1.0 diff --git a/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc index 71d741923a..3c2a1c5151 100644 --- a/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc @@ -978,8 +978,8 @@ ;; definition for function vector-dot (defun vector-dot ((arg0 vector) (arg1 vector)) "Take the dot product of two vectors. -Only does the x, y, z compoments. -Originally handwritten assembly to space out loads and use FPU accumulator" + Only does the x, y, z compoments. + Originally handwritten assembly to space out loads and use FPU accumulator" (vector-dot arg0 arg1) ) @@ -1003,7 +1003,7 @@ Originally handwritten assembly to space out loads and use FPU accumulator" ;; definition for function vector4-dot (defun vector4-dot ((arg0 vector) (arg1 vector)) "Take the dot product of two vectors. -Does the x, y, z, and w compoments" + Does the x, y, z, and w compoments" (vector4-dot arg0 arg1) ) diff --git a/test/decompiler/reference/jak2/engine/math/vector_REF.gc b/test/decompiler/reference/jak2/engine/math/vector_REF.gc index 03edad80da..e6fdc097b9 100644 --- a/test/decompiler/reference/jak2/engine/math/vector_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/vector_REF.gc @@ -111,7 +111,7 @@ ;; definition for function vector/! (defun vector/! ((arg0 vector) (arg1 vector) (arg2 vector)) "Set arg0 = arg1 / arg2. The w component will be set to 1. -The implementation is kind of crazy." + The implementation is kind of crazy." (rlet ((Q :class vf) (vf0 :class vf) (vf4 :class vf) @@ -208,7 +208,7 @@ The implementation is kind of crazy." ;; definition for function vector--float*! (defun vector--float*! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) "Set arg0 = arg1 - (arg2 * arg3). The w component will be set to 1. -Is this different from vector-*!" + Is this different from vector-*!" (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -311,7 +311,7 @@ Is this different from vector-*!" ;; definition for function vector-seek! (defun vector-seek! ((arg0 vector) (arg1 vector) (arg2 float)) "Seek arg0 toward arg1. The arg0 is both read and written. -arg2 is saturated to (0, 1)" + arg2 is saturated to (0, 1)" (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -337,9 +337,9 @@ arg2 is saturated to (0, 1)" ;; definition for function vector-smooth-seek! (defun vector-smooth-seek! ((arg0 vector) (arg1 vector) (arg2 float)) "Smoothly seek vec toward target. -The step always points toward the target and has length (dist * alpha). -If the step is longer than max-step, the step is projected onto a _square_ with side length arg2. -Note that this doesn't project to a circle like the function below..." + The step always points toward the target and has length (dist * alpha). + If the step is longer than max-step, the step is projected onto a _square_ with side length arg2. + Note that this doesn't project to a circle like the function below..." (rlet ((acc :class vf) (vf0 :class vf) (vf4 :class vf) @@ -369,9 +369,9 @@ Note that this doesn't project to a circle like the function below..." ;; definition for function vector-seek-2d-xz-smooth! (defun vector-seek-2d-xz-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) "Smoothly seek vec's x and z components toward target. -The step always points toward the target and has length (dist * alpha). -If the step is longer than max-step, the step is projected onto a circle of radius max-step. -Doesn't touch y or w." + The step always points toward the target and has length (dist * alpha). + If the step is longer than max-step, the step is projected onto a circle of radius max-step. + Doesn't touch y or w." (let ((f0-1 (- (-> arg1 x) (-> arg0 x))) (f2-1 (- (-> arg1 z) (-> arg0 z))) ) @@ -401,9 +401,9 @@ Doesn't touch y or w." ;; definition for function vector-seek-2d-yz-smooth! (defun vector-seek-2d-yz-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) "Smoothly seek vec's y and z components toward target. -The step always points toward the target and has length (dist * alpha). -If the step is longer than max-step, the step is projected onto a circle of radius max-step. -Doesn't touch x or w." + The step always points toward the target and has length (dist * alpha). + If the step is longer than max-step, the step is projected onto a circle of radius max-step. + Doesn't touch x or w." (let ((f0-1 (- (-> arg1 y) (-> arg0 y))) (f2-1 (- (-> arg1 z) (-> arg0 z))) ) @@ -433,9 +433,9 @@ Doesn't touch x or w." ;; definition for function vector-seek-3d-smooth! (defun vector-seek-3d-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) "Smoothly seek vec's x, y, and z components toward target. -The step always points toward the target and has length (dist * alpha). -If the step is longer than max-step, the step is projected onto a circle of radius max-step. -Doesn't touch w." + The step always points toward the target and has length (dist * alpha). + If the step is longer than max-step, the step is projected onto a circle of radius max-step. + Doesn't touch w." (let ((f0-1 (- (-> arg1 x) (-> arg0 x))) (f1-2 (- (-> arg1 y) (-> arg0 y))) (f3-1 (- (-> arg1 z) (-> arg0 z))) @@ -469,8 +469,8 @@ Doesn't touch w." ;; definition for function seek-with-smooth (defun seek-with-smooth ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) "Move value closer to target. -If we are within deadband, just go straight to target. -If not, try to go alpha*err. If that is a larger step than max-step, limit to max-step" + If we are within deadband, just go straight to target. + If not, try to go alpha*err. If that is a larger step than max-step, limit to max-step" (let ((f0-1 (- arg1 arg0))) (cond ((>= arg4 (fabs f0-1)) @@ -526,7 +526,7 @@ If not, try to go alpha*err. If that is a larger step than max-step, limit to ma ;; definition for function vector-v! (defun vector-v! ((arg0 vector)) "Convert a velocity to a displacement per frame. The velocity should be in X/actual_second. -Uses the current process clock." + Uses the current process clock." (vector-float*! arg0 arg0 (seconds-per-frame)) arg0 ) @@ -806,7 +806,7 @@ Uses the current process clock." ;; definition for function vector-normalize-ret-len! (defun vector-normalize-ret-len! ((arg0 vector) (arg1 float)) "Modify arg0 in place to have length arg1 for its xyz components. -The w part isn't changed and the _original_ length is returned." + The w part isn't changed and the _original_ length is returned." (local-vars (v1-1 float)) (rlet ((acc :class vf) (Q :class vf) @@ -843,8 +843,8 @@ The w part isn't changed and the _original_ length is returned." ;; INFO: Used lq/sq (defun vector-normalize-copy! ((arg0 vector) (arg1 vector) (arg2 float)) "Normalize, but not in place. -This implementation is very good compared to the vector-normalize! one. -The w component is set to 1." + This implementation is very good compared to the vector-normalize! one. + The w component is set to 1." (let ((f0-0 (vector-length arg1))) (cond ((= f0-0 0.0) @@ -906,8 +906,8 @@ The w component is set to 1." ;; definition for function vector-length-max! (defun vector-length-max! ((arg0 vector) (arg1 float)) "Make vector at most arg1 length (xyz only). -If it is larger, project onto sphere. -Doesn't touch w" + If it is larger, project onto sphere. + Doesn't touch w" (let ((f0-0 (vector-length arg0))) (when (not (or (= f0-0 0.0) (< f0-0 arg1))) (let ((f0-1 (/ f0-0 arg1))) @@ -925,8 +925,8 @@ Doesn't touch w" ;; definition for function vector-xz-length-max! (defun vector-xz-length-max! ((arg0 vector) (arg1 float)) "Make vector at most arg1 length (xz only). -It it is larger, project onto circle. -Doesn't touch w or y." + It it is larger, project onto circle. + Doesn't touch w or y." (let* ((v1-0 arg0) (f0-4 (sqrtf (+ (* (-> v1-0 x) (-> v1-0 x)) (* (-> v1-0 z) (-> v1-0 z))))) ) @@ -1046,7 +1046,7 @@ Doesn't touch w or y." ;; definition for function rot-zxy-from-vector! (defun rot-zxy-from-vector! ((arg0 vector) (arg1 vector)) "I think this gives you a vector of euler angles to rotate some unit vector -to arg1." + to arg1." (let* ((f28-0 (-> arg1 z)) (f30-0 (-> arg1 x)) (f0-0 (atan f30-0 f28-0)) @@ -1065,7 +1065,7 @@ to arg1." ;; definition for function rot-zyx-from-vector! (defun rot-zyx-from-vector! ((arg0 vector) (arg1 vector)) "I think this gives you a vector of euler angles to rotate some unit vector -to arg1." + to arg1." (let* ((f28-0 (-> arg1 z)) (f30-0 (- (-> arg1 y))) (f0-1 (atan f30-0 f28-0)) @@ -1084,7 +1084,7 @@ to arg1." ;; definition for function vector-lerp! (defun vector-lerp! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) "Linearly interpolate between two vectors. Alpha isn't clamped. -w will be set to 1." + w will be set to 1." (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -1108,7 +1108,7 @@ w will be set to 1." ;; INFO: Used lq/sq (defun vector-lerp-clamp! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) "Linearly interpolate between two vectors, clamping alpha to 0, 1. -w will be set to 1." + w will be set to 1." (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -1203,9 +1203,9 @@ w will be set to 1." ;; INFO: Used lq/sq (defun vector-degi ((arg0 vector) (arg1 vector)) "Convert a vector (in _rotations_) to degrees units, stored in an int. -Truncates to the nearest _rotation_. -Neither the input or output is a commonly used form. -Unsurprisingly, this strange function is never used." + Truncates to the nearest _rotation_. + Neither the input or output is a commonly used form. + Unsurprisingly, this strange function is never used." (local-vars (v1-0 uint128) (v1-1 uint128)) (rlet ((vf1 :class vf)) (.lvf vf1 (&-> arg1 quad)) @@ -1221,8 +1221,8 @@ Unsurprisingly, this strange function is never used." ;; INFO: Used lq/sq (defun vector-degf ((arg0 vector) (arg1 vector)) "Convert a vector (in integer degree units) to floating point rotations. -Truncates to the nearest _rotation_. -Like the previous function, this is stupid and unused." + Truncates to the nearest _rotation_. + Like the previous function, this is stupid and unused." (local-vars (v1-1 uint128)) (rlet ((vf1 :class vf)) (let ((v1-0 (-> arg1 quad))) @@ -1238,7 +1238,7 @@ Like the previous function, this is stupid and unused." ;; definition for function vector-degmod (defun vector-degmod ((arg0 vector) (arg1 vector)) "This one is actually right. Wraps degrees units (in floats, like they should be) -to +/- half a rotation." + to +/- half a rotation." (local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128)) (rlet ((vf1 :class vf)) (.lvf vf1 (&-> arg1 quad)) @@ -1617,7 +1617,7 @@ to +/- half a rotation." ;; definition for function rand-vu-sphere-point! (defun rand-vu-sphere-point! ((arg0 vector) (arg1 float)) "Get a random point on the sphere at the origin with radius arg1. -The point is on the surface of the sphere." + The point is on the surface of the sphere." (set-vector! arg0 (rand-vu-float-range -1.0 1.0) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc index e273fffe43..81639585f7 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc @@ -222,10 +222,10 @@ ;; WARN: Function get-nav-control has a return type of none, but the expression builder found a return statement. (defun get-nav-control ((arg0 process-drawable) (arg1 nav-mesh)) "Given a [[process-drawable]] get the associated [[nav-control]] using either: -- the provided `nav-mesh` arg -- the `nav-mesh` associated with the [[process-drawable]]'s [[entity]] -If no [[nav-mesh]] is set or found, set the [[entity]]'s [[entity-perm-status]] to TODO and return an error. -Note that this doesn't actually return the nav-control, but instead adds this process-drawable to the nav-mesh." + - the provided `nav-mesh` arg + - the `nav-mesh` associated with the [[process-drawable]]'s [[entity]] + If no [[nav-mesh]] is set or found, set the [[entity]]'s [[entity-perm-status]] to TODO and return an error. + Note that this doesn't actually return the nav-control, but instead adds this process-drawable to the nav-mesh." (if (not arg1) (set! arg1 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0)) ) @@ -397,7 +397,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr ;; WARN: Return type mismatch int vs none. (defun add-nav-sphere ((nav nav-control) (sphere sphere) (max-spheres int)) "Adds the given [[sphere]] to the [[nav-control]]'s `sphere-array` so long as -`max-spheres` is less than [[nav-control]]'s `sphere-count`" + `max-spheres` is less than [[nav-control]]'s `sphere-count`" (local-vars (a2-4 float)) (rlet ((vf1 :class vf) (vf2 :class vf) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc index 0ab392cf8e..07591b08e1 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc @@ -25,7 +25,7 @@ ;; definition for method 74 of type nav-enemy (defmethod general-event-handler ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('nav-mesh-kill) (deactivate this) @@ -207,9 +207,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((self nav-enemy)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) (set-time! (-> self last-draw-time)) ) @@ -968,10 +968,10 @@ ;; definition for method 98 of type nav-enemy (defmethod in-aggro-range? ((this nav-enemy) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (if (and arg0 (not arg1)) (set! arg1 (get-trans arg0 1)) ) @@ -1120,7 +1120,7 @@ ;; WARN: Return type mismatch float vs none. (defmethod set-enemy-info! ((this nav-enemy) (arg0 nav-enemy-info)) "In addition to setting the `enemy-info`, also init the `neck-joint` if applicable from it -@param info Set `enemy-info` accordingly" + @param info Set `enemy-info` accordingly" (set! (-> this enemy-info) arg0) (set! (-> arg0 callback-info) *nav-enemy-callback-info*) (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) @@ -1315,11 +1315,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-from-entity! ((this nav-enemy) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-enemy-collision! this) (process-drawable-from-entity! this arg0) (init-enemy! this) diff --git a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc index ae763cfa79..31677255ec 100644 --- a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc @@ -1099,11 +1099,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-from-entity! ((this rigid-body-object) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (allocate-and-init-cshape this) (process-drawable-from-entity! this arg0) (init-skel-and-rigid-body this) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/focus_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/focus_REF.gc index fc8acf58ee..8bc4cccb24 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/focus_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/focus_REF.gc @@ -41,7 +41,7 @@ ;; definition for method 10 of type focus (defmethod collide-check? ((this focus) (proc process-focusable)) "If the focused process is not dead, -check that the [[collide-spec]] of the focus and the process match." + check that the [[collide-spec]] of the focus and the process match." (when (and proc (not (logtest? (-> proc focus-status) (focus-status disable dead)))) (let* ((root (-> proc root)) (cshape (if (type? root collide-shape) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc index 024ab6c006..941626a37a 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/process-taskable_REF.gc @@ -14,8 +14,8 @@ ;; WARN: Return type mismatch int vs none. (defbehavior process-taskable-anim-loop process-taskable ((arg0 (function process-taskable object))) "Takes in a function and loops as long as it's return value is truthy -Seen take in - `true-func` which takes no args TODO - seems fishy -- a `(process-taskable process) lambda" + Seen take in - `true-func` which takes no args TODO - seems fishy + - a `(process-taskable process) lambda" (while (arg0 self) (let ((s5-0 (get-art-elem self))) (when (!= (ja-group) s5-0) @@ -42,7 +42,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy ;; WARN: Return type mismatch art-joint-anim vs art-element. (defmethod get-art-elem ((this process-taskable)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (the-as art-element (if (> (-> this skel active-channels) 0) (-> this skel root-channel 0 frame-group) ) @@ -430,11 +430,11 @@ Seen take in - `true-func` which takes no args TODO - seems fishy ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this process-taskable) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (process-taskable-method-31 this) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/engine/ps2/pad_REF.gc b/test/decompiler/reference/jak2/engine/ps2/pad_REF.gc index 6e25a6ebbd..f4e7098bb8 100644 --- a/test/decompiler/reference/jak2/engine/ps2/pad_REF.gc +++ b/test/decompiler/reference/jak2/engine/ps2/pad_REF.gc @@ -222,7 +222,7 @@ It's 32 bytes + type tag (ignored by C kernel)." ;; definition for method 0 of type cpad-list (defmethod new cpad-list ((allocation symbol) (type-to-make type)) "Create a cpad-list for 2 controllers. It's fine to do this even if one or both controllers -aren't connected yet." + aren't connected yet." (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> gp-0 num-cpads) 2) (set! (-> gp-0 cpads 0) (new 'global 'cpad-info 0)) @@ -234,9 +234,9 @@ aren't connected yet." ;; definition for function analog-input (defun analog-input ((arg0 int) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) "Convert integer input from pad into a float between -out-range and +out-range. -The offset is applied directly to the input. -The center val is the expected value for 0, after applying offset. -The max val is the expected value with the stick pushed all the way." + The offset is applied directly to the input. + The center val is the expected value for 0, after applying offset. + The max val is the expected value with the stick pushed all the way." (let* ((f1-1 (- (the float arg0) arg1)) (f0-3 (- (fabs f1-1) arg2)) (v1-0 (- arg3 arg2)) diff --git a/test/decompiler/reference/jak2/engine/ps2/timer_REF.gc b/test/decompiler/reference/jak2/engine/ps2/timer_REF.gc index d2d06d39d2..9af19d5a47 100644 --- a/test/decompiler/reference/jak2/engine/ps2/timer_REF.gc +++ b/test/decompiler/reference/jak2/engine/ps2/timer_REF.gc @@ -114,8 +114,8 @@ ;; ERROR: Unsupported inline assembly instruction kind - [mfc0 a1, Count] (defun stopwatch-end ((arg0 stopwatch)) "End a stopwatch level. Stops the stopwatch if it's back to level zero. -There is no guard against ending a stopwatch too many times, and a negative level -will cause errors!" + There is no guard against ending a stopwatch too many times, and a negative level + will cause errors!" (local-vars (a1-0 int)) (+! (-> arg0 begin-level) -1) (when (zero? (-> arg0 begin-level)) @@ -180,7 +180,7 @@ will cause errors!" ;; definition for method 10 of type clock (defmethod advance-by! ((this clock) (arg0 float)) "Advance the clock by arg0 timeframes (as a float). -Both counters keep a separate fractional and integer counter." + Both counters keep a separate fractional and integer counter." (the int (+ arg0 (-> this accum))) (+! (-> this integral-accum) arg0) (set! (-> this old-integral-frame-counter) (-> this integral-frame-counter)) diff --git a/test/decompiler/reference/jak2/engine/sound/gsound-h_REF.gc b/test/decompiler/reference/jak2/engine/sound/gsound-h_REF.gc index 48d705deea..ce6e0a5061 100644 --- a/test/decompiler/reference/jak2/engine/sound/gsound-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/sound/gsound-h_REF.gc @@ -687,6 +687,7 @@ (shutdown sound-rpc-shutdown :overlay-at (-> data 0)) (list-sounds sound-rpc-list-sounds :overlay-at (-> data 0)) (unload-music sound-rpc-unload-music :overlay-at (-> data 0)) + (mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0)) ) ) diff --git a/test/decompiler/reference/jak2/engine/sound/gsound_REF.gc b/test/decompiler/reference/jak2/engine/sound/gsound_REF.gc index 68cd124945..8c2f46c545 100644 --- a/test/decompiler/reference/jak2/engine/sound/gsound_REF.gc +++ b/test/decompiler/reference/jak2/engine/sound/gsound_REF.gc @@ -715,8 +715,8 @@ ;; INFO: Used lq/sq (defbehavior sound-play-by-name process-drawable ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 object)) "Send play rpc to play a sound! -Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]] -otherwise, an explicit [[vector]] can be provided" + Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]] + otherwise, an explicit [[vector]] can be provided" (local-vars (sv-16 sound-group)) (set! sv-16 arg5) (let ((s4-0 arg6)) diff --git a/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc index a8e0b01064..5880f35c07 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc @@ -140,7 +140,7 @@ ;; definition for method 10 of type carry-info (defmethod distance-from-destination ((this carry-info) (arg0 carry-info)) "Returns the distance from the current `point` and the provided [[carry-info]]'s `point`. -Returns `-1.0` if it exceeds the maximum allowed" + Returns `-1.0` if it exceeds the maximum allowed" (let* ((f28-0 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (-> arg0 point) (-> this point)))) (f30-0 (fabs (deg-diff f28-0 (vector-y-angle (-> this normal))))) (f28-1 (fabs (deg-diff (+ 32768.0 f28-0) (vector-y-angle (-> arg0 normal))))) diff --git a/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc index 03543390e7..3c08862da7 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc @@ -230,9 +230,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this grunt-mech)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" ((method-of-type grunt common-post) this) 0 (none) diff --git a/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc index edc2dc450f..4b14800bbb 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc @@ -382,11 +382,11 @@ ;; definition for method 11 of type mech (defmethod init-from-entity! ((this mech) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0) (none) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc b/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc index 7ebbf315ce..71a27dade5 100644 --- a/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc @@ -1161,11 +1161,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this slide-control) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc index 24ee9924ce..0e15215485 100644 --- a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc @@ -2227,11 +2227,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this base-turret) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (turret-init! this arg0 (the-as matrix #f)) (go (method-of-object this idle)) (none) diff --git a/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc b/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc index 2fb4a050f2..656409d003 100644 --- a/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc @@ -1177,9 +1177,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod run-pending-updates! ((this engine-minimap) (arg0 time-frame)) "Run updates if they scheduled. If something is found that has no pending update, kill it. -Note that we won't kill things on this call if they fail to update their `update-time`. -They will survive until the next call to `run-pending-updates`! -(or you can modify their `update-time` before that to prevent them from being killed.)" + Note that we won't kill things on this call if they fail to update their `update-time`. + They will survive until the next call to `run-pending-updates`! + (or you can modify their `update-time` before that to prevent them from being killed.)" (let ((s2-0 (the-as (pointer connection-pers) (&-> this alive-list))) (s3-0 (-> this alive-list)) ) diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc index c3e94d09e7..f695b945a8 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc @@ -5658,8 +5658,8 @@ ;; definition for function get-highscore-type (defun get-highscore-type ((highscore-index-arg int)) "Given a highscore index, return it's type as a symbol -@param highscore-index-arg something -@returns The type, as as symbol. Either `'game` or `'race`" + @param highscore-index-arg something + @returns The type, as as symbol. Either `'game` or `'race`" (let ((highscore-type 'game)) (let ((highscore-index highscore-index-arg)) (cond diff --git a/test/decompiler/reference/jak2/engine/ui/text_REF.gc b/test/decompiler/reference/jak2/engine/ui/text_REF.gc index 588a9c8a6f..0b12a53ed5 100644 --- a/test/decompiler/reference/jak2/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/text_REF.gc @@ -252,7 +252,7 @@ ;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. (defun load-game-text-info ((arg0 string) (arg1 (pointer object)) (arg2 kheap)) "Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for -the game-text-info, and heap is the heap to load to. The heap will be cleared." + the game-text-info, and heap is the heap to load to. The heap will be cleared." (local-vars (v0-3 int) (sv-16 game-text-info) (sv-24 int) (sv-32 int) (sv-40 int)) (set! sv-16 (the-as game-text-info (-> arg1 0))) (set! sv-24 (the-as int (-> *setting-control* user-current language))) @@ -330,8 +330,8 @@ the game-text-info, and heap is the heap to load to. The heap will be cleared." ;; WARN: Return type mismatch int vs none. (defun load-level-text-files ((arg0 int)) "Load the text files needed for level idx. -This function made more sense back when text files were split up, but in the end they put everything -in a single text group and file." + This function made more sense back when text files were split up, but in the end they put everything + in a single text group and file." (if (or *level-text-file-load-flag* (>= arg0 0)) (load-game-text-info "common" (&-> '*common-text* value) *common-text-heap*) ) diff --git a/test/decompiler/reference/jak2/kernel/gcommon_REF.gc b/test/decompiler/reference/jak2/kernel/gcommon_REF.gc index 29a4dbfc32..a76434bd2c 100644 --- a/test/decompiler/reference/jak2/kernel/gcommon_REF.gc +++ b/test/decompiler/reference/jak2/kernel/gcommon_REF.gc @@ -250,7 +250,7 @@ This is the main vector type." ;; WARN: Using new Jak 2 rtype-of (defun type? ((obj object) (desired-type type)) "Return if the given object is an instance of the given type. -Works on basics, bintegers, or symbols." + Works on basics, bintegers, or symbols." (let ((v1-0 object) (a0-1 (rtype-of obj)) ) @@ -270,8 +270,8 @@ Works on basics, bintegers, or symbols." ;; definition for function find-parent-method (defun find-parent-method ((typ type) (method-id int)) "Find the closest parent type that has a different implementation of the given method and return that method. -If it does not exist, return `nothing` function. -This is used to implement call-parent-method." + If it does not exist, return `nothing` function. + This is used to implement call-parent-method." (local-vars (v0-0 function)) (let ((v1-2 (-> typ method-table method-id))) (until (!= v0-0 v1-2) @@ -341,11 +341,11 @@ This is used to implement call-parent-method." ;; definition for function member (defun member ((obj-to-find object) (list object)) "See if the first argument is in the proper list of the second argument. -Checked with simple equality. -If so, return the list starting at the at point (a truthy value). -Otherwise, return #f. -(member 'b '(a b c)) -> (b c d). -(member 'w '(a b c)) -> #f" + Checked with simple equality. + If so, return the list starting at the at point (a truthy value). + Otherwise, return #f. + (member 'b '(a b c)) -> (b c d). + (member 'w '(a b c)) -> #f" (let ((v1-0 list)) (while (not (or (null? v1-0) (= (car v1-0) obj-to-find))) (set! v1-0 (cdr v1-0)) @@ -370,8 +370,8 @@ Otherwise, return #f. ;; definition for function assoc (defun assoc ((key object) (assoc-list object)) "Search an association list for given object. Return #f if not found, otherwise the element with matching car. -(assoc 'a '((a . 1) (b . 2) (c . 3))) -> (a . 1) -(assoc 'x '((a . 1) (b . 2) (c . 3))) -> #f" + (assoc 'a '((a . 1) (b . 2) (c . 3))) -> (a . 1) + (assoc 'x '((a . 1) (b . 2) (c . 3))) -> #f" (let ((v1-0 assoc-list)) (while (not (or (null? v1-0) (= (car (car v1-0)) key))) (set! v1-0 (cdr v1-0)) @@ -507,9 +507,9 @@ Otherwise, return #f. ;; definition for function insert-cons! (defun insert-cons! ((new-obj object) (list object)) "Update an association list to have the given (key . value) pair. -If a previous value exists, it is deleted first. -This function always allocates a pair through `cons` on the global heap, which can never be freed, -so it should almost never be used at runtime." + If a previous value exists, it is deleted first. + This function always allocates a pair through `cons` on the global heap, which can never be freed, + so it should almost never be used at runtime." (let ((a3-0 (delete-car! (car new-obj) list))) (cons new-obj a3-0) ) @@ -518,8 +518,8 @@ so it should almost never be used at runtime." ;; definition for function sort (defun sort ((list pair) (compare-func (function object object object))) "Sort a list using the given comparision function. -The function can return a #t/#f value, or a positive/negative value. -For example, you could use either `-` or `<` as functions to sort integers." + The function can return a #t/#f value, or a positive/negative value. + For example, you could use either `-` or `<` as functions to sort integers." (let ((s4-0 -1)) (while (nonzero? s4-0) (set! s4-0 0) @@ -915,7 +915,7 @@ The stride is stored in the heap-base of the inline-array-class child class." ;; definition for function mem-set32! (defun mem-set32! ((dst pointer) (word-count int) (value int)) "Set memory to the given 32-bit value, repeated n times. (like C memset, but setting int32_t instead of char). -Not an optimized implementation. Must be 4-byte aligned." + Not an optimized implementation. Must be 4-byte aligned." (let ((v0-0 dst)) (dotimes (v1-0 word-count) (set! (-> (the-as (pointer int32) dst)) value) diff --git a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc index a5a4d8fc66..938ac32c78 100644 --- a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc @@ -171,7 +171,7 @@ ;; WARN: Return type mismatch int vs none. (defbehavior remove-exit process () "Remove the top stack frame. If you have no other stack frames, you can use this before a `go` -to skip the `exit` of the state you are currently in." + to skip the `exit` of the state you are currently in." (if (-> self stack-frame-top) (set! (-> self stack-frame-top) (-> self stack-frame-top next)) ) @@ -642,7 +642,6 @@ to skip the `exit` of the state you are currently in." ) ;; definition for method 3 of type dead-pool-heap -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this dead-pool-heap)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) diff --git a/test/decompiler/reference/jak2/kernel/gstring_REF.gc b/test/decompiler/reference/jak2/kernel/gstring_REF.gc index 3ca4641bfc..eab4c942f1 100644 --- a/test/decompiler/reference/jak2/kernel/gstring_REF.gc +++ b/test/decompiler/reference/jak2/kernel/gstring_REF.gc @@ -218,7 +218,7 @@ ;; WARN: Return type mismatch int vs none. (defun copyn-charp<-string ((dst (pointer uint8)) (src string) (len int)) "Copy part of a string to a c-string. Writes null terminator, repeatedly, to reach the given length. -If the source is longer than the length, the null terminator is still included." + If the source is longer than the length, the null terminator is still included." (let ((v1-0 (-> src data))) (while (and (nonzero? (-> v1-0 0)) (< 1 len)) (set! (-> dst 0) (-> v1-0 0)) diff --git a/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc b/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc index 14aeebd640..b3f565023a 100644 --- a/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/atoll-obs_REF.gc @@ -144,11 +144,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this piston) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-64 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -327,11 +327,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this turbine) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -500,11 +500,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this liftcat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -705,11 +705,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atollrotpipe) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -920,11 +920,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this slider) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -1101,11 +1101,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-windmill) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((a1-1 (new 'stack-no-clear 'sync-info-params))) (let ((v1-2 0)) @@ -1186,11 +1186,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-valve) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -1243,11 +1243,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-hatch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -1326,11 +1326,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-hellcat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -1403,11 +1403,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-mar-symbol) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc b/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc index e96e77f368..e4edbe56f6 100644 --- a/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/atoll-tank_REF.gc @@ -1791,11 +1791,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this atoll-tank) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this is-master?) #t) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) diff --git a/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc b/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc index 29910f16f7..a0526ce55e 100644 --- a/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/juicer_REF.gc @@ -785,9 +785,9 @@ ;; definition for method 55 of type juicer (defmethod common-post ((this juicer)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) @@ -821,7 +821,7 @@ ;; definition for method 74 of type juicer (defmethod general-event-handler ((this juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit-flinch) (cond diff --git a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc index b39842c6f9..bc1c04cff7 100644 --- a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc @@ -48,11 +48,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cboss-tractor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -139,7 +139,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this cboss-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this sound-id) (new-sound-id)) 0 (none) @@ -148,10 +148,10 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 43 of type cboss-elevator (defmethod move-between-points ((this cboss-elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) @@ -806,9 +806,9 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this krew-boss-clone)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) @@ -883,7 +883,7 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 74 of type krew-boss-clone (defmethod general-event-handler ((this krew-boss-clone) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (with-pp (case arg2 (('touch 'bonk 'attack) @@ -2117,7 +2117,7 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this krew-boss) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('track) (cond diff --git a/test/decompiler/reference/jak2/levels/castle/castle-obs_REF.gc b/test/decompiler/reference/jak2/levels/castle/castle-obs_REF.gc index a58235fc21..1e59001b78 100644 --- a/test/decompiler/reference/jak2/levels/castle/castle-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/castle-obs_REF.gc @@ -60,11 +60,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-conveyor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (reset-root! this) (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) @@ -401,11 +401,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-conveyor-switch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -702,11 +702,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-electric-fence) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -920,10 +920,10 @@ This commonly includes things such as: ;; definition for method 43 of type cas-elevator (defmethod move-between-points ((this cas-elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s5-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) @@ -1045,7 +1045,7 @@ This commonly includes things such as: ;; definition for method 33 of type cas-elevator (defmethod init-plat! ((this cas-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this sound-id) (new-sound-id)) (cas-elevator-method-49 this) (none) @@ -1378,11 +1378,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-rot-bridge) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0))) (set! (-> s4-0 total-prims) (the-as uint 6)) @@ -1635,11 +1635,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-switch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) @@ -1864,11 +1864,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-trapdoor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -1977,11 +1977,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-chain-plat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -2114,11 +2114,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-rot-blade) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -2239,11 +2239,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-flag-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2302,11 +2302,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-flag-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2690,11 +2690,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cas-robot-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -2857,11 +2857,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this lightning-ball) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) diff --git a/test/decompiler/reference/jak2/levels/castle/pad/caspad-obs_REF.gc b/test/decompiler/reference/jak2/levels/castle/pad/caspad-obs_REF.gc index 922cf3765c..17cfa08fc7 100644 --- a/test/decompiler/reference/jak2/levels/castle/pad/caspad-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/pad/caspad-obs_REF.gc @@ -39,10 +39,10 @@ ;; definition for method 43 of type cpad-elevator (defmethod move-between-points ((this cpad-elevator) (vec vector) (point-a float) (point-b float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((path-point-a (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-a 'interp)) (path-point-b (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-b 'interp)) (elevator-trans (-> this root trans)) @@ -80,7 +80,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod configure-collision ((this cpad-elevator) (collide-with-jak? symbol)) "Appropriately sets the collision on the elevator -@param collide-with-jak? If set, the elevator will collide with Jak" + @param collide-with-jak? If set, the elevator will collide with Jak" (let ((prim (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) (cond (collide-with-jak? @@ -185,7 +185,7 @@ ;; WARN: Return type mismatch sound-id vs none. (defmethod init-plat! ((this cpad-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (let ((last-path-index (+ (-> this path curve num-cverts) -1))) (calc-dist-between-points! this 0 last-path-index) (calc-dist-between-points! this last-path-index 0) diff --git a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc index dc7ae0b99c..e8d9ef027c 100644 --- a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc @@ -976,7 +976,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this roboguard-level) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('attack) (cond diff --git a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc index 4283562d74..7a0b214e0e 100644 --- a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc @@ -1267,9 +1267,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this bombbot)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (local-vars (sv-16 sparticle-launcher) (sv-20 sparticle-launcher)) (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) @@ -1395,7 +1395,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this bombbot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('nav-mesh-kill) (change-to *default-nav-mesh* this) diff --git a/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc b/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc index c47af4d38c..9c4db27a33 100644 --- a/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc @@ -1829,11 +1829,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this bush-collect) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/common/height-map-h_REF.gc b/test/decompiler/reference/jak2/levels/city/common/height-map-h_REF.gc index 965ce01936..4073aeaf08 100644 --- a/test/decompiler/reference/jak2/levels/city/common/height-map-h_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/height-map-h_REF.gc @@ -53,6 +53,6 @@ all initialized from static data." ;; definition for function get-traffic-height (defun get-traffic-height ((arg0 vector)) "@returns The value of [[xz-height-map::9]] using [[*traffic-height-map*]] and the [[vector]] provided -@see [[xz-height-map::9]]" + @see [[xz-height-map::9]]" (get-height-at-point *traffic-height-map* arg0) ) diff --git a/test/decompiler/reference/jak2/levels/city/common/nav-graph-h_REF.gc b/test/decompiler/reference/jak2/levels/city/common/nav-graph-h_REF.gc index 3313161d30..73014a4788 100644 --- a/test/decompiler/reference/jak2/levels/city/common/nav-graph-h_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/nav-graph-h_REF.gc @@ -135,21 +135,21 @@ ;; definition for method 11 of type nav-branch (defmethod get-density ((this nav-branch)) "TODO -@returns `density * 0.0078125` - is this some kind of trick?" + @returns `density * 0.0078125` - is this some kind of trick?" (* 0.0078125 (the float (-> this density))) ) ;; definition for method 12 of type nav-branch (defmethod get-speed-limit ((this nav-branch)) "TODO -@returns `speed-limit * 1024.0`" + @returns `speed-limit * 1024.0`" (* 1024.0 (the float (-> this speed-limit))) ) ;; definition for method 13 of type nav-branch (defmethod get-width ((this nav-branch)) "TODO -@returns `width * 256.0`" + @returns `width * 256.0`" (* 256.0 (the float (-> this width))) ) @@ -161,14 +161,14 @@ ;; definition for method 15 of type nav-branch (defmethod dest-node-id-at-max? ((this nav-branch)) "@returns if `dest-node`'s `id` is equal to `#FFFF` -@see [[nav-node]]" + @see [[nav-node]]" (!= (-> this dest-node id) #xffff) ) ;; definition for method 21 of type nav-node (defmethod get-radius ((this nav-node)) "TODO -@returns `radius * 1024.0" + @returns `radius * 1024.0" (* 1024.0 (the float (-> this radius))) ) @@ -180,8 +180,8 @@ ;; definition for method 19 of type nav-node (defmethod calc-sine-and-cosine! ((this nav-node) (ret vector)) "Computes the sine and cosine of the `angle`. -@param! ret The result -@returns Nothing, the result will be in `ret`" + @param! ret The result + @returns Nothing, the result will be in `ret`" (let ((angle (the float (-> this angle))) (sin-cos-result (new 'stack-no-clear 'vector)) ) @@ -198,7 +198,7 @@ ;; INFO: Used lq/sq (defmethod get-position ((this nav-node) (ret vector)) "@param! ret The [[vector]] that is modified to hold the result -@returns the `position` [[vector]] with a `w` component of `1.0`" + @returns the `position` [[vector]] with a `w` component of `1.0`" (set! (-> ret quad) (-> this position quad)) (set! (-> ret w) 1.0) ret @@ -314,8 +314,8 @@ ;; definition for method 41 of type nav-graph (defmethod node-at-idx ((this nav-graph) (idx int)) "Get the `nav-node` at a given position. -@param idx The position in the `node-array` to return -@returns the [[nav-node]] if it can be found, otherwise return [[#f]]" + @param idx The position in the `node-array` to return + @returns the [[nav-node]] if it can be found, otherwise return [[#f]]" (let ((v0-0 (the-as nav-node #f))) (if (and (>= idx 0) (< idx (-> this node-count))) (set! v0-0 (-> this node-array idx)) diff --git a/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc b/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc index 44da09ae9c..7be06a606c 100644 --- a/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc @@ -1191,7 +1191,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod patch-nodes ((this nav-graph)) "Patch nodes. Node pointers are stored as indices into arrays to be allocated on the level heap -and patched at runtime after loading." + and patched at runtime after loading." (when (not (-> this patched)) (set! (-> this patched) #t) (let ((s5-0 0)) diff --git a/test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc b/test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc index 5367d35504..44b9b47889 100644 --- a/test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/searchlight_REF.gc @@ -80,11 +80,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this searchlight) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc index 2ebffecf6c..0b90a4f29b 100644 --- a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc @@ -984,11 +984,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this boat-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this mesh) (nav-mesh-from-res-tag arg0 'nav-mesh-actor 0)) (set! (-> this entity) arg0) (when (-> this mesh) diff --git a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc index 50b4637bc0..6e6782df10 100644 --- a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc @@ -528,11 +528,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this security-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (ctywide-entity-hack) (set! (-> this breach) #f) (set! (-> this pass) (res-lump-value arg0 'pickup-type int :time -1000000000.0)) @@ -1025,11 +1025,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fruit-stand) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (fruit-stand-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2145,11 +2145,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cty-guard-turret) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (v1-23 handle)) (with-pp (cty-guard-turret-method-32 this) @@ -2384,11 +2384,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this parking-spot) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (set! (-> this minimap) #f) (set! (-> this vehicle) (the-as handle #f)) @@ -2940,11 +2940,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this propa) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (propa-method-29 this) (process-drawable-from-entity! this arg0) (ctywide-entity-hack) @@ -3006,11 +3006,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this baron-statue) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -3955,11 +3955,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this burning-bush) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (burning-bush-method-30 this) (process-drawable-from-entity! this arg0) (ctywide-entity-hack) @@ -4023,11 +4023,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this barons-ship-lores) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (when (demo?) (process-entity-status! this (entity-perm-status dead) #t) (go empty-state) @@ -4296,11 +4296,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this lurker-pipe-lid) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (lurker-pipe-lid-method-28 this) (process-drawable-from-entity! this arg0) (ctywide-entity-hack) @@ -4477,11 +4477,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ctyn-lamp) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (ctyn-lamp-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc index e0b5be1501..0015654a39 100644 --- a/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc @@ -1290,11 +1290,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-marrow) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-marrow-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1564,11 +1564,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-beetree) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-beetree-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1834,11 +1834,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-cabbage) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-cabbage-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2091,11 +2091,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-small-cabbage) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-small-cabbage-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2392,11 +2392,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-chilirots) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-chilirots-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2517,11 +2517,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farm-sprinkler-barrels) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (farm-sprinkler-barrels-method-28 this) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/city/farm/yakow_REF.gc b/test/decompiler/reference/jak2/levels/city/farm/yakow_REF.gc index 35e910ad0c..044e627bc4 100644 --- a/test/decompiler/reference/jak2/levels/city/farm/yakow_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/farm/yakow_REF.gc @@ -219,7 +219,7 @@ ;; definition for method 74 of type yakow (defmethod general-event-handler ((this yakow) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('attack) (let ((v1-1 (the-as object (-> arg3 param 1)))) diff --git a/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc b/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc index 54bd8f3040..4b6abe5113 100644 --- a/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/generic/neon-praxis-part_REF.gc @@ -1210,11 +1210,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this city-neon-praxis) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause enemy)) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc_REF.gc index bfc0ee9ed5..194c229937 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc_REF.gc @@ -179,7 +179,7 @@ ;; definition for method 74 of type crocadog-escort (defmethod general-event-handler ((this crocadog-escort) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('attack) ((method-of-type bot general-event-handler) this arg0 arg1 arg2 arg3) @@ -198,7 +198,7 @@ ;; definition for method 59 of type crocadog-escort (defmethod get-penetrate-info ((this crocadog-escort)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (let ((v1-1 ((method-of-type bot get-penetrate-info) this))) (logior (penetrate jak-yellow-shot jak-red-shot jak-blue-shot) v1-1) ) @@ -373,11 +373,11 @@ ;; definition for method 11 of type crocadog-escort (defmethod init-from-entity! ((this crocadog-escort) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) ((method-of-type bot init-from-entity!) this arg0) (none) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc index 01654c1270..2bc4561ef8 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc @@ -117,7 +117,7 @@ ;; definition for method 74 of type hal-escort (defmethod general-event-handler ((this hal-escort) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('notify) (case (-> arg3 param 0) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc_REF.gc index 6991c7a912..d81647bca6 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc_REF.gc @@ -179,7 +179,7 @@ ;; definition for method 74 of type kid-escort (defmethod general-event-handler ((this kid-escort) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('arrest) (let* ((s4-0 (handle->process (-> this arrestor-handle))) @@ -372,11 +372,11 @@ ;; definition for method 11 of type kid-escort (defmethod init-from-entity! ((this kid-escort) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) ((method-of-type bot init-from-entity!) this arg0) (none) @@ -636,7 +636,7 @@ This commonly includes things such as: ;; definition for method 59 of type kid-escort (defmethod get-penetrate-info ((this kid-escort)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (let ((v1-1 ((method-of-type bot get-penetrate-info) this))) (logior (penetrate jak-yellow-shot jak-red-shot jak-blue-shot) v1-1) ) diff --git a/test/decompiler/reference/jak2/levels/city/market/ashelin/ctyasha-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/market/ashelin/ctyasha-obs_REF.gc index 4925a1bc72..a13ba8d6b0 100644 --- a/test/decompiler/reference/jak2/levels/city/market/ashelin/ctyasha-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/market/ashelin/ctyasha-obs_REF.gc @@ -921,7 +921,7 @@ ;; definition for method 74 of type tanker-grunt (defmethod general-event-handler ((this tanker-grunt) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('skip-intro) (when (and (-> this next-state) @@ -1039,7 +1039,7 @@ ;; definition for method 74 of type tanker-juicer (defmethod general-event-handler ((this tanker-juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('skip-intro) (when (and (-> this next-state) (let ((v1-4 (-> this next-state name))) @@ -1334,11 +1334,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tanker-container) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -1468,11 +1468,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tanker-crash) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) diff --git a/test/decompiler/reference/jak2/levels/city/market/ctymark-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/market/ctymark-obs_REF.gc index 77757f313b..0978aea0aa 100644 --- a/test/decompiler/reference/jak2/levels/city/market/ctymark-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/market/ctymark-obs_REF.gc @@ -1139,11 +1139,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this market-basket-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec crate)) @@ -1231,11 +1231,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this market-basket-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec crate)) @@ -1323,11 +1323,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this market-crate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec crate)) @@ -1415,11 +1415,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this market-sack-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec crate)) @@ -1507,11 +1507,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this market-sack-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec crate)) diff --git a/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc b/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc index 558d342ea7..37f899bbee 100644 --- a/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc @@ -2126,7 +2126,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this city-lurker) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('nav-mesh-kill) (format 0 "nav-mesh-kill event recieved by ~s ~d~%" (-> this name) arg2) diff --git a/test/decompiler/reference/jak2/levels/city/oracle/oracle-scenes_REF.gc b/test/decompiler/reference/jak2/levels/city/oracle/oracle-scenes_REF.gc index d764ebf2c3..e037990450 100644 --- a/test/decompiler/reference/jak2/levels/city/oracle/oracle-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/oracle/oracle-scenes_REF.gc @@ -855,7 +855,7 @@ ;; definition for method 35 of type oracle-npc (defmethod get-art-elem ((this oracle-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (logior! (-> this draw status) (draw-control-status no-draw-bounds)) (let ((root-prim (-> this root root-prim))) (set! (-> root-prim prim-core collide-as) (collide-spec)) diff --git a/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc b/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc index ecb2a981ee..c9a220912e 100644 --- a/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc @@ -106,11 +106,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this krew-package) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc index 851f6e8eb7..8eaf19aae1 100644 --- a/test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/palace/ctypal-obs_REF.gc @@ -98,11 +98,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this palace-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -209,11 +209,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ctypal-broke-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (format #t "~A initialising~%" (-> this name)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -294,11 +294,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ctypal-baron-statue-broken) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc b/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc index 72ef5627cb..94eae4e1c7 100644 --- a/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/port/ctyport-part_REF.gc @@ -3646,11 +3646,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hiphog-exterior-marquee) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause enemy)) @@ -3779,11 +3779,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this farthy) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (set! (-> this root pause-adjust-distance) 1228800.0) diff --git a/test/decompiler/reference/jak2/levels/city/protect/protect_REF.gc b/test/decompiler/reference/jak2/levels/city/protect/protect_REF.gc index adf1deeecb..7d8f929175 100644 --- a/test/decompiler/reference/jak2/levels/city/protect/protect_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/protect/protect_REF.gc @@ -87,11 +87,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this seal-of-mar) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc b/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc index bce235f630..7b3a416d21 100644 --- a/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc @@ -80,7 +80,7 @@ ;; INFO: Used lq/sq (defmethod find-ground ((this krew-collection-item)) "TODO - understand the collision query stuff more -@returns whether or not the [[self]] is above the ground" + @returns whether or not the [[self]] is above the ground" (let ((on-ground? #f)) (let ((query (new 'stack-no-clear 'collide-query-with-2vec))) (set! (-> query vec quad) (-> this root trans quad)) @@ -178,7 +178,7 @@ ;; WARN: Return type mismatch object vs none. (defbehavior krew-collection-item-init-by-other krew-collection-item ((position vector)) "Given a [[vector]] defining it's position, create a [[krew-collection-item]] -@param position The intended position of the item" + @param position The intended position of the item" (set! (-> self level) (level-get *level* 'lsack)) (set! (-> self root) (new 'process 'trsqv)) (set! (-> self root trans quad) (-> position quad)) @@ -205,8 +205,8 @@ ;; WARN: Return type mismatch process vs krew-collection-item. (defun krew-collection-item-spawn ((proc process) (position vector)) "Given a [[vector]] defining it's position, create a [[krew-collection-item]] via [[process-spawn]] -@param proc The [[process]] that is used to spawn the new item -@param position The intended position of the item" + @param proc The [[process]] that is used to spawn the new item + @param position The intended position of the item" (let ((new-krew-item (the-as process #f))) (let ((new-proc (process-spawn krew-collection-item position :to proc))) (if new-proc diff --git a/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc b/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc index 23f7fbace1..bd99a080ce 100644 --- a/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc @@ -672,7 +672,7 @@ ;; WARN: disable def twice: 51. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this citizen-rebel) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-flinch 'hit-knocked) (when (nonzero? (-> this gui-id)) @@ -733,7 +733,7 @@ ;; definition for method 59 of type citizen-rebel (defmethod get-penetrate-info ((this citizen-rebel)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (let ((v1-1 ((method-of-type nav-enemy get-penetrate-info) this))) (logior (penetrate enemy-yellow-shot) v1-1) ) diff --git a/test/decompiler/reference/jak2/levels/city/slums/kor/kid_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/kor/kid_REF.gc index a22d1a4e5a..14cb1d374a 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/kor/kid_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/kor/kid_REF.gc @@ -179,7 +179,7 @@ ;; definition for method 74 of type kid (defmethod general-event-handler ((this kid) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('arrest) (let* ((s4-0 (handle->process (-> this arrestor-handle))) diff --git a/test/decompiler/reference/jak2/levels/city/slums/kor/kor_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/kor/kor_REF.gc index f8378f0497..deed074fb9 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/kor/kor_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/kor/kor_REF.gc @@ -197,7 +197,7 @@ ;; definition for method 74 of type kor (defmethod general-event-handler ((this kor) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('arrest) (let* ((s4-0 (handle->process (-> this arrestor-handle))) diff --git a/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc index fef837d2da..93a52d30ba 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/neon-baron-part_REF.gc @@ -3593,11 +3593,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this neon-baron) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (matrix-rotate-y! (-> this mat) (quaternion-y-angle (-> arg0 quat))) (set! (-> this mat trans quad) (-> arg0 extra trans quad)) (set! (-> this master-enable) -1) @@ -3642,11 +3642,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hide-door-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0))) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen-enemy_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen-enemy_REF.gc index d9ea9300b4..1c3ed0f5d5 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen-enemy_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen-enemy_REF.gc @@ -30,9 +30,9 @@ ;; definition for method 55 of type citizen-enemy (defmethod common-post ((this citizen-enemy)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) (set! (-> a1-0 options) (overlaps-others-options)) (set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter)) @@ -115,7 +115,7 @@ ;; definition for method 74 of type citizen-enemy (defmethod general-event-handler ((this citizen-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('event-death) #f diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc index 8c0d74a428..b85ef8037c 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc @@ -97,8 +97,8 @@ ;; WARN: Return type mismatch int vs enemy-aware. (defmethod update-target-awareness! ((this citizen) (arg0 process-focusable) (arg1 enemy-best-focus)) "Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets `aware` and related fields as well! -@TODO - flesh out docs -@returns the value that sets `aware`" + @TODO - flesh out docs + @returns the value that sets `aware`" (when arg1 (let ((f0-0 (vector-vector-distance (get-trans arg0 0) (-> this root trans)))) (when (< f0-0 (-> arg1 rating)) @@ -263,7 +263,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this citizen) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-flinch 'hit-knocked) (let ((v1-1 #f)) @@ -386,9 +386,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this citizen)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (when (< (-> this next-time-look-at) (current-time)) (when (nonzero? (-> this neck)) (let ((a0-4 (handle->process (-> this focus handle)))) @@ -684,11 +684,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this citizen) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc index d22fb4b562..741012fc91 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc @@ -342,7 +342,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this civilian) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('track) #f diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc index 2d6c053bdc..30e8108ce3 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc @@ -558,9 +558,9 @@ ;; definition for method 55 of type crimson-guard (defmethod common-post ((this crimson-guard)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type citizen common-post))) (t9-0 this) ) @@ -604,7 +604,7 @@ ;; WARN: disable def twice: 122. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this crimson-guard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-flinch 'hit-knocked) (speech-control-method-13 *speech-control* (the-as handle this)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc index 274a0d15fb..01973f4072 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc @@ -280,7 +280,7 @@ ;; definition for method 74 of type metalhead-grunt (defmethod general-event-handler ((this metalhead-grunt) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc index 4b95863c06..05a5b578f3 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc @@ -425,9 +425,9 @@ ;; definition for method 55 of type metalhead-predator (defmethod common-post ((this metalhead-predator)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type citizen-enemy common-post))) (t9-0 this) ) @@ -441,7 +441,7 @@ ;; WARN: disable def twice: 21. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this metalhead-predator) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('attack) (set! (-> this shock-effect-end) (the-as int (+ (current-time) (seconds 1)))) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc index 7930a2bcfd..c43543382f 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc @@ -262,7 +262,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod add-new-supression-box ((this traffic-suppressor) (arg0 traffic-suppression-params)) "Create a suppression box for these params. -The param object is updated with the ID of the box and can be later used with update-box-from-params." + The param object is updated with the ID of the box and can be later used with update-box-from-params." (set! (-> arg0 id) -1) (let ((v1-1 0)) (b! #t cfg-4 :delay (nop!)) @@ -487,7 +487,7 @@ The param object is updated with the ID of the box and can be later used with up ;; WARN: Return type mismatch int vs none. (defmethod deactivate-object ((this traffic-tracker) (arg0 int) (arg1 symbol)) "Send a traffic-off event (or traffic-off-force) to deactivate an object, specified by index in active object array. -Process is recycled and moved to reserved, if it deactivates." + Process is recycled and moved to reserved, if it deactivates." (with-pp (let* ((s3-0 (-> this active-object-type-list arg0)) (gp-0 'traffic-off) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc index bbc8d309db..98aafe9b8d 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/transport_REF.gc @@ -607,11 +607,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this transport) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (transport-method-31 this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-rider_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-rider_REF.gc index 88c0ae1ec5..62e32884fa 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-rider_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-rider_REF.gc @@ -260,11 +260,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this vehicle-rider) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc index 333c3b7761..70934668c4 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -198,11 +198,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this vehicle) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) diff --git a/test/decompiler/reference/jak2/levels/city/vinroom/vinroom-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/vinroom/vinroom-obs_REF.gc index 22034ee879..e74a27c448 100644 --- a/test/decompiler/reference/jak2/levels/city/vinroom/vinroom-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/vinroom/vinroom-obs_REF.gc @@ -209,11 +209,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this vin-turbine) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -265,11 +265,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this vin-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) diff --git a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc index 62d64db176..92a3cae7d5 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc @@ -229,7 +229,7 @@ ;; definition for method 59 of type ashelin (defmethod get-penetrate-info ((this ashelin)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (let* ((t9-0 (method-of-type bot get-penetrate-info)) (v0-0 (t9-0 this)) ) diff --git a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc index 745c88da44..62cdd9b077 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc @@ -438,8 +438,8 @@ ;; WARN: Return type mismatch int vs enemy-aware. (defmethod update-target-awareness! ((this bot) (arg0 process-focusable) (arg1 enemy-best-focus)) "Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets `aware` and related fields as well! -@TODO - flesh out docs -@returns the value that sets `aware`" + @TODO - flesh out docs + @returns the value that sets `aware`" (the-as enemy-aware 3) ) @@ -742,7 +742,7 @@ ;; WARN: disable def twice: 280. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this bot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (v0-0 object)) (case arg2 (('track) @@ -1078,7 +1078,7 @@ ;; WARN: Using new Jak 2 rtype-of (defmethod bot-check-too-far ((this bot)) "Call the current [[bot-waypoint]]'s `check-too-far` function if available, otherwise use the default `course` one. -If the player is too far, play a warning speech." + If the player is too far, play a warning speech." (let ((result 0)) (let ((too-far-check (-> this delay-too-far-check))) (cond @@ -1147,9 +1147,9 @@ If the player is too far, play a warning speech." ;; definition for method 55 of type bot (defmethod common-post ((this bot)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (set! (-> this travel-prev-ry) (-> this travel-prev-ry1)) (set! (-> this travel-prev-ry1) (quaternion-y-angle (-> this root quat))) (let ((f0-4 (/ (the float (-> this hit-points)) (the float (-> this enemy-info default-hit-points))))) diff --git a/test/decompiler/reference/jak2/levels/common/ai/halt/hal_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/halt/hal_REF.gc index b6e0947ee6..d9796229fd 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/halt/hal_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/halt/hal_REF.gc @@ -399,7 +399,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this hal) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('notify) (case (-> arg3 param 0) diff --git a/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc index 1e621c9d99..3d4284e6b1 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc @@ -373,7 +373,7 @@ ;; definition for method 74 of type sig (defmethod general-event-handler ((this sig) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('untrigger) (sig-plasma-method-11 (-> this plasma) #t) @@ -395,9 +395,9 @@ ;; definition for method 55 of type sig (defmethod common-post ((this sig)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((v1-2 (-> this skel top-anim frame-group))) (cond ((time-elapsed? (-> this danger-time) (seconds 2)) diff --git a/test/decompiler/reference/jak2/levels/common/airlock_REF.gc b/test/decompiler/reference/jak2/levels/common/airlock_REF.gc index 19ef96c91c..b47c665adb 100644 --- a/test/decompiler/reference/jak2/levels/common/airlock_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/airlock_REF.gc @@ -841,11 +841,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this com-airlock-outer) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -921,11 +921,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this com-airlock-inner) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1018,11 +1018,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-entry-gate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1096,11 +1096,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-door-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1176,11 +1176,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-mar-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) @@ -1260,11 +1260,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-throne-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1339,11 +1339,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this vin-door-ctyinda) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1418,11 +1418,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1497,11 +1497,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this oracle-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) diff --git a/test/decompiler/reference/jak2/levels/common/battle_REF.gc b/test/decompiler/reference/jak2/levels/common/battle_REF.gc index 715d64cf66..9d21c9970d 100644 --- a/test/decompiler/reference/jak2/levels/common/battle_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/battle_REF.gc @@ -1995,11 +1995,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-from-entity! ((this battle) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask enemy)) (let ((s4-0 (new 'process 'trsqv))) (set! (-> this root) s4-0) diff --git a/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc b/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc index 34d9212bc9..161ab0cbc7 100644 --- a/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc @@ -773,7 +773,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod set-elec-scale-if-close! ((this elec-gate) (arg0 float)) "If [[target]]'s position is within `80` [[meters]], set the scale to the value provided -@see [[elec-gate::29]]" + @see [[elec-gate::29]]" (if (< (vector-vector-distance (-> this root trans) (target-pos 0)) 327680.0) (set-elec-scale! this arg0) ) @@ -855,9 +855,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod set-state! ((this elec-gate)) "If either [[actor-option::17]] is set on the [[elec-gate]] or the related subtask is completed -make the gate `idle`. - -Otherwise, the gate will be `active`." + make the gate `idle`. + + Otherwise, the gate will be `active`." (if (or (logtest? (actor-option user17) (-> this fact options)) (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) ) @@ -872,11 +872,11 @@ Otherwise, the gate will be `active`." ;; INFO: Used lq/sq (defmethod init-from-entity! ((this elec-gate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (set! (-> this entity) arg0) @@ -974,8 +974,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod set-elec-scale! ((this fort-elec-gate) (scale float)) "Calls associated mood functions to set the scale with the value provided -@see mood-funcs -@see mood-funcs2" + @see mood-funcs + @see mood-funcs2" (set-fordumpa-electricity-scale! scale) (set-forresca-electricity-scale! scale (-> this palette-id)) (set-forrescb-electricity-scale! scale (-> this palette-id)) @@ -1016,8 +1016,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod set-elec-scale! ((this drill-elec-gate) (arg0 float)) "Calls associated mood functions to set the scale with the value provided -@see mood-funcs -@see mood-funcs2" + @see mood-funcs + @see mood-funcs2" (set-drill-electricity-scale! arg0 (-> this palette-id)) 0 (none) @@ -1072,8 +1072,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod set-elec-scale! ((this castle-elec-gate) (arg0 float)) "Calls associated mood functions to set the scale with the value provided -@see mood-funcs -@see mood-funcs2" + @see mood-funcs + @see mood-funcs2" (set-castle-electricity-scale! arg0) 0 (none) @@ -1154,8 +1154,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod set-elec-scale! ((this palroof-elec-gate) (arg0 float)) "Calls associated mood functions to set the scale with the value provided -@see mood-funcs -@see mood-funcs2" + @see mood-funcs + @see mood-funcs2" (set-palroof-electricity-scale! arg0 (-> this palette-id)) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc index a71087c14c..ffef010ec0 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/amphibian/amphibian_REF.gc @@ -342,7 +342,7 @@ ;; definition for method 74 of type amphibian (defmethod general-event-handler ((this amphibian) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -963,9 +963,9 @@ ;; definition for method 55 of type amphibian (defmethod common-post ((this amphibian)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (set! (-> this prev-ry) (-> this prev-ry1)) (set! (-> this prev-ry1) (quaternion-y-angle (-> this root quat))) ((method-of-type nav-enemy common-post) this) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/bouncer_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/bouncer_REF.gc index 85d81da748..296a47cbc3 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/bouncer_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/bouncer_REF.gc @@ -240,11 +240,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this bouncer) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this mods) #f) (bouncer-method-24 this) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc index b46af43cd0..31a62658f0 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc @@ -492,7 +492,7 @@ ;; definition for method 74 of type centurion (defmethod general-event-handler ((this centurion) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('jump) #f @@ -979,9 +979,9 @@ ;; INFO: Used lq/sq (defmethod common-post ((this centurion)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (rlet ((acc :class vf) (vf0 :class vf) (vf4 :class vf) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc index 75831b7b54..3a85f4991e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc @@ -249,7 +249,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod look-at-target! ((this fodder) (arg0 enemy-flag)) "Logic for looking at the target that is locked on, sets some flags and adjusts the neck to look at the target if available -@param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" + @param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" (let ((parent-method (method-of-type nav-enemy look-at-target!))) (parent-method this arg0) ) @@ -283,8 +283,8 @@ ;; definition for method 179 of type fodder (defmethod look-at-position! ((this fodder) (position vector)) "Adjusts the eyes to look at particular position, or the focused target -@param position If this is provided, it will be used with [[joint-mod::target-set!]] to adjust the eyes, otherwise the `focus` position is used -@return TODO - unsure what the return value is, but it seems to make the eyes more lazy" + @param position If this is provided, it will be used with [[joint-mod::target-set!]] to adjust the eyes, otherwise the `focus` position is used + @return TODO - unsure what the return value is, but it seems to make the eyes more lazy" (when (not position) (let ((focus-proc (handle->process (-> this focus handle)))) (if focus-proc @@ -370,9 +370,9 @@ ;; WARN: Return type mismatch object vs none. (defmethod common-post ((this fodder)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((parent-method (method-of-type nav-enemy common-post))) (parent-method this) ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc index 3195fac98c..3d5e19fa25 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/grenadier_REF.gc @@ -314,7 +314,7 @@ ;; definition for method 74 of type grenadier (defmethod general-event-handler ((this grenadier) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit-knocked) (when (= (-> this incoming knocked-type) (knocked-type knocked-type-4)) @@ -1186,9 +1186,9 @@ ;; definition for method 55 of type grenadier (defmethod common-post ((this grenadier)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc index 78109b344e..682ea04831 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc @@ -394,7 +394,7 @@ ;; definition for method 74 of type grunt (defmethod general-event-handler ((this grunt) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc index c4a7bc4e6e..fd6d9fbd9d 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc @@ -1213,7 +1213,7 @@ ;; definition for method 74 of type crimson-guard-level (defmethod general-event-handler ((this crimson-guard-level) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('event-death) (when (<= (-> this hit-points) 0) @@ -1580,9 +1580,9 @@ ;; WARN: Return type mismatch object vs none. (defmethod common-post ((this crimson-guard-level)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/guards/guard-conversation_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/guards/guard-conversation_REF.gc index 9a3dcb1a51..73e6fddabb 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/guards/guard-conversation_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/guards/guard-conversation_REF.gc @@ -414,11 +414,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this guard-conversation) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this triggered?) #f) (set! (-> this root) (new 'process 'trsqv)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/guards/transport-level_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/guards/transport-level_REF.gc index badca6564d..8034e596c2 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/guards/transport-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/guards/transport-level_REF.gc @@ -357,11 +357,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this transport-level) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (transport-level-method-31 this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc index f0c6aa5293..beafef09be 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/crimson-guard-hover_REF.gc @@ -1181,7 +1181,7 @@ ;; definition for method 74 of type crimson-guard-hover (defmethod general-event-handler ((this crimson-guard-hover) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (v1-15 enemy-flag)) (case arg2 (('attack-invinc) @@ -1412,9 +1412,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this crimson-guard-hover)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) (let* ((s5-0 (hover-nav-control-method-16 (-> this hover) (new 'stack-no-clear 'vector))) (s4-0 diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc index 5bfeacdf48..f9bd20cf03 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc @@ -265,7 +265,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this flamer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-flinch 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -621,9 +621,9 @@ ;; definition for method 55 of type flamer (defmethod common-post ((this flamer)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (update-vol! (-> this sound) (-> this sound-volume)) (flamer-method-191 this) ((method-of-type nav-enemy common-post) this) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc index 8ef4291de8..2ac855034a 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc @@ -5,7 +5,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this hover-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (v1-41 float)) (rlet ((acc :class vf) (vf0 :class vf) @@ -308,9 +308,9 @@ ;; definition for method 55 of type hover-enemy (defmethod common-post ((this hover-enemy)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (hover-enemy-method-148 this) (enemy-method-129 this) (let ((t9-2 (method-of-type enemy common-post))) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc index f25ff1799c..fa9d70324b 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc @@ -698,11 +698,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hover-formation) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-32 structure)) (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc index 36e74d94d0..101bb5ea71 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/wasp_REF.gc @@ -474,7 +474,7 @@ ;; definition for method 74 of type wasp (defmethod general-event-handler ((this wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -582,9 +582,9 @@ ;; definition for method 55 of type wasp (defmethod common-post ((this wasp)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) ((method-of-type hover-enemy common-post) this) (none) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc index a9619049af..3891b7a2f4 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/metalmonk_REF.gc @@ -421,9 +421,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this metalmonk)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) @@ -436,7 +436,7 @@ ;; definition for method 74 of type metalmonk (defmethod general-event-handler ((this metalmonk) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked 'hit-flinch) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc index 3da7654f1e..b5b7f2e4f2 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc @@ -299,7 +299,7 @@ ;; definition for method 74 of type spyder (defmethod general-event-handler ((this spyder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -714,9 +714,9 @@ ;; definition for method 55 of type spyder (defmethod common-post ((this spyder)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (spyder-method-185 this) (spyder-method-184 this (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) (update-trans! (-> this sound) (-> this root trans)) diff --git a/test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc index 76ba5e9971..837e4ab50b 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/com-elevator_REF.gc @@ -43,10 +43,10 @@ ;; definition for method 43 of type com-elevator (defmethod move-between-points ((this com-elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) @@ -204,7 +204,7 @@ ;; WARN: Return type mismatch sound-id vs none. (defmethod init-plat! ((this com-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (dotimes (s5-0 (-> this path curve num-cverts)) (let ((a1-1 (res-lump-struct (-> this entity) 'string-startup-vector structure :time (the float s5-0)))) (cond @@ -352,7 +352,7 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch sound-id vs none. (defmethod init-plat! ((this tomb-trans-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (call-parent-method this) (set! (-> this sound-id) (new-sound-id)) (none) diff --git a/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc index f466719d93..a2335d9f7d 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/fort-floor-spike_REF.gc @@ -221,11 +221,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-floor-spike) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-spike-collision! this) (process-drawable-from-entity! this arg0) (init-spike-joints! this) diff --git a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc index 250d0bfe5c..c21a2530d6 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc @@ -932,7 +932,7 @@ ;; definition for method 74 of type gun-buoy (defmethod general-event-handler ((this gun-buoy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('jump) #f @@ -948,9 +948,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this gun-buoy)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (-> this root) (let* ((s4-0 *target*) (s5-0 (if (type? s4-0 process-focusable) @@ -1036,10 +1036,10 @@ ;; WARN: disable def twice: 40. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod in-aggro-range? ((this gun-buoy) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (local-vars (v1-19 process-focusable) (f30-1 meters)) (if (and arg0 (not arg1)) (set! arg1 (get-trans arg0 0)) diff --git a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc index 9708e0d330..9ef9220332 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc @@ -671,9 +671,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this spydroid)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) @@ -771,7 +771,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this spydroid) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (v1-6 vector) (sv-144 vector)) (rlet ((vf0 :class vf) (vf4 :class vf) diff --git a/test/decompiler/reference/jak2/levels/common/scene-actor_REF.gc b/test/decompiler/reference/jak2/levels/common/scene-actor_REF.gc index b213e7902d..05c51a2695 100644 --- a/test/decompiler/reference/jak2/levels/common/scene-actor_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/scene-actor_REF.gc @@ -322,7 +322,7 @@ ;; definition for method 35 of type kor-npc (defmethod get-art-elem ((this kor-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor kor-hideout)) (-> this draw art-group data 5) @@ -388,11 +388,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this metalkor-highres) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -471,7 +471,7 @@ This commonly includes things such as: ;; definition for method 35 of type tess-npc (defmethod get-art-elem ((this tess-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor tess-alley)) (if (task-node-closed? (game-task-node ruins-tower-resolution)) @@ -526,7 +526,6 @@ This commonly includes things such as: ) ;; definition for method 3 of type keira-npc -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this keira-npc)) (when (not this) (set! this this) @@ -540,10 +539,9 @@ This commonly includes things such as: ) ;; definition for method 35 of type keira-npc -;; INFO: this function exists in multiple non-identical object files (defmethod get-art-elem ((this keira-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor keira-stadium)) (-> this draw art-group data 3) @@ -555,7 +553,6 @@ This commonly includes things such as: ) ;; definition for method 33 of type keira-npc -;; INFO: this function exists in multiple non-identical object files ;; WARN: Return type mismatch int vs none. (defmethod init-art! ((this keira-npc)) "@see [[initialize-skeleton]]" @@ -590,7 +587,7 @@ This commonly includes things such as: ;; definition for method 35 of type krew-npc (defmethod get-art-elem ((this krew-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (-> this draw art-group data 4) ) @@ -643,7 +640,7 @@ This commonly includes things such as: ;; definition for method 35 of type kid-npc (defmethod get-art-elem ((this kid-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor kid-alley)) (-> this draw art-group data 5) @@ -681,7 +678,7 @@ This commonly includes things such as: ;; definition for method 35 of type crocadog-npc (defmethod get-art-elem ((this crocadog-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor crocadog-vinroom)) (-> this draw art-group data 5) @@ -744,7 +741,7 @@ This commonly includes things such as: ;; definition for method 35 of type torn-npc (defmethod get-art-elem ((this torn-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (cond ((task-node-open? (game-task-node ruins-tower-introduction)) (-> this draw art-group data 5) @@ -835,7 +832,7 @@ This commonly includes things such as: ;; definition for method 35 of type youngsamos-npc (defmethod get-art-elem ((this youngsamos-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor youngsamos-forest)) (-> this draw art-group data 4) @@ -896,7 +893,7 @@ This commonly includes things such as: ;; definition for method 35 of type samos-npc (defmethod get-art-elem ((this samos-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor samos-hideout)) (-> this draw art-group data 4) @@ -945,7 +942,7 @@ This commonly includes things such as: ;; definition for method 35 of type onin-npc (defmethod get-art-elem ((this onin-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (let ((v1-1 (get-current-task-event (-> this task)))) (case (-> v1-1 action) (((game-task-action play)) @@ -1028,7 +1025,7 @@ This commonly includes things such as: ;; definition for method 35 of type pecker-npc (defmethod get-art-elem ((this pecker-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (local-vars (s5-0 art-joint-anim) (f30-0 float)) (cond ((logtest? (-> (get-current-task-event (-> this task)) flags) (game-task-flags gatflag-02)) @@ -1139,7 +1136,7 @@ This commonly includes things such as: ;; definition for method 35 of type ashelin-npc (defmethod get-art-elem ((this ashelin-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor ashelin-throne)) (logior! (-> this draw status) (draw-control-status no-draw-bounds)) @@ -1188,7 +1185,7 @@ This commonly includes things such as: ;; definition for method 35 of type daxter-npc (defmethod get-art-elem ((this daxter-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (-> this draw art-group data 3) ) @@ -1287,9 +1284,9 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defun intro-play () "A dedicated function for playing the intro cutscenes in the correct order -```opengoal -\"intro-samos-hut\" \"intro-vortex\" \"intro-city-square\" \"intro-prison\" -```" + ```opengoal + \"intro-samos-hut\" \"intro-vortex\" \"intro-city-square\" \"intro-prison\" + ```" (set! (-> *setting-control* user-default border-mode) #t) (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) (process-spawn @@ -1307,9 +1304,9 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defun outro-play () "A dedicated function for playing the intro cutscenes in the correct order -```opengoal -\"outro-nest\" \"outro-palace\" \"outro-hiphog\" \"outro-port\" -```" + ```opengoal + \"outro-nest\" \"outro-palace\" \"outro-hiphog\" \"outro-port\" + ```" (set! (-> *setting-control* user-default border-mode) #t) (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) (process-spawn diff --git a/test/decompiler/reference/jak2/levels/common/scene-looper_REF.gc b/test/decompiler/reference/jak2/levels/common/scene-looper_REF.gc index eebe2c0234..8dc083515f 100644 --- a/test/decompiler/reference/jak2/levels/common/scene-looper_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/scene-looper_REF.gc @@ -61,7 +61,7 @@ ;; definition for function stop-loop-scene (defun stop-loop-scene () "Kills the current [[scene-looper]] -@see [[kill-by-type]]" + @see [[kill-by-type]]" (kill-by-type scene-looper *active-pool*) ) @@ -69,7 +69,7 @@ ;; WARN: Return type mismatch (pointer process) vs (pointer scene-looper). (defun loop-scene ((scene-name symbol)) "Stops looping the current scene, then spawns a new [[scene-looper]] for the given scene -@see [[stop-loop-scene]" + @see [[stop-loop-scene]" (stop-loop-scene) (process-spawn scene-looper scene-name) ) diff --git a/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc b/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc index e03f75163f..0768231e80 100644 --- a/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/warp-gate_REF.gc @@ -823,11 +823,11 @@ ;; definition for method 11 of type warp-gate (defmethod init-from-entity! ((this warp-gate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (warp-gate-init arg0 (the-as vector #f)) (none) ) diff --git a/test/decompiler/reference/jak2/levels/consite/consite-obs_REF.gc b/test/decompiler/reference/jak2/levels/consite/consite-obs_REF.gc index a1ad3ec70e..2e6d34418d 100644 --- a/test/decompiler/reference/jak2/levels/consite/consite-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/consite/consite-obs_REF.gc @@ -38,11 +38,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this consite-break-scaffold) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -115,11 +115,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this consite-bomb-elevator-hinges) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -199,11 +199,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this consite-bomb-elevator) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) (set! (-> s4-0 total-prims) (the-as uint 2)) @@ -289,11 +289,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this consite-silo-doors) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -363,7 +363,7 @@ This commonly includes things such as: ;; definition for method 35 of type baron-npc (defmethod get-art-elem ((this baron-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor baron-consite)) (-> this draw art-group data 4) diff --git a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc index dfb11dd63d..5668d2482e 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc @@ -726,11 +726,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-clasp) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) @@ -786,11 +786,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-clasp-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (when (not (task-node-closed? (game-task-node dig-knock-down-resolution))) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) @@ -1537,11 +1537,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-digger) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc index 79509f9a2d..c78e75b67b 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc @@ -730,11 +730,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-log) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this hud-handle) (the-as handle #f)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) @@ -897,11 +897,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-button) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) diff --git a/test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc index a4260a803d..a9ecce2a61 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig1-obs_REF.gc @@ -990,11 +990,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-bomb-crate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 penetrated-by) (penetrate diff --git a/test/decompiler/reference/jak2/levels/dig/dig2-obs_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig2-obs_REF.gc index 0acc4b2911..40f61f6963 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig2-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig2-obs_REF.gc @@ -52,11 +52,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-breakable-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) (let ((s4-0 (art-group-get-by-name *level* "skel-dig-breakable-door" (the-as (pointer uint32) #f)))) diff --git a/test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc index 9ad6058cf7..dd74b034db 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig3-obs_REF.gc @@ -355,11 +355,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-spikey-step) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 int)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -792,11 +792,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-spikey-sphere-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1067,11 +1067,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-balloon-lurker) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -1354,11 +1354,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-wheel-step) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -2139,11 +2139,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-stomp-block-controller) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this played-fall?) #f) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -2194,11 +2194,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dig-totem) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc index ef7c867900..9e4a6a45d5 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-baron_REF.gc @@ -1117,11 +1117,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-barons-ship) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) (set! (-> s4-0 total-prims) (the-as uint 2)) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-obs2_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-obs2_REF.gc index c316d8a67b..96ce9c50d5 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-obs2_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-obs2_REF.gc @@ -210,11 +210,11 @@ ;; definition for method 11 of type drill-flip-step (defmethod init-from-entity! ((this drill-flip-step) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-plat-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) @@ -385,11 +385,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-falling-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -506,11 +506,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-sliding-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -697,11 +697,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-breakable-barrel) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -931,11 +931,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-metalhead-eggs) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (init-collision! this) (process-drawable-from-entity! this arg0) @@ -1331,11 +1331,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-bridge-shot) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -1435,11 +1435,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-drill) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc index 570645a416..fc6244de6e 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc @@ -122,8 +122,8 @@ ;; WARN: Return type mismatch int vs none. (defmethod start-bouncing! ((this drill-plat-falling)) "Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce -and translate the platform via the `smush` -@see [[smush-control]]" + and translate the platform via the `smush` + @see [[smush-control]]" (activate! (-> this smush) -1.0 24 120 1.0 1.0 (-> self clock)) (set-time! (-> this bounce-time)) (set! (-> this bouncing) #t) @@ -195,11 +195,11 @@ and translate the platform via the `smush` ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-plat-falling) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) @@ -498,10 +498,10 @@ This commonly includes things such as: ;; definition for method 43 of type drill-elevator (defmethod move-between-points ((this drill-elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) @@ -546,7 +546,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this drill-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this shaft) (process-spawn drill-elevator-shaft (-> this entity extra trans) (-> this basetrans) :to this) ) @@ -659,8 +659,8 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch int vs none. (defmethod move-to-next-point! ((this drill-mech-elevator)) "If the [[*target*]] is in a valid state and there is a point to transition to in the elevator's path -do so. -@see [[elevator::47]]" + do so. + @see [[elevator::47]]" (local-vars (sv-16 float)) (let ((a0-1 *target*)) (when (and a0-1 @@ -698,7 +698,7 @@ do so. ;; definition for method 33 of type drill-mech-elevator (defmethod init-plat! ((this drill-mech-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this running-sound-id) (new 'static 'sound-id)) ((method-of-type drill-elevator init-plat!) this) (none) @@ -950,11 +950,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fire-floor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -1670,11 +1670,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-laser) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this firing?) #f) (set! (-> this hit-sound-id) (new 'static 'sound-id)) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc index 9df2716f16..84fd3097b2 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc @@ -740,11 +740,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-control-panel) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -794,11 +794,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-control-panel-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/drill/drill-spool_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-spool_REF.gc index 646971dd75..cb1c70aa19 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-spool_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-spool_REF.gc @@ -854,11 +854,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) @@ -1057,11 +1057,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-crane) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag) (sv-32 res-tag)) (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) diff --git a/test/decompiler/reference/jak2/levels/drill/drillmid-obs_REF.gc b/test/decompiler/reference/jak2/levels/drill/drillmid-obs_REF.gc index e11727c252..ee3fd8fda7 100644 --- a/test/decompiler/reference/jak2/levels/drill/drillmid-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drillmid-obs_REF.gc @@ -29,11 +29,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-elevator-doors) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -122,10 +122,10 @@ This commonly includes things such as: ;; definition for method 43 of type drill-lift (defmethod move-between-points ((this drill-lift) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) diff --git a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc index cc85c267e8..4596a855ed 100644 --- a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc @@ -409,9 +409,9 @@ ;; WARN: Return type mismatch symbol vs none. (defmethod common-post ((this ginsu)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (ginsu-method-180 this) (let ((t9-1 (method-of-type nav-enemy common-post))) (t9-1 this) @@ -580,7 +580,7 @@ ;; WARN: disable def twice: 11. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod general-event-handler ((this ginsu) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (v0-1 object)) (case arg2 (('touched) diff --git a/test/decompiler/reference/jak2/levels/forest/fish_REF.gc b/test/decompiler/reference/jak2/levels/forest/fish_REF.gc index c00f29eb6b..e7d9fbf519 100644 --- a/test/decompiler/reference/jak2/levels/forest/fish_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/fish_REF.gc @@ -486,11 +486,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fish-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/forest/forest-obs_REF.gc b/test/decompiler/reference/jak2/levels/forest/forest-obs_REF.gc index db7bf63c9d..8995b54faa 100644 --- a/test/decompiler/reference/jak2/levels/forest/forest-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/forest-obs_REF.gc @@ -36,11 +36,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this forest-hover-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this entity) arg0) (hover-enemy-manager-init! this *forest-protect-battle*) (set! (-> this transport-actor 0) (entity-actor-lookup arg0 'alt-actor 0)) @@ -443,11 +443,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this forest-youngsamos) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) forest-youngsamos-bounce-reaction) diff --git a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc index 409295eab0..56dce0dd06 100644 --- a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc @@ -239,8 +239,8 @@ ;; WARN: Return type mismatch int vs enemy-aware. (defmethod update-target-awareness! ((this pegasus) (proc process-focusable) (focus enemy-best-focus)) "Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets `aware` and related fields as well! -For pegasus, it will call [[enemy::57]] only if the [[pegasus]] has been targetted for more than 5 [[seconds]] -@returns the value from [[enemy::57]], otherwise [[enemy-aware::4]]" + For pegasus, it will call [[enemy::57]] only if the [[pegasus]] has been targetted for more than 5 [[seconds]] + @returns the value from [[enemy::57]], otherwise [[enemy-aware::4]]" (the-as enemy-aware (if (time-elapsed? (-> this targetted-timer) (seconds 5)) (the-as int ((method-of-type enemy update-target-awareness!) this proc focus)) 4 @@ -251,7 +251,7 @@ For pegasus, it will call [[enemy::57]] only if the [[pegasus]] has been targett ;; definition for method 74 of type pegasus (defmethod general-event-handler ((this pegasus) (proc process) (arg2 int) (event-type symbol) (event event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case event-type (('track) #f @@ -291,9 +291,9 @@ For pegasus, it will call [[enemy::57]] only if the [[pegasus]] has been targett ;; definition for method 56 of type pegasus (defmethod damage-amount-from-attack ((this pegasus) (arg0 process) (arg1 event-message-block)) "Only attacks from the jetboard will deal max damage (6), but by default it will return `1`. -This is why the scouts are technically killable by other means -@returns the amount of damage taken from an attack. Also updates the `targetted-timer`. -@see [[*pegasus-enemy-info*]]" + This is why the scouts are technically killable by other means + @returns the amount of damage taken from an attack. Also updates the `targetted-timer`. + @see [[*pegasus-enemy-info*]]" (let ((hitpoints 1)) (let ((attack-info (the-as attack-info (-> arg1 param 1)))) (case (-> arg1 message) @@ -313,10 +313,10 @@ This is why the scouts are technically killable by other means ;; WARN: Return type mismatch symbol vs none. (defbehavior pegasus-draw-section pegasus ((path-percent-a float) (path-percent-b float) (color rgba)) "Draws the [[pegasus]] curve section between the two provided points. -@param path-percent-a Percentage along the path for the first point -@param path-percent-b Percentage along the path for the second point -param color The color to draw the curve with -@see [[curve-control]]" + @param path-percent-a Percentage along the path for the first point + @param path-percent-b Percentage along the path for the second point + param color The color to draw the curve with + @see [[curve-control]]" (let ((point-a (new 'stack-no-clear 'vector)) (point-b (new 'stack-no-clear 'vector)) ) @@ -340,9 +340,9 @@ param color The color to draw the curve with ;; definition for function pegasus-show-runs (defbehavior pegasus-show-runs pegasus () "When [[*display-path-marks*]] is enabled, allow the user to cycle through the displayed path -- Pressing [[up]] on the D-Pad will increment the path index -- Pressing [[down]] on the D-Pad will decrement the path index -Additional debug text will be displayed as well. This is useful as many paths overlap other paths" + - Pressing [[up]] on the D-Pad will increment the path index + - Pressing [[down]] on the D-Pad will decrement the path index + Additional debug text will be displayed as well. This is useful as many paths overlap other paths" (when *display-path-marks* (when (cpad-pressed? 0 up) (+! (-> self display-path) 1) @@ -393,10 +393,10 @@ Additional debug text will be displayed as well. This is useful as many paths o ;; WARN: Return type mismatch vector vs none. (defbehavior pegasus-rotate pegasus ((influenced-by-target? symbol) (angle float)) "Rotates the [[pegasus]] along the path, factoring in the current speed and the target's position -@param influenced-by-target? Whether or not to care about [[target]]'s position -@param angle The hopeful angle to use when constructing the rotation matrix, ultimately limited to `0.25` (radians?) though -@see [[target-pos]] and [[matrix-from-two-vectors-max-angle-partial!]] -@TODO - `float` should be `degrees` -- The usual amount passed in is `(degrees 100.0835)`" + @param influenced-by-target? Whether or not to care about [[target]]'s position + @param angle The hopeful angle to use when constructing the rotation matrix, ultimately limited to `0.25` (radians?) though + @see [[target-pos]] and [[matrix-from-two-vectors-max-angle-partial!]] + @TODO - `float` should be `degrees` -- The usual amount passed in is `(degrees 100.0835)`" (let ((rotation-matrix (new 'stack-no-clear 'matrix)) (flee-direction-vec (new 'stack-no-clear 'vector)) ) @@ -439,14 +439,14 @@ Additional debug text will be displayed as well. This is useful as many paths o ;; WARN: Return type mismatch float vs none. (defbehavior pegasus-loop-on-same-path pegasus () "Creates an endless loop on the same path as the name suggests -- If we are beyond the end of the path, start again near the beginning (1%) -- If we are far before the beginning, start at the beginning (0%) -- If we are atleast 1% into the path, step back 1% -- If we are less than 0% somehow, slowly add 1% -Ultimately this appears to be some sort of safe-guard to get things back into a somewhat working state -if there are unexpected path conditions -- but the results of this are not great! -Another potential explaination is to make it easy during development to identify and debug a bad path -In practice, this is never called" + - If we are beyond the end of the path, start again near the beginning (1%) + - If we are far before the beginning, start at the beginning (0%) + - If we are atleast 1% into the path, step back 1% + - If we are less than 0% somehow, slowly add 1% + Ultimately this appears to be some sort of safe-guard to get things back into a somewhat working state + if there are unexpected path conditions -- but the results of this are not great! + Another potential explaination is to make it easy during development to identify and debug a bad path + In practice, this is never called" (cond ((< 100.0 (-> self curve-position)) (set! (-> self curve-position) 1.0) @@ -467,9 +467,9 @@ In practice, this is never called" ;; definition for function pegasus-choose-path (defbehavior pegasus-choose-path pegasus () "Determines the next path the pegasus should take if we have completed the current path it's on -There are many fail-safes here if something goes wrong to try to keep the pegasus behaving -@see [[pegasus-look-on-same-path]] -@TODO - understand the path selection better" + There are many fail-safes here if something goes wrong to try to keep the pegasus behaving + @see [[pegasus-look-on-same-path]] + @TODO - understand the path selection better" (local-vars (f0-15 float) (f30-0 float)) (while (begin (label cfg-61) (or (< 1.0 (-> self curve-position)) (< (-> self curve-position) 0.0))) (let ((curr-pegasus-path (-> self path-info (-> self current-path))) @@ -586,8 +586,8 @@ There are many fail-safes here if something goes wrong to try to keep the pegasu ;; WARN: Return type mismatch int vs none. (defbehavior pegasus-move pegasus ((explicit-y-vel float) (adjust-y-offset? symbol)) "Moves the pegasus along the path by smoothly interpolating along it -@param explicit-y-vel Normally `0.0` but this value is used when the pegasus needs to switch direction -@param adjust-y-offset? Normally [[#f]] which forces the movement to reflect the result of the collison query - the [[pegasus]] will stay close to the ground. [[#t]] ignores this" + @param explicit-y-vel Normally `0.0` but this value is used when the pegasus needs to switch direction + @param adjust-y-offset? Normally [[#f]] which forces the movement to reflect the result of the collison query - the [[pegasus]] will stay close to the ground. [[#t]] ignores this" (+! (-> self curve-position) (/ (the float (* (- (current-time) (-> self clock old-frame-counter)) (the int (-> self speed)))) (total-distance (-> self path-info (-> self current-path) path-data)) @@ -676,13 +676,13 @@ There are many fail-safes here if something goes wrong to try to keep the pegasu ;; definition for function pegasus-calc-speed (defbehavior pegasus-calc-speed pegasus ((min-dist float) (max-dist float) (max-speed float) (min-speed float)) "Calculates the pegasus' speed based on a number of factors: -- Speed up as the target gets closer (up to a max) and slow down as the target is further away (up to a min) -This function also is what causes the pegasus to flip around -@param min-dist TODO -@param max-dist TODO -@param max-speed The maximum speed the pegasus can go -@param min-speed The minimum speed the pegasus can go -@returns If there should be a reaction to the target via [[enemy::72]]" + - Speed up as the target gets closer (up to a max) and slow down as the target is further away (up to a min) + This function also is what causes the pegasus to flip around + @param min-dist TODO + @param max-dist TODO + @param max-speed The maximum speed the pegasus can go + @param min-speed The minimum speed the pegasus can go + @returns If there should be a reaction to the target via [[enemy::72]]" (let ((dir-to-target (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (target-pos 0))) (react-to-target? #f) ) @@ -741,9 +741,9 @@ This function also is what causes the pegasus to flip around ;; definition for function pegasus-calc-anim-speed (defbehavior pegasus-calc-anim-speed pegasus () "Based on `speed`, adjust how fast the pegasus should animate. -The faster it's moving the fast it flaps it's wings, etc -@TODO understand the magic values here better -@returns The anim speed, it can be no lower than `1.5`" + The faster it's moving the fast it flaps it's wings, etc + @TODO understand the magic values here better + @returns The anim speed, it can be no lower than `1.5`" (let* ((speed-abs (fabs (-> self speed))) (f0-2 (* 0.07324219 speed-abs)) (f0-3 (+ -15.0 f0-2)) @@ -756,9 +756,9 @@ The faster it's moving the fast it flaps it's wings, etc ;; definition for method 55 of type pegasus (defmethod common-post ((this pegasus)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (track-how-long-aimed-at! this) (pegasus-show-runs) ((method-of-type enemy common-post) this) @@ -898,7 +898,7 @@ The faster it's moving the fast it flaps it's wings, etc ;; definition for function pegasus-fly-code (defbehavior pegasus-fly-code pegasus ((arg0 int)) "Handles the flying animations and sounds -@TODO - cleanup a bit more" + @TODO - cleanup a bit more" (let ((anim-speed (pegasus-calc-anim-speed))) (let ((gp-0 (and (-> self can-run) (< (the-as time-frame (-> self ambient-possible)) (current-time))))) (let* ((min-dist (lerp-scale 61440.0 32768.0 (the float arg0) 0.0 3000.0)) diff --git a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc index 8edaa6ac64..03ae47e508 100644 --- a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc @@ -461,7 +461,7 @@ ;; definition for method 74 of type predator (defmethod general-event-handler ((this predator) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('attack) (set! (-> this shock-effect-end) (the-as uint (+ (current-time) (seconds 1)))) @@ -1390,9 +1390,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this predator)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) @@ -1540,11 +1540,11 @@ ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this predator) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) @@ -1717,11 +1717,11 @@ This commonly includes things such as: ;; WARN: new jak 2 until loop case, check carefully (defmethod init-from-entity! ((this predator-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (rlet ((acc :class vf) (vf0 :class vf) diff --git a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc index fc2cedac2a..e834d79dc4 100644 --- a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc @@ -138,7 +138,7 @@ ;; WARN: Return type mismatch object vs symbol. (defmethod spooked? ((this wren)) "@returns a [[symbol]] indicating if Jak is considered close enough to the wren to spook it. -If so, it transitions from [[wren::peck]] to [[wren::hunt]]" + If so, it transitions from [[wren::peck]] to [[wren::hunt]]" (let* ((gp-0 *target*) (a0-2 (if (type? gp-0 process-focusable) gp-0 @@ -457,11 +457,11 @@ If so, it transitions from [[wren::peck]] to [[wren::hunt]]" ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this wren) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc index c28838a060..59e2e1fff8 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpa-obs_REF.gc @@ -255,11 +255,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-elec-switch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -493,11 +493,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-fence) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (fort-fence-method-23 this) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpb-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpb-obs_REF.gc index d06db952f4..c484411d97 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpb-obs_REF.gc @@ -63,11 +63,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-plat-orbit) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -354,11 +354,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-plat-shuttle) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-64 int)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -486,7 +486,7 @@ This commonly includes things such as: ;; definition for method 25 of type fort-conveyor (defmethod set-and-get-ambient-sound! ((this fort-conveyor)) "So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]] -and return it as well. Otherwise, set it to `0`" + and return it as well. Otherwise, set it to `0`" (let* ((s5-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) (v1-2 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 1.0 'interp)) (a3-3 (vector+! (new 'stack-no-clear 'vector) s5-0 v1-2)) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc index 1426da55bc..4354599c59 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc @@ -163,11 +163,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-dump-bomb-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec bot)) @@ -992,11 +992,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-missile) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc index e93ab962e6..57d7168fc8 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc @@ -1100,11 +1100,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-robotank) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/fortress/exit/forexita-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/exit/forexita-obs_REF.gc index 97fe2c4e86..52210fd05a 100644 --- a/test/decompiler/reference/jak2/levels/fortress/exit/forexita-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/exit/forexita-obs_REF.gc @@ -214,7 +214,7 @@ ;; WARN: Return type mismatch sound-id vs none. (defmethod init-plat! ((this fort-lift-plat)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this root pause-adjust-distance) 327680.0) (set! (-> this sound-id) (new-sound-id)) (none) @@ -231,9 +231,9 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 36 of type fort-lift-plat (defmethod plat-path-sync ((this fort-lift-plat)) "If the `sync` period is greater than `0` then transition the state to [[plat::35]] -otherwise, [[plat::34]] - -@see [[sync-eased]]" + otherwise, [[plat::34]] + + @see [[sync-eased]]" (cond ((logtest? (-> this path flags) (path-control-flag not-found)) (go (method-of-object this plat-idle)) @@ -326,11 +326,11 @@ otherwise, [[plat::34]] ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-claw) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc b/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc index 9621d355ad..4e13026b48 100644 --- a/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/fort-turret_REF.gc @@ -560,9 +560,9 @@ ;; definition for method 55 of type fort-turret (defmethod common-post ((this fort-turret)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type enemy common-post))) (t9-0 this) ) @@ -921,7 +921,7 @@ ;; definition for method 74 of type fort-turret (defmethod general-event-handler ((this fort-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (if (and (= arg2 'notify) (< 1 arg1) (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) *target*)) (set-time! (-> this last-hit-time)) ) @@ -1018,7 +1018,7 @@ ;; WARN: Return type mismatch int vs penetrate. (defmethod get-penetrate-info ((this fort-turret)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (the-as penetrate 0) ) diff --git a/test/decompiler/reference/jak2/levels/fortress/fortress-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/fortress-obs_REF.gc index ad12a98a3c..f37bd1ab21 100644 --- a/test/decompiler/reference/jak2/levels/fortress/fortress-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/fortress-obs_REF.gc @@ -158,11 +158,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-trap-door) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec obstacle)) diff --git a/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc index de56156cd2..0fb8e75320 100644 --- a/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc @@ -265,11 +265,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this prsn-hang-cell) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -448,11 +448,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this prsn-cell-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -531,11 +531,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this prsn-vent-fan) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -592,11 +592,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this prsn-torture) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 penetrated-by) (penetrate)) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) diff --git a/test/decompiler/reference/jak2/levels/fortress/rescue/forresca-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/rescue/forresca-obs_REF.gc index 68cb26f2ab..96f2046f2c 100644 --- a/test/decompiler/reference/jak2/levels/fortress/rescue/forresca-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/rescue/forresca-obs_REF.gc @@ -198,11 +198,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-led) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -429,9 +429,9 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod set-state! ((this elec-lock-gate)) "If either [[actor-option::17]] is set on the [[elec-gate]] or the related subtask is completed -make the gate `idle`. - -Otherwise, the gate will be `active`." + make the gate `idle`. + + Otherwise, the gate will be `active`." (if (elec-lock-gate-method-31 this #f) (go (method-of-object this shutdown)) ((method-of-type fort-elec-gate set-state!) this) diff --git a/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc index 645a194163..0f3c2acd0d 100644 --- a/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/rescue/forrescb-obs_REF.gc @@ -49,11 +49,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-twist-rail) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -584,11 +584,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fort-elec-belt) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-64 int)) (quaternion-copy! (-> this init-quat) (-> arg0 quat)) (let ((s5-0 (new 'stack-no-clear 'sync-info-params))) @@ -726,7 +726,7 @@ This commonly includes things such as: ;; definition for method 25 of type fort-conveyor (defmethod set-and-get-ambient-sound! ((this fort-conveyor)) "So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]] -and return it as well. Otherwise, set it to `0`" + and return it as well. Otherwise, set it to `0`" (let* ((s5-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) (v1-2 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 1.0 'interp)) (a3-3 (vector+! (new 'stack-no-clear 'vector) s5-0 v1-2)) diff --git a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc index bb5d0fb42a..cd2b8245de 100644 --- a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc +++ b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc @@ -2050,10 +2050,10 @@ ;; INFO: Used lq/sq (defmethod path-playing? ((this gun-dummy)) "Core functionality for playing back the dummy's path. Does things like: -- calculates the score in case the dummy is hit based on the time elapsed -- moves around the dummy -- plays sounds accordingly -@returns if the dummy's current path is still in progress" + - calculates the score in case the dummy is hit based on the time elapsed + - moves around the dummy + - plays sounds accordingly + @returns if the dummy's current path is still in progress" (local-vars (at-0 int) (ret symbol)) (with-pp (rlet ((acc :class vf) @@ -2469,11 +2469,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this gun-dummy) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-dummy-collison! this) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) diff --git a/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc b/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc index 7c4893395c..6510189e83 100644 --- a/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc @@ -212,11 +212,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this training-path) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (length "training-path-")) (a0-3 (length (-> this name))) (v1-2 0) @@ -2224,11 +2224,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this training-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set-setting! 'darkjak #f 0.0 0) (set! sv-16 (new 'static 'res-tag)) @@ -2520,11 +2520,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this gungame-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/hideout/hideout-obs_REF.gc b/test/decompiler/reference/jak2/levels/hideout/hideout-obs_REF.gc index 8e8a56e3f9..5cf595f2b0 100644 --- a/test/decompiler/reference/jak2/levels/hideout/hideout-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/hideout/hideout-obs_REF.gc @@ -30,11 +30,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hide-door-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -173,11 +173,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hide-light) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/levels/hiphog/hiphog-obs_REF.gc b/test/decompiler/reference/jak2/levels/hiphog/hiphog-obs_REF.gc index 045e8460c7..88083593c6 100644 --- a/test/decompiler/reference/jak2/levels/hiphog/hiphog-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/hiphog/hiphog-obs_REF.gc @@ -39,11 +39,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -98,11 +98,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-d) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -157,11 +157,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-f) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -216,11 +216,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-g) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -275,11 +275,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-i) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -334,11 +334,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-j) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -393,11 +393,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-n) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -452,11 +452,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-trophy-m) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc b/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc index 909632625a..dea2d83d8c 100644 --- a/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc @@ -1231,8 +1231,8 @@ (arg4 sparticle-launch-state) ) "Determines the position of the minute hand of the hiphog's clock associated with [[time-of-day-proc]] -TODO - check args -Every real second is 1 minute in Jak's time of day" + TODO - check args + Every real second is 1 minute in Jak's time of day" (local-vars (v1-4 float) (v1-5 float)) (rlet ((vf0 :class vf) (vf1 :class vf) @@ -1284,8 +1284,8 @@ Every real second is 1 minute in Jak's time of day" (arg4 sparticle-launch-state) ) "Determines the position of the hour hand of the hiphog's clock associated with [[time-of-day-proc]] -TODO - check args -Every real minute is 1 hour in Jak's time of day" + TODO - check args + Every real minute is 1 hour in Jak's time of day" (local-vars (v1-4 float) (v1-5 float)) (rlet ((vf0 :class vf) (vf1 :class vf) @@ -1337,9 +1337,9 @@ Every real minute is 1 hour in Jak's time of day" (arg4 sparticle-launch-state) ) "Determines the position of the second hand of the hiphog's clock associated with [[time-of-day-proc]] -TODO - check args -The clock actually only has 2 hands, this one does not appear to have been used? -Every real second is 1/60th of a second in Jak's time of day" + TODO - check args + The clock actually only has 2 hands, this one does not appear to have been used? + Every real second is 1/60th of a second in Jak's time of day" (local-vars (v1-4 float) (v1-5 float)) (rlet ((vf0 :class vf) (vf1 :class vf) @@ -1610,7 +1610,7 @@ Every real second is 1/60th of a second in Jak's time of day" ;; WARN: Return type mismatch int vs none. (defun hiphog-mirror-sheen-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) "Handles the effect on the hiphogs mirror, which involves using [[*hiphog-mirror-sheen-waveform*]] -TODO on args and some more documentation" + TODO on args and some more documentation" (let ((s5-0 (new 'stack-no-clear 'vector))) (set-vector! s5-0 -1515.52 0.0 -95436.8 1.0) (vector-! s5-0 (camera-pos) s5-0) diff --git a/test/decompiler/reference/jak2/levels/hiphog/hiphog-scenes_REF.gc b/test/decompiler/reference/jak2/levels/hiphog/hiphog-scenes_REF.gc index 2a022e2f48..24dfc33bd3 100644 --- a/test/decompiler/reference/jak2/levels/hiphog/hiphog-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/hiphog/hiphog-scenes_REF.gc @@ -29,11 +29,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-door-b) (entiy entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape penetrated-by) (penetrate)) (let ((cshape-group (new 'process 'collide-shape-prim-group cshape (the-as uint 2) 0))) @@ -131,7 +131,7 @@ This commonly includes things such as: ;; definition for method 35 of type hip-whack-a-metal (defmethod get-art-elem ((this hip-whack-a-metal)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> (get-current-task-event (-> this task)) action) (((game-task-action play)) (set! (-> this talk-message) (text-id press-triangle-to-play)) @@ -214,11 +214,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hip-mirror) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this entity) (initialize-skeleton @@ -419,7 +419,7 @@ This commonly includes things such as: ;; definition for method 35 of type sig-npc (defmethod get-art-elem ((this sig-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (if (task-node-open? (game-task-node forest-hunt-introduction)) (-> this draw art-group data 4) (-> this draw art-group data 4) diff --git a/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc b/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc index f2a57d03e2..82746da2c0 100644 --- a/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/intro/intro-obs_REF.gc @@ -224,11 +224,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this intro-flamer) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -398,11 +398,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this metalhead-spawner) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this init-pos quad) (-> arg0 extra trans quad)) (vector-reset! (-> this average-dir)) (dotimes (s5-0 19) @@ -470,11 +470,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this vil-windmill-sail) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/mountain/canyon/mincan-obs_REF.gc b/test/decompiler/reference/jak2/levels/mountain/canyon/mincan-obs_REF.gc index 3bfe011542..6876d18a71 100644 --- a/test/decompiler/reference/jak2/levels/mountain/canyon/mincan-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/canyon/mincan-obs_REF.gc @@ -123,11 +123,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mincan-lighthouse-lens) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -232,11 +232,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mincan-lighthouse) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -321,11 +321,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mincan-lens) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-group (new 'process 'collide-shape-prim-group cshape (the-as uint 7) 0))) (set! (-> cshape total-prims) (the-as uint 8)) @@ -449,11 +449,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mincan-cogs) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/mountain/mountain-obs2_REF.gc b/test/decompiler/reference/jak2/levels/mountain/mountain-obs2_REF.gc index 04034715c4..2f011a8908 100644 --- a/test/decompiler/reference/jak2/levels/mountain/mountain-obs2_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/mountain-obs2_REF.gc @@ -74,11 +74,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-iris-door) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec obstacle)) @@ -195,7 +195,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this mtn-plat-shoot)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (logclear! (-> this mask) (process-mask actor-pause)) (logior! (-> this mask) (process-mask enemy)) (set-vector! (-> this axe-flip) 1.0 0.0 0.0 1.0) diff --git a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc index 1049ad64a7..d70d801b2a 100644 --- a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc @@ -1367,11 +1367,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-dice) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 6) 0))) (set! (-> s4-0 total-prims) (the-as uint 7)) @@ -1555,10 +1555,10 @@ This commonly includes things such as: ;; definition for method 43 of type mtn-plat-elevator (defmethod move-between-points ((this mtn-plat-elevator) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) ) @@ -1686,11 +1686,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-plat-updown) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-plat-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1843,11 +1843,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-plat-eject) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (mtn-plat-eject-method-22 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1954,11 +1954,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-plat-long) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-plat-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2065,11 +2065,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-gate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -2561,11 +2561,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-aval-rocks) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-sphere) (sv-48 collide-shape-prim-sphere) (sv-64 vector)) (stack-size-set! (-> this main-thread) 512) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -2892,11 +2892,11 @@ This commonly includes things such as: ;; definition for method 11 of type mtn-plat-return (defmethod init-from-entity! ((this mtn-plat-return) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-plat-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -3094,11 +3094,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-button) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -3215,11 +3215,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-gear-device) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (cond ((task-complete? *game-info* (game-task mountain-gear)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -3546,7 +3546,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch float vs none. (defmethod init-plat! ((this trans-plat)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (logior! (-> this flags) (mtn-plat-flags mtpflags-1)) (let* ((s5-0 *target*) (a0-2 (if (type? s5-0 process-focusable) diff --git a/test/decompiler/reference/jak2/levels/mountain/mountain-scenes_REF.gc b/test/decompiler/reference/jak2/levels/mountain/mountain-scenes_REF.gc index b90fef70d3..c55795f531 100644 --- a/test/decompiler/reference/jak2/levels/mountain/mountain-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/mountain-scenes_REF.gc @@ -1754,11 +1754,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-plat-buried-rocks) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec obstacle)) @@ -1959,9 +1959,9 @@ This commonly includes things such as: ;; definition for method 36 of type mtn-plat-buried (defmethod plat-path-sync ((this mtn-plat-buried)) "If the `sync` period is greater than `0` then transition the state to [[plat::35]] -otherwise, [[plat::34]] - -@see [[sync-eased]]" + otherwise, [[plat::34]] + + @see [[sync-eased]]" (cond ((or (logtest? (-> this path flags) (path-control-flag not-found)) (and (not (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) @@ -3103,11 +3103,11 @@ otherwise, [[plat::34]] ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-lens) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this entity) (logclear! (-> this mask) (process-mask actor-pause)) @@ -3152,11 +3152,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-lens-base) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this entity) (logclear! (-> this mask) (process-mask actor-pause)) @@ -3212,11 +3212,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-lens-floor) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec obstacle)) @@ -3281,11 +3281,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-shard) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this entity) (logclear! (-> this mask) (process-mask actor-pause)) @@ -3321,11 +3321,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-step-plat-rocks-a) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape)) (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-group (new 'process 'collide-shape-prim-group cshape (the-as uint 3) 0))) @@ -3416,11 +3416,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-step-plat-rocks-b) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape)) (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-group (new 'process 'collide-shape-prim-group cshape (the-as uint 17) 0))) @@ -3529,11 +3529,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this mtn-step-plat-rocks-c) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape)) (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-group (new 'process 'collide-shape-prim-group cshape (the-as uint 24) 0))) diff --git a/test/decompiler/reference/jak2/levels/mountain/rhino-wall_REF.gc b/test/decompiler/reference/jak2/levels/mountain/rhino-wall_REF.gc index 4b4d7c901b..8224fab58d 100644 --- a/test/decompiler/reference/jak2/levels/mountain/rhino-wall_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/rhino-wall_REF.gc @@ -114,11 +114,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this rhino-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) (let ((s3-0 (res-lump-struct (-> this entity) 'art-name structure)) diff --git a/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc b/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc index 54d151ca40..007091e122 100644 --- a/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/rhino_REF.gc @@ -628,7 +628,7 @@ ;; INFO: Used lq/sq (defmethod general-event-handler ((this rhino) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (local-vars (sv-96 int) (sv-112 symbol) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc index 5b136a5bd4..4fd2892124 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc @@ -1719,11 +1719,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this rift-ring-ingame) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1984,11 +1984,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nest-break-precipice) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc index 4eaab33990..dc732c9a97 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc @@ -1067,11 +1067,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nestb-tail-bound) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec special-obstacle)) @@ -1940,11 +1940,11 @@ This commonly includes things such as: ;; INFO: Used lq/sq (defmethod init-from-entity! ((this metalkor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) @@ -2097,7 +2097,3 @@ This commonly includes things such as: (metalkor-go-next-stage) (none) ) - - - - diff --git a/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc index bbafd37138..2176e0c748 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc @@ -1682,11 +1682,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nest-gun-parts) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1747,11 +1747,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nest-unbroken-rocks) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc b/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc index 64af5463f0..10a2b8338f 100644 --- a/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc @@ -570,7 +570,7 @@ ;; definition for method 74 of type flying-spider (defmethod general-event-handler ((this flying-spider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -638,9 +638,9 @@ ;; definition for method 55 of type flying-spider (defmethod common-post ((this flying-spider)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" ((method-of-type nav-enemy common-post) this) (none) ) @@ -745,7 +745,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod look-at-target! ((this flying-spider) (arg0 enemy-flag)) "Logic for looking at the target that is locked on, sets some flags and adjusts the neck to look at the target if available -@param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" + @param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details" 0 (none) ) @@ -754,7 +754,7 @@ ;; WARN: Return type mismatch int vs penetrate. (defmethod get-penetrate-info ((this flying-spider)) "@returns the allowed way(s) this enemy can take damage -@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" + @see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]" (the-as penetrate 0) ) diff --git a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc index 1793acebef..b9210719a4 100644 --- a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc @@ -755,7 +755,7 @@ ;; definition for method 74 of type mammoth (defmethod general-event-handler ((this mammoth) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit) (logclear! (-> this mask) (process-mask actor-pause)) @@ -1429,9 +1429,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this mammoth)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (local-vars (sv-752 lightning-spec) (sv-768 int) (sv-784 symbol) (sv-800 mammoth)) (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) diff --git a/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc b/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc index 53a3039106..6935dfc33e 100644 --- a/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc @@ -1241,7 +1241,7 @@ ;; definition for method 74 of type mantis (defmethod general-event-handler ((this mantis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('track) (if (and (-> arg3 param 0) (time-elapsed? (-> this track-timer) (seconds 0.5))) @@ -1503,9 +1503,9 @@ ;; WARN: Return type mismatch vector vs none. (defmethod common-post ((this mantis)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (local-vars (s5-0 vector)) (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) diff --git a/test/decompiler/reference/jak2/levels/nest/nest-obs_REF.gc b/test/decompiler/reference/jak2/levels/nest/nest-obs_REF.gc index 82c9f30f40..fca3252915 100644 --- a/test/decompiler/reference/jak2/levels/nest/nest-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/nest-obs_REF.gc @@ -134,11 +134,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nest-switch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -258,11 +258,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this nest-piston) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) diff --git a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc index 63f872edf8..3b7c6d0d2d 100644 --- a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc @@ -1800,11 +1800,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this squid) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 penetrated-by) (penetrate diff --git a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc index 66a524c469..1b2b34f10a 100644 --- a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc @@ -248,11 +248,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-electric-fan) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -497,11 +497,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-cable-nut) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -1026,11 +1026,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-rot-gun) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1107,11 +1107,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-windmill) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -1201,11 +1201,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-flip-step) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/palace/pal-obs_REF.gc b/test/decompiler/reference/jak2/levels/palace/pal-obs_REF.gc index f328d85b7a..9411c06fa0 100644 --- a/test/decompiler/reference/jak2/levels/palace/pal-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/pal-obs_REF.gc @@ -98,11 +98,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-falling-plat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -192,11 +192,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-ent-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) @@ -392,11 +392,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-grind-ring-center) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (pal-grind-ring-center-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -418,11 +418,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-grind-ring-center) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (pal-grind-ring-center-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -610,11 +610,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-grind-ring) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (pal-grind-ring-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -796,11 +796,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-ent-glass) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (pal-ent-glass-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1004,11 +1004,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this palent-turret) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (palent-turret-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1200,11 +1200,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-breakable-window) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (pal-breakable-window-method-29 this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/palace/roof/palroof-obs_REF.gc b/test/decompiler/reference/jak2/levels/palace/roof/palroof-obs_REF.gc index e5e7c64d92..9fb3501eb4 100644 --- a/test/decompiler/reference/jak2/levels/palace/roof/palroof-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/roof/palroof-obs_REF.gc @@ -144,11 +144,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pal-prong) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) diff --git a/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc b/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc index 47fc40da57..49b8c4c1f7 100644 --- a/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc @@ -48,11 +48,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this throne-throne) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-group (new 'process 'collide-shape-prim-group cshape (the-as uint 1) 0))) (set! (-> cshape total-prims) (the-as uint 2)) diff --git a/test/decompiler/reference/jak2/levels/ruins/breakable-wall_REF.gc b/test/decompiler/reference/jak2/levels/ruins/breakable-wall_REF.gc index 8c98324170..c84828a25e 100644 --- a/test/decompiler/reference/jak2/levels/ruins/breakable-wall_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/breakable-wall_REF.gc @@ -464,11 +464,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ruins-breakable-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) (set! (-> this side) #f) diff --git a/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc b/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc index e81a8e53b8..dbfea2b084 100644 --- a/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc @@ -470,11 +470,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this throwblock) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -560,11 +560,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pushblock) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/ruins/pillar-collapse_REF.gc b/test/decompiler/reference/jak2/levels/ruins/pillar-collapse_REF.gc index 8918980d61..4c9ee63545 100644 --- a/test/decompiler/reference/jak2/levels/ruins/pillar-collapse_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/pillar-collapse_REF.gc @@ -222,11 +222,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ruins-pillar-collapse) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape-moving)) (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) diff --git a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc index e30bcbbf86..70525406a2 100644 --- a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc @@ -260,7 +260,7 @@ ;; definition for method 74 of type rapid-gunner (defmethod general-event-handler ((this rapid-gunner) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-flinch) (logclear! (-> this mask) (process-mask actor-pause)) @@ -489,10 +489,10 @@ ;; definition for method 98 of type rapid-gunner (defmethod in-aggro-range? ((this rapid-gunner) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (let ((t9-0 (method-of-type nav-enemy in-aggro-range?))) (and (t9-0 this arg0 arg1) (or (not (logtest? (-> this fact enemy-options) (enemy-option user8))) @@ -601,9 +601,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod common-post ((this rapid-gunner)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) diff --git a/test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc b/test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc index 113012932b..fded9fa35b 100644 --- a/test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/ruins-obs_REF.gc @@ -213,11 +213,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this beam) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -267,8 +267,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod start-bouncing! ((this ruins-bridge)) "Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce -and translate the platform via the `smush` -@see [[smush-control]]" + and translate the platform via the `smush` + @see [[smush-control]]" (logclear! (-> this mask) (process-mask sleep)) (logclear! (-> this mask) (process-mask sleep-code)) 0 @@ -286,11 +286,11 @@ and translate the platform via the `smush` ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ruins-bridge) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) @@ -438,8 +438,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod start-bouncing! ((this ruins-drop-plat)) "Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce -and translate the platform via the `smush` -@see [[smush-control]]" + and translate the platform via the `smush` + @see [[smush-control]]" (activate! (-> this smush) -1.0 60 150 1.0 1.0 (-> self clock)) (set-time! (-> this bounce-time)) (set! (-> this bouncing) #t) @@ -494,11 +494,11 @@ and translate the platform via the `smush` ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ruins-drop-plat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) diff --git a/test/decompiler/reference/jak2/levels/ruins/ruins-part_REF.gc b/test/decompiler/reference/jak2/levels/ruins/ruins-part_REF.gc index 506b1933e2..7ef862ec16 100644 --- a/test/decompiler/reference/jak2/levels/ruins/ruins-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/ruins-part_REF.gc @@ -716,7 +716,7 @@ ;; WARN: Return type mismatch int vs none. (defun ruins-bird-bob-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) "Move the bird particles up and down, on a sinusoidal period with a wavelength of 300 frames -TODO - check argument types / what birds?" + TODO - check argument types / what birds?" (set! (-> arg2 vector 0 y) (+ (-> arg1 key proc root trans y) (* -2048.0 (sin (* 218.45334 (the float (mod (current-time) 300)))))) ) diff --git a/test/decompiler/reference/jak2/levels/ruins/ruins-scenes_REF.gc b/test/decompiler/reference/jak2/levels/ruins/ruins-scenes_REF.gc index a101447926..c978543c2c 100644 --- a/test/decompiler/reference/jak2/levels/ruins/ruins-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/ruins-scenes_REF.gc @@ -126,8 +126,8 @@ ;; WARN: Return type mismatch int vs none. (defun ruins-slide-sparks ((arg0 object) (position vector)) "Generates simple sparks (2D particles) at the location specified. This is used in the cutscene. -@param position The position to render the sparks at -TODO - first arg type?" + @param position The position to render the sparks at + TODO - first arg type?" (launch-particles (-> *part-id-table* 1247) position) 0 (none) @@ -1374,11 +1374,11 @@ The scale will be linearly-interpolated based on the distance from the camera" ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this flag) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) @@ -1479,11 +1479,11 @@ Touching it flips the `play?` field which will trigger the cutscene" ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this ruins-precipice) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((cshape-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> cshape-mesh prim-core collide-as) (collide-spec obstacle)) diff --git a/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc b/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc index a5dc7e0778..d17abee1ad 100644 --- a/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc @@ -239,7 +239,7 @@ ;; definition for method 74 of type jinx (defmethod general-event-handler ((this jinx) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('request) (case (-> arg3 param 0) diff --git a/test/decompiler/reference/jak2/levels/sewer/gator_REF.gc b/test/decompiler/reference/jak2/levels/sewer/gator_REF.gc index 6cbcdcb1c7..18d4f2d294 100644 --- a/test/decompiler/reference/jak2/levels/sewer/gator_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/gator_REF.gc @@ -160,7 +160,7 @@ ;; definition for method 74 of type gator (defmethod general-event-handler ((this gator) (proc process) (arg2 int) (event-type symbol) (event event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case event-type (('hit-knocked) (when (= (-> this incoming knocked-type) (knocked-type knocked-type-4)) @@ -181,7 +181,7 @@ ;; definition for method 179 of type gator (defmethod adjust-depth! ((this gator)) "Changes the height based on the ocean depth -@see [[get-height]]" + @see [[get-height]]" (set! (-> this ocean-y) (get-height *ocean* (-> this root trans) #t)) (set! (-> this root trans y) (+ -10240.0 (-> this ocean-y))) ) @@ -199,7 +199,7 @@ ;; definition for method 181 of type gator (defmethod encircle-target! ((this gator) (arg0 float) (arg1 float) (arg2 symbol)) "Core movement for the [[gator]], circles the target, charges at the target, etc -@params TODO - not sure, they all dont seem to do very much and this method is a mess" + @params TODO - not sure, they all dont seem to do very much and this method is a mess" (local-vars (v1-17 object) (a0-5 object)) (let ((f30-0 (vector-dot (-> this new-facing) (-> this old-facing))) (s5-0 75) @@ -298,9 +298,9 @@ ;; WARN: Return type mismatch vector vs none. (defmethod common-post ((this gator)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((func (method-of-type nav-enemy common-post))) (func this) ) @@ -338,10 +338,10 @@ ;; INFO: Used lq/sq (defmethod in-aggro-range? ((this gator) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (let ((target-pos (new 'stack-no-clear 'vector))) (when (and (= *target* arg0) (not arg1) (= (-> *target* control ground-pat material) (pat-material waterbottom))) (set! (-> target-pos quad) (-> (get-trans arg0 0) quad)) diff --git a/test/decompiler/reference/jak2/levels/sewer/hal2-course_REF.gc b/test/decompiler/reference/jak2/levels/sewer/hal2-course_REF.gc index 5b2bb700b9..d34da71325 100644 --- a/test/decompiler/reference/jak2/levels/sewer/hal2-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/hal2-course_REF.gc @@ -98,7 +98,7 @@ ;; definition for method 74 of type hal-sewer (defmethod general-event-handler ((this hal-sewer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('notify) (case (-> arg3 param 0) diff --git a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc index bb785dfdce..8a77d8b8a6 100644 --- a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc @@ -863,7 +863,7 @@ ;; definition for method 74 of type hosehead (defmethod general-event-handler ((this hosehead) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('cue-chase) (cond @@ -2127,9 +2127,9 @@ ;; definition for method 55 of type hosehead (defmethod common-post ((this hosehead)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) diff --git a/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc index 220a1bbfa2..c39c692e47 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sew-gunturret_REF.gc @@ -593,7 +593,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod aim-turret! ((this sew-gunturret) (aim-at-target? symbol)) "Calculates the angle and tilt for the turret to either aim at the target, or it's default direction -@param aim-at-target? Whether or not the turret should aim at the target, will ignore the target if #f" + @param aim-at-target? Whether or not the turret should aim at the target, will ignore the target if #f" (cond ((and aim-at-target? (-> this los-clear)) (let ((target-proc (handle->process (-> this focus handle)))) @@ -722,7 +722,7 @@ ;; INFO: Used lq/sq (defmethod fire-turret! ((this sew-gunturret) (fire-sound? symbol)) "Actually fires the turret, sets `flash-state` to [[#t]] -@param fire-sound? Whether to play the fire sound effect or not" + @param fire-sound? Whether to play the fire sound effect or not" (let ((v1-4 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params gun-joint)))) (proj-params (new 'stack-no-clear 'projectile-init-by-other-params)) ) @@ -872,7 +872,7 @@ ;; definition for method 74 of type sew-gunturret (defmethod general-event-handler ((this sew-gunturret) (proc process) (arg2 int) (event-type symbol) (event event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (if (and (= event-type 'notify) (< 1 arg2) (= (-> event param 0) 'attack) (= (-> event param 1) *target*)) (set-time! (-> this last-hit-time)) ) @@ -1025,10 +1025,10 @@ ;; definition for method 98 of type sew-gunturret (defmethod in-aggro-range? ((this sew-gunturret) (proc process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (cond ((= (-> this activate-distance) 0.0) (return #t) diff --git a/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc index 154cba33f0..d3f3707d00 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sewer-obs2_REF.gc @@ -39,10 +39,10 @@ ;; definition for method 43 of type sew-elevator (defmethod move-between-points ((this sew-elevator) (arg1 vector) (point-a float) (point-b float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((path-point-a (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-a 'interp)) (path-point-b (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-b 'interp)) (elevator-pos (-> this root trans)) @@ -83,7 +83,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod configure-collision ((this sew-elevator) (collide-with-jak? symbol)) "Appropriately sets the collision on the elevator -@param collide-with-jak? If set, the elevator will collide with Jak" + @param collide-with-jak? If set, the elevator will collide with Jak" (let ((prim-group (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) (cond (collide-with-jak? @@ -158,7 +158,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this sew-elevator)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this sound-id) (new-sound-id)) 0 (none) @@ -168,11 +168,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch int vs none. (defmethod init-defaults! ((this sew-elevator)) "Initializes default settings related to the [[elevator]]: -- `elevator-xz-threshold` -- `elevator-y-threshold` -- `elevator-start-pos` -- `elevator-move-rate` -- `elevator-flags`" + - `elevator-xz-threshold` + - `elevator-y-threshold` + - `elevator-start-pos` + - `elevator-move-rate` + - `elevator-flags`" (let ((func (method-of-type elevator init-defaults!))) (func this) ) @@ -366,11 +366,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-valve) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (tag-1 res-tag) (tag-2 res-tag)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -664,11 +664,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-mar-statue) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this spawned-debris?) #f) (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) @@ -738,8 +738,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod start-bouncing! ((this sew-catwalk)) "Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce -and translate the platform via the `smush` -@see [[smush-control]]" + and translate the platform via the `smush` + @see [[smush-control]]" (logclear! (-> this mask) (process-mask sleep)) (logclear! (-> this mask) (process-mask sleep-code)) 0 @@ -785,11 +785,11 @@ and translate the platform via the `smush` ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-catwalk) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape-moving)) (stack-size-set! (-> this main-thread) 512) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) @@ -1046,11 +1046,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-mine-a) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec pusher)) @@ -1147,11 +1147,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-mine-b) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((cshape (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0)))) (set! (-> prim-mesh prim-core collide-as) (collide-spec pusher)) @@ -1396,11 +1396,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-wall) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) (let ((data ((method-of-type res-lump get-property-struct) @@ -1556,11 +1556,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-grill) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this entity) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/sewer/sewer-obs_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sewer-obs_REF.gc index a186fd9688..cc2338668e 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sewer-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sewer-obs_REF.gc @@ -151,11 +151,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-single-blade) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -357,11 +357,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-tri-blade) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -509,11 +509,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-arm-blade) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -641,11 +641,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-multi-blade) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -803,11 +803,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-twist-blade) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask ambient)) (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) @@ -1028,7 +1028,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod broadcast-to-actors ((this sew-light-switch) (event-type symbol)) "Broadcast event to all associated [[entity]]s via the `actor-group`s -@param `event-type` the symbol to broadcast" + @param `event-type` the symbol to broadcast" (with-pp (dotimes (group-idx (-> this actor-group-count)) (let ((group (-> this actor-group group-idx))) @@ -1063,11 +1063,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this sew-light-switch) (entity entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (tag res-tag)) (init-switch-collision! this) (process-drawable-from-entity! this entity) @@ -1100,7 +1100,7 @@ This commonly includes things such as: ;; ERROR: failed type prop at 53: Could not figure out load: (set! v1 (l.w s4)) (defmethod sew-light-control-method-16 ((a0-0 sew-light-control) (a1-0 object) (a2-0 vector) (a3-0 float)) "@unused -@TODO - not done yet, no callers?" + @TODO - not done yet, no callers?" (local-vars (v0-0 symbol) (v0-1 none) @@ -1281,8 +1281,8 @@ This commonly includes things such as: ;; definition for method 15 of type sew-light-control (defmethod press! ((this sew-light-control) (switched-on? symbol) (should-turret-flash? symbol)) "Turns the lights on (or off) -@param switched-on? Should the sewer lights be turned on or off? -@param should-turret-flash? Should the turret have it's `flash` set as well" + @param switched-on? Should the sewer lights be turned on or off? + @param should-turret-flash? Should the turret have it's `flash` set as well" (set-sewer-lights-flag! switched-on?) (if should-turret-flash? (set-sewer-turret-flash!) @@ -1293,8 +1293,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defbehavior sew-light-control-init-by-other sew-light-control ((switch entity-actor) (turret entity-actor)) "Creates a [[sew-light-control]] given two entities for the turret and switch itself -@param switch The entity for the switch -@param turret The entity for the turret" + @param switch The entity for the switch + @param turret The entity for the turret" (process-entity-set! self switch) (set! (-> *game-info* controller 0) (process->handle self)) (set! (-> self switch-ent) switch) @@ -1308,8 +1308,8 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defun sewer-startup () "Basic house-keeping for starting the sewer area: -- sets up the bigmap -- spawns the first switch and turret" + - sets up the bigmap + - spawns the first switch and turret" (cond ((task-node-closed? (game-task-node sewer-board-introduction)) (set! (-> sewer bigmap-id) (bigmap-id sewer-with-board-area)) diff --git a/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc index ad4c796586..174dfd17f6 100644 --- a/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc @@ -1370,11 +1370,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this hoverboard-training-manager) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! sv-16 (new 'static 'res-tag)) (let ((v1-1 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) @@ -1558,11 +1558,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this skate-training-ramp) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (skate-training-ramp-method-28 this) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) @@ -1698,11 +1698,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this skate-gate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (skate-gate-method-29 this) (process-drawable-from-entity! this arg0) (logclear! (-> this mask) (process-mask actor-pause)) @@ -1979,11 +1979,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this skatea-floating-ring) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (skatea-floating-ring-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc index fbc5ee211a..5007ab614d 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc @@ -88,11 +88,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this dummy-vehicle) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -215,11 +215,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this gar-curtain) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 symbol) (sv-48 type) (sv-64 collide-shape)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 8) 0))) @@ -1183,11 +1183,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this spotlight) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -1228,11 +1228,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this gar-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -2142,11 +2142,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this stad-samos) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -2470,11 +2470,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch entity-perm-status vs none. (defmethod init-from-entity! ((this stadium-barrier) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (process-entity-status! this (entity-perm-status dead) #t) (none) ) @@ -2835,11 +2835,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this stad-force-field) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stad-force-field-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2883,11 +2883,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this stad-c-force-field) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stad-force-field-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2931,11 +2931,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this stad-d-force-field) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stad-force-field-method-28 this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -3205,11 +3205,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this brutter-balloon) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) diff --git a/test/decompiler/reference/jak2/levels/stadium/stadium-race-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadium-race-obs_REF.gc index 689db1b25b..34899fc3b3 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadium-race-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadium-race-obs_REF.gc @@ -132,11 +132,11 @@ ;; definition for method 11 of type stdmb-race-hatch (defmethod init-from-entity! ((this stdmb-race-hatch) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stdmb-race-hatch-method-21 this) (process-drawable-from-entity! this arg0) (stdmb-race-hatch-method-22 this) diff --git a/test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc index 3193b5166e..2b4b5eece3 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadium-scenes_REF.gc @@ -3244,7 +3244,7 @@ ;; definition for method 35 of type keira-npc (defmethod get-art-elem ((this keira-npc)) "Checks various things such the current actor, task status, etc to determine the right art-group data to use -@returns the appropriate [[art-element]] for the given NPC" + @returns the appropriate [[art-element]] for the given NPC" (case (-> this task actor) (((game-task-actor keira-stadium)) (-> this draw art-group data 4) diff --git a/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc b/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc index f2378165e4..7aade78b5d 100644 --- a/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/chaincrate_REF.gc @@ -364,11 +364,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this strip-chain-crate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 int)) (set! (-> this root) (new 'process 'trsqv)) (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) diff --git a/test/decompiler/reference/jak2/levels/strip/strip-drop_REF.gc b/test/decompiler/reference/jak2/levels/strip/strip-drop_REF.gc index d11d054cde..8e98347055 100644 --- a/test/decompiler/reference/jak2/levels/strip/strip-drop_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/strip-drop_REF.gc @@ -465,11 +465,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this crane) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -556,11 +556,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cranecrate) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -750,11 +750,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this grunt-egg) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (cond ((>= (res-lump-value arg0 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) diff --git a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc index 41d78cc098..5eb3e647e0 100644 --- a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc @@ -171,11 +171,11 @@ ;; INFO: Used lq/sq (defmethod init-from-entity! ((this strip-hazard) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-64 res-tag)) (set-vector! (-> this shove-vec) 0.0 12288.0 24576.0 1.0) (set! (-> this no-collision-timer) (the-as uint 0)) @@ -272,11 +272,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this fencespikes) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 string)) (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) @@ -429,11 +429,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this pitspikes) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -539,11 +539,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this curtainsaw) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -951,11 +951,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this grenade-point) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this parented?) #f) (when (not (-> this parented?)) (let ((a1-1 (handle->process (-> *game-info* controller 0)))) @@ -1794,11 +1794,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this drill-plat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/strip/strip-rescue_REF.gc b/test/decompiler/reference/jak2/levels/strip/strip-rescue_REF.gc index f8f10f095e..f6555a3da5 100644 --- a/test/decompiler/reference/jak2/levels/strip/strip-rescue_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/strip-rescue_REF.gc @@ -61,11 +61,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cntrlrm-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) (set! (-> s4-0 total-prims) (the-as uint 4)) @@ -163,11 +163,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cntrlrm-button) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) diff --git a/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc b/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc index b5507f8093..b58a557098 100644 --- a/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc @@ -879,9 +879,9 @@ ;; definition for method 55 of type monster-frog (defmethod common-post ((this monster-frog)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (water-control-method-10 (-> this water)) ((method-of-type nav-enemy common-post) this) (none) diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc index f6d4369048..2a5d06e90c 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc @@ -226,7 +226,7 @@ ;; definition for method 74 of type tomb-beetle (defmethod general-event-handler ((this tomb-beetle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (let ((v1-0 (new 'static 'array int64 2 -1 0))) (case arg2 (('cue-chase) diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc index 20728ac687..298319b551 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc @@ -145,11 +145,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-plat-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (logior! (-> this mask) (process-mask platform)) (init-plat-collision! this) (process-drawable-from-entity! this arg0) @@ -813,11 +813,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-stair-block) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 penetrated-by) (penetrate)) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 8) 0))) @@ -1151,11 +1151,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod init-defaults! ((this tomb-elevator)) "Initializes default settings related to the [[elevator]]: -- `elevator-xz-threshold` -- `elevator-y-threshold` -- `elevator-start-pos` -- `elevator-move-rate` -- `elevator-flags`" + - `elevator-xz-threshold` + - `elevator-y-threshold` + - `elevator-start-pos` + - `elevator-move-rate` + - `elevator-flags`" (let ((t9-0 (method-of-type elevator init-defaults!))) (t9-0 this) ) @@ -1235,11 +1235,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boss-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) @@ -1360,11 +1360,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-wing-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (set! (-> s5-0 penetrated-by) (penetrate)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) @@ -1488,11 +1488,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boulder-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker)) @@ -1781,11 +1781,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-plat-return) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (init-plat-collision! this) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2119,11 +2119,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-sphinx) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (the-as collide-shape-moving (new 'process 'trsqv))) (process-drawable-from-entity! this arg0) (set! (-> this target-actor) (entity-actor-lookup arg0 'alt-actor 0)) diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc index bfde7496e8..162bfe7405 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-water_REF.gc @@ -130,11 +130,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -327,11 +327,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-beetle-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) @@ -697,9 +697,9 @@ This commonly includes things such as: ;; WARN: Return type mismatch symbol vs none. (defmethod send-event! ((this tomb-beetle-button) (arg0 symbol)) "Prepares an [[event-message-block]] using the provided type to send an event to: -- the `notify-actor` -- every [[entity-actor]] in the `actor-group` array -@see [[entity-actor]]" + - the `notify-actor` + - every [[entity-actor]] in the `actor-group` array + @see [[entity-actor]]" (when arg0 (let ((a1-1 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-1 from) (process->ppointer self)) @@ -1137,11 +1137,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-plat-simon) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) @@ -1786,11 +1786,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-simon-button) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0))) (set! (-> s4-0 total-prims) (the-as uint 6)) @@ -2228,11 +2228,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-vibe) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag) (sv-32 res-tag)) (with-pp (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -2643,11 +2643,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-water-trap) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) @@ -2846,11 +2846,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-smash-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc index 5cece71ed3..52c7d261e7 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc @@ -713,11 +713,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boss-bridge) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (case ((method-of-type res-lump get-property-struct) (-> this entity) 'tomb-boss-bridge-type diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc index be99bf7d1e..256ea9ce76 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc @@ -533,11 +533,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boss-catwalk) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((a2-1 (res-lump-value arg0 'mode uint128 :time -1000000000.0))) (tomb-boss-catwalk-method-22 this (-> arg0 extra trans) (the-as int a2-1)) ) @@ -1692,11 +1692,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boss-pillar) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -1917,11 +1917,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this tomb-boss-firepot) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-more-extras_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-more-extras_REF.gc index 75767694c8..5e301a274e 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-more-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-more-extras_REF.gc @@ -520,11 +520,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this cave-in-master) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) diff --git a/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc index f4504e4f04..4663dc1e87 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow2_REF.gc @@ -181,11 +181,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this widow) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) diff --git a/test/decompiler/reference/jak2/levels/under/centipede_REF.gc b/test/decompiler/reference/jak2/levels/under/centipede_REF.gc index 51fb664864..ee5b41dee5 100644 --- a/test/decompiler/reference/jak2/levels/under/centipede_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/centipede_REF.gc @@ -217,7 +217,7 @@ ;; definition for method 74 of type centipede (defmethod general-event-handler ((this centipede) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('under-break-floor) (go (method-of-object this thru-grating)) @@ -566,10 +566,10 @@ ;; definition for method 98 of type centipede (defmethod in-aggro-range? ((this centipede) (arg0 process-focusable) (arg1 vector)) "Should the enemy activate. -- if `activate-distance` is `0.0`, always true -- otherwise, check if the provided process is close enough -@param proc The process used to distance check -@returns true/false" + - if `activate-distance` is `0.0`, always true + - otherwise, check if the provided process is close enough + @param proc The process used to distance check + @returns true/false" (when arg0 (if (not arg1) (set! arg1 (get-trans arg0 0)) @@ -675,9 +675,9 @@ ;; INFO: Used lq/sq (defmethod common-post ((this centipede)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((t9-0 (method-of-type nav-enemy common-post))) (t9-0 this) ) diff --git a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc index af7c65e0db..e9915eb956 100644 --- a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc @@ -901,7 +901,7 @@ ;; definition for method 74 of type jellyfish (defmethod general-event-handler ((this jellyfish) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (case arg2 (('hit 'hit-knocked) (logclear! (-> this mask) (process-mask actor-pause)) @@ -1137,9 +1137,9 @@ ;; INFO: Used lq/sq (defmethod common-post ((this jellyfish)) "Does a lot of various things relating to interacting with the target -- tracks when the enemy was last drawn -- looks at the target and handles attacking -@TODO Not extremely well understood yet" + - tracks when the enemy was last drawn + - looks at the target and handles attacking + @TODO Not extremely well understood yet" (let ((v1-1 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) (-> this main-joint-acc) (-> this root quat))) ) (+! (-> this tentacle-clock) diff --git a/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc b/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc index b058431208..d3b0dace0a 100644 --- a/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc @@ -144,7 +144,7 @@ ;; definition for method 74 of type sig-under (defmethod general-event-handler ((this sig-under) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) "Handles various events for the enemy -@TODO - unsure if there is a pattern for the events and this should have a more specific name" + @TODO - unsure if there is a pattern for the events and this should have a more specific name" (with-pp (case arg2 (('set-task) diff --git a/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc b/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc index 02ca4f7ba2..2bbccd9dd4 100644 --- a/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-laser_REF.gc @@ -437,11 +437,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-laser) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-64 res-tag)) (set! (-> this root) (the-as collide-shape-moving (new 'process 'trsqv))) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc index e3a7c5fa84..3a56cf75a8 100644 --- a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc @@ -394,11 +394,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this bubbler) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (set! (-> this part) (create-launch-control (-> *part-group-id-table* 500) this)) @@ -647,11 +647,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-rise-plat) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -1550,11 +1550,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-mine) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec enemy camera-blocker)) @@ -1640,10 +1640,10 @@ This commonly includes things such as: ;; definition for method 43 of type under-lift (defmethod move-between-points ((this under-lift) (arg0 vector) (arg1 float) (arg2 float)) "Move between two points on the elevator's path -@param vec TODO not sure -@param point-a The first point fetched from the elevator's path -@param point-b The second point fetched from the path -@see [[path-control]] and [[elevator]]" + @param vec TODO not sure + @param point-a The first point fetched from the elevator's path + @param point-b The second point fetched from the path + @see [[path-control]] and [[elevator]]" (let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp)) (a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp)) (v1-3 (-> this root trans)) @@ -1754,7 +1754,7 @@ This commonly includes things such as: ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this under-lift)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (set! (-> this sound-id) (new-sound-id)) (set! (-> this draw light-index) (the-as uint 4)) 0 @@ -1890,11 +1890,11 @@ For example for an elevator pre-compute the distance between the first and last ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-break-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (stack-size-set! (-> this main-thread) 512) (logior! (-> this mask) (process-mask collectable)) (let ((s3-0 ((method-of-type res-lump get-property-struct) @@ -2033,11 +2033,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-seaweed-a) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s4-0 reaction) cshape-reaction-default) @@ -2145,11 +2145,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-seaweed-b) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2211,11 +2211,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-seaweed-c) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton @@ -2277,11 +2277,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-seaweed-d) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) (initialize-skeleton diff --git a/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc b/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc index f11fa193f6..b322170859 100644 --- a/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc @@ -2353,11 +2353,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-shoot-block) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) diff --git a/test/decompiler/reference/jak2/levels/under/under-sig-obs_REF.gc b/test/decompiler/reference/jak2/levels/under/under-sig-obs_REF.gc index cc1292957f..8b365f37af 100644 --- a/test/decompiler/reference/jak2/levels/under/under-sig-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-sig-obs_REF.gc @@ -136,7 +136,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod init-plat! ((this under-plat-shoot)) "Does any necessary initial platform setup. -For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." + For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound." (logclear! (-> this mask) (process-mask actor-pause)) (logior! (-> this mask) (process-mask enemy)) (set-vector! (-> this axe-flip) 1.0 0.0 0.0 1.0) @@ -436,9 +436,9 @@ For example for an elevator pre-compute the distance between the first and last ;; definition for method 36 of type under-plat-shoot (defmethod plat-path-sync ((this under-plat-shoot)) "If the `sync` period is greater than `0` then transition the state to [[plat::35]] -otherwise, [[plat::34]] - -@see [[sync-eased]]" + otherwise, [[plat::34]] + + @see [[sync-eased]]" (cond ((and (script-eval (the-as pair (-> this draw-test-script))) (= *bot-record-path* -1)) (go (method-of-object this dormant)) @@ -582,11 +582,11 @@ otherwise, [[plat::34]] ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-break-floor) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) (set! (-> s4-0 total-prims) (the-as uint 3)) @@ -692,11 +692,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-break-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) @@ -831,11 +831,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-break-bridge) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this bridge-id) (res-lump-value (-> this entity) 'extra-id int :time -1000000000.0)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) @@ -979,11 +979,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-int-door) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0))) @@ -1148,11 +1148,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-plat-long) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (init-plat-collision! this) (process-drawable-from-entity! this arg0) @@ -1304,11 +1304,11 @@ This commonly includes things such as: ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-plat-wall) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (set! (-> this extended-amount) 0.0) (logior! (-> this mask) (process-mask platform)) (set! (-> this clock) (-> *display* user0-clock)) diff --git a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc index 76be9b64fe..06cd317012 100644 --- a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc @@ -1125,11 +1125,11 @@ ;; WARN: Return type mismatch object vs none. (defmethod init-from-entity! ((this under-locking) (arg0 entity-actor)) "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that. -This commonly includes things such as: -- stack size -- collision information -- loading the skeleton group / bones -- sounds" + This commonly includes things such as: + - stack size + - collision information + - loading the skeleton group / bones + - sounds" (local-vars (sv-16 res-tag)) (set! (-> this which-reminder?) #f) (set! (-> this spooled-sound-id) (new 'static 'sound-id)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/cloth-art-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/cloth-art-h_REF.gc index 3a20476520..626fcf1375 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/cloth-art-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/cloth-art-h_REF.gc @@ -255,8 +255,8 @@ (deftype cloth-base (basic) () (:methods - (init! (_type_) int) - (cloth-base-method-10 (_type_ cloth-params handle) int) + (update! (_type_) int) + (setup-from-params! (_type_ cloth-params handle) int) ) ) @@ -273,7 +273,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc index be28d83c04..660fef4ac5 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc @@ -3,6 +3,7 @@ ;; definition of type float-pair (deftype float-pair (structure) + "Two floats. Specifies one point on a piecewise linear curve." ((first float) (second float) (x float :overlay-at first) @@ -27,6 +28,7 @@ ;; definition of type float-pair-array (deftype float-pair-array (inline-array-class) + "Array of points used to make a piecewise linear curve." ((data float-pair :inline :dynamic) ) ) @@ -50,9 +52,13 @@ ;; definition of type curve2d (deftype curve2d (basic) + "Interface for evaluating a 2d curve. +The input is a float (x-position) and the output is a float (y-position). +The curve is over (0, 1). Values outside of the range are either clamped +or wrapped depending on the loop-behavior flag." () (:methods - (curve2d-method-9 (_type_ float int) float) + (evaluate (_type_ float loop-behavior) float) ) ) @@ -69,9 +75,11 @@ ;; definition of type curve-color (deftype curve-color (basic) + "Interface for evaluating a color curve. The input is a float, representing +progress through the curve, and the result is a floating point rgba color." () (:methods - (curve-color-method-9 (_type_ float rgbaf int) rgbaf) + (evaluate (_type_ float rgbaf loop-behavior) rgbaf) ) ) @@ -88,11 +96,13 @@ ;; definition of type curve2d-piecewise (deftype curve2d-piecewise (curve2d) + "Implementation of 2d-curve for a piecewise linear curve. +Not particularly efficient - each evaluation needs to check each point." ((pts float-pair-array) - (default-loop-behavior uint64) + (default-loop-behavior loop-behavior) ) (:methods - (curve2d-piecewise-method-10 (_type_ int symbol int) none) + (allocate! (_type_ int symbol symbol) none) (curve2d-piecewise-method-11 (_type_) none) ) ) @@ -112,6 +122,9 @@ ;; definition of type curve2d-fast (deftype curve2d-fast (curve2d) + "Implementation of 2d piecewise linear curve which tries to be faster. +While it is faster, it places the huge restriction that you can only have 4 points. +Note that the xs should be negative here." ((xs vector :inline) (ys vector :inline) (one-over-x-deltas vector :inline) @@ -134,6 +147,7 @@ ;; definition for function rgbaf-lerp! (defun rgbaf-lerp! ((arg0 rgbaf) (arg1 rgbaf) (arg2 rgbaf) (arg3 float)) + "Lerp all four components of rgba." (vector-lerp! arg0 arg1 arg2 arg3) (set! (-> arg0 w) (lerp (-> arg1 w) (-> arg2 w) arg3)) arg0 @@ -141,6 +155,9 @@ ;; definition of type curve-color-fast (deftype curve-color-fast (curve-color) + "Implementation of color curve which tries to be faster. +While it is faster, it again has the restriction that you only +get 4 piecewise sections." ((xs vector :inline) (ys vector 4 :inline) (one-over-x-deltas vector :inline) @@ -163,6 +180,8 @@ ;; definition of type color-pair (deftype color-pair (structure) + "Single section of a piecewise linear color curve. +Unlike the fast version, this stores x values exactly like you'd expect." ((first float) (second rgbaf :inline) (x float :overlay-at first) @@ -187,6 +206,7 @@ ;; definition of type color-pair-array (deftype color-pair-array (inline-array-class) + "Array of points for piecewise linear color curve." ((data color-pair :inline :dynamic) ) ) @@ -210,11 +230,12 @@ ;; definition of type curve-color-piecewise (deftype curve-color-piecewise (curve-color) + "Implementation of curve-color." ((pts color-pair-array) - (default-loop-behavior uint64) + (default-loop-behavior loop-behavior) ) (:methods - (curve-color-piecewise-method-10 (_type_ int symbol uint) none) + (allocate! (_type_ int symbol symbol) none) ) ) @@ -233,13 +254,13 @@ ;; definition for method 10 of type curve2d-piecewise ;; WARN: Return type mismatch int vs none. -(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 int)) +(defmethod allocate! ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 symbol)) + "Allocate memory for points." (set! (-> this pts) ((method-of-type float-pair-array new) arg1 float-pair-array arg0)) - (set! (-> this default-loop-behavior) (the-as uint (if arg2 - 0 - 1 - ) - ) + (set! (-> this default-loop-behavior) (if arg2 + (loop-behavior wrap) + (loop-behavior clamp) + ) ) 0 (none) @@ -247,13 +268,13 @@ ;; definition for method 10 of type curve-color-piecewise ;; WARN: Return type mismatch int vs none. -(defmethod curve-color-piecewise-method-10 ((this curve-color-piecewise) (arg0 int) (arg1 symbol) (arg2 uint)) +(defmethod allocate! ((this curve-color-piecewise) (arg0 int) (arg1 symbol) (arg2 symbol)) + "Allocate memory for points." (set! (-> this pts) ((method-of-type color-pair-array new) arg1 color-pair-array arg0)) - (set! (-> this default-loop-behavior) (the-as uint (if arg2 - 0 - 1 - ) - ) + (set! (-> this default-loop-behavior) (if arg2 + (loop-behavior wrap) + (loop-behavior clamp) + ) ) 0 (none) @@ -261,20 +282,19 @@ ;; definition for method 9 of type curve-color-piecewise ;; INFO: Used lq/sq -(defmethod curve-color-method-9 ((this curve-color-piecewise) (arg0 float) (arg1 rgbaf) (arg2 int)) +(defmethod evaluate ((this curve-color-piecewise) (arg0 float) (arg1 rgbaf) (arg2 loop-behavior)) + "Compute value of curve at the given position." (when (or (< 1.0 arg0) (< arg0 0.0)) - (if (= arg2 3) - (set! arg2 (the-as int (-> this default-loop-behavior))) - ) - (let ((v1-8 arg2)) - (cond - ((zero? v1-8) - (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) - ) - ((= v1-8 1) - (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) - ) + (if (= arg2 (loop-behavior use-default)) + (set! arg2 (-> this default-loop-behavior)) ) + (case arg2 + (((loop-behavior wrap)) + (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) + ) + (((loop-behavior clamp)) + (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) + ) ) ) (when (= arg0 0.0) @@ -298,20 +318,19 @@ ) ;; definition for method 9 of type curve2d-piecewise -(defmethod curve2d-method-9 ((this curve2d-piecewise) (arg0 float) (arg1 int)) +(defmethod evaluate ((this curve2d-piecewise) (arg0 float) (arg1 loop-behavior)) + "Compute value of curve at the given position." (when (or (< 1.0 arg0) (< arg0 0.0)) - (if (= arg1 3) - (set! arg1 (the-as int (-> this default-loop-behavior))) - ) - (let ((v1-8 arg1)) - (cond - ((zero? v1-8) - (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) - ) - ((= v1-8 1) - (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) - ) + (if (= arg1 (loop-behavior use-default)) + (set! arg1 (-> this default-loop-behavior)) ) + (case arg1 + (((loop-behavior wrap)) + (set! arg0 (- arg0 (* (the float (the int (/ arg0 1.0))) 1.0))) + ) + (((loop-behavior clamp)) + (set! arg0 (fmax 0.0 (fmin 1.0 arg0))) + ) ) ) (if (= arg0 0.0) @@ -334,7 +353,8 @@ ;; definition for function evaluate-curve-fast ;; WARN: Return type mismatch number vs float. -(defun evaluate-curve-fast ((arg0 curve2d-fast) (arg1 rgbaf) (arg2 rgbaf)) +(defun evaluate-curve-fast ((arg0 curve2d-fast) (arg1 float)) + "Evaluate a curve2d-fast at the given value." (local-vars (v0-0 number)) (rlet ((acc :class vf) (vf0 :class vf) @@ -346,7 +366,7 @@ (vf29 :class vf) ) (init-vf0-vector) - (let ((a2-1 (new 'stack-no-clear 'vector)) + (let ((a2-0 (new 'stack-no-clear 'vector)) (v1-0 (new 'stack-no-clear 'vector)) ) (.mov vf27 arg1) @@ -358,10 +378,10 @@ (.add.x.vf vf28 vf24 vf27) (.mul.w.vf acc vf25 vf0) (.add.mul.vf vf29 vf28 vf26 acc) - (.svf (&-> a2-1 quad) vf28) + (.svf (&-> a2-0 quad) vf28) (.svf (&-> v1-0 quad) vf29) - (let ((a0-1 (-> a2-1 z)) - (a1-1 (-> a2-1 y)) + (let ((a0-1 (-> a2-0 z)) + (a1-1 (-> a2-0 y)) ) (nop!) (b! (>= (the-as int a0-1) 0) cfg-3 :delay (set! v0-0 (-> v1-0 z))) @@ -376,7 +396,8 @@ ;; definition for method 9 of type curve2d-fast ;; WARN: Return type mismatch number vs float. -(defmethod curve2d-method-9 ((this curve2d-fast) (arg0 float) (arg1 int)) +(defmethod evaluate ((this curve2d-fast) (arg0 float) (arg1 loop-behavior)) + "Compute value of curve at the given position." (local-vars (v0-0 number)) (rlet ((acc :class vf) (vf0 :class vf) @@ -419,7 +440,8 @@ ) ;; definition for function evaluate-color-curve-fast -(defun evaluate-color-curve-fast ((arg0 curve-color-fast) (arg1 rgbaf) (arg2 rgbaf)) +(defun evaluate-color-curve-fast ((arg0 curve-color-fast) (arg1 float) (arg2 rgbaf)) + "Evaluate a color-curve-fast at the given value." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -474,7 +496,8 @@ ) ;; definition for method 9 of type curve-color-fast -(defmethod curve-color-method-9 ((this curve-color-fast) (arg0 float) (arg1 rgbaf) (arg2 int)) +(defmethod evaluate ((this curve-color-fast) (arg0 float) (arg1 rgbaf) (arg2 loop-behavior)) + "Compute value of curve at the given position." (rlet ((acc :class vf) (vf0 :class vf) (vf1 :class vf) @@ -537,22 +560,21 @@ ) ;; definition for function rgba<-rgbaf -;; WARN: Return type mismatch rgba vs int. (defun rgba<-rgbaf ((arg0 rgba) (arg1 rgbaf)) - (the-as int (copy-and-set-field - (copy-and-set-field - (copy-and-set-field - (copy-and-set-field arg0 r (the int (* 128.0 (-> arg1 x)))) - g - (the int (* 128.0 (-> arg1 y))) - ) - b - (the int (* 128.0 (-> arg1 z))) - ) - a - (the int (* 128.0 (-> arg1 w))) - ) - ) + "Convert rgbaf to rgba. Seems like the input rgba's value is not used in any way." + (copy-and-set-field + (copy-and-set-field + (copy-and-set-field + (copy-and-set-field arg0 r (the int (* 128.0 (-> arg1 x)))) + g + (the int (* 128.0 (-> arg1 y))) + ) + b + (the int (* 128.0 (-> arg1 z))) + ) + a + (the int (* 128.0 (-> arg1 w))) + ) ) ;; failed to figure out what this is: @@ -588,7 +610,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-linear-up-hold*) (!= loading-level global)) (set! *curve-linear-up-hold* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as int #f)) + (allocate! *curve-linear-up-hold* 2 'loading-level #f) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc index 8ff76ed73f..5702c70063 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc @@ -64,7 +64,7 @@ ;; failed to figure out what this is: (when (or (zero? *water-simple-alpha-curve-in*) (!= loading-level global)) (set! *water-simple-alpha-curve-in* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-in* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-in* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -82,7 +82,7 @@ ;; failed to figure out what this is: (when (or (zero? *growing-curve*) (!= loading-level global)) (set! *growing-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *growing-curve* 2 'loading-level (the-as int #f)) + (allocate! *growing-curve* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -100,7 +100,7 @@ ;; failed to figure out what this is: (when (or (zero? *water-simple-alpha-curve-fade-out*) (!= loading-level global)) (set! *water-simple-alpha-curve-fade-out* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-fade-out* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -118,7 +118,7 @@ ;; failed to figure out what this is: (when (or (zero? *color-curve-tan-brown*) (!= loading-level global)) (set! *color-curve-tan-brown* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *color-curve-tan-brown* 2 'loading-level (the-as uint #f)) + (allocate! *color-curve-tan-brown* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -190,17 +190,15 @@ (set! (-> *water-wake-trail* uv-repeat-dist) 40960.0) ;; failed to figure out what this is: -(set! (-> *water-wake-trail* lie-mode) (the-as uint 1)) +(set! (-> *water-wake-trail* lie-mode) (lie-mode appearance1)) ;; failed to figure out what this is: (set! (-> *water-wake-trail* max-age) (seconds 3)) ;; failed to figure out what this is: (if #f - (set! (-> *water-wake-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *water-wake-trail* tex-id) (the-as uint #x500800)) + (set! (-> *water-wake-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *water-wake-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) ;; failed to figure out what this is: @@ -243,7 +241,7 @@ (let* ((v1-18 (estimate-light-trail-mem-usage (the-as uint (-> s5-0 max-num-crumbs)) - (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + (the-as uint (= (-> s5-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-0 (get-process *default-dead-pool* light-trail-tracker-water (+ v1-18 8192) 1)) diff --git a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc index 67e01b3d52..4e9056613d 100644 --- a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc @@ -323,7 +323,7 @@ that gets accessed by the accompanying process." ;; definition of type entity-info (deftype entity-info (basic) - ((ptype type) + ((ptype object) (pool symbol) (heap-size int32) ) diff --git a/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc new file mode 100644 index 0000000000..85901d28c9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc @@ -0,0 +1,241 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *entity-info*, type (array entity-info) +(define *entity-info* + (new 'static 'boxed-array :type entity-info + (new 'static 'entity-info :ptype 'factory-boss :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref flitter-spawner :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bubbles-path :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x8000 + ) + (new 'static 'entity-info :ptype 'desert-chase-ring :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-grunt :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-roboguard :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref w-parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref min-elevator :method-count 52) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref tpl-bouncer :method-count 28) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'veger-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info :ptype 'seem-npc :pool '*16k-dead-pool* :heap-size #x20000) + (new 'static 'entity-info + :ptype (type-ref krimson-wall :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'kleever-catch-lizards :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'kleever-npc :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'damus-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info + :ptype (type-ref nav-graph :method-count 45) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref tizard :method-count 36) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype (type-ref ladder :method-count 27) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype 'mh-centipede :pool '*16k-dead-pool* :heap-size #x6000) + (new 'static 'entity-info :ptype 'dark-tower :pool '*16k-dead-pool* :heap-size #x5800) + (new 'static 'entity-info + :ptype (type-ref curve-bubbles-Shape :method-count 15) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-tower-door :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-d :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-c :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-b :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-a :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-de-tower-undervines :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-twitch-blade :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-claw-finger-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-large :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-door :method-count 33) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer-large :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref searchlight :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ctyn-lamp :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref burning-bush :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref sail-boat-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref barge :method-count 152) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref boat-manager :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref propa :method-count 33) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref city-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref security-wall :method-count 25) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-guard-turret :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-fruit-stand :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref fruit-stand :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref torn :method-count 218) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref neon-baron :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x10000 + ) + ) + ) + +;; definition for function entity-info-lookup +;; WARN: Return type mismatch basic vs entity-info. +(defun entity-info-lookup ((arg0 type)) + (the-as entity-info (cond + ((nonzero? (-> arg0 method-table 13)) + (-> arg0 method-table 13) + ) + (else + (let ((v1-1 *entity-info*)) + (dotimes (a1-0 (-> v1-1 length)) + (let ((a2-3 (-> v1-1 a1-0 ptype))) + (when (if (logtest? (the-as int a2-3) 1) + (= (-> arg0 symbol) a2-3) + (= arg0 a2-3) + ) + (set! (-> arg0 method-table 13) (the-as function (-> v1-1 a1-0))) + (return (the-as entity-info (-> v1-1 a1-0))) + ) + ) + ) + ) + (set! (-> arg0 method-table 13) #f) + (the-as basic #f) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc index 0783a92797..0f614f338f 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc @@ -667,10 +667,10 @@ (let ((v1-2 arg0)) (cond ((zero? v1-2) - (curve2d-method-9 arg3 (/ arg2 arg4) 3) + (evaluate arg3 (/ arg2 arg4) (loop-behavior use-default)) ) ((= v1-2 1) - (curve2d-method-9 arg3 arg1 3) + (evaluate arg3 arg1 (loop-behavior use-default)) ) ((= v1-2 2) (let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) @@ -877,7 +877,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc index 148b116ea0..67da9ee735 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc @@ -42,8 +42,8 @@ (uv-mode uint64) (uv-repeat-dist float) (max-age time-frame) - (tex-id uint32) - (lie-mode uint64) + (tex-id texture-id) + (lie-mode lie-mode) (lie-vector vector :inline) (zbuffer? symbol) (use-tape-mode? symbol) @@ -101,7 +101,7 @@ ) (format #t "[~8x] ~A~%" this 'light-trail-breadcrumb) (format #t "~1Tpos: #~%" (-> this pos)) - (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (format #t "~1Tbirth-time: ~D~%" (-> this birth-time)) (label cfg-4) this ) @@ -131,33 +131,33 @@ ;; definition of type light-trail (deftype light-trail (basic) - ((crumb-array (array light-trail-breadcrumb)) + ((crumb-array (array uint8)) (crumb-size uint8) (crumb-count int16) (max-crumb-count int16) (appearance light-trail-composition) (start-marker uint64) (end-marker uint64) - (decision uint64) + (decision light-trail-decision) (total-distance-traveled float) (strip prim-strip) (strip2 prim-strip) (cache-vector vector 4 :inline) ) (:methods - (light-trail-method-9 (_type_ light-trail-composition int) none) - (light-trail-method-10 (_type_) none) - (light-trail-method-11 (_type_ vector time-frame) int) - (light-trail-method-12 (_type_) none) - (light-trail-method-13 (_type_) int) - (light-trail-method-14 (_type_) none) + (setup! (_type_ light-trail-composition int) none) + (reset! (_type_) none) + (add-crumb! (_type_ vector time-frame) int) + (build-prim-strip! (_type_) none) + (common-trans! (_type_) int) + (expire-old-points! (_type_) none) (light-trail-method-15 (_type_) none) - (add-vert! (_type_ prim-strip vector float float float) none) - (light-trail-method-17 (_type_ vector float float vector float) symbol) - (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) - (light-trail-method-19 (_type_ float int) none) + (add-vert-to-prim-strip! (_type_ prim-strip vector rgba float float) none) + (add-tri-pair-to-prim! (_type_ vector rgba float vector float) symbol) + (calc-vertex-pos! (_type_ light-trail-breadcrumb int vector vector) none) + (crumb-age-out-callback (_type_ float int) none) (reset-crumbs! (_type_) none) - (light-trail-method-21 (_type_ vector) none) + (replace-last-crumb! (_type_ vector) none) ) ) @@ -198,7 +198,7 @@ ) (format #t "[~8x] ~A~%" this 'weapon-trail-crumb) (format #t "~1Tpos: #~%" (-> this pos)) - (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (format #t "~1Tbirth-time: ~D~%" (-> this birth-time)) (format #t "~1Toffset: #~%" (-> this offset)) (label cfg-4) this @@ -208,7 +208,7 @@ (deftype weapon-trail (light-trail) () (:methods - (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (add-crumb-with-offset (_type_ vector vector) light-trail-breadcrumb) (weapon-trail-method-23 (_type_ vector vector) none) ) ) @@ -250,7 +250,7 @@ ) (format #t "[~8x] ~A~%" this 'tread-trail-crumb) (format #t "~1Tpos: #~%" (-> this pos)) - (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (format #t "~1Tbirth-time: ~D~%" (-> this birth-time)) (format #t "~1Tnormal: #~%" (-> this normal)) (label cfg-4) this @@ -260,8 +260,8 @@ (deftype tread-trail (light-trail) () (:methods - (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) - (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) + (add-crumb-with-offset (_type_ vector vector) none) + (tread-trail-method-23 (_type_ vector vector) none) ) ) @@ -350,11 +350,11 @@ die ) (:methods - (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) - (light-trail-tracker-method-17 (_type_ process-focusable) symbol) - (light-trail-tracker-method-18 (_type_ process-focusable) symbol) - (light-trail-tracker-method-19 (_type_) symbol) - (light-trail-tracker-method-20 (_type_ vector) none) + (get-tracked-object-pos (_type_ process-focusable vector) vector) + (should-track? (_type_ process-focusable) symbol) + (should-end? (_type_ process-focusable) symbol) + (should-draw? (_type_) symbol) + (add-crumb! (_type_ vector) none) ) ) @@ -432,13 +432,13 @@ (set! (-> self next-line-check-time) 0) (set! (-> self last-add-frame-val) (the-as uint 0)) (set! (-> self offscreen?) #f) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (when (-> arg0 track-immediately?) (let ((gp-1 (handle->process (-> self tracked-object)))) - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) - (light-trail-method-11 + (if (should-track? self (the-as process-focusable gp-1)) + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) (seconds 10000) ) ) @@ -456,7 +456,7 @@ (set! (-> self joint0) (-> arg0 joint0)) (set! (-> self joint1) (-> arg0 joint1)) (set! (-> self offscreen?) #f) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (go-virtual tracking) ) @@ -467,7 +467,7 @@ (set! (-> self offscreen?) #f) (set! (-> self next-line-check-time) 0) (set! (-> self last-add-frame-val) (the-as uint 0)) - (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (setup! (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) (go-virtual tracking) ) @@ -514,7 +514,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc index 0cfc2e20cf..9253a49f56 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc @@ -3,45 +3,39 @@ ;; definition for method 9 of type light-trail ;; WARN: Return type mismatch int vs none. -(defmethod light-trail-method-9 ((this light-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this light-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this appearance) arg0) (set! (-> this crumb-size) (the-as uint (max 16 (the-as int (-> this crumb-size))))) - (set! (-> this crumb-array) - (the-as - (array light-trail-breadcrumb) - (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size)))) - ) - ) + (set! (-> this crumb-array) (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size))))) (set! (-> this max-crumb-count) arg1) (set! (-> this crumb-count) 0) - (set! (-> this strip) - (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) - ) + (set! (-> this strip) (new 'process 'prim-strip (* arg1 2) (-> arg0 tex-id) (the-as string #f))) (set! (-> this strip2) #f) - (if (= (-> this appearance lie-mode) 3) - (set! (-> this strip2) - (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) - ) + (if (= (-> this appearance lie-mode) (lie-mode use-two-strips)) + (set! (-> this strip2) (new 'process 'prim-strip (* arg1 2) (-> arg0 tex-id) (the-as string #f))) ) - (light-trail-method-10 this) + (reset! this) 0 (none) ) ;; definition for method 10 of type light-trail ;; WARN: Return type mismatch float vs none. -(defmethod light-trail-method-10 ((this light-trail)) +(defmethod reset! ((this light-trail)) + "Clear all tracked crumbs." (set! (-> this crumb-count) 0) (set! (-> this start-marker) (the-as uint (current-time))) (set! (-> this end-marker) (the-as uint (current-time))) - (set! (-> this decision) (the-as uint 2)) + (set! (-> this decision) (light-trail-decision reset)) (set! (-> this total-distance-traveled) 0.0) (none) ) ;; definition for method 11 of type light-trail ;; INFO: Used lq/sq -(defmethod light-trail-method-11 ((this light-trail) (arg0 vector) (arg1 time-frame)) +(defmethod add-crumb! ((this light-trail) (arg0 vector) (arg1 time-frame)) + "Try adding a crumb, kicking out the oldest if there's not enough room. This may reject if it's too close to the previous." (local-vars (s3-0 int)) (with-pp (if (< (seconds 5000) arg1) @@ -55,7 +49,7 @@ ) (cond ((< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) (set! s3-0 1) (goto cfg-12) ) @@ -86,7 +80,7 @@ (set! f0-5 (- f2-0 f1-2)) ) (set! (-> a1-5 pos quad) (-> arg0 quad)) - (set! (-> a1-5 pos w) (the-as float (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) + (set! (-> a1-5 birth-time) (the-as uint (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) ) (mem-copy! (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (-> this crumb-count))) @@ -95,7 +89,7 @@ ) ) (+! (-> this crumb-count) 1) - (set! (-> this decision) (the-as uint 0)) + (set! (-> this decision) (light-trail-decision added)) (label cfg-12) s3-0 ) @@ -104,21 +98,27 @@ ;; definition for method 21 of type light-trail ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. -(defmethod light-trail-method-21 ((this light-trail) (arg0 vector)) +(defmethod replace-last-crumb! ((this light-trail) (arg0 vector)) + "Similar to add-crumb, but will modify the last crumb instead of advancing." (with-pp (let ((v1-0 (-> this crumb-count))) 0.0 (cond ((zero? v1-0) - (light-trail-method-11 this arg0 (seconds 10000)) + (add-crumb! this arg0 (seconds 10000)) ) (else - (set! (-> this decision) (the-as uint 0)) - (let ((gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) - (let ((f0-1 (vector-vector-distance (the-as vector (&+ gp-0 0)) arg0))) + (set! (-> this decision) (light-trail-decision added)) + (let ((gp-0 (the-as + light-trail-breadcrumb + (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))) + ) + ) + ) + (let ((f0-1 (vector-vector-distance (-> gp-0 pos) arg0))) (+! (-> this total-distance-traveled) f0-1) (if (< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) ) ) (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) @@ -128,10 +128,10 @@ (if (-> this appearance use-tape-mode?) (set! f0-4 (- f2-0 f1-3)) ) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> arg0 quad)) - (set! (-> gp-0 3) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 birth-time) (the-as - light-trail-breadcrumb + uint (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) ) ) @@ -147,10 +147,11 @@ ;; definition for method 16 of type light-trail ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. -(defmethod add-vert! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 float) (arg3 float) (arg4 float)) +(defmethod add-vert-to-prim-strip! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 rgba) (arg3 float) (arg4 float)) + "Add a single vertex to the prim." (let ((v1-3 (-> arg0 data (-> arg0 num-verts)))) (set! (-> v1-3 pos quad) (-> arg1 quad)) - (set! (-> v1-3 col) (the-as rgba arg2)) + (set! (-> v1-3 col) arg2) (set! (-> v1-3 stq x) arg3) (set! (-> v1-3 stq y) arg4) ) @@ -161,31 +162,74 @@ ;; definition for method 17 of type light-trail ;; INFO: Used lq/sq -(defmethod light-trail-method-17 ((this light-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) +(defmethod add-tri-pair-to-prim! ((this light-trail) (arg0 vector) (arg1 rgba) (arg2 float) (arg3 vector) (arg4 float)) + "Add two vertices to the prim strip to add two triangles" (if (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) (return #f) ) (cond - ((= (-> this appearance lie-mode) 3) + ((= (-> this appearance lie-mode) (lie-mode use-two-strips)) (let ((s1-0 (new 'stack-no-clear 'vector))) (set! (-> s1-0 quad) (-> this cache-vector 0 quad)) (vector-normalize! s1-0 (* 0.5 arg2)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) + arg1 + arg4 + 1.0 + ) ) (let ((s1-1 (new 'stack-no-clear 'vector))) (set! (-> s1-1 quad) (-> this cache-vector 1 quad)) (vector-normalize! s1-1 (* 0.5 arg2)) - (add-vert! this (-> this strip2) (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) arg1 arg4 0.0) - (add-vert! this (-> this strip2) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip2) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip2) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) + arg1 + arg4 + 1.0 + ) ) ) (else (let ((s1-2 (new 'stack-no-clear 'vector))) (set! (-> s1-2 quad) (-> arg3 quad)) (vector-normalize! s1-2 (* 0.5 arg2)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) + arg1 + arg4 + 1.0 + ) ) ) ) @@ -240,7 +284,7 @@ ;; definition for method 18 of type light-trail ;; INFO: Used lq/sq ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (let ((v1-0 (new 'stack-no-clear 'vector))) (cond ((> (the-as uint arg1) 0) @@ -254,30 +298,28 @@ ) ) ) - (let ((a2-9 (-> this appearance lie-mode))) - (cond - ((= a2-9 1) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - ) - ((zero? a2-9) - (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) - ) - ((= a2-9 2) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (vector-cross! arg3 v1-0 arg3) - ) - ((= a2-9 3) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (set! (-> this cache-vector 0 quad) (-> arg3 quad)) - (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) - (set! (-> arg3 y) 0.0) - (vector-cross! arg3 v1-0 arg3) - (set! (-> this cache-vector 1 quad) (-> arg3 quad)) - ) - ) + (case (-> this appearance lie-mode) + (((lie-mode appearance1)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + ) + (((lie-mode appearance0)) + (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) + ) + (((lie-mode appearance2)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + ) + (((lie-mode use-two-strips)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (set! (-> this cache-vector 0 quad) (-> arg3 quad)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + (set! (-> this cache-vector 1 quad) (-> arg3 quad)) + ) ) ) (none) @@ -286,7 +328,8 @@ ;; definition for method 12 of type light-trail ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. -(defmethod light-trail-method-12 ((this light-trail)) +(defmethod build-prim-strip! ((this light-trail)) + "Build the mesh for this light trail." (local-vars (sv-64 time-frame) (sv-72 uint) @@ -318,12 +361,14 @@ ) (while (>= s3-0 s4-0) (let* ((v1-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s4-0 -1))))) - (a1-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0)))) - (a0-6 (- (-> this start-marker) (the-as uint (-> a1-3 3)))) + (a1-3 (the-as object (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0))))) + (a0-6 (- (-> this start-marker) (-> (the-as light-trail-breadcrumb a1-3) birth-time))) ) - (when (and (>= a0-6 0) (< a0-6 (-> this appearance max-age))) + (when (and (>= (the-as int a0-6) 0) (< (the-as time-frame a0-6) (-> this appearance max-age))) (set! *total-length* - (+ *total-length* (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ a1-3 0)))) + (+ *total-length* + (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ (the-as (pointer uint8) a1-3) 0))) + ) ) (set! (-> *dist-cache-array* s4-0) *total-length*) ) @@ -345,7 +390,7 @@ (set! sv-128 (math-camera-pos)) (set! sv-132 (new 'stack-no-clear 'vector)) (set! (-> this strip num-verts) (the-as uint 0)) - (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip tex-id) (-> this appearance tex-id)) (cond ((not (-> this appearance zbuffer?)) (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) @@ -380,7 +425,7 @@ ) (when (-> this strip2) (set! (-> this strip2 num-verts) (the-as uint 0)) - (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip2 tex-id) (-> this appearance tex-id)) (cond ((not (-> this appearance zbuffer?)) (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) @@ -416,9 +461,13 @@ ) (countdown (s5-1 (-> s5-0 0)) (let* ((s3-1 s5-1) - (s4-1 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1))) + (s4-1 (the-as object (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1)))) ) - (set! sv-136 (/ (the float (+ (- (-> this start-marker) (the-as uint (-> s4-1 3))) sv-80)) (the float sv-64))) + (set! sv-136 + (/ (the float (+ (- (-> this start-marker) (-> (the-as light-trail-breadcrumb s4-1) birth-time)) sv-80)) + (the float sv-64) + ) + ) (when (or (< 1.0 sv-136) (< sv-136 0.0)) ) (when (and (>= 1.0 sv-136) (>= sv-136 0.0)) @@ -440,10 +489,10 @@ f28-0 f26-0 (-> this appearance alpha-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-140 (curve2d-method-9 (-> this appearance alpha-curve-1) sv-140 3)) + (set! sv-140 (evaluate (-> this appearance alpha-curve-1) sv-140 (loop-behavior use-default))) ) (when (-> this appearance alpha-curve-2) (set! sv-144 @@ -454,10 +503,10 @@ f28-0 f26-0 (-> this appearance alpha-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-144 (curve2d-method-9 (-> this appearance alpha-curve-2) sv-144 3)) + (set! sv-144 (evaluate (-> this appearance alpha-curve-2) sv-144 (loop-behavior use-default))) ) (when (-> this appearance width-curve) (set! sv-148 @@ -468,10 +517,10 @@ f28-0 f26-0 (-> this appearance width-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (set! sv-148 (curve2d-method-9 (-> this appearance width-curve) sv-148 3)) + (set! sv-148 (evaluate (-> this appearance width-curve) sv-148 (loop-behavior use-default))) ) (set! sv-152 (compute-trail-scaled-t @@ -481,7 +530,7 @@ f28-0 f26-0 (-> this appearance uv-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) (when (or (< 1.0 sv-152) (< sv-152 0.0)) @@ -502,14 +551,14 @@ f28-0 f26-0 (-> this appearance color-repeat-dist) - (the-as vector (&+ s4-1 0)) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) ) ) - (curve-color-method-9 (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) 3) + (evaluate (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) (loop-behavior use-default)) ) ) (set! (-> sv-200 w) (* (-> sv-200 w) sv-192)) - (light-trail-method-18 this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) + (calc-vertex-pos! this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) (when (or (and (= (-> this appearance uv-mode) 3) (< sv-92 sv-152)) (and (!= (-> this appearance uv-mode) 3) (< sv-152 sv-92)) ) @@ -517,30 +566,34 @@ (set! (-> s2-0 3 z) (- sv-152)) (set! (-> s2-0 3 w) (- sv-92 (-> s2-0 3 z))) (set! (-> s2-0 4 x) (/ sv-92 (-> s2-0 3 w))) - (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ s4-1 0)) (-> s2-0 4 x)) + (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) (-> s2-0 4 x)) (rgbaf-lerp! (the-as rgbaf (-> s2-0 2)) sv-100 (the-as rgbaf sv-200) (-> s2-0 4 x)) (set! (-> s2-0 3 y) (lerp sv-96 sv-196 (-> s2-0 4 x))) (vector-lerp! (-> s2-0 1) sv-132 sv-204 (-> s2-0 4 x)) (set! (-> s2-0 3 x) (the-as float (rgba<-rgbaf (the-as rgba (-> s2-0 3 x)) (the-as rgbaf (-> s2-0 2))))) - (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 0.0) - (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 1.0) + (add-tri-pair-to-prim! this (-> s2-0 0) (the-as rgba (-> s2-0 3 x)) (-> s2-0 3 y) (-> s2-0 1) 0.0) + (add-tri-pair-to-prim! this (-> s2-0 0) (the-as rgba (-> s2-0 3 x)) (-> s2-0 3 y) (-> s2-0 1) 1.0) ) ) - (light-trail-method-17 + (add-tri-pair-to-prim! this - (the-as vector (&+ s4-1 0)) - (the-as float (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200))) + (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) + (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200)) sv-196 sv-204 sv-152 ) (when (> s3-1 0) (let ((v1-149 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ s3-1 -1))))) - (set! sv-88 (+ sv-88 (vector-vector-distance (the-as vector (&+ s4-1 0)) (the-as vector (&+ v1-149 0))))) + (set! sv-88 + (+ sv-88 + (vector-vector-distance (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) (the-as vector (&+ v1-149 0))) + ) + ) ) ) (set! sv-92 sv-152) - (set! (-> sv-104 quad) (-> (the-as vector (&+ s4-1 0)) quad)) + (set! (-> sv-104 quad) (-> (the-as vector (&+ (the-as (pointer uint8) s4-1) 0)) quad)) (set! sv-96 sv-196) (set! (-> sv-100 quad) (-> sv-200 quad)) (set! (-> sv-132 quad) (-> sv-204 quad)) @@ -554,23 +607,28 @@ ;; definition for method 19 of type light-trail ;; WARN: Return type mismatch int vs none. -(defmethod light-trail-method-19 ((this light-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this light-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." 0 (none) ) ;; definition for method 14 of type light-trail ;; WARN: Return type mismatch pointer vs none. -(defmethod light-trail-method-14 ((this light-trail)) +(defmethod expire-old-points! ((this light-trail)) + "Internal function to kill off points that are too old." (let ((s4-0 (new 'stack-no-clear 'light-trail-breadcrumb)) (s5-0 -1) ) (let ((s3-0 (-> this crumb-count))) (dotimes (s2-0 s3-0) - (let ((a1-0 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0))))) + (let ((a1-0 + (the-as light-trail-breadcrumb (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0)))) + ) + ) (cond - ((< (the-as uint (-> a1-0 3)) (-> this end-marker)) - (mem-copy! (the-as pointer s4-0) a1-0 16) + ((< (-> a1-0 birth-time) (-> this end-marker)) + (mem-copy! (the-as pointer s4-0) (the-as pointer a1-0) 16) (set! s5-0 s2-0) ) (else @@ -582,17 +640,19 @@ ) (label cfg-8) (when (>= s5-0 0) - (let ((s3-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1))))) - (s2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + (let ((s3-1 (the-as object (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1)))))) + (s2-1 + (the-as light-trail-breadcrumb (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + ) ) - (let* ((f0-1 (the float (- (-> this start-marker) (the-as uint (-> s3-1 3))))) - (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 pos w))))) + (let* ((f0-1 (the float (- (-> this start-marker) (-> (the-as light-trail-breadcrumb s3-1) birth-time)))) + (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 birth-time))))) (f30-0 (/ (- (the float (-> this appearance max-age)) f0-1) (- f1-1 f0-1))) ) - (light-trail-method-19 this f30-0 s5-0) - (vector-lerp! (the-as vector (&+ s2-1 0)) (the-as vector (&+ s3-1 0)) (-> s4-0 pos) f30-0) + (crumb-age-out-callback this f30-0 s5-0) + (vector-lerp! (-> s2-1 pos) (the-as vector (&+ (the-as (pointer uint8) s3-1) 0)) (-> s4-0 pos) f30-0) ) - (set! (-> s2-1 3) (the-as light-trail-breadcrumb (-> this end-marker))) + (set! (-> s2-1 birth-time) (-> this end-marker)) ) (when (> s5-0 0) (set! (-> this crumb-count) (- (-> this crumb-count) s5-0)) @@ -608,37 +668,36 @@ ) ;; definition for method 13 of type light-trail -(defmethod light-trail-method-13 ((this light-trail)) +(defmethod common-trans! ((this light-trail)) + "Call this on each frame to handle max-age." (with-pp (if (<= (-> this crumb-count) 0) (return 0) ) - (let ((v1-3 (-> this decision))) - (cond - ((= v1-3 2) - (return 0) - ) - ((zero? v1-3) - (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) - (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) - (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) - (set! (-> this end-marker) v1-8) - (light-trail-method-14 this) - ) + (case (-> this decision) + (((light-trail-decision reset)) + (return 0) + ) + (((light-trail-decision added)) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) + (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) + (set! (-> this end-marker) v1-8) + (expire-old-points! this) ) ) - ((= v1-3 1) - (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) - (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) - (reset-crumbs! this) - (set! (-> this end-marker) (-> this start-marker)) - ) - (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) - (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) + (((light-trail-decision not-added)) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) + (reset-crumbs! this) + (set! (-> this end-marker) (-> this start-marker)) ) - ) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) ) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) 0 ) ) @@ -654,8 +713,8 @@ ;; definition for function light-trail-tracker-common-post (defbehavior light-trail-tracker-common-post light-trail-tracker () (cond - ((light-trail-tracker-method-19 self) - (light-trail-method-12 (-> self trail)) + ((should-draw? self) + (build-prim-strip! (-> self trail)) ) (else (set! (-> self trail strip num-verts) (the-as uint 0)) @@ -676,26 +735,23 @@ (case (-> block param 0) (('add-crumb) (let ((a1-1 (handle->process (-> self tracked-object)))) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector)) - ) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector))) ) ) (('add-crumb-elapsed) (let ((a1-4 (handle->process (-> self tracked-object)))) - (light-trail-method-11 + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) (the-as time-frame (the int (the-as float (-> block param 1)))) ) ) ) (('add-crumb-pos) - (light-trail-tracker-method-20 self (the-as vector (-> block param 1))) + (add-crumb! self (the-as vector (-> block param 1))) ) (('replace-last-crumb) - (light-trail-method-21 (-> self trail) (the-as vector (-> block param 1))) + (replace-last-crumb! (-> self trail) (the-as vector (-> block param 1))) ) (('die) (go-virtual die) @@ -708,17 +764,14 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual die) ) (else - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) - ) + (if (should-track? self (the-as process-focusable gp-0)) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector))) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) 0 ) ) @@ -735,7 +788,7 @@ '() ) :trans (behavior () - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code (behavior () (until #f @@ -769,7 +822,7 @@ ;; definition for method 16 of type light-trail-tracker ;; INFO: Used lq/sq -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) (let ((a0-2 (if (type? arg0 process-focusable) arg0 ) @@ -783,13 +836,13 @@ ) ;; definition for method 17 of type light-trail-tracker -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker) (arg0 process-focusable)) #t ) ;; definition for method 16 of type light-trail-tracker-water ;; INFO: Used lq/sq -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) (let ((a0-2 (if (type? arg0 process-focusable) arg0 ) @@ -809,7 +862,7 @@ ;; definition for method 17 of type light-trail-tracker-water ;; WARN: Return type mismatch object vs symbol. -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-water) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-water) (arg0 process-focusable)) (the-as symbol (and *target* (or (logtest? (water-flag touch-water) (-> *target* water flags)) (logtest? (-> *target* control status) (collide-status on-water)) ) @@ -818,12 +871,12 @@ ) ;; definition for method 18 of type light-trail-tracker -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker) (arg0 process-focusable)) (not arg0) ) ;; definition for method 18 of type light-trail-tracker-water -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-water) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker-water) (arg0 process-focusable)) (let ((v1-0 (if (type? arg0 process-focusable) arg0 ) @@ -853,7 +906,7 @@ ) ;; definition for method 18 of type light-trail-tracker-projectile -(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-projectile) (arg0 process-focusable)) +(defmethod should-end? ((this light-trail-tracker-projectile) (arg0 process-focusable)) (if (not arg0) (set! (-> this tracked-object) (the-as handle #f)) ) @@ -862,7 +915,7 @@ ;; definition for method 16 of type light-trail-tracker-projectile ;; INFO: Used lq/sq -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) (let ((a0-1 arg0)) (if a0-1 (set! (-> arg1 quad) (-> a0-1 root trans quad)) @@ -881,13 +934,10 @@ (go-virtual hang-on) ) (else - (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) - (light-trail-tracker-method-20 - self - (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) - ) + (if (should-track? self (the-as process-focusable gp-0)) + (add-crumb! self (get-tracked-object-pos self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector))) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -906,7 +956,7 @@ (if (time-elapsed? (-> self state-time) (seconds 2)) (go-virtual die) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code sleep-code :post light-trail-tracker-common-post @@ -922,7 +972,7 @@ (if (time-elapsed? (-> self state-time) (seconds 2)) (go-virtual die) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) :code sleep-code :post light-trail-tracker-common-post @@ -942,7 +992,7 @@ (let ((a1-1 (-> block param 1)) (a2-1 (-> block param 2)) ) - (weapon-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + (add-crumb-with-offset (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) ) ) ) @@ -953,7 +1003,7 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual hang-on) ) (else @@ -969,10 +1019,10 @@ ) ) ) - (weapon-trail-method-22 (-> self trail) s5-0 a2-0) + (add-crumb-with-offset (-> self trail) s5-0 a2-0) ) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -987,7 +1037,7 @@ :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (case message (('reset) - (light-trail-method-10 (-> self trail)) + (reset! (-> self trail)) ) (('notice) (case (-> block param 0) @@ -998,7 +1048,7 @@ (let ((a1-1 (-> block param 0)) (a2-1 (-> block param 1)) ) - (tread-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + (add-crumb-with-offset (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) ) ) ) @@ -1009,7 +1059,7 @@ :trans (behavior () (let ((gp-0 (handle->process (-> self tracked-object)))) (cond - ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + ((should-end? self (the-as process-focusable gp-0)) (go-virtual die) ) (else @@ -1018,7 +1068,7 @@ (setup-dma-and-tex (-> self trail strip) a1-2) ) ) - (light-trail-method-13 (-> self trail)) + (common-trans! (-> self trail)) ) ) ) @@ -1030,13 +1080,14 @@ ;; definition for method 18 of type weapon-trail ;; INFO: Used lq/sq ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) (none) ) ;; definition for method 9 of type weapon-trail -(defmethod light-trail-method-9 ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this crumb-size) (the-as uint 32)) (call-parent-method this arg0 arg1) (none) @@ -1044,15 +1095,16 @@ ;; definition for method 22 of type weapon-trail ;; INFO: Used lq/sq -;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. -(defmethod weapon-trail-method-22 ((this weapon-trail) (arg0 vector) (arg1 vector)) +;; WARN: Return type mismatch (pointer uint8) vs light-trail-breadcrumb. +(defmethod add-crumb-with-offset ((this weapon-trail) (arg0 vector) (arg1 vector)) + "Given two points, add the first and offset to a crumb." (let ((gp-0 (new 'stack-no-clear 'vector)) (v1-0 (new 'stack-no-clear 'vector)) ) (vector-! gp-0 arg1 arg0) (vector-float*! gp-0 gp-0 0.5) (vector+! v1-0 arg0 gp-0) - (let ((v1-1 (light-trail-method-11 this v1-0 (seconds 10000)))) + (let ((v1-1 (add-crumb! this v1-0 (seconds 10000)))) (the-as light-trail-breadcrumb (when (!= v1-1 1) @@ -1076,7 +1128,7 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch object vs none. (defmethod weapon-trail-method-23 ((this weapon-trail) (arg0 vector) (arg1 vector)) - (local-vars (gp-0 (pointer light-trail-breadcrumb)) (f0-2 float)) + (local-vars (gp-0 weapon-trail-crumb) (f0-2 float)) (with-pp (let ((s4-0 (new 'stack-no-clear 'vector)) (s3-0 (new 'stack-no-clear 'vector)) @@ -1085,18 +1137,20 @@ 0.0 (cond ((zero? v1-0) - (weapon-trail-method-22 this arg0 arg1) + (add-crumb-with-offset this arg0 arg1) ) ((begin - (set! (-> this decision) (the-as uint 0)) - (set! gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + (set! (-> this decision) (light-trail-decision added)) + (set! gp-0 + (the-as weapon-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + ) (vector-! s4-0 arg1 arg0) (vector-float*! s4-0 s4-0 0.5) (vector+! s3-0 arg0 s4-0) - (set! f0-2 (vector-vector-distance (the-as vector (&+ gp-0 0)) s3-0)) + (set! f0-2 (vector-vector-distance (-> gp-0 pos) s3-0)) (< f0-2 40.96) ) - (set! (-> this decision) (the-as uint 1)) + (set! (-> this decision) (light-trail-decision not-added)) ) (else (+! (-> this total-distance-traveled) f0-2) @@ -1107,11 +1161,11 @@ (if (-> this appearance use-tape-mode?) (set! f0-6 (- f2-0 f1-2)) ) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> s3-0 quad)) - (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 16)) pos quad) (-> s4-0 quad)) - (set! (-> gp-0 3) + (set! (-> gp-0 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 offset quad) (-> s4-0 quad)) + (set! (-> gp-0 birth-time) (the-as - light-trail-breadcrumb + uint (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-6)) ) ) @@ -1125,7 +1179,8 @@ ;; definition for method 19 of type weapon-trail ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-19 ((this weapon-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this weapon-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) ) @@ -1136,7 +1191,8 @@ ;; definition for method 17 of type weapon-trail ;; INFO: Used lq/sq -(defmethod light-trail-method-17 ((this weapon-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) +(defmethod add-tri-pair-to-prim! ((this weapon-trail) (arg0 vector) (arg1 rgba) (arg2 float) (arg3 vector) (arg4 float)) + "Add two vertices to the prim strip to add two triangles" (when (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) (format 0 "Out of stuff (~d)~%" (-> this strip allocated-num-verts)) (return #f) @@ -1144,15 +1200,29 @@ (vector-float*! arg3 arg3 arg2) (let ((s2-0 (new 'stack-no-clear 'vector))) (set! (-> s2-0 quad) (-> arg3 quad)) - (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) arg1 arg4 0.0) - (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) arg1 arg4 1.0) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) + arg1 + arg4 + 0.0 + ) + (add-vert-to-prim-strip! + this + (-> this strip) + (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) + arg1 + arg4 + 1.0 + ) ) #f ) ;; definition for method 18 of type tread-trail ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-18 ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) +(defmethod calc-vertex-pos! ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) (let ((v1-0 (new 'stack-no-clear 'vector))) (cond ((> (the-as uint arg1) 0) @@ -1172,7 +1242,8 @@ ) ;; definition for method 9 of type tread-trail -(defmethod light-trail-method-9 ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) +(defmethod setup! ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) + "Initialize, including allocation of crumbs and strips on the process heap." (set! (-> this crumb-size) (the-as uint 32)) (call-parent-method this arg0 arg1) (none) @@ -1180,7 +1251,8 @@ ;; definition for method 19 of type tread-trail ;; WARN: Return type mismatch vector vs none. -(defmethod light-trail-method-19 ((this tread-trail) (arg0 float) (arg1 int)) +(defmethod crumb-age-out-callback ((this tread-trail) (arg0 float) (arg1 int)) + "To be implemented by the user to smoothly interpolate out non-default entries in their crumb type." (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) ) @@ -1191,78 +1263,73 @@ ;; definition for method 22 of type tread-trail ;; INFO: Used lq/sq -;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. -(defmethod tread-trail-method-22 ((this tread-trail) (arg0 vector) (arg1 vector)) - (let ((v1-1 (light-trail-method-11 this arg0 (seconds 10000)))) - (the-as - light-trail-breadcrumb - (when (!= v1-1 1) - (let ((v0-1 - (the-as - object - (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) +;; WARN: Return type mismatch (pointer uint8) vs none. +(defmethod add-crumb-with-offset ((this tread-trail) (arg0 vector) (arg1 vector)) + (let ((v1-1 (add-crumb! this arg0 (seconds 10000)))) + (if (!= v1-1 1) + (set! (-> (the-as + light-trail-breadcrumb + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + pos + quad ) - ) + (-> arg1 quad) ) - (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> arg1 quad)) - v0-1 - ) ) - ) ) + (none) ) ;; definition for method 23 of type tread-trail ;; INFO: Used lq/sq -;; WARN: Return type mismatch object vs light-trail-breadcrumb. +;; WARN: Return type mismatch object vs none. (defmethod tread-trail-method-23 ((this tread-trail) (arg0 vector) (arg1 vector)) (with-pp (let ((v1-0 (-> this crumb-count))) 0.0 - (the-as - light-trail-breadcrumb - (cond - ((zero? v1-0) - (tread-trail-method-22 this arg0 arg1) - ) - (else - (set! (-> this decision) (the-as uint 0)) - (let ((s5-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) - (let ((f0-1 (vector-vector-distance (the-as vector (&+ s5-0 0)) arg0))) - (+! (-> this total-distance-traveled) f0-1) - (if (< f0-1 40.96) - (set! (-> this decision) (the-as uint 1)) - ) + (cond + ((zero? v1-0) + (add-crumb-with-offset this arg0 arg1) + ) + (else + (set! (-> this decision) (light-trail-decision added)) + (let ((s5-0 + (the-as tread-trail-crumb (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + ) ) - (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) - (f2-0 (the float (-> this appearance max-age))) - (f0-4 0.0) - ) - (if (-> this appearance use-tape-mode?) - (set! f0-4 (- f2-0 f1-3)) - ) - (set! (-> (the-as light-trail-breadcrumb (&+ s5-0 0)) pos quad) (-> arg0 quad)) - (set! (-> s5-0 3) - (the-as - light-trail-breadcrumb - (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) - ) + (let ((f0-1 (vector-vector-distance (-> s5-0 pos) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (light-trail-decision not-added)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> s5-0 pos quad) (-> arg0 quad)) + (set! (-> s5-0 birth-time) + (the-as + uint + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) ) - ) - (let ((v0-0 (the-as object (&+ s5-0 16)))) - (set! (-> (the-as light-trail-breadcrumb v0-0) pos quad) (-> arg1 quad)) - v0-0 - ) + ) ) + (set! (-> s5-0 normal quad) (-> arg1 quad)) ) ) ) ) + (none) ) ) ;; definition for method 19 of type light-trail-tracker -(defmethod light-trail-tracker-method-19 ((this light-trail-tracker)) +(defmethod should-draw? ((this light-trail-tracker)) (let ((a1-0 (handle->process (-> this tracked-object)))) #t (let ((v1-4 #t)) @@ -1318,10 +1385,10 @@ ;; definition for method 20 of type light-trail-tracker ;; WARN: Return type mismatch uint vs none. -(defmethod light-trail-tracker-method-20 ((this light-trail-tracker) (arg0 vector)) +(defmethod add-crumb! ((this light-trail-tracker) (arg0 vector)) (if (zero? (mod (-> this last-add-frame-val) (-> this trail appearance frame-stagger))) - (light-trail-method-11 (-> this trail) arg0 (seconds 10000)) - (light-trail-method-21 (-> this trail) arg0) + (add-crumb! (-> this trail) arg0 (seconds 10000)) + (replace-last-crumb! (-> this trail) arg0) ) (+! (-> this last-add-frame-val) 1) (none) diff --git a/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc index 56eb885528..dab5be3959 100644 --- a/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc @@ -291,10 +291,10 @@ (momentum vector :inline) ) (:methods - (calculate-wind! (_type_) none) - (verlet-particle-system-method-12 (_type_ float) none) - (verlet-particle-system-method-13 (_type_) none) - (verlet-particle-system-method-14 (_type_) none) + (accumulate-external-forces! (_type_) none) + (compute-verlet-step (_type_ float) none) + (run-one-iteration (_type_) none) + (reset! (_type_) none) (debug-draw (_type_) none) ) ) @@ -388,9 +388,9 @@ (:methods (initialize-cloth-system! (_type_ cloth-params) none) (debug-draw-spheres (_type_) none) - (cloth-system-method-18 (_type_) int) - (cloth-system-method-19 (_type_) none) - (cloth-system-method-20 (_type_) none) + (post-physics-update (_type_) int) + (enforce-constraints-1 (_type_) none) + (enforce-constraints-2 (_type_) none) (cloth-system-method-21 (_type_) none) (cloth-system-method-22 (_type_) none) (cloth-system-method-23 (_type_) none) @@ -404,9 +404,9 @@ (cloth-system-method-31 (_type_ current-position-info) none) (cloth-system-method-32 (_type_ vector int int current-position-info) none) (cloth-system-method-33 (_type_ vu-lights) none) - (cloth-system-method-34 (_type_) none) - (cloth-system-method-35 (_type_) none) - (cloth-system-method-36 (_type_) none) + (hide! (_type_) none) + (reset-locations (_type_) none) + (pre-physics-update (_type_) none) (cloth-system-cmd-handler (_type_ pair) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc b/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc new file mode 100644 index 0000000000..483b87b021 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc @@ -0,0 +1,2284 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 7 of type verlet-particle-system +(defmethod relocate ((this verlet-particle-system) (offset int)) + (if (nonzero? (-> this particles)) + (&+! (-> this particles) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 8 of type art-cloth-geo +(defmethod mem-usage ((this art-cloth-geo) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 77 (-> usage length))) + (set! (-> usage data 76 name) "art-cloth-geo") + (+! (-> usage data 76 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 76 used) v1-6) + (+! (-> usage data 76 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +;; definition for method 5 of type art-cloth-geo +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this art-cloth-geo)) + (the-as int (+ (-> this type size) + (* (-> this length) 32) + (asize-of (-> this sphere-transforms)) + (asize-of (-> this disc-transforms)) + (asize-of (-> this anchor-transforms)) + ) + ) + ) + +;; definition for method 14 of type verlet-particle-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod reset! ((this verlet-particle-system)) + "Reset to stationary/default state." + (set! (-> this accum-force quad) (the-as uint128 0)) + (dotimes (v1-1 (-> this particles length)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 v1-1)))) + (-> this particles data v1-1 pos quad) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type cloth-system +(defmethod reset! ((this cloth-system)) + "Reset to stationary/default state." + (reset-locations this) + (when (> (-> this anchor-points length) 0) + (let ((v1-6 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> this anchor-points data)) + (the-as vector (-> this particles data (-> this anchor-points data 0 particle-index))) + ) + ) + ) + (dotimes (a0-4 (-> this particles length)) + (vector+! (the-as vector (-> this particles data a0-4)) (the-as vector (-> this particles data a0-4)) v1-6) + ) + ) + ) + (dotimes (s5-0 1) + (run-one-iteration this) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 36 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod pre-physics-update ((this cloth-system)) + "Callback to update prior to running verlet integration. Can handle movement of the entire system in the world, for example" + 0 + (none) + ) + +;; definition for method 36 of type cloth-on-skeleton +;; INFO: Used lq/sq +;; WARN: Return type mismatch cloth-flag vs none. +(defmethod pre-physics-update ((this cloth-on-skeleton)) + "Callback to update prior to running verlet integration. Can handle movement of the entire system in the world, for example" + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (handle->process (-> this owner))) + ) + (when s4-0 + (cond + ((< -1 (-> this base-transform-index)) + (let* ((v1-4 s5-0) + (a3-0 (-> (the-as process-focusable s4-0) node-list data (-> this base-transform-index) bone transform)) + (a0-8 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-4 rvec quad) a0-8) + (set! (-> v1-4 uvec quad) a1-3) + (set! (-> v1-4 fvec quad) a2-0) + (set! (-> v1-4 trans quad) a3-1) + ) + ) + (else + (quaternion->matrix s5-0 (-> (the-as process-focusable s4-0) root quat)) + (set! (-> s5-0 trans quad) (-> (the-as process-focusable s4-0) root trans quad)) + ) + ) + (vector-normalize! (-> s5-0 fvec) 1.0) + (vector-normalize! (-> s5-0 uvec) 1.0) + (vector-normalize! (-> s5-0 rvec) 1.0) + (vector-float*! (-> s5-0 trans) (-> s5-0 trans) (/ 1.0 (-> s5-0 trans w))) + (set! (-> s5-0 trans w) 1.0) + (when (logtest? (cloth-flag local-space local-space-xyz local-space-y) (-> this flags)) + (let ((s4-1 (matrix-identity! (new 'stack-no-clear 'matrix)))) + (if (logtest? (cloth-flag local-space-y) (-> this flags)) + (set! (-> s4-1 trans y) (- (-> s5-0 trans y) (-> this last-owner-mat trans y))) + (vector-! (-> s4-1 trans) (-> s5-0 trans) (-> this last-owner-mat trans)) + ) + (when (logtest? (cloth-flag local-space) (-> this flags)) + (let ((s3-0 (matrix-identity! (new 'stack-no-clear 'matrix)))) + (vector-float*! (-> s3-0 trans) (-> s5-0 trans) -1.0) + (matrix*! s4-1 s4-1 s3-0) + (matrix-4x4-inverse! s3-0 (-> this last-owner-mat)) + (matrix*! s3-0 s3-0 s5-0) + (set! (-> s3-0 trans quad) (the-as uint128 0)) + (set! (-> s3-0 trans w) 1.0) + (matrix*! s4-1 s4-1 s3-0) + (matrix-identity! s3-0) + (set! (-> s3-0 trans quad) (-> s5-0 trans quad)) + (matrix*! s4-1 s4-1 s3-0) + ) + ) + (dotimes (s3-1 (-> this particles length)) + (set! (-> this particles data s3-1 pos w) 1.0) + (vector-matrix*! + (the-as vector (-> this particles data s3-1)) + (the-as vector (-> this particles data s3-1)) + s4-1 + ) + (set! (-> this particles data s3-1 pos w) 1.0) + (set! (-> this particles data s3-1 prev-pos w) 1.0) + (vector-matrix*! + (the-as vector (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 s3-1))) + (the-as vector (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 s3-1))) + s4-1 + ) + (set! (-> this particles data s3-1 prev-pos w) 1.0) + ) + ) + ) + (let ((a2-7 (-> this last-owner-mat)) + (v1-54 (-> s5-0 rvec quad)) + (a0-42 (-> s5-0 uvec quad)) + (a1-23 (-> s5-0 fvec quad)) + (a3-2 (-> s5-0 trans quad)) + ) + (set! (-> a2-7 rvec quad) v1-54) + (set! (-> a2-7 uvec quad) a0-42) + (set! (-> a2-7 fvec quad) a1-23) + (set! (-> a2-7 trans quad) a3-2) + ) + (logclear! (-> this flags) (cloth-flag local-space local-space-xyz local-space-y)) + ) + ) + (none) + ) + +;; definition for method 14 of type cloth-on-skeleton +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod reset! ((this cloth-on-skeleton)) + "Reset to stationary/default state." + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (handle->process (-> this owner))) + ) + (when s4-0 + (cond + ((< -1 (-> this base-transform-index)) + (let* ((v1-5 s5-0) + (a3-0 (-> (the-as process-focusable s4-0) node-list data (-> this base-transform-index) bone transform)) + (a0-8 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-8) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + (else + (quaternion->matrix s5-0 (-> (the-as process-focusable s4-0) root quat)) + (set! (-> s5-0 trans quad) (-> (the-as process-focusable s4-0) root trans quad)) + ) + ) + (dotimes (s4-1 (-> this particles length)) + (vector-matrix*! (the-as vector (-> this particles data s4-1)) (the-as vector (-> this mesh mesh s4-1)) s5-0) + (vector-float*! + (the-as vector (-> this particles data s4-1)) + (the-as vector (-> this particles data s4-1)) + (/ 1.0 (-> this particles data s4-1 pos w)) + ) + (set! (-> this particles data s4-1 pos w) 1.0) + ) + (let ((v1-24 0) + (a0-24 (+ (-> this particles length) -1)) + ) + (while (>= a0-24 v1-24) + (+! v1-24 1) + ) + ) + (let ((a0-25 (-> s5-0 trans))) + (set! (-> this last-owner-pos quad) (-> a0-25 quad)) + ) + ) + ) + (set! (-> this accum-force quad) (the-as uint128 0)) + (dotimes (v1-29 (-> this particles length)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this particles data 0 prev-pos)) (* 48 v1-29)))) + (-> this particles data v1-29 pos quad) + ) + ) + (none) + ) + +;; definition for method 7 of type cloth-system +(defmethod relocate ((this cloth-system) (offset int)) + (if (nonzero? (-> this stick-constraints)) + (&+! (-> this stick-constraints) offset) + ) + (if (nonzero? (-> this disc-collision-constraints)) + (&+! (-> this disc-collision-constraints) offset) + ) + (if (nonzero? (-> this collision-constraints)) + (&+! (-> this collision-constraints) offset) + ) + (if (nonzero? (-> this anchor-points)) + (&+! (-> this anchor-points) offset) + ) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (if (nonzero? (-> this strip2)) + (&+! (-> this strip2) offset) + ) + (if (nonzero? (-> this strip3)) + (&+! (-> this strip3) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 7 of type cloth-on-skeleton +(defmethod relocate ((this cloth-on-skeleton) (offset int)) + (call-parent-method this offset) + ) + +;; definition for method 15 of type verlet-particle-system +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this verlet-particle-system)) + (dotimes (s5-0 (-> this particles length)) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 583) + ) + (format (clear *temp-string*) "~d" s5-0) + (s4-0 + s3-0 + (the-as bucket-id s2-0) + *temp-string* + (the-as vector (-> this particles data s5-0)) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this cloth-system)) + (dotimes (s5-0 (-> this particles length)) + (let* ((a0-1 (/ s5-0 (-> this cloth-width))) + (v1-2 (mod s5-0 (-> this cloth-width))) + (s1-0 (cond + ((not (logtest? a0-1 1)) + (if (or (< v1-2 (/ (-> this cloth-width) 4)) (>= v1-2 (/ (* 3 (-> this cloth-width)) 4))) + 3 + 4 + ) + ) + ((or (< v1-2 (/ (-> this cloth-width) 4)) (>= v1-2 (/ (* 3 (-> this cloth-width)) 4))) + 7 + ) + (else + 6 + ) + ) + ) + (s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 583) + ) + (format (clear *temp-string*) "~d" s5-0) + (s4-0 + s3-0 + (the-as bucket-id s2-0) + *temp-string* + (the-as vector (-> this particles data s5-0)) + (the-as font-color s1-0) + (the-as vector2h #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 16 of type cloth-system +;; INFO: Used lq/sq +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod initialize-cloth-system! ((this cloth-system) (arg0 cloth-params)) + "Set up this cloth system with the given [[cloth-params]]." + (local-vars (sv-16 int) (sv-20 int) (sv-24 int) (sv-28 int)) + (if (or (zero? (-> this mesh)) (< (-> this mesh length) 4)) + (go process-drawable-art-error "cloth-mesh (art-cloth-geo)") + ) + (set! (-> this params) arg0) + (set! (-> this cloth-width) (the-as int (-> arg0 cloth-width))) + (set! (-> this cloth-height) (/ (the-as int (-> this mesh length)) (-> this cloth-width))) + (set! (-> this drag) (-> arg0 drag)) + (set! (-> this collision-constraints) + (new 'process 'collision-sphere-array (the-as int (-> arg0 num-sphere-constraints))) + ) + (set! (-> this disc-collision-constraints) + (new 'process 'collision-disc-array (the-as int (-> arg0 num-disc-constraints))) + ) + (set! (-> this anchor-points) (new 'process 'anchor-point-array (the-as int (-> arg0 num-anchor-points)))) + (set! (-> this wind-constant) (-> arg0 wind-constant)) + (set! (-> this gravity-constant) (-> arg0 gravity-constant)) + (set! (-> this thickness-scalar) (-> arg0 cloth-thickness)) + (set! (-> this flags) (-> arg0 flags)) + (set! (-> this timestep-frequency) (-> arg0 timestep-frequency)) + (set! (-> this secret-disable) (-> arg0 secret-disable)) + (when (<= (-> this mesh cloth-thickness length) 0) + ) + (if (logtest? (-> this flags) (cloth-flag flip-normals)) + (set! (-> this face-normal-scalar) -1.0) + (set! (-> this face-normal-scalar) 1.0) + ) + (set! (-> this particles) (new 'process 'particle-array (* (-> this cloth-width) (-> this cloth-height)))) + (if (not (and (nonzero? (-> this collision-constraints)) (and (nonzero? (-> this disc-collision-constraints)) + (nonzero? (-> this anchor-points)) + (nonzero? (-> this particles)) + ) + ) + ) + (go process-drawable-art-error "cloth-memory") + ) + (dotimes (v1-38 (-> this particles length)) + (set! (-> this particles data v1-38 pos quad) (-> this mesh mesh v1-38 pt quad)) + (set! (-> this particles data v1-38 mass-scale) 1.0) + ) + (set! sv-16 (* (+ (-> this cloth-width) -1) (-> this cloth-height))) + (set! sv-20 (* (+ (-> this cloth-height) -1) (-> this cloth-width))) + (set! sv-24 (+ (* (+ (-> this cloth-width) -2) 2) 2)) + (let ((v1-52 (* sv-24 (+ (-> this cloth-height) -1))) + (s4-0 (* (+ (-> this cloth-width) -2) (-> this cloth-height))) + ) + (set! sv-28 (+ s4-0 (* (-> this cloth-width) (+ (-> this cloth-height) -2)))) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (+! s4-0 (* (-> this cloth-height) 2)) + (set! sv-28 (+ sv-28 (* (-> this cloth-height) 2))) + ) + (set! sv-28 (max 0 sv-28)) + (let ((s3-1 (max 0 v1-52))) + (set! (-> this num-xy-constraints) (+ sv-16 sv-20)) + (set! (-> this num-diagonal-constraints) s3-1) + (if (zero? (-> this stick-constraints)) + (set! (-> this stick-constraints) (new 'process 'stick-constraint-array (+ sv-16 sv-20 s3-1 sv-28))) + ) + (let ((v1-62 0)) + (dotimes (a0-37 (-> this cloth-height)) + (dotimes (a1-20 (+ (-> this cloth-width) -1)) + (let ((a2-11 (+ a1-20 (* a0-37 (-> this cloth-width)))) + (a3-2 (-> this stick-constraints data v1-62)) + ) + (set! (-> a3-2 particle0) (the-as uint a2-11)) + (set! (-> a3-2 particle1) (the-as uint (+ a2-11 1))) + ) + (+! v1-62 1) + ) + ) + ) + (let ((v1-65 sv-16)) + (dotimes (a0-38 (+ (-> this cloth-height) -1)) + (dotimes (a1-24 (-> this cloth-width)) + (let ((a2-18 (+ a1-24 (* a0-38 (-> this cloth-width)))) + (a3-5 (-> this stick-constraints data v1-65)) + ) + (set! (-> a3-5 particle0) (the-as uint a2-18)) + (set! (-> a3-5 particle1) (the-as uint (+ a2-18 (-> this cloth-width)))) + ) + (+! v1-65 1) + ) + ) + ) + (let ((v1-69 (+ sv-16 sv-20))) + (dotimes (a0-40 (+ (-> this cloth-height) -1)) + (dotimes (a1-29 (-> this cloth-width)) + (let ((a2-24 (+ a1-29 (* a0-40 (-> this cloth-width)))) + (a3-8 (-> this stick-constraints data v1-69)) + ) + (when (< a1-29 (+ (-> this cloth-width) -1)) + (set! (-> a3-8 particle0) (the-as uint a2-24)) + (set! (-> a3-8 particle1) (the-as uint (+ (-> this cloth-width) 1 a2-24))) + (+! v1-69 1) + (set! a3-8 (-> this stick-constraints data v1-69)) + ) + (when (> a1-29 0) + (set! (-> a3-8 particle0) (the-as uint a2-24)) + (set! (-> a3-8 particle1) (the-as uint (+ (-> this cloth-width) -1 a2-24))) + (+! v1-69 1) + (-> this stick-constraints data v1-69) + ) + ) + ) + ) + ) + (let ((v1-74 (+ sv-16 sv-20 s3-1))) + (dotimes (a0-42 (-> this cloth-height)) + (dotimes (a1-34 (+ (-> this cloth-width) -2)) + (let ((a2-31 (+ a1-34 (* a0-42 (-> this cloth-width)))) + (a3-14 (-> this stick-constraints data v1-74)) + ) + (set! (-> a3-14 particle0) (the-as uint a2-31)) + (set! (-> a3-14 particle1) (the-as uint (+ a2-31 2))) + ) + (+! v1-74 1) + ) + ) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (dotimes (a0-48 (-> this cloth-height)) + (let ((a1-40 (+ (* (+ a0-48 1) (-> this cloth-width)) -3)) + (a2-38 (* a0-48 (-> this cloth-width))) + (a3-17 (-> this stick-constraints data v1-74)) + ) + (set! (-> a3-17 particle0) (the-as uint a1-40)) + (set! (-> a3-17 particle1) (the-as uint a2-38)) + ) + (let ((v1-75 (+ v1-74 1))) + (-> this stick-constraints data v1-75) + (let ((a1-46 (+ (* (+ a0-48 1) (-> this cloth-width)) -2)) + (a2-43 (+ (* a0-48 (-> this cloth-width)) 1)) + (a3-20 (-> this stick-constraints data v1-75)) + ) + (set! (-> a3-20 particle0) (the-as uint a1-46)) + (set! (-> a3-20 particle1) (the-as uint a2-43)) + ) + (set! v1-74 (+ v1-75 1)) + ) + (-> this stick-constraints data v1-74) + ) + ) + ) + (let ((v1-80 (+ sv-16 sv-20 s3-1 s4-0))) + (dotimes (a0-51 (+ (-> this cloth-height) -2)) + (dotimes (a1-51 (-> this cloth-width)) + (let ((a2-47 (+ a1-51 (* a0-51 (-> this cloth-width)))) + (a3-23 (-> this stick-constraints data v1-80)) + ) + (set! (-> a3-23 particle0) (the-as uint a2-47)) + (set! (-> a3-23 particle1) (the-as uint (+ a2-47 (* (-> this cloth-width) 2)))) + ) + (+! v1-80 1) + ) + ) + ) + ) + ) + (let ((s4-1 (* (if (logtest? (-> this flags) (cloth-flag double-sided)) + (+ (* (-> this cloth-width) 2) 1) + (+ (* 3 (+ (-> this cloth-width) -2)) 6) + ) + (+ (-> this cloth-height) -1) + ) + ) + ) + (if (zero? (-> this strip)) + (set! (-> this strip) + (new 'process 'prim-strip s4-1 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name)) + ) + ) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (when (zero? (-> this strip2)) + (set! (-> this strip2) + (new 'process 'prim-strip s4-1 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name2)) + ) + (set! (-> this strip2 num-verts) (the-as uint 0)) + 0 + ) + (when (zero? (-> this strip3)) + (let ((a2-53 (* (+ (* (-> this cloth-width) 2) (* (-> this cloth-height) 2)) 2))) + (set! (-> this strip3) + (new 'process 'prim-strip a2-53 (new 'static 'texture-id :index #x3 :page #x1) (-> arg0 tex-name3)) + ) + ) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + ) + ) + (set! (-> this strip num-verts) (the-as uint 0)) + 0 + (when (logtest? (-> this flags) (cloth-flag autogen-uvs)) + (dotimes (v1-115 (-> this particles length)) + (let ((a1-59 (mod v1-115 (-> this cloth-width))) + (a0-63 (/ v1-115 (-> this cloth-width))) + ) + (set! (-> this mesh mesh v1-115 u) (/ (the float a1-59) (the float (+ (-> this cloth-width) -1)))) + (set! (-> this mesh mesh v1-115 v) (- 1.0 (/ (the float a0-63) (the float (+ (-> this cloth-height) -1))))) + ) + (set! (-> this mesh mesh v1-115 v) (fmax 0.0 (fmin 1.0 (-> this mesh mesh v1-115 v)))) + ) + (dotimes (v1-118 (-> this cloth-width)) + (+ (-> this cloth-height) -1) + (set! (-> this mesh mesh v1-118 v) 0.99) + ) + ) + (logior! (-> this flags) (cloth-flag need-reset need-setup)) + (logior! (-> this flags) (cloth-flag active inited)) + (set! (-> this reset-count) 1) + 0 + (none) + ) + +;; definition for method 10 of type cloth-on-skeleton +(defmethod setup-from-params! ((this cloth-on-skeleton) (arg0 cloth-params) (arg1 handle)) + (if (logtest? (-> this flags) (cloth-flag inited)) + (return 0) + ) + (set! (-> this owner) arg1) + (set! (-> this num-iterations) (-> arg0 num-iterations)) + (let ((s4-0 (handle->process (-> this owner)))) + (when (and s4-0 (< -1 (-> arg0 mesh))) + (set! (-> this mesh) + (the-as art-cloth-geo (-> (the-as process-focusable s4-0) draw art-group data (-> arg0 mesh))) + ) + (when (or (not (-> this mesh)) (!= (-> this mesh type) art-cloth-geo)) + (if (logtest? (-> arg0 flags) (cloth-flag suppress-mesh-failure)) + (return 0) + (go process-drawable-art-error "cloth-mesh (art-cloth-geo)") + ) + ) + (set! (-> this base-transform-index) (-> arg0 initial-xform)) + (set! (-> arg0 num-anchor-points) + (the-as uint (max (-> this mesh anchor-transforms length) (the-as int (-> arg0 num-anchor-points)))) + ) + (set! (-> arg0 num-sphere-constraints) + (the-as uint (max (-> this mesh sphere-transforms length) (the-as int (-> arg0 num-sphere-constraints)))) + ) + (set! (-> arg0 num-disc-constraints) + (the-as uint (max (-> this mesh disc-transforms length) (the-as int (-> arg0 num-disc-constraints)))) + ) + (set! (-> this ball-collision-radius) (-> arg0 ball-collision-radius)) + (set! (-> this ball-collision-radius) (-> this ball-collision-radius)) + (dotimes (s3-0 (-> this mesh anchor-transforms length)) + (let ((s2-0 (-> this mesh anchor-transforms data s3-0))) + (when (< (-> s2-0 joint) 0) + (let ((v1-47 + (the-as + joint + (get-art-by-name-method (-> (the-as process-focusable s4-0) draw jgeo) (-> s2-0 joint-name) (the-as type #f)) + ) + ) + ) + (set! (-> s2-0 joint) (if v1-47 + (+ (-> v1-47 number) 1) + 0 + ) + ) + ) + ) + ) + ) + (dotimes (s3-1 (-> this mesh sphere-transforms length)) + (let ((s2-1 (-> this mesh sphere-transforms data s3-1))) + (when (< (-> s2-1 joint) 0) + (let ((v1-61 + (the-as + joint + (get-art-by-name-method (-> (the-as process-focusable s4-0) draw jgeo) (-> s2-1 joint-name) (the-as type #f)) + ) + ) + ) + (set! (-> s2-1 joint) (if v1-61 + (+ (-> v1-61 number) 1) + 0 + ) + ) + ) + ) + ) + ) + (dotimes (s3-2 (-> this mesh disc-transforms length)) + (let ((s2-2 (-> this mesh disc-transforms data s3-2))) + (when (< (-> s2-2 joint) 0) + (let ((v1-76 (the-as joint (get-art-by-name-method + (-> (the-as process-focusable s4-0) draw jgeo) + (the-as string (-> s2-2 joint-name)) + (the-as type #f) + ) + ) + ) + ) + (set! (-> s2-2 joint) (if v1-76 + (+ (-> v1-76 number) 1) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + (initialize-cloth-system! this arg0) + 0 + ) + +;; definition for method 13 of type verlet-particle-system +;; WARN: Return type mismatch int vs none. +(defmethod run-one-iteration ((this verlet-particle-system)) + "Run one iteration of the system." + 0 + (none) + ) + +;; definition for method 9 of type verlet-particle-system +(defmethod update! ((this verlet-particle-system)) + (with-pp + (accumulate-external-forces! this) + (let ((v1-4 (- (current-time) (-> pp clock old-frame-counter)))) + (if (> (-> this timestep-frequency) 0) + (compute-verlet-step this (* 0.0033333334 (the float (-> this timestep-frequency)))) + (compute-verlet-step this (* 0.0033333334 (the float v1-4))) + ) + ) + 0 + ) + ) + +;; definition for method 9 of type cloth-system +(defmethod update! ((this cloth-system)) + (if (not (logtest? (-> this flags) (cloth-flag active))) + (return 0) + ) + (when (logtest? (-> this flags) (cloth-flag need-setup)) + (cond + ((or (> (-> this reset-count) 0) (logtest? (-> this flags) (cloth-flag no-draw))) + (reset! this) + (+! (-> this reset-count) -1) + (set! (-> this reset-count) (max 0 (-> this reset-count))) + ) + (else + (reset! this) + (logclear! (-> this flags) (cloth-flag need-setup)) + (dotimes (s5-0 (-> this stick-constraints length)) + (let ((s4-0 (-> this stick-constraints data s5-0))) + 0.0 + (let ((f0-1 (vector-vector-distance + (the-as vector (-> this particles data (-> s4-0 particle0))) + (the-as vector (-> this particles data (-> s4-0 particle1))) + ) + ) + ) + (set! (-> s4-0 one-over-two-times-constraint-length) (/ 1.0 (* 2.0 f0-1))) + (set! (-> s4-0 constraint-length-sqd) (* f0-1 f0-1)) + (set! (-> s4-0 constraint-length-half) (* 0.5 f0-1)) + ) + ) + ) + ) + ) + ) + (when (and (logtest? (-> this flags) (cloth-flag need-reset)) + (not (logtest? (-> this flags) (cloth-flag need-setup))) + ) + (reset! this) + (if (> (-> this reset-count) 0) + (+! (-> this reset-count) -1) + (logclear! (-> this flags) (cloth-flag need-reset)) + ) + ) + (pre-physics-update this) + (call-parent-method this) + (reset-locations this) + (let ((s5-1 (-> this num-iterations))) + (if (logtest? (cloth-flag riding) (-> this flags)) + (+! s5-1 1) + ) + (dotimes (s4-1 s5-1) + (run-one-iteration this) + ) + ) + (when (and (> (the-as uint (-> this secret-disable)) 0) + (> (the-as uint (logand (-> *game-info* secrets) (-> this secret-disable))) 0) + ) + (hide! this) + (return 0) + ) + (post-physics-update this) + 0 + ) + +;; definition for method 9 of type cloth-on-skeleton +;; INFO: Used lq/sq +(defmethod update! ((this cloth-on-skeleton)) + (if (not (logtest? (cloth-flag hidden) (-> this flags))) + (logclear! (-> this flags) (cloth-flag no-draw)) + ) + (when (and (handle->process (-> this owner)) (= (-> (handle->process (-> this owner)) type) target)) + (let* ((s5-0 (handle->process (-> this owner))) + (a0-16 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when (and a0-16 (focus-test? (the-as process-focusable a0-16) teleporting)) + (set! (-> this reset-count) 1) + (logior! (-> this flags) (cloth-flag need-reset no-draw)) + ) + ) + ) + (let ((s5-1 (handle->process (-> this owner)))) + (if (and s5-1 + (nonzero? (-> (the-as process-focusable s5-1) draw)) + (logtest? (-> (the-as process-focusable s5-1) draw status) + (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) + ) + ) + (logior! (-> this flags) (cloth-flag no-draw)) + ) + (when (and s5-1 (nonzero? (-> (the-as process-focusable s5-1) draw))) + (let ((s4-0 (-> (the-as process-focusable s5-1) draw))) + (setup-dma-and-tex (-> this strip) s4-0) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (setup-dma-and-tex (-> this strip2) s4-0) + (setup-dma-and-tex (-> this strip3) s4-0) + ) + ) + ) + (when (< -1 (-> this base-transform-index)) + (let ((s5-2 (-> (the-as process-focusable s5-1) node-list data 3 bone transform trans))) + (let ((f0-0 12288.0)) + (when (< (* f0-0 f0-0) (vector-vector-distance-squared (-> this last-owner-pos) s5-2)) + ) + ) + (set! (-> this last-owner-pos quad) (-> s5-2 quad)) + ) + ) + ) + (call-parent-method this) + ) + +;; definition for method 11 of type verlet-particle-system +;; WARN: Return type mismatch int vs none. +(defmethod accumulate-external-forces! ((this verlet-particle-system)) + "If this cloth system has the wind flag, calculate the wind force." + 0 + (none) + ) + +;; definition for method 34 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod hide! ((this cloth-system)) + (logior! (-> this flags) (cloth-flag no-draw hidden)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + (none) + ) + +;; definition for method 11 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod accumulate-external-forces! ((this cloth-system)) + "If this cloth system has the wind flag, calculate the wind force." + (if (not (logtest? (-> this flags) (cloth-flag no-gravity))) + (vector-float*! (-> this accum-force) (new 'static 'vector :y -1.0) (-> this gravity-constant)) + ) + (if (logtest? (-> this flags) (cloth-flag use-momentum)) + (vector+float*! (-> this accum-force) (-> this accum-force) (-> this momentum) 1.0) + ) + (when (logtest? (-> this flags) (cloth-flag use-wind)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (cond + ((-> *setting-control* user-current global-wind) + (vector-float*! s5-0 (the-as vector (-> *setting-control* user-current global-wind)) (-> this wind-constant)) + ) + (else + (let ((v1-17 s5-0) + (a1-1 (-> this particles data)) + ) + (vector-float*! + v1-17 + (-> *wind-work* + wind-array + (logand (+ (the int (-> a1-1 0 pos x)) (the int (-> a1-1 0 pos z)) (-> *wind-work* wind-time)) 63) + ) + (* 2048.0 (-> this wind-constant) (-> *setting-control* user-current ambient-wind-scalar)) + ) + ) + ) + ) + (let* ((f0-11 (vector-normalize-ret-len! s5-0 1.0)) + (f0-12 (fmin 163840.0 f0-11)) + ) + (vector+float*! (-> this accum-force) (-> this accum-force) s5-0 f0-12) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type verlet-particle-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod compute-verlet-step ((this verlet-particle-system) (arg0 float)) + (let ((f0-1 (* arg0 arg0)) + (f1-1 (-> this drag)) + ) + (dotimes (v1-0 (-> this particles length)) + (let ((a2-1 (-> this particles data v1-0)) + (a1-4 (new 'stack-no-clear 'vector)) + ) + (let ((a3-0 (-> this accum-force))) + (vector-float*! a1-4 (-> a2-1 pos) (- 2.0 f1-1)) + (vector-! a1-4 a1-4 (vector-float*! (new 'stack-no-clear 'vector) (-> a2-1 prev-pos) (- 1.0 f1-1))) + (vector+float*! a1-4 a1-4 a3-0 f0-1) + ) + (set! (-> a2-1 prev-pos quad) (-> a2-1 pos quad)) + (set! (-> a2-1 pos quad) (-> a1-4 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type cloth-system +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed load: (set! vf10 (l.vf (+ a2-8 32))) at op 59 +(defmethod enforce-constraints-1 ((this cloth-system)) + (local-vars (a1-8 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) 0.5) + (set! (-> v1-0 y) 0.5) + (set! (-> v1-0 z) 0.5) + (set! (-> v1-0 w) 0.5) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) 3.0) + (set! (-> a1-4 y) 3.0) + (set! (-> a1-4 z) 3.0) + (set! (-> a1-4 w) 3.0) + (.max.w.vf vf7 vf0 vf0) + (.lvf vf8 (&-> v1-0 quad)) + (.lvf vf12 (&-> a1-4 quad)) + ) + ) + (.sub.w.vf vf9 vf0 vf0) + (dotimes (v1-1 (-> this stick-constraints length)) + (let* ((a1-7 (-> this stick-constraints data v1-1)) + (a2-8 (-> this particles data (-> a1-7 particle0))) + (a3-5 (-> this particles data (-> a1-7 particle1))) + ) + (.lvf vf2 (&-> a2-8 pos quad)) + (.lvf vf3 (&-> a3-5 pos quad)) + (.lvf vf6 (&-> a1-7 vec quad)) + (.sub.vf vf4 vf3 vf2) + (.mul.vf vf5 vf4 vf4) + (.mul.z.vf acc vf7 vf5) + (.add.mul.y.vf acc vf7 vf5 acc) + (.add.mul.x.vf acc vf7 vf5 acc) + (.add.mul.z.vf vf5 vf7 vf6 acc) + (.mul.y.vf vf5 vf5 vf6) + (.div.vf Q vf6 vf5 :fsf #b0 :ftf #b0) + (.lvf vf10 (+ a2-8 32)) + (.lvf vf11 (+ a3-5 32)) + (.max.x.vf vf10 vf0 vf10 :mask #b111) + (.max.x.vf vf11 vf0 vf11 :mask #b111) + (.add.vf vf13 vf10 vf11) + (.sub.vf vf13 vf12 vf13) + (.mul.vf vf10 vf10 vf13) + (.mul.vf vf11 vf11 vf13) + (.wait.vf) + (.sub.vf vf5 vf8 Q) + (.mul.vf vf5 vf5 vf4) + (.mul.vf vf10 vf10 vf5) + (.add.vf vf2 vf2 vf10) + (.mul.vf vf11 vf11 vf5) + (.sub.vf vf3 vf3 vf11) + (.svf (&-> a2-8 pos quad) vf2) + (.svf (&-> a3-5 pos quad) vf3) + ) + (.mov a1-8 vf3) + ) + (none) + ) + ) + +;; definition for method 20 of type cloth-system +;; WARN: Return type mismatch symbol vs none. +(defmethod enforce-constraints-2 ((this cloth-system)) + (dotimes (v1-0 (-> this stick-constraints length)) + (let* ((t0-0 (-> this stick-constraints data v1-0)) + (a1-5 (-> this particles data (-> t0-0 particle0))) + (a2-6 (-> this particles data (-> t0-0 particle1))) + (f0-1 (* 2.0 (-> t0-0 constraint-length-half))) + (a3-4 (vector-! (new 'stack-no-clear 'vector) (-> a2-6 pos) (-> a1-5 pos))) + ) + 0.0 + (let ((f1-2 (* f0-1 f0-1))) + 0.0 + 0.0 + (let* ((f1-4 (/ (+ f1-2 (vector-dot a3-4 a3-4)) (* 2.0 f0-1))) + (f0-3 (/ (- f1-4 f0-1) f1-4)) + ) + (vector-float*! a3-4 a3-4 (* 0.5 f0-3)) + ) + ) + (let ((f1-6 1.0) + (f0-5 -1.0) + ) + (cond + ((< (-> t0-0 particle0) (the-as uint 7)) + (set! f1-6 (* 0.0 f1-6)) + (set! f0-5 (* 2.0 f0-5)) + ) + ((< (-> t0-0 particle1) (the-as uint 7)) + (set! f1-6 (* 2.0 f1-6)) + (set! f0-5 (* 0.0 f0-5)) + ) + ) + (vector+float*! (-> a1-5 pos) (-> a1-5 pos) a3-4 f1-6) + (vector+float*! (-> a2-6 pos) (-> a2-6 pos) a3-4 f0-5) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type cloth-system +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 21 cloth-system)" 21 cloth-system) + +;; definition for method 23 of type cloth-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod cloth-system-method-23 ((this cloth-system)) + (local-vars + (sv-32 int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 matrix) + (sv-68 verlet-particle) + (sv-72 verlet-particle) + (sv-76 verlet-particle) + (sv-80 verlet-particle) + (sv-144 vector) + (sv-148 vector) + (sv-152 float) + (sv-156 float) + (sv-160 vector) + (sv-164 float) + (sv-168 float) + (sv-208 vector) + (sv-212 float) + (sv-216 vector) + ) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 -1) + (set! sv-64 (new 'stack-no-clear 'matrix)) + (dotimes (s5-0 (+ (-> this cloth-height) -1)) + (dotimes (s4-0 (+ (-> this cloth-width) -1)) + (set! sv-68 (-> this particles data sv-32)) + (set! sv-72 (-> this particles data (+ sv-32 1))) + (set! sv-76 (-> this particles data (+ sv-32 (-> this cloth-width)))) + (set! sv-80 (-> this particles data (+ (-> this cloth-width) 1 sv-32))) + (set! sv-144 (vector-! (new 'stack-no-clear 'vector) (-> sv-80 pos) (-> sv-68 pos))) + (set! sv-148 (vector-! (new 'stack-no-clear 'vector) (-> sv-72 pos) (-> sv-76 pos))) + (set! sv-152 (the-as float 0.0)) + (set! sv-156 (the-as float 0.0)) + (set! sv-160 (new 'stack-no-clear 'vector)) + (set! sv-164 (the-as float 0.0)) + (vector-float*! sv-160 (-> sv-72 pos) (-> sv-72 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-68 pos) (-> sv-68 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-76 pos) (-> sv-76 mass-scale)) + (vector+float*! sv-160 sv-160 (-> sv-80 pos) (-> sv-80 mass-scale)) + (vector-float*! sv-160 sv-160 0.25) + (set! sv-40 0) + (set! sv-56 -1) + (set! (-> sv-64 rvec quad) (the-as uint128 0)) + (dotimes (s3-0 (-> this collision-constraints length)) + (when (!= s3-0 sv-56) + (let ((v1-39 (-> this collision-constraints data s3-0))) + (set! sv-164 (the-as float 204.8)) + (set! sv-168 (the-as float 0.0)) + (set! sv-168 (+ (-> v1-39 r) (the-as float sv-164))) + (set! sv-208 (vector-! (new 'stack-no-clear 'vector) sv-160 (the-as vector v1-39))) + ) + (set! sv-212 (the-as float 0.0)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-212 (vector-dot sv-208 sv-208)) + (when (< sv-212 (* sv-168 sv-168)) + (vector-normalize-copy! sv-216 sv-208 sv-168) + (vector-! sv-216 sv-216 sv-208) + (when (and (> sv-40 0) (< (vector-dot sv-216 (the-as vector sv-64)) 0.0)) + ) + (vector+float*! (-> sv-68 pos) (-> sv-68 pos) sv-216 (-> sv-68 mass-scale)) + (vector+float*! (-> sv-72 pos) (-> sv-72 pos) sv-216 (-> sv-72 mass-scale)) + (vector+float*! (-> sv-76 pos) (-> sv-76 pos) sv-216 (-> sv-76 mass-scale)) + (vector+float*! (-> sv-80 pos) (-> sv-80 pos) sv-216 (-> sv-80 mass-scale)) + (vector+! sv-160 sv-160 sv-216) + (set! sv-40 (+ sv-40 1)) + ) + ) + ) + (set! sv-32 (+ sv-32 1)) + ) + (set! sv-32 (+ sv-32 1)) + ) + (none) + ) + +;; definition for method 22 of type cloth-system +;; WARN: Return type mismatch symbol vs none. +(defmethod cloth-system-method-22 ((this cloth-system)) + (local-vars + (v1-25 float) + (v1-27 float) + (sv-16 sphere) + (sv-24 int) + (sv-32 verlet-particle) + (sv-36 verlet-particle) + (sv-40 verlet-particle) + (sv-44 verlet-particle) + (sv-96 vector) + (sv-100 vector) + (sv-104 float) + (sv-108 float) + (sv-112 vector) + (sv-116 float) + (sv-120 float) + (sv-160 float) + (sv-164 float) + (sv-168 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (dotimes (s5-0 (-> this collision-constraints length)) + (set! sv-16 (-> this collision-constraints data s5-0)) + (set! sv-24 0) + (dotimes (s4-0 (+ (-> this cloth-height) -1)) + (dotimes (s3-0 (+ (-> this cloth-width) -1)) + (set! sv-32 (-> this particles data sv-24)) + (set! sv-36 (-> this particles data (+ sv-24 1))) + (set! sv-40 (-> this particles data (+ sv-24 (-> this cloth-width)))) + (set! sv-44 (-> this particles data (+ (-> this cloth-width) 1 sv-24))) + (set! sv-96 (vector-! (new 'stack-no-clear 'vector) (-> sv-44 pos) (-> sv-32 pos))) + (set! sv-100 (vector-! (new 'stack-no-clear 'vector) (-> sv-36 pos) (-> sv-40 pos))) + (set! sv-104 (the-as float 0.0)) + (set! sv-108 (the-as float 0.0)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! sv-116 (the-as float 0.0)) + (.lvf vf1 (&-> sv-96 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-25 vf1) + (set! sv-104 v1-25) + (.lvf vf1 (&-> sv-100 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-27 vf1) + (set! sv-108 v1-27) + (if (< sv-108 sv-104) + (vector+float*! sv-112 (-> sv-32 pos) sv-96 0.5) + (vector+float*! sv-112 (-> sv-40 pos) sv-100 0.5) + ) + (set! sv-116 (the-as float 0.0)) + (set! sv-120 (the-as float 0.0)) + (set! sv-120 (-> sv-16 r)) + (set! sv-160 (the-as float (vector-! (new 'stack-no-clear 'vector) sv-112 (the-as vector sv-16)))) + (set! sv-164 (the-as float 0.0)) + (set! sv-168 (new 'stack-no-clear 'vector)) + (set! sv-164 (vector-dot (the-as vector sv-160) (the-as vector sv-160))) + (when (< sv-164 (* sv-120 sv-120)) + (vector-normalize-copy! sv-168 (the-as vector sv-160) sv-120) + (vector-! sv-168 sv-168 (the-as vector sv-160)) + (vector+! (-> sv-32 pos) (-> sv-32 pos) sv-168) + (vector+! (-> sv-36 pos) (-> sv-36 pos) sv-168) + (vector+! (-> sv-40 pos) (-> sv-40 pos) sv-168) + (vector+! (-> sv-44 pos) (-> sv-44 pos) sv-168) + ) + (set! sv-24 (+ sv-24 1)) + ) + (set! sv-24 (+ sv-24 1)) + ) + ) + (none) + ) + ) + +;; definition for method 13 of type cloth-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod run-one-iteration ((this cloth-system)) + "Run one iteration of the system." + (enforce-constraints-1 this) + (cloth-system-method-21 this) + (dotimes (v1-4 0) + (let* ((a0-6 (-> this disc-collision-constraints data v1-4)) + (a2-0 (-> a0-6 start-particle-index)) + (a3-0 (-> a0-6 end-particle-index)) + (a1-2 (max 0 (min a2-0 (+ (-> this particles length) -1)))) + ) + (if (< a3-0 0) + (set! a3-0 (+ (-> this particles length) -1)) + ) + (let ((a2-8 (max 0 (min a3-0 (+ (-> this particles length) -1))))) + (while (>= a2-8 a1-2) + (let ((a3-7 (-> this particles data a1-2 pos))) + 0.0 + (let ((t1-0 (new 'stack-no-clear 'vector)) + (t0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! t1-0 a3-7 (-> a0-6 origin)) + (let ((f0-2 (vector-dot t1-0 (-> a0-6 normal)))) + (when (< 0.0 f0-2) + (vector+float*! t0-7 a3-7 (-> a0-6 normal) (* -1.0 f0-2)) + (if (< (vector-length (vector-! (new 'stack-no-clear 'vector) t0-7 (-> a0-6 origin))) (-> a0-6 radius)) + (set! (-> a3-7 quad) (-> t0-7 quad)) + ) + ) + ) + ) + ) + (+! a1-2 1) + ) + ) + ) + ) + (dotimes (v1-7 (-> this anchor-points length)) + (set! (-> this particles data (-> this anchor-points data v1-7 particle-index) pos quad) + (-> this anchor-points data v1-7 anchor-pos quad) + ) + (set! (-> this particles data (-> this anchor-points data v1-7 particle-index) mass-scale) 0.0) + ) + (when (logtest? (-> this flags) (cloth-flag wraps)) + (dotimes (v1-13 (-> this cloth-height)) + (let ((a0-19 (-> this particles data (+ (* v1-13 (-> this cloth-width)) -1 (-> this cloth-width)))) + (a1-20 (the-as object (&-> (-> this particles) _data (* (* 48 (-> this cloth-width)) v1-13)))) + ) + (set! (-> a0-19 mass-scale) 0.0) + (set! (-> a0-19 pos quad) (-> (the-as vector (&-> (the-as vector a1-20) x)) quad)) + (set! (-> a0-19 prev-pos quad) (-> (the-as vector (&-> (the-as vector a1-20) x)) quad)) + ) + ) + ) + (when (logtest? (-> this flags) (cloth-flag check-ground)) + (dotimes (v1-19 (-> this particles length)) + (let ((a0-25 (-> this particles data v1-19))) + (set! (-> a0-25 pos y) (fmax (-> a0-25 pos y) (-> this ground-constraint))) + ) + ) + ) + 0 + (none) + ) + +;; definition for function get-neighboring-faces +(defun get-neighboring-faces ((arg0 vector4w) (arg1 int) (arg2 int) (arg3 int) (arg4 int)) + (let ((v0-0 0)) + (when (and (< arg2 (+ arg4 -1)) (< arg1 (+ arg3 -1))) + (set! (-> arg0 data v0-0) (+ (* arg2 (+ arg3 -1)) arg1)) + (+! v0-0 1) + ) + (when (and (> arg2 0) (< arg1 (+ arg3 -1))) + (set! (-> arg0 data v0-0) (+ (* (+ arg2 -1) (+ arg3 -1)) arg1)) + (+! v0-0 1) + ) + (when (and (> arg2 0) (> arg1 0)) + (set! (-> arg0 data v0-0) (+ arg1 -1 (* (+ arg2 -1) (+ arg3 -1)))) + (+! v0-0 1) + ) + (when (and (< arg2 (+ arg4 -1)) (> arg1 0)) + (set! (-> arg0 data v0-0) (+ arg1 -1 (* arg2 (+ arg3 -1)))) + (+! v0-0 1) + ) + v0-0 + ) + ) + +;; failed to figure out what this is: +(kmemopen global "cloth-buffers") + +;; definition for symbol *normal-array*, type (inline-array vector) +(define *normal-array* (the-as (inline-array vector) (malloc 'global 6400))) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for method 27 of type cloth-system +;; INFO: Used lq/sq +(defmethod cloth-system-method-27 ((this cloth-system) (arg0 vector) (arg1 int) (arg2 int) (arg3 current-position-info)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (new 'stack-no-clear 'vector4w))) + 0 + (let ((v1-1 (get-neighboring-faces s3-0 arg1 arg2 (-> this cloth-width) (-> this cloth-height)))) + (set! (-> arg0 quad) (the-as uint128 0)) + (dotimes (a0-3 v1-1) + (vector+! arg0 arg0 (-> *normal-array* (-> s3-0 data a0-3))) + ) + ) + ) + (let ((v1-4 arg0)) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-4 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-5 f0-0)) + (.mov vf3 a0-5) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> v1-4 quad) vf1) + ) + (if (-> arg3 face-normal-needs-flip?) + (vector-float*! arg0 arg0 -1.0) + ) + (vector-float*! arg0 arg0 (-> this face-normal-scalar)) + arg0 + ) + ) + +;; definition for function light-vertex +;; WARN: Return type mismatch int vs rgba. +(defun light-vertex ((arg0 current-position-info) (arg1 vector)) + (local-vars (v0-0 uint128) (v0-1 uint128) (v0-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg0 lights direction 0 quad)) + (.lvf vf2 (&-> arg0 lights direction 1 quad)) + (.lvf vf3 (&-> arg0 lights direction 2 quad)) + (.lvf vf4 (&-> arg0 lights color 0 quad)) + (.lvf vf5 (&-> arg0 lights color 1 quad)) + (.lvf vf6 (&-> arg0 lights color 2 quad)) + (.lvf vf7 (&-> arg0 lights ambient quad)) + (.lvf vf10 (&-> (-> arg0 scale) quad)) + (.lvf vf11 (&-> (-> arg0 clamp-col) quad)) + (.lvf vf8 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf8) + (.add.mul.y.vf acc vf2 vf8 acc) + (.add.mul.z.vf vf8 vf3 vf8 acc) + (.max.x.vf vf8 vf8 vf0) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf8 acc) + (.add.mul.y.vf acc vf5 vf8 acc) + (.add.mul.z.vf vf9 vf6 vf8 acc) + (.mul.x.vf vf9 vf9 vf10) + (.min.vf vf9 vf9 vf11) + (.ftoi.vf vf9 vf9) + (.mov v0-0 vf9) + (.ppach v0-1 (the-as uint128 0) v0-0) + (.ppacb v0-2 (the-as uint128 0) v0-1) + (the-as rgba v0-2) + ) + ) + +;; definition for method 28 of type cloth-system +;; INFO: Used lq/sq +(defmethod cloth-system-method-28 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info)) + (local-vars + (sv-16 verlet-particle) + (sv-80 vector) + (sv-84 vector) + (sv-88 vector) + (sv-92 symbol) + (sv-112 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-16 (-> this particles data (+ arg0 (* arg1 (-> this cloth-width))))) + (set! sv-80 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) + (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index0))) 32) + ) + ) + (the-as vector sv-16) + ) + ) + (set! sv-84 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) + (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index1))) 32) + ) + ) + (the-as vector sv-16) + ) + ) + (set! sv-88 (new 'stack-no-clear 'vector)) + (set! sv-92 (the-as symbol #f)) + (vector-cross! sv-88 sv-80 sv-84) + (let ((a0-10 (-> arg2 cross-index0))) + (set! (-> arg2 cross-index0) (-> arg2 cross-index1)) + (set! (-> arg2 cross-index1) a0-10) + ) + (let ((s2-0 sv-88) + (s0-0 sv-16) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-112 s1-0) + (let ((v0-0 (math-camera-pos))) + (.lvf vf4 (&-> s0-0 pos quad)) + (.lvf vf5 (&-> v0-0 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-112 quad) vf6) + (let ((v1-12 (< 0.0 (vector-dot s1-0 s2-0)))) + (when (!= v1-12 (-> arg2 face-normal-needs-flip?)) + (set! (-> arg2 face-normal-needs-flip?) (not (-> arg2 face-normal-needs-flip?))) + (cloth-system-method-30 + this + (the-as int (-> arg2 last-2-x-index)) + (the-as int (-> arg2 last-2-y-index)) + arg2 + 1 + ) + (cloth-system-method-30 this (the-as int (-> arg2 last-x-index)) (the-as int (-> arg2 last-y-index)) arg2 1) + ) + ) + ) + (cloth-system-method-30 this arg0 arg1 arg2 0) + (none) + ) + ) + +;; definition for method 31 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod cloth-system-method-31 ((this cloth-system) (arg0 current-position-info)) + (let ((a0-1 (-> arg0 last-normal)) + (s5-0 (+ (-> arg0 current-vert-index) -1)) + ) + (let ((v1-1 (-> arg0 backside-normal))) + (vector+float*! + (the-as vector (+ (the-as uint (-> this strip2 data 0 pos)) (* s5-0 32))) + (the-as vector (+ (the-as uint (-> this strip data 0 pos)) (* s5-0 32))) + a0-1 + (-> this thickness-scalar) + ) + (set! (-> this strip2 data s5-0 col) (light-vertex arg0 v1-1)) + ) + (set! (-> this strip2 data s5-0 stq x) (-> this strip data s5-0 stq x)) + (set! (-> this strip2 data s5-0 stq y) (-> this strip data s5-0 stq y)) + ) + 0 + (none) + ) + +;; definition for method 32 of type cloth-system +;; WARN: Return type mismatch vector vs none. +(defmethod cloth-system-method-32 ((this cloth-system) (arg0 vector) (arg1 int) (arg2 int) (arg3 current-position-info)) + (cond + ((> (-> this mesh cloth-thickness length) 0) + (let ((v1-5 (+ arg1 (* arg2 (-> this cloth-width))))) + 0.0 + (let ((f0-4 (* -1.0 + (-> this mesh thickness-scalar) + (-> this face-normal-scalar) + (the float (-> this mesh cloth-thickness data v1-5)) + ) + ) + ) + (vector-float*! (-> arg3 backside-normal) arg0 -1.0) + (vector-float*! arg0 arg0 f0-4) + ) + ) + ) + (else + (vector-float*! (-> arg3 backside-normal) arg0 -1.0) + (vector-float*! arg0 arg0 (* 204.8 + (/ (the float arg2) (the float (+ (-> this cloth-height) -1))) + (-> this thickness-scalar) + (-> this face-normal-scalar) + ) + ) + ) + ) + (none) + ) + +;; definition for method 30 of type cloth-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint vs none. +(defmethod cloth-system-method-30 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info) (arg3 int)) + (let ((s1-0 (+ arg0 (* arg1 (-> this cloth-width))))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> arg2 current-vert-index) 32))) + ) + (-> this particles data s1-0 pos quad) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq z) (the-as float arg3)) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (cloth-system-method-27 this s0-0 arg0 arg1 arg2) + (set! (-> this strip data (-> arg2 current-vert-index) col) (light-vertex arg2 s0-0)) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq x) (-> this mesh mesh s1-0 u)) + (set! (-> this strip data (-> arg2 current-vert-index) stq y) (-> this mesh mesh s1-0 v)) + ) + (when (zero? arg3) + (set! (-> arg2 last-2-x-index) (-> arg2 last-x-index)) + (set! (-> arg2 last-2-y-index) (-> arg2 last-y-index)) + (set! (-> arg2 last-x-index) (the-as uint arg0)) + (set! (-> arg2 last-y-index) (the-as uint arg1)) + ) + (+! (-> arg2 current-vert-index) 1) + (none) + ) + +;; definition for method 29 of type cloth-system +;; INFO: Used lq/sq +(defmethod cloth-system-method-29 ((this cloth-system) (arg0 int) (arg1 int) (arg2 current-position-info) (arg3 int)) + (let ((s2-0 (+ arg0 (* arg1 (-> this cloth-width))))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> arg2 current-vert-index) 32))) + ) + (-> this particles data s2-0 pos quad) + ) + (set! (-> this strip data (-> arg2 current-vert-index) stq z) (the-as float arg3)) + (let ((s1-0 (-> arg2 last-normal))) + (cloth-system-method-27 this s1-0 arg0 arg1 arg2) + (set! (-> this strip data (-> arg2 current-vert-index) col) (light-vertex arg2 s1-0)) + (set! (-> this strip data (-> arg2 current-vert-index) stq x) (-> this mesh mesh s2-0 u)) + (set! (-> this strip data (-> arg2 current-vert-index) stq y) (-> this mesh mesh s2-0 v)) + (cloth-system-method-32 this s1-0 arg0 arg1 arg2) + ) + ) + (let ((v0-3 (+ (-> arg2 current-vert-index) 1))) + (set! (-> arg2 current-vert-index) v0-3) + v0-3 + ) + ) + +;; definition for method 26 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod cloth-system-method-26 ((this cloth-system)) + (* (+ (-> this cloth-width) -1) (+ (-> this cloth-height) -1)) + (dotimes (v1-3 (+ (-> this cloth-height) -1)) + (dotimes (a1-2 (+ (-> this cloth-width) -1)) + (let* ((a2-0 a1-2) + (t1-0 (+ (* v1-3 (-> this cloth-width)) a2-0)) + (a2-1 (new 'stack-no-clear 'vector)) + (a3-2 (new 'stack-no-clear 'vector)) + (t0-4 (+ a1-2 (* v1-3 (+ (-> this cloth-width) -1)))) + ) + (vector-! + a2-1 + (the-as vector (-> this particles data t1-0)) + (the-as vector (-> this particles data (+ (-> this cloth-width) 1 t1-0))) + ) + (vector-! + a3-2 + (the-as vector (-> this particles data (+ t1-0 1))) + (the-as vector (-> this particles data (+ t1-0 (-> this cloth-width)))) + ) + (vector-cross! (-> *normal-array* t0-4) a2-1 a3-2) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type cloth-system +(defmethod cloth-system-method-33 ((this cloth-system) (lights vu-lights)) + (vu-lights<-light-group! lights (the-as light-group (-> *time-of-day-context* light-group))) + (none) + ) + +;; definition for method 33 of type cloth-on-skeleton +(defmethod cloth-system-method-33 ((this cloth-on-skeleton) (lights vu-lights)) + (let ((draw-ctrl (-> (the-as process-focusable (handle->process (-> this owner))) draw))) + (cond + ((logtest? (-> draw-ctrl global-effect) (draw-control-global-effect no-textures)) + (logclear! (-> this strip flags) (prim-flags texture-enable)) + (logclear! (-> this strip2 flags) (prim-flags texture-enable)) + (logclear! (-> this strip3 flags) (prim-flags texture-enable)) + ) + (else + (logior! (-> this strip flags) (prim-flags texture-enable)) + (logior! (-> this strip2 flags) (prim-flags texture-enable)) + (logior! (-> this strip3 flags) (prim-flags texture-enable)) + ) + ) + (calc-vu1-lights lights draw-ctrl #f) + ) + (none) + ) + +;; definition for method 25 of type cloth-system +;; INFO: Used lq/sq +(defmethod cloth-system-method-25 ((this cloth-system)) + (local-vars (v0-1 texture-id) (v0-4 texture-id) (a0-72 int) (a0-74 int) (sv-224 int)) + (cond + ((and (not (logtest? (cloth-flag using-alt-tex) (-> this flags))) + (and (>= (-> *game-info* skill-total) 600.0) (-> this params alt-tex-name)) + ) + (logior! (-> this flags) (cloth-flag using-alt-tex)) + (set! (-> this strip tex-id) (lookup-texture-id-by-name (-> this params alt-tex-name) (the-as string #f))) + (set! v0-1 + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 tex-id) (lookup-texture-id-by-name (-> this params alt-tex-name2) (the-as string #f))) + (set! v0-1 (lookup-texture-id-by-name (-> this params alt-tex-name3) (the-as string #f))) + (set! (-> this strip3 tex-id) v0-1) + v0-1 + ) + ) + ) + ((and (logtest? (cloth-flag using-alt-tex) (-> this flags)) (< (-> *game-info* skill-total) 600.0)) + (logclear! (-> this flags) (cloth-flag using-alt-tex)) + (set! (-> this strip tex-id) (lookup-texture-id-by-name (-> this params tex-name) (the-as string #f))) + (set! v0-4 + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 tex-id) (lookup-texture-id-by-name (-> this params tex-name2) (the-as string #f))) + (set! v0-4 (lookup-texture-id-by-name (-> this params tex-name3) (the-as string #f))) + (set! (-> this strip3 tex-id) v0-4) + v0-4 + ) + ) + ) + ) + (when (logtest? (-> this flags) (cloth-flag no-draw)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + (return 0) + ) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip3 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip3 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip alpha) (new 'static 'gs-alpha)) + (set! (-> this strip2 alpha) (-> this strip alpha)) + (set! (-> this strip3 alpha) (-> this strip alpha)) + (set! (-> this strip clamp) (new 'static 'gs-clamp)) + (set! (-> this strip2 clamp) (new 'static 'gs-clamp)) + (set! (-> this strip3 clamp) (new 'static 'gs-clamp)) + (logior! (-> this strip flags) (prim-flags fog-enable)) + (logior! (-> this strip2 flags) (prim-flags fog-enable)) + (logior! (-> this strip3 flags) (prim-flags fog-enable)) + (cloth-system-method-26 this) + (let ((s5-0 (new 'stack-no-clear 'current-position-info))) + (let ((s4-0 0) + (s3-0 1) + (s2-0 1) + (s1-0 -1) + ) + (set! (-> s5-0 current-vert-index) (the-as uint 0)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (cloth-system-method-33 this (-> s5-0 lights)) + (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) + (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) + (dotimes (s0-0 (+ (-> this cloth-height) -1)) + (set! sv-224 0) + (while (< sv-224 (-> this cloth-width)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (cloth-system-method-29 this s4-0 s3-0 s5-0 0) + (cloth-system-method-31 this s5-0) + (cloth-system-method-29 this s4-0 (+ s3-0 s1-0) s5-0 0) + (cloth-system-method-31 this s5-0) + (+! s4-0 s2-0) + (set! sv-224 (+ sv-224 1)) + ) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq quad) + (-> this strip data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip2 data (-> s5-0 current-vert-index) stq quad) + (-> this strip2 data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip2 data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (+! (-> s5-0 current-vert-index) 1) + (set! s2-0 (* -1 s2-0)) + (set! s1-0 (* -1 s1-0)) + (+! s4-0 s2-0) + (if (< s1-0 0) + (+! s3-0 2) + ) + ) + ) + (set! (-> this strip num-verts) (-> s5-0 current-vert-index)) + (set! (-> this strip2 num-verts) (-> s5-0 current-vert-index)) + ) + 0 + (let ((v1-110 0)) + (let ((a0-67 1)) + (dotimes (a1-27 (-> this cloth-width)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-67 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-67 stq quad)) + (let ((v1-111 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-111 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-67 32)))) + ) + (set! (-> this strip3 data v1-111 stq quad) (-> this strip2 data a0-67 stq quad)) + (set! v1-110 (+ v1-111 1)) + ) + (+! a0-67 2) + ) + ) + (let ((a0-71 (* (-> this cloth-width) 2))) + (dotimes (a1-28 (+ (-> this cloth-height) -1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-71 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-71 stq quad)) + (set! (-> this strip3 data v1-110 stq z) 0.0) + (let ((v1-112 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-112 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-71 32)))) + ) + (set! (-> this strip3 data v1-112 stq quad) (-> this strip2 data a0-71 stq quad)) + (set! (-> this strip3 data v1-112 stq z) 0.0) + (set! v1-110 (+ v1-112 1)) + ) + (if (= (logand a1-28 1) 1) + (+! a0-71 (* (-> this cloth-width) 4)) + (+! a0-71 2) + ) + ) + (let ((a1-31 -2)) + (cond + ((= (logand (-> this cloth-height) 1) 1) + (set! a0-72 (- a0-71 (* (-> this cloth-width) 4))) + (set! a1-31 (* -1 a1-31)) + ) + (else + (set! a0-72 (+ a0-71 a1-31 a1-31)) + ) + ) + (dotimes (a2-44 (-> this cloth-width)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-72 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-72 stq quad)) + (let ((v1-113 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-113 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-72 32)))) + ) + (set! (-> this strip3 data v1-113 stq quad) (-> this strip2 data a0-72 stq quad)) + (set! v1-110 (+ v1-113 1)) + ) + (+! a0-72 a1-31) + ) + ) + ) + (if (not (logtest? (-> this cloth-height) 1)) + (set! a0-74 (+ a0-72 2)) + (set! a0-74 (+ a0-72 -2 1)) + ) + (dotimes (a1-38 (+ (-> this cloth-height) -1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-110 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* a0-74 32)))) + ) + (set! (-> this strip3 data v1-110 stq quad) (-> this strip data a0-74 stq quad)) + (set! (-> this strip3 data v1-110 stq z) 0.0) + (let ((v1-114 (+ v1-110 1))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip3 data 0 pos)) (* v1-114 32)))) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip2 data 0 pos)) (* a0-74 32)))) + ) + (set! (-> this strip3 data v1-114 stq quad) (-> this strip2 data a0-74 stq quad)) + (set! (-> this strip3 data v1-114 stq z) 0.0) + (set! v1-110 (+ v1-114 1)) + ) + (if (not (logtest? (- (-> this cloth-height) (+ a1-38 1)) 1)) + (set! a0-74 (- a0-74 (* (-> this cloth-width) 4))) + (+! a0-74 -2) + ) + ) + (set! (-> this strip3 num-verts) (the-as uint v1-110)) + ) + 0 + ) + +;; definition for method 18 of type cloth-system +(defmethod post-physics-update ((this cloth-system)) + (when (logtest? (-> this flags) (cloth-flag no-draw)) + (set! (-> this strip num-verts) (the-as uint 0)) + (when (nonzero? (-> this strip2)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip3 num-verts) (the-as uint 0)) + 0 + ) + (return 0) + ) + (if (logtest? (-> this flags) (cloth-flag double-sided)) + (cloth-system-method-25 this) + (cloth-system-method-24 this) + ) + ) + +;; definition for method 18 of type cloth-on-skeleton +(defmethod post-physics-update ((this cloth-on-skeleton)) + (let ((a1-0 (handle->process (-> this owner)))) + (if (and a1-0 (logtest? (-> (the-as process-focusable a1-0) draw status) (draw-control-status on-screen))) + (call-parent-method this) + ) + ) + ) + +;; definition for method 24 of type cloth-system +;; INFO: Used lq/sq +(defmethod cloth-system-method-24 ((this cloth-system)) + (local-vars (sv-16 int) (sv-24 int) (sv-32 int) (sv-40 int)) + (cloth-system-method-26 this) + (set! sv-16 0) + (set! sv-24 1) + (set! sv-32 1) + (set! sv-40 -1) + (let ((s5-0 (new 'stack-no-clear 'current-position-info))) + (set! (-> s5-0 current-vert-index) (the-as uint 0)) + (set! (-> s5-0 last-x-index) (the-as uint -1)) + (set! (-> s5-0 last-y-index) (the-as uint -1)) + (set! (-> s5-0 last-2-x-index) (the-as uint -1)) + (set! (-> s5-0 last-2-y-index) (the-as uint -1)) + (set! (-> s5-0 face-normal-needs-flip?) #f) + (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) + (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) + (vu-lights<-light-group! (-> s5-0 lights) (the-as light-group (-> *time-of-day-context* light-group))) + (dotimes (s4-0 (+ (-> this cloth-height) -1)) + (let* ((a0-17 (+ sv-16 (/ (+ sv-32 -1) 2) (* (+ sv-24 (/ (+ sv-40 -1) 2)) (+ (-> this cloth-width) -1)))) + (s3-0 (-> *normal-array* a0-17)) + (s1-0 (-> this particles data (+ sv-16 (* sv-24 (-> this cloth-width))))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s2-0 (the-as vector s1-0) (math-camera-pos)) + (set! (-> s5-0 face-normal-needs-flip?) (< 0.0 (vector-dot s2-0 s3-0))) + ) + (cloth-system-method-30 this sv-16 sv-24 s5-0 0) + (cloth-system-method-30 this sv-16 (+ sv-24 sv-40) s5-0 0) + (set! (-> s5-0 cross-index0) 2) + (set! (-> s5-0 cross-index1) 1) + (set! sv-16 (+ sv-16 sv-32)) + (let ((s3-1 1) + (s2-1 (+ (-> this cloth-width) -1)) + ) + (while (>= s2-1 s3-1) + (cloth-system-method-28 this sv-16 sv-24 s5-0) + (cloth-system-method-28 this sv-16 (+ sv-24 sv-40) s5-0) + (set! sv-16 (+ sv-16 sv-32)) + (+! s3-1 1) + ) + ) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this strip data 0 pos)) (* (-> s5-0 current-vert-index) 32))) + ) + (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this strip data 0 pos)) (* (+ (-> s5-0 current-vert-index) -2) 32)) + ) + ) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq quad) + (-> this strip data (+ (-> s5-0 current-vert-index) -2) stq quad) + ) + (set! (-> this strip data (-> s5-0 current-vert-index) stq z) (the-as float #x1)) + (+! (-> s5-0 current-vert-index) 1) + (set! sv-32 (* -1 sv-32)) + (set! sv-40 (* -1 sv-40)) + (set! sv-16 (+ sv-16 sv-32)) + (if (< sv-40 0) + (set! sv-24 (+ sv-24 2)) + ) + ) + (set! (-> this strip num-verts) (-> s5-0 current-vert-index)) + ) + 0 + ) + +;; definition for method 35 of type cloth-on-skeleton +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod reset-locations ((this cloth-on-skeleton)) + (let ((s5-0 (handle->process (-> this owner)))) + (when (nonzero? (-> this mesh anchor-transforms)) + (dotimes (s4-0 (-> this mesh anchor-transforms length)) + (set! (-> this anchor-points data s4-0 particle-index) + (the-as uint (-> this mesh anchor-transforms data s4-0 constraint-index)) + ) + (cond + (s5-0 + (let ((a2-0 + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh anchor-transforms data s4-0 joint) + bone + transform + ) + ) + ) + (vector-matrix*! + (the-as vector (-> this anchor-points data s4-0)) + (the-as vector (-> this mesh anchor-transforms data s4-0)) + a2-0 + ) + ) + (vector-float*! + (the-as vector (-> this anchor-points data s4-0)) + (the-as vector (-> this anchor-points data s4-0)) + (/ 1.0 (-> this anchor-points data s4-0 anchor-pos w)) + ) + (set! (-> this anchor-points data s4-0 anchor-pos w) 1.0) + ) + (else + (set! (-> this anchor-points data s4-0 anchor-pos quad) + (-> this mesh anchor-transforms data s4-0 offset quad) + ) + ) + ) + ) + ) + (when (nonzero? (-> this mesh sphere-transforms)) + (dotimes (s4-1 (-> this mesh sphere-transforms length)) + (cond + (s5-0 + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this collision-constraints data s4-1 quad)) + (set! (-> s3-0 w) 1.0) + (vector-matrix*! + s3-0 + (the-as vector (-> this mesh sphere-transforms data s4-1)) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh sphere-transforms data s4-1 joint) + bone + transform + ) + ) + (vector-float*! s3-0 s3-0 (/ 1.0 (-> s3-0 w))) + (set! (-> this collision-constraints data s4-1 x) (-> s3-0 x)) + (set! (-> this collision-constraints data s4-1 y) (-> s3-0 y)) + (set! (-> this collision-constraints data s4-1 z) (-> s3-0 z)) + ) + ) + (else + (set! (-> this collision-constraints data s4-1 quad) (-> this mesh sphere-transforms data s4-1 offset quad)) + ) + ) + (set! (-> this collision-constraints data s4-1 r) (-> this mesh sphere-transforms data s4-1 radius)) + ) + ) + (when (nonzero? (-> this mesh disc-transforms)) + (dotimes (s4-2 (-> this mesh disc-transforms length)) + (cond + (s5-0 + (vector-matrix*! + (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) + (the-as vector (-> this mesh disc-transforms data s4-2)) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh disc-transforms data s4-2 joint) + bone + transform + ) + ) + (vector-rotate*! + (the-as vector (-> this disc-collision-constraints data s4-2)) + (the-as vector (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2))) + (-> (the-as process-focusable s5-0) + node-list + data + (-> this mesh disc-transforms data s4-2 joint) + bone + transform + ) + ) + ) + (else + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) + ) + (-> this mesh disc-transforms data s4-2 offset quad) + ) + (set! (-> this disc-collision-constraints data s4-2 normal quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2)))) + ) + ) + ) + (set! (-> this disc-collision-constraints data s4-2 radius) (-> this mesh disc-transforms data s4-2 radius)) + (set! (-> this disc-collision-constraints data s4-2 start-particle-index) + (-> this mesh disc-transforms data s4-2 start-particle-index) + ) + (set! (-> this disc-collision-constraints data s4-2 end-particle-index) + (-> this mesh disc-transforms data s4-2 end-particle-index) + ) + ) + ) + ) + (none) + ) + +;; definition for method 35 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod reset-locations ((this cloth-system)) + 0 + (none) + ) + +;; definition for symbol *once*, type symbol +(define *once* #f) + +;; definition for method 17 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-spheres ((this cloth-system)) + (dotimes (s5-0 (-> this collision-constraints length)) + (add-debug-sphere + #t + (bucket-id debug) + (-> this collision-constraints data s5-0) + (-> this collision-constraints data s5-0 r) + *color-cyan* + ) + (format *stdcon* "Transform ~d, size ~f~%" s5-0 (* 0.00024414062 (-> this collision-constraints data s5-0 r))) + ) + (dotimes (s5-1 (-> this disc-collision-constraints length)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s5-1))) + (-> this disc-collision-constraints data s5-1 radius) + *color-red* + ) + ) + 0 + (none) + ) + +;; definition for symbol *cloth-fade-alpha*, type gs-alpha +(define *cloth-fade-alpha* (new 'static 'gs-alpha :b #x1 :d #x1)) + +;; definition for method 25 of type cloth-on-skeleton +;; WARN: Return type mismatch symbol vs int. +(defmethod cloth-system-method-25 ((this cloth-on-skeleton)) + (call-parent-method this) + (let ((proc (handle->process (-> this owner)))) + (the-as int (when (and proc (nonzero? (-> (the-as process-drawable proc) draw))) + (let ((draw-ctrl (-> (the-as process-focusable proc) draw))) + (let ((fade (-> draw-ctrl force-fade))) + (when (logtest? (-> draw-ctrl status) (draw-control-status force-fade)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip alpha) *cloth-fade-alpha*) + (dotimes (a0-14 (the-as int (-> this strip num-verts))) + (set! (-> this strip data a0-14 col a) fade) + ) + (when (logtest? (-> this flags) (cloth-flag double-sided)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 alpha) *cloth-fade-alpha*) + (set! (-> this strip3 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip3 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> this strip3 alpha) *cloth-fade-alpha*) + (dotimes (a0-25 (the-as int (-> this strip2 num-verts))) + (set! (-> this strip2 data a0-25 col a) fade) + ) + (dotimes (a0-28 (the-as int (-> this strip3 num-verts))) + (set! (-> this strip3 data a0-28 col a) fade) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 11 of type cloth-on-skeleton +;; INFO: Used lq/sq +(defmethod accumulate-external-forces! ((this cloth-on-skeleton)) + "If this cloth system has the wind flag, calculate the wind force." + (when (logtest? (-> this flags) (cloth-flag use-parent-momentum)) + (let ((proc (handle->process (-> this owner)))) + (if proc + (set! (-> this momentum quad) (-> (the-as process-drawable proc) root transv quad)) + ) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for function symbol->cloth-flags +;; WARN: Return type mismatch int vs cloth-flag. +(defun symbol->cloth-flags ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as cloth-flag (cond + ((= v1-0 'local-space) + #x40000 + ) + ((= v1-0 'local-space-xyz) + #x80000 + ) + ((= v1-0 'local-space-y) + #x100000 + ) + ((= v1-0 'riding) + #x10000 + ) + (else + 0 + ) + ) + ) + ) + ) + +;; definition for method 37 of type cloth-system +;; WARN: Return type mismatch int vs none. +(defmethod cloth-system-cmd-handler ((this cloth-system) (command pair)) + (let ((msg (-> command car))) + (case msg + (('scene-reset-frame) + (if (logtest? (cloth-flag use-old-resets) (-> this flags)) + (logior! (-> this flags) (cloth-flag need-reset)) + (logior! (-> this flags) (cloth-flag local-space)) + ) + ) + (('set-flags 'clear-flags) + (let ((flags 0)) + (let* ((s3-0 (-> command cdr)) + (a0-9 (-> (the-as pair s3-0) car)) + ) + (while (not (null? s3-0)) + (set! flags (logior (the-as cloth-flag flags) (symbol->cloth-flags (the-as symbol a0-9)))) + (set! s3-0 (-> (the-as pair s3-0) cdr)) + (set! a0-9 (-> (the-as pair s3-0) car)) + ) + ) + (if (= msg 'set-flags) + (logior! (-> this flags) flags) + (logclear! (-> this flags) flags) + ) + ) + ) + (('hide) + (hide! this) + ) + (('show) + (logclear! (-> this flags) (cloth-flag hidden)) + ) + (('wind-strength) + (set! (-> this wind-constant) (command-get-float (-> (the-as pair (-> command cdr)) car) 0.0)) + ) + (('reset) + (logior! (-> this flags) (cloth-flag need-reset)) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc index 672c3536c3..a62b977e9d 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc @@ -378,7 +378,7 @@ (let ((proc (handle->process (-> gp-0 s4-0)))) (when proc (dotimes (i (-> (the-as process-drawable proc) draw cloth-instances length)) - (init! (-> (the-as process-drawable proc) draw cloth-instances i)) + (update! (-> (the-as process-drawable proc) draw cloth-instances i)) ) ) ) @@ -898,7 +898,7 @@ (set! (-> this draw cloth-instances length) (-> this draw cloth-instances allocated-length)) (dotimes (s4-4 (-> arg0 clothing length)) (set! (-> this draw cloth-instances s4-4) (new 'process 'cloth-on-skeleton)) - (cloth-base-method-10 (-> this draw cloth-instances s4-4) (-> arg0 clothing s4-4) (process->handle this)) + (setup-from-params! (-> this draw cloth-instances s4-4) (-> arg0 clothing s4-4) (process->handle this)) ) ) (logior! (-> this draw global-effect) (-> arg0 global-effects)) @@ -2312,7 +2312,7 @@ ) (dotimes (i (-> proc draw cloth-instances length)) (if (not arg1) - (cloth-system-method-34 (-> proc draw cloth-instances i)) + (hide! (-> proc draw cloth-instances i)) (logclear! (-> proc draw cloth-instances i flags) (cloth-flag hidden)) ) ) diff --git a/test/decompiler/reference/jak3/engine/scene/scene_REF.gc b/test/decompiler/reference/jak3/engine/scene/scene_REF.gc index c3a0065b18..b11968a00d 100644 --- a/test/decompiler/reference/jak3/engine/scene/scene_REF.gc +++ b/test/decompiler/reference/jak3/engine/scene/scene_REF.gc @@ -1707,16 +1707,13 @@ (the-as (function process-drawable symbol) (if (logtest? (-> self scene scene-flags) (scene-flags scf1)) - (lambda :behavior scene-player - () - (when (cpad-pressed? 0 triangle) - (set! (-> self aborted?) #t) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) - #t - ) - (none) - ) + (lambda :behavior scene-player () (when (cpad-pressed? 0 triangle) + (set! (-> self aborted?) #t) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + #t + ) + ) false-func ) ) @@ -2169,7 +2166,3 @@ ) this ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc index f0aa25f643..640356954b 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc @@ -351,7 +351,7 @@ ) ;; definition for method 17 of type light-trail-tracker-blue-3 -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-blue-3) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-blue-3) (arg0 process-focusable)) #f ) @@ -394,17 +394,15 @@ (set! (-> *blue-shot-trail* uv-repeat-dist) 163840.0) ;; failed to figure out what this is: -(set! (-> *blue-shot-trail* lie-mode) (the-as uint 0)) +(set! (-> *blue-shot-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *blue-shot-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *blue-shot-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *blue-shot-trail* tex-id) (the-as uint #x500f00)) + (set! (-> *blue-shot-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *blue-shot-trail* tex-id) (new 'static 'texture-id :index #xf :page #x5)) ) ;; failed to figure out what this is: @@ -464,7 +462,7 @@ (set! (-> s5-0 track-immediately?) #t) (let* ((v1-30 (estimate-light-trail-mem-usage (the-as uint (-> s5-0 max-num-crumbs)) - (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + (the-as uint (= (-> s5-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-0 (get-process *default-dead-pool* light-trail-tracker-blue-3 (+ v1-30 8192) 1)) @@ -1269,7 +1267,7 @@ ;; failed to figure out what this is: (when (or (zero? *uv-loop-curve*) (!= loading-level global)) (set! *uv-loop-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *uv-loop-curve* 2 'loading-level (the-as int #t)) + (allocate! *uv-loop-curve* 2 'loading-level #t) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc index 85869a70b3..3cc1d66c93 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc @@ -993,7 +993,7 @@ (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) 0.0 (let* ((f0-3 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this blur-time)))) - (f0-4 (curve2d-method-9 (-> this blur-curve) f0-3 3)) + (f0-4 (evaluate (-> this blur-curve) f0-3 (loop-behavior use-default))) (f0-5 (- 1.0 f0-4)) ) (blit-displays-work-method-17 @@ -1016,7 +1016,7 @@ 0.0 0.0 (let ((f0-4 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this flash-time))))) - (curve-color-method-9 (-> this fade-curve) f0-4 (the-as rgbaf gp-0) 3) + (evaluate (-> this fade-curve) f0-4 (the-as rgbaf gp-0) (loop-behavior use-default)) ) (set! (-> gp-0 x) (* 255.0 (-> gp-0 x))) (set! (-> gp-0 y) (* 255.0 (-> gp-0 y))) @@ -1462,8 +1462,8 @@ 0.0 0.0 (let ((f30-0 1.0) - (f28-0 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 3)) - (f26-1 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 3)) + (f28-0 (evaluate *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 (loop-behavior use-default))) + (f26-1 (evaluate *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 (loop-behavior use-default))) ) (when (time-elapsed? (-> self state-time) (seconds 5)) (let ((f30-1 (* 0.00066666666 (the float (+ (- (seconds -5) (-> self state-time)) (current-time)))))) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc index 004ac224f9..248a70bd77 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc @@ -867,7 +867,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *curve-linear-up-red*) (!= loading-level global)) (set! *curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -921,17 +921,15 @@ gun (set! (-> *red-shot-3-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *red-shot-3-trail* lie-mode) (the-as uint 0)) +(set! (-> *red-shot-3-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *red-shot-3-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *red-shot-3-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *red-shot-3-trail* tex-id) (the-as uint #x100300)) + (set! (-> *red-shot-3-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *red-shot-3-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -964,7 +962,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *curve-yellow2-shot-alpha*) (!= loading-level global)) (set! *curve-yellow2-shot-alpha* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-yellow2-shot-alpha* 21 'loading-level (the-as int #f)) + (allocate! *curve-yellow2-shot-alpha* 21 'loading-level #f) ) ;; failed to figure out what this is: @@ -1157,17 +1155,15 @@ gun (set! (-> *yellow-shot-2-trail* uv-repeat-dist) 20480.0) ;; failed to figure out what this is: -(set! (-> *yellow-shot-2-trail* lie-mode) (the-as uint 0)) +(set! (-> *yellow-shot-2-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *yellow-shot-2-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *yellow-shot-2-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *yellow-shot-2-trail* tex-id) (the-as uint #x501e00)) + (set! (-> *yellow-shot-2-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *yellow-shot-2-trail* tex-id) (new 'static 'texture-id :index #x1e :page #x5)) ) ;; failed to figure out what this is: @@ -4175,7 +4171,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-fade-curve*) (!= loading-level global)) (set! *gun-dark-3-nuke-fade-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve* 5 'loading-level (the-as uint #f)) + (allocate! *gun-dark-3-nuke-fade-curve* 5 'loading-level #f) ) ;; failed to figure out what this is: @@ -4262,7 +4258,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-blur-curve*) (!= loading-level global)) (set! *gun-dark-3-nuke-blur-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve* 4 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-blur-curve* 4 'loading-level #f) ) ;; failed to figure out what this is: @@ -4298,7 +4294,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-x*) (!= loading-level global)) (set! *gun-dark-3-nuke-mushroom-size-curve-x* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -4316,7 +4312,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-y*) (!= loading-level global)) (set! *gun-dark-3-nuke-mushroom-size-curve-y* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -4585,7 +4581,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-fade-curve-small*) (!= loading-level global)) (set! *gun-dark-3-nuke-fade-curve-small* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve-small* 5 'loading-level (the-as uint #f)) + (allocate! *gun-dark-3-nuke-fade-curve-small* 5 'loading-level #f) ) ;; failed to figure out what this is: @@ -4672,7 +4668,7 @@ gun ;; failed to figure out what this is: (when (or (zero? *gun-dark-3-nuke-blur-curve-small*) (!= loading-level global)) (set! *gun-dark-3-nuke-blur-curve-small* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve-small* 4 'loading-level (the-as int #f)) + (allocate! *gun-dark-3-nuke-blur-curve-small* 4 'loading-level #f) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc index 4a07ecf1f2..3106ae0591 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc @@ -187,7 +187,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-28 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-28 8192) 1)) @@ -1619,7 +1619,7 @@ ;; failed to figure out what this is: (when (or (zero? *impact-blur*) (!= loading-level global)) (set! *impact-blur* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *impact-blur* 3 'loading-level (the-as int #f)) + (allocate! *impact-blur* 3 'loading-level #f) ) ;; failed to figure out what this is: @@ -1643,7 +1643,7 @@ ;; failed to figure out what this is: (when (or (zero? *shockwave-blur-red-2*) (!= loading-level global)) (set! *shockwave-blur-red-2* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *shockwave-blur-red-2* 5 'loading-level (the-as int #f)) + (allocate! *shockwave-blur-red-2* 5 'loading-level #f) ) ;; failed to figure out what this is: @@ -1773,7 +1773,7 @@ (adjust-warp-radius-and-alpha self) (let ((f0-14 (-> self current-stage-t))) 0.0 - (let* ((f0-16 (- 1.0 (curve2d-method-9 *impact-blur* f0-14 3))) + (let* ((f0-16 (- 1.0 (evaluate *impact-blur* f0-14 (loop-behavior use-default)))) (f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength))))) ) (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f) @@ -2322,7 +2322,7 @@ (while (-> self child) (let ((f0-11 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) 0.0 - (let* ((f0-13 (- 1.0 (curve2d-method-9 *impact-blur* f0-11 1))) + (let* ((f0-13 (- 1.0 (evaluate *impact-blur* f0-11 (loop-behavior clamp)))) (f0-14 (lerp f0-13 1.0 f30-1)) ) (set! (-> *display* force-sync) (the-as uint 2)) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc index 7ce203e94e..13e4a0c579 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc @@ -1953,7 +1953,7 @@ (set! (-> s5-1 track-immediately?) #t) (let* ((v1-34 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (gp-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-34 8192) 1)) diff --git a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc index 5799093105..fddb65f23a 100644 --- a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc @@ -427,7 +427,7 @@ (case (-> self ext-geo) (((target-geo jakc)) (dotimes (s5-1 (-> gp-1 clothing length)) - (cloth-base-method-10 (-> self draw cloth-instances s5-1) (-> gp-1 clothing s5-1) (process->handle self)) + (setup-from-params! (-> self draw cloth-instances s5-1) (-> gp-1 clothing s5-1) (process->handle self)) (logior! (-> self draw cloth-instances s5-1 flags) (cloth-flag need-reset active)) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc index 70f3393bd0..4747b34745 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc @@ -1495,7 +1495,7 @@ ;; failed to figure out what this is: (when (or (zero? *grunt-jump-curve*) (!= loading-level global)) (set! *grunt-jump-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *grunt-jump-curve* 3 'loading-level (the-as int #t)) + (allocate! *grunt-jump-curve* 3 'loading-level #t) ) ;; failed to figure out what this is: @@ -1561,7 +1561,7 @@ ) (let ((f0-15 f30-0)) 0.0 - (let* ((f0-16 (curve2d-method-9 *grunt-jump-curve* f0-15 3)) + (let* ((f0-16 (evaluate *grunt-jump-curve* f0-15 (loop-behavior use-default))) (f0-17 (* f0-16 f0-16)) (f0-18 (lerp (-> this jump-height-percentage-start) (-> this jump-height-percentage-end) f0-17)) (f0-20 (- (* 2.0 f0-18) (* f0-18 f0-18))) @@ -1698,7 +1698,7 @@ ;; failed to figure out what this is: (when (or (zero? *grunt-dists*) (!= loading-level global)) (set! *grunt-dists* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *grunt-dists* 5 'loading-level (the-as int #t)) + (allocate! *grunt-dists* 5 'loading-level #t) ) ;; failed to figure out what this is: @@ -1799,7 +1799,7 @@ (vector-float*! gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) - (curve2d-method-9 *grunt-dists* f26-0 3) + (evaluate *grunt-dists* f26-0 (loop-behavior use-default)) ) (vector+float*! (-> self root trans) (-> self root trans) gp-0 1.0) ) @@ -1818,7 +1818,7 @@ (let* ((f26-1 (ja-frame-num 0)) (f0-27 (/ f26-1 (the float (ja-num-frames 0)))) (gp-1 (new-stack-vector0)) - (f28-2 (curve2d-method-9 *curve-linear-up-down* f0-27 3)) + (f28-2 (evaluate *curve-linear-up-down* f0-27 (loop-behavior use-default))) ) (vector-float*! gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) @@ -2105,7 +2105,7 @@ ) ) ) - (+! (-> self root trans y) (* 409.6 (curve2d-method-9 *grunt-idle-shift* f0-2 3))) + (+! (-> self root trans y) (* 409.6 (evaluate *grunt-idle-shift* f0-2 (loop-behavior use-default)))) ) ) :code (behavior ((arg0 symbol)) @@ -2194,7 +2194,7 @@ (let ((f28-1 (ja-frame-num 0))) (let* ((f0-15 (/ f28-1 (the float (ja-num-frames 0)))) (gp-1 (new-stack-vector0)) - (f26-0 (curve2d-method-9 *curve-linear-up-down* f0-15 3)) + (f26-0 (evaluate *curve-linear-up-down* f0-15 (loop-behavior use-default))) ) (vector-float*! gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) (vector+float*! gp-1 gp-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) -1228.8) diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc index b122ab3cc8..24a180069d 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc @@ -1515,7 +1515,7 @@ (let* ((f0-0 0.9) (f1-1 (* 0.0033333334 (the float (current-time)))) (f0-1 (/ (- f1-1 (* (the float (the int (/ f1-1 f0-0))) f0-0)) f0-0)) - (f0-2 (curve2d-method-9 *curve-linear-up-down* f0-1 3)) + (f0-2 (evaluate *curve-linear-up-down* f0-1 (loop-behavior use-default))) (f0-3 (sin (lerp -16384.0 16384.0 f0-2))) (f0-4 (+ 1.0 f0-3)) (f0-5 (* 0.5 f0-4)) @@ -2223,7 +2223,3 @@ :code sleep-code :post ja-post ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc index 5bab832cea..83b68e8a07 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc @@ -824,7 +824,7 @@ ;; failed to figure out what this is: (when (or (zero? *bt-height-adjust*) (!= loading-level global)) (set! *bt-height-adjust* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-height-adjust* 4 'loading-level (the-as int #t)) + (allocate! *bt-height-adjust* 4 'loading-level #t) ) ;; failed to figure out what this is: @@ -871,7 +871,7 @@ (set! f0-7 (* f0-7 f0-7)) ) ) - (let* ((f0-8 (curve2d-method-9 *bt-height-adjust* f0-7 3)) + (let* ((f0-8 (evaluate *bt-height-adjust* f0-7 (loop-behavior use-default))) (f0-9 (lerp (-> this start-path-height-offset) (-> this dest-path-height-offset) f0-8)) ) (set! (-> this path-height-vel) (* (- f0-9 (-> this path-height-offset)) (-> pp clock frames-per-second))) @@ -2162,7 +2162,7 @@ ;; failed to figure out what this is: (when (or (zero? *bt-clamp-curve-x*) (!= loading-level global)) (set! *bt-clamp-curve-x* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-clamp-curve-x* 7 'loading-level (the-as int #t)) + (allocate! *bt-clamp-curve-x* 7 'loading-level #t) ) ;; failed to figure out what this is: @@ -2210,7 +2210,7 @@ ;; failed to figure out what this is: (when (or (zero? *bt-accel-curve*) (!= loading-level global)) (set! *bt-accel-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *bt-accel-curve* 4 'loading-level (the-as int #t)) + (allocate! *bt-accel-curve* 4 'loading-level #t) ) ;; failed to figure out what this is: @@ -2352,8 +2352,12 @@ ) (set! (-> this y-boost-scalar) (fmax 0.0 (fmin 2.5 (-> this y-boost-scalar)))) (set! (-> this x-boost-scalar) (fmax 0.0 (fmin 2.5 (-> this x-boost-scalar)))) - (set! (-> this rotyv) (* (-> this rotyv) (curve2d-method-9 *bt-accel-curve* (-> this y-boost-scalar) 2))) - (set! (-> this rotxv) (* (-> this rotxv) (curve2d-method-9 *bt-accel-curve* (-> this x-boost-scalar) 2))) + (set! (-> this rotyv) + (* (-> this rotyv) (evaluate *bt-accel-curve* (-> this y-boost-scalar) (loop-behavior b2))) + ) + (set! (-> this rotxv) + (* (-> this rotxv) (evaluate *bt-accel-curve* (-> this x-boost-scalar) (loop-behavior b2))) + ) (set! (-> this rotxv) (* 0.8 (-> this rotxv))) (+! (-> this roty) (* (-> this rotyv) (seconds-per-frame))) (+! (-> this rotx) (* (-> this rotxv) (seconds-per-frame))) diff --git a/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc b/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc index d8d8adccfe..93e630762d 100644 --- a/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc @@ -12,7 +12,7 @@ ;; failed to figure out what this is: (when (or (zero? *hijack-suck-curve*) (!= loading-level global)) (set! *hijack-suck-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *hijack-suck-curve* 4 'loading-level (the-as int #t)) + (allocate! *hijack-suck-curve* 4 'loading-level #t) ) ;; failed to figure out what this is: @@ -46,7 +46,7 @@ (let* ((f1-0 (the float (-> *game-info* sub-task-list (game-task-node city-hijack-vehicle-escape) death-count))) (f0-2 (fmax 0.0 (fmin 15.0 f1-0))) ) - (set! f30-0 (curve2d-method-9 *hijack-suck-curve* f0-2 2)) + (set! f30-0 (evaluate *hijack-suck-curve* f0-2 (loop-behavior b2))) ) ) f30-0 diff --git a/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc b/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc index fa72d9efe8..d50e5f74e8 100644 --- a/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc @@ -3240,7 +3240,7 @@ (set! (-> this sprites 1 color w) 0) (let ((f0-11 (* 0.011111111 (the float (- (current-time) (-> this spike-time)))))) 0.0 - (let ((f0-12 (curve2d-method-9 *hud-boost-curve* f0-11 3))) + (let ((f0-12 (evaluate *hud-boost-curve* f0-11 (loop-behavior use-default)))) (set! (-> this tt-current) (lerp (-> this tt-prev) (-> this tt-next) f0-12)) ) ) @@ -3260,7 +3260,7 @@ (f0-23 (lerp 1.0 0.3 f28-2)) (f1-16 (* 0.0033333334 (the float (current-time)))) (f0-24 (/ (- f1-16 (* (the float (the int (/ f1-16 f0-23))) f0-23)) f0-23)) - (f1-18 (* f28-2 (curve2d-method-9 *curve-linear-up-down* f0-24 3))) + (f1-18 (* f28-2 (evaluate *curve-linear-up-down* f0-24 (loop-behavior use-default)))) (f28-3 (fmax 0.0 (fmin 1.0 f1-18))) ) (set! (-> this sprites 3 color x) (the int (lerp 128.0 192.0 f28-3))) diff --git a/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc b/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc index d4db65acf1..2014b4977b 100644 --- a/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc @@ -41,7 +41,7 @@ ;; failed to figure out what this is: (when (or (zero? *growing-curve-torpedo*) (!= loading-level global)) (set! *growing-curve-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *growing-curve-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *growing-curve-torpedo* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -59,7 +59,7 @@ ;; failed to figure out what this is: (when (or (zero? *water-simple-alpha-curve-fade-out-torpedo*) (!= loading-level global)) (set! *water-simple-alpha-curve-fade-out-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-fade-out-torpedo* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -77,7 +77,7 @@ ;; failed to figure out what this is: (when (or (zero? *color-curve-tan-brown-torpedo*) (!= loading-level global)) (set! *color-curve-tan-brown-torpedo* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *color-curve-tan-brown-torpedo* 2 'loading-level (the-as uint #f)) + (allocate! *color-curve-tan-brown-torpedo* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -113,7 +113,7 @@ ;; failed to figure out what this is: (when (or (zero? *water-simple-alpha-curve-in-torpedo*) (!= loading-level global)) (set! *water-simple-alpha-curve-in-torpedo* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *water-simple-alpha-curve-in-torpedo* 2 'loading-level (the-as int #f)) + (allocate! *water-simple-alpha-curve-in-torpedo* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -167,17 +167,15 @@ (set! (-> *torpedo-wake-trail* uv-repeat-dist) 81920.0) ;; failed to figure out what this is: -(set! (-> *torpedo-wake-trail* lie-mode) (the-as uint 1)) +(set! (-> *torpedo-wake-trail* lie-mode) (lie-mode appearance1)) ;; failed to figure out what this is: (set! (-> *torpedo-wake-trail* max-age) (seconds 0.3)) ;; failed to figure out what this is: (if #f - (set! (-> *torpedo-wake-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *torpedo-wake-trail* tex-id) (the-as uint #x500800)) + (set! (-> *torpedo-wake-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *torpedo-wake-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) ;; failed to figure out what this is: @@ -1622,7 +1620,7 @@ ) ;; definition for method 17 of type light-trail-tracker-torpedo -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-torpedo) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-torpedo) (arg0 process-focusable)) (let ((v1-0 arg0)) (and (-> (the-as htorpedo v1-0) on-water?) (< (-> v1-0 root trans y) 20480.0)) ) @@ -1630,7 +1628,7 @@ ;; definition for method 16 of type light-trail-tracker-torpedo ;; INFO: Used lq/sq -(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-torpedo) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this light-trail-tracker-torpedo) (arg0 process-focusable) (arg1 vector)) (let ((v1-0 arg0)) (when v1-0 (set! (-> arg1 quad) (-> v1-0 root trans quad)) @@ -1682,7 +1680,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-34 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-torpedo (+ v1-34 8192) 1)) @@ -2091,7 +2089,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc index 14bcb78648..6716b38faa 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc @@ -1753,17 +1753,15 @@ (set! (-> *assault-bombbot-trail* uv-repeat-dist) 4096000.0) ;; failed to figure out what this is: -(set! (-> *assault-bombbot-trail* lie-mode) (the-as uint 0)) +(set! (-> *assault-bombbot-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *assault-bombbot-trail* max-age) (seconds 0.1)) ;; failed to figure out what this is: (if #f - (set! (-> *assault-bombbot-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *assault-bombbot-trail* tex-id) (the-as uint #x100300)) + (set! (-> *assault-bombbot-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *assault-bombbot-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -1832,17 +1830,15 @@ (set! (-> *assault-bombbot-trail-2* uv-repeat-dist) 4096000.0) ;; failed to figure out what this is: -(set! (-> *assault-bombbot-trail-2* lie-mode) (the-as uint 0)) +(set! (-> *assault-bombbot-trail-2* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *assault-bombbot-trail-2* max-age) (seconds 0.1)) ;; failed to figure out what this is: (if #f - (set! (-> *assault-bombbot-trail-2* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *assault-bombbot-trail-2* tex-id) (the-as uint #x100300)) + (set! (-> *assault-bombbot-trail-2* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *assault-bombbot-trail-2* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -1970,7 +1966,7 @@ (set! (-> gp-0 track-immediately?) #t) (let* ((v1-11 (estimate-light-trail-mem-usage (the-as uint (-> gp-0 max-num-crumbs)) - (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + (the-as uint (= (-> gp-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-11 8192) 1)) @@ -1990,7 +1986,7 @@ (set! (-> gp-0 appearance) *assault-bombbot-trail-2*) (let* ((v1-20 (estimate-light-trail-mem-usage (the-as uint (-> gp-0 max-num-crumbs)) - (the-as uint (= (-> gp-0 appearance lie-mode) 3)) + (the-as uint (= (-> gp-0 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-20 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc index 8b80593d19..da907c0458 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc @@ -211,7 +211,7 @@ ;; failed to figure out what this is: (when (or (zero? *port-assault-blur-curve*) (!= loading-level global)) (set! *port-assault-blur-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *port-assault-blur-curve* 4 'loading-level (the-as int #t)) + (allocate! *port-assault-blur-curve* 4 'loading-level #t) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc index 8a5d811107..c3726fbe80 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc @@ -1481,7 +1481,7 @@ ;; failed to figure out what this is: (when (or (zero? *v-catapult-shot-impact-blur*) (!= loading-level global)) (set! *v-catapult-shot-impact-blur* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *v-catapult-shot-impact-blur* 3 'loading-level (the-as int #f)) + (allocate! *v-catapult-shot-impact-blur* 3 'loading-level #f) ) ;; failed to figure out what this is: @@ -2412,7 +2412,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc index 369ba80d89..60134e87d2 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc @@ -510,7 +510,7 @@ (set! (-> s5-1 track-immediately?) #t) (let* ((v1-28 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-28 8192) 1)) @@ -1178,7 +1178,3 @@ ) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc index c3d67716d5..572d4701a5 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc @@ -4,7 +4,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-beast-linear-up-red*) (!= loading-level global)) (set! *curve-beast-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-beast-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-beast-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -83,17 +83,15 @@ (set! (-> *beast-grenade-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *beast-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *beast-grenade-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *beast-grenade-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *beast-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *beast-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *beast-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *beast-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -1040,7 +1038,7 @@ (set! (-> s5-1 track-immediately?) #t) (let* ((v1-22 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-22 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc index 4901a3284d..f4d9be8ab0 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc @@ -24,7 +24,7 @@ ;; failed to figure out what this is: (when (or (zero? *mh-flyer-curve-linear-up-red*) (!= loading-level global)) (set! *mh-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *mh-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *mh-flyer-curve-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -103,17 +103,15 @@ (set! (-> *mh-flyer-missile-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *mh-flyer-missile-trail* lie-mode) (the-as uint 0)) +(set! (-> *mh-flyer-missile-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *mh-flyer-missile-trail* max-age) (seconds 1)) ;; failed to figure out what this is: (if #f - (set! (-> *mh-flyer-missile-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *mh-flyer-missile-trail* tex-id) (the-as uint #x100300)) + (set! (-> *mh-flyer-missile-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *mh-flyer-missile-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -541,7 +539,7 @@ (set! (-> s5-5 track-immediately?) #t) (let* ((v0-8 (estimate-light-trail-mem-usage (the-as uint (-> s5-5 max-num-crumbs)) - (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + (the-as uint (= (-> s5-5 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-8 8192) 1)) @@ -1601,7 +1599,3 @@ (mh-flyer-method-158 self) (go-virtual on-path) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/desert-rescue_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/desert-rescue_REF.gc index 91f755e56e..51374c488f 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/desert-rescue_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/desert-rescue_REF.gc @@ -1179,17 +1179,15 @@ (set! (-> *transport-tread-settings* uv-repeat-dist) 20480.0) ;; failed to figure out what this is: -(set! (-> *transport-tread-settings* lie-mode) (the-as uint 0)) +(set! (-> *transport-tread-settings* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *transport-tread-settings* max-age) (seconds 20)) ;; failed to figure out what this is: (if "tread-marks" - (set! (-> *transport-tread-settings* tex-id) - (the-as uint (lookup-texture-id-by-name "tread-marks" (the-as string #f))) - ) - (set! (-> *transport-tread-settings* tex-id) (the-as uint #x100300)) + (set! (-> *transport-tread-settings* tex-id) (lookup-texture-id-by-name "tread-marks" (the-as string #f))) + (set! (-> *transport-tread-settings* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -1330,14 +1328,12 @@ (vector+float*! s2-0 s2-0 (-> v1-4 fvec) -27852.8) (vector+float*! s3-0 s2-0 (-> v1-4 rvec) -14131.2) (vector+float*! s5-0 s2-0 (-> v1-4 rvec) 14131.2) - (set! (-> *transport-tread-settings* tex-id) - (the-as uint (lookup-texture-id-by-name "tread-marks" (the-as string #f))) - ) + (set! (-> *transport-tread-settings* tex-id) (lookup-texture-id-by-name "tread-marks" (the-as string #f))) (set! (-> s3-0 y) (probe-ground2 this s3-0 s4-0)) (+! (-> s3-0 y) 409.6) (let ((v1-11 (the-as tread-trail-tracker (handle->process (-> this tread1))))) (if (zero? (mod (-> this tread-last-spawn-index) (-> this tread-frequency))) - (tread-trail-method-22 (-> v1-11 trail) s3-0 s4-0) + (add-crumb-with-offset (-> v1-11 trail) s3-0 s4-0) (tread-trail-method-23 (-> v1-11 trail) s3-0 s4-0) ) ) @@ -1345,7 +1341,7 @@ (+! (-> s5-0 y) 409.6) (let ((v1-21 (the-as tread-trail-tracker (handle->process (-> this tread2))))) (if (zero? (mod (-> this tread-last-spawn-index) (-> this tread-frequency))) - (tread-trail-method-22 (-> v1-21 trail) s5-0 s4-0) + (add-crumb-with-offset (-> v1-21 trail) s5-0 s4-0) (tread-trail-method-23 (-> v1-21 trail) s5-0 s4-0) ) ) @@ -1559,7 +1555,7 @@ (let* ((v1-64 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-2 (get-process *default-dead-pool* tread-trail-tracker (+ v1-64 8192) 1)) @@ -1580,7 +1576,7 @@ (let* ((v1-73 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-3 (get-process *default-dead-pool* tread-trail-tracker (+ v1-73 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc index dad2245e1e..b451e98b80 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc @@ -85,10 +85,10 @@ (set! (-> sv-260 z) 1.0) (set! (-> sv-260 w) sv-128) (set! sv-256 (rgba<-rgbaf (the-as rgba sv-256) sv-260)) - (add-prim-vert this (-> this strip1) sv-240 (the-as rgba sv-256) 0.0 sv-132) - (add-prim-vert this (-> this strip1) sv-244 (the-as rgba sv-256) 1.0 sv-132) - (add-prim-vert this (-> this strip2) sv-248 (the-as rgba sv-256) 1.0 sv-132) - (add-prim-vert this (-> this strip2) sv-252 (the-as rgba sv-256) 0.0 sv-132) + (add-prim-vert this (-> this strip1) sv-240 sv-256 0.0 sv-132) + (add-prim-vert this (-> this strip1) sv-244 sv-256 1.0 sv-132) + (add-prim-vert this (-> this strip2) sv-248 sv-256 1.0 sv-132) + (add-prim-vert this (-> this strip2) sv-252 sv-256 0.0 sv-132) (+! f30-0 sv-136) ) ) @@ -328,7 +328,3 @@ ) #f ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc index c8d38a2d3f..4248482192 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc @@ -599,7 +599,7 @@ (let* ((v1-26 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-26 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc index ab5fb9fef5..0173be8c84 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc @@ -951,7 +951,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-toad-linear-up-red*) (!= loading-level global)) (set! *curve-toad-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-toad-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-toad-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -1030,17 +1030,15 @@ (set! (-> *toad-grenade-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *toad-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *toad-grenade-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *toad-grenade-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *toad-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *toad-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *toad-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *toad-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc index 2f61be87db..0da4978651 100644 --- a/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc @@ -78,7 +78,7 @@ ) ;; definition for method 17 of type light-trail-tracker-vehicle -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-vehicle) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-vehicle) (arg0 process-focusable)) #f ) @@ -121,17 +121,15 @@ (set! (-> *factory-fighter-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *factory-fighter-trail* lie-mode) (the-as uint 0)) +(set! (-> *factory-fighter-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *factory-fighter-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *factory-fighter-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *factory-fighter-trail* tex-id) (the-as uint #x100300)) + (set! (-> *factory-fighter-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *factory-fighter-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -1289,7 +1287,7 @@ (let* ((v1-38 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-vehicle (+ v1-38 8192) 1)) @@ -2063,7 +2061,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc index 13cc8fd6a8..de3575f3e5 100644 --- a/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc @@ -239,17 +239,15 @@ (set! (-> *eco-green-trail* uv-repeat-dist) 102399.99) ;; failed to figure out what this is: -(set! (-> *eco-green-trail* lie-mode) (the-as uint 3)) +(set! (-> *eco-green-trail* lie-mode) (lie-mode use-two-strips)) ;; failed to figure out what this is: (set! (-> *eco-green-trail* max-age) (seconds 2)) ;; failed to figure out what this is: (if #f - (set! (-> *eco-green-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *eco-green-trail* tex-id) (the-as uint #x500800)) + (set! (-> *eco-green-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *eco-green-trail* tex-id) (new 'static 'texture-id :index #x8 :page #x5)) ) ;; failed to figure out what this is: @@ -299,12 +297,12 @@ ;; definition for method 17 of type eco-green-trail-tracker ;; WARN: Return type mismatch object vs symbol. -(defmethod light-trail-tracker-method-17 ((this eco-green-trail-tracker) (arg0 process-focusable)) +(defmethod should-track? ((this eco-green-trail-tracker) (arg0 process-focusable)) (the-as symbol (and *target* (focus-test? *target* board) (< 0.0 (-> *target* fact eco-green)))) ) ;; definition for method 16 of type eco-green-trail-tracker -(defmethod light-trail-tracker-method-16 ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) +(defmethod get-tracked-object-pos ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) (if *target* (vector<-cspace! arg1 (-> *target* node-list data 37)) ) @@ -455,7 +453,7 @@ (let* ((v1-62 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* eco-green-trail-tracker (+ v1-62 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc index 9ef7318466..1e6b2fbb27 100644 --- a/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc +++ b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc @@ -4,7 +4,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-glider-ring-linear-up-red*) (!= loading-level global)) (set! *curve-glider-ring-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-glider-ring-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-glider-ring-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -83,17 +83,15 @@ (set! (-> *glider-ring-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *glider-ring-trail* lie-mode) (the-as uint 0)) +(set! (-> *glider-ring-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *glider-ring-trail* max-age) (seconds 1)) ;; failed to figure out what this is: (if #f - (set! (-> *glider-ring-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *glider-ring-trail* tex-id) (the-as uint #x100300)) + (set! (-> *glider-ring-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *glider-ring-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -142,7 +140,7 @@ ) ;; definition for method 17 of type light-trail-tracker-glider-ring -(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) +(defmethod should-track? ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) #f ) @@ -823,7 +821,7 @@ (let* ((v1-64 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-glider-ring (+ v1-64 8192) 1)) @@ -978,7 +976,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc index 255c65330c..2349de605e 100644 --- a/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc @@ -398,7 +398,7 @@ ;; failed to figure out what this is: (when (or (zero? *drill-loop-mid-curve*) (!= loading-level global)) (set! *drill-loop-mid-curve* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *drill-loop-mid-curve* 3 'loading-level (the-as int #t)) + (allocate! *drill-loop-mid-curve* 3 'loading-level #t) ) ;; failed to figure out what this is: @@ -431,7 +431,7 @@ (let ((f0-3 (* 0.07692308 (+ -15.0 f30-0)))) 0.0 0.0 - (let* ((f26-0 (curve2d-method-9 *drill-loop-mid-curve* f0-3 3)) + (let* ((f26-0 (evaluate *drill-loop-mid-curve* f0-3 (loop-behavior use-default))) (f28-0 (lerp -0.5 0.25 f26-0)) ) (sound-play-by-name @@ -459,7 +459,7 @@ (let ((f0-15 (* 0.055555556 (+ -28.0 f30-0)))) 0.0 0.0 - (let* ((f26-1 (curve2d-method-9 *drill-loop-mid-curve* f0-15 3)) + (let* ((f26-1 (evaluate *drill-loop-mid-curve* f0-15 (loop-behavior use-default))) (f28-1 (lerp -0.5 0.25 f26-1)) ) (sound-play-by-name diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc index 20453fba5a..54c5216697 100644 --- a/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc @@ -686,7 +686,7 @@ ;; failed to figure out what this is: (when (or (zero? *prebot-sword-color-curve*) (!= loading-level global)) (set! *prebot-sword-color-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *prebot-sword-color-curve* 2 'loading-level (the-as uint #t)) + (allocate! *prebot-sword-color-curve* 2 'loading-level #t) ) ;; failed to figure out what this is: @@ -722,7 +722,7 @@ ;; failed to figure out what this is: (when (or (zero? *prebot-sword-white-red-curve*) (!= loading-level global)) (set! *prebot-sword-white-red-curve* (new 'loading-level 'curve-color-piecewise)) - (curve-color-piecewise-method-10 *prebot-sword-white-red-curve* 3 'loading-level (the-as uint #t)) + (allocate! *prebot-sword-white-red-curve* 3 'loading-level #t) ) ;; failed to figure out what this is: @@ -819,7 +819,7 @@ (set! (-> *prebot-sword-color-array* uv-repeat-dist) 40960.0) ;; failed to figure out what this is: -(set! (-> *prebot-sword-color-array* lie-mode) (the-as uint 0)) +(set! (-> *prebot-sword-color-array* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *prebot-sword-color-array* max-age) (seconds 0.3)) @@ -827,9 +827,9 @@ ;; failed to figure out what this is: (if #f (set! (-> *prebot-sword-color-array* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (lookup-texture-id-by-name (the-as string #f) (the-as string #f)) ) - (set! (-> *prebot-sword-color-array* tex-id) (the-as uint #x100300)) + (set! (-> *prebot-sword-color-array* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -918,12 +918,10 @@ (set! (-> s5-1 joint0) 3) (set! (-> s5-1 joint1) 5) (set! (-> s5-1 appearance) *prebot-sword-color-array*) - (set! (-> *prebot-sword-color-array* tex-id) - (the-as uint (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) - ) + (set! (-> *prebot-sword-color-array* tex-id) (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) (let* ((v1-43 (estimate-light-trail-mem-usage (the-as uint (-> s5-1 max-num-crumbs)) - (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + (the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* weapon-trail-tracker (+ v1-43 8192) 1)) @@ -1345,7 +1343,3 @@ ) (prebot-go-next-stage) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc index 27c564eaba..a8ea293695 100644 --- a/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc @@ -334,17 +334,15 @@ (set! (-> *bb-timer-chase-trail* uv-repeat-dist) 163840.0) ;; failed to figure out what this is: -(set! (-> *bb-timer-chase-trail* lie-mode) (the-as uint 0)) +(set! (-> *bb-timer-chase-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *bb-timer-chase-trail* max-age) (seconds 4)) ;; failed to figure out what this is: (if #f - (set! (-> *bb-timer-chase-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *bb-timer-chase-trail* tex-id) (the-as uint #x100300)) + (set! (-> *bb-timer-chase-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *bb-timer-chase-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -463,12 +461,12 @@ ((-> self start-tracking?) (when (time-elapsed? (-> self time-offset) (seconds 0.05)) (set-time! (-> self time-offset)) - (when (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (when (should-track? self (the-as process-focusable gp-1)) (set! (-> self trail start-marker) (the-as uint 0)) (set! (-> self trail end-marker) (the-as uint 0)) - (light-trail-method-11 + (add-crumb! (-> self trail) - (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (get-tracked-object-pos self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) 0 ) ) @@ -493,7 +491,7 @@ ) ;; definition for method 19 of type timer-chase-trail -(defmethod light-trail-tracker-method-19 ((this timer-chase-trail)) +(defmethod should-draw? ((this timer-chase-trail)) #t ) @@ -508,13 +506,13 @@ (set! (-> gp-1 tracked-obj) (process->handle self)) (set! (-> gp-1 appearance) *bb-timer-chase-trail*) (set! (-> *bb-timer-chase-trail* tex-id) - (the-as uint (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f))) + (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f)) ) (set! (-> gp-1 max-num-crumbs) 500) (set! (-> gp-1 track-immediately?) #f) (let* ((v1-18 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-0 (get-process *default-dead-pool* timer-chase-trail (+ v1-18 8192) 1)) diff --git a/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc b/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc index f724eca064..fe99ce0a9c 100644 --- a/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc @@ -24,7 +24,7 @@ ;; failed to figure out what this is: (when (or (zero? *dm-flyer-curve-linear-up-red*) (!= loading-level global)) (set! *dm-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *dm-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *dm-flyer-curve-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -103,17 +103,15 @@ (set! (-> *dm-flyer-missile-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *dm-flyer-missile-trail* lie-mode) (the-as uint 0)) +(set! (-> *dm-flyer-missile-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *dm-flyer-missile-trail* max-age) (seconds 1)) ;; failed to figure out what this is: (if #f - (set! (-> *dm-flyer-missile-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *dm-flyer-missile-trail* tex-id) (the-as uint #x100300)) + (set! (-> *dm-flyer-missile-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *dm-flyer-missile-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -640,7 +638,7 @@ (set! (-> s5-5 track-immediately?) #t) (let* ((v0-12 (estimate-light-trail-mem-usage (the-as uint (-> s5-5 max-num-crumbs)) - (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + (the-as uint (= (-> s5-5 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-12 8192) 1)) @@ -682,7 +680,3 @@ (none) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc b/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc index ebc84c096d..5c40e5ffb8 100644 --- a/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc @@ -4,7 +4,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-maker-linear-up-red*) (!= loading-level global)) (set! *curve-maker-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-maker-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-maker-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -83,17 +83,15 @@ (set! (-> *maker-grenade-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *maker-grenade-trail* lie-mode) (the-as uint 0)) +(set! (-> *maker-grenade-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *maker-grenade-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *maker-grenade-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *maker-grenade-trail* tex-id) (the-as uint #x100300)) + (set! (-> *maker-grenade-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *maker-grenade-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -948,7 +946,7 @@ (set! (-> s5-2 track-immediately?) #t) (let* ((v1-32 (estimate-light-trail-mem-usage (the-as uint (-> s5-2 max-num-crumbs)) - (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + (the-as uint (= (-> s5-2 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-32 8192) 1)) @@ -967,7 +965,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc index 29dae7b7ca..3bbc7fc02d 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc @@ -445,7 +445,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-maker-entry-linear-up-red*) (!= loading-level global)) (set! *curve-maker-entry-linear-up-red* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-maker-entry-linear-up-red* 2 'loading-level (the-as int #f)) + (allocate! *curve-maker-entry-linear-up-red* 2 'loading-level #f) ) ;; failed to figure out what this is: @@ -524,17 +524,15 @@ (set! (-> *maker-entry-trail* uv-repeat-dist) 16384000.0) ;; failed to figure out what this is: -(set! (-> *maker-entry-trail* lie-mode) (the-as uint 0)) +(set! (-> *maker-entry-trail* lie-mode) (lie-mode appearance0)) ;; failed to figure out what this is: (set! (-> *maker-entry-trail* max-age) (seconds 0.5)) ;; failed to figure out what this is: (if #f - (set! (-> *maker-entry-trail* tex-id) - (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) - ) - (set! (-> *maker-entry-trail* tex-id) (the-as uint #x100300)) + (set! (-> *maker-entry-trail* tex-id) (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + (set! (-> *maker-entry-trail* tex-id) (new 'static 'texture-id :index #x3 :page #x1)) ) ;; failed to figure out what this is: @@ -2569,7 +2567,7 @@ (let* ((v1-104 (estimate-light-trail-mem-usage (the-as uint (-> gp-1 max-num-crumbs)) - (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + (the-as uint (= (-> gp-1 appearance lie-mode) (lie-mode use-two-strips))) ) ) (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-104 8192) 1)) @@ -2909,7 +2907,3 @@ 0 (none) ) - - - - diff --git a/test/offline/config/jak3/config.jsonc b/test/offline/config/jak3/config.jsonc index 0fada79667..1b3e122609 100644 --- a/test/offline/config/jak3/config.jsonc +++ b/test/offline/config/jak3/config.jsonc @@ -384,7 +384,11 @@ // asm "close-sky-buffer", // protect-gunship - "find-reposition-pt" + "find-reposition-pt", + // asm + "(method 19 cloth-system)", + "(method 37 cloth-system)", + "(method 19 rope-prim-system)" ], "skip_compile_states": {