diff --git a/decompiler/config/jak1/ntsc_v1/var_names.jsonc b/decompiler/config/jak1/ntsc_v1/var_names.jsonc index 551e37f9a6..ce55860609 100644 --- a/decompiler/config/jak1/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak1/ntsc_v1/var_names.jsonc @@ -8118,6 +8118,7 @@ "idx" ] }, + "calculate-basis-functions-vector!": {}, "calculate-completion": { "args": [ "the-progress" @@ -8290,6 +8291,8 @@ ] } }, + "circle-circle-xz-intersect": {}, + "circle-test": {}, "citb-drop-plat-drop-children": { "vars": { "v1-4": [ @@ -8303,6 +8306,7 @@ "s" ] }, + "closest-pt-in-triangle": {}, "cloud-track": { "vars": { "s1-1": [ @@ -8407,6 +8411,8 @@ ] } }, + "curve-closest-point": {}, + "curve-copy!": {}, "curve-evaluate!": { "vars": { "t2-1": [ @@ -8419,6 +8425,8 @@ ] } }, + "curve-get-pos!": {}, + "curve-length": {}, "debug-menu-append-item": { "args": [ "menu", @@ -9124,6 +9132,8 @@ "v1-1": "data" } }, + "eul->matrix": {}, + "eul->quat": {}, "execute-process-tree": {}, "fact": { "args": [ @@ -9142,6 +9152,17 @@ "s5-0": "expected-version" } }, + "find-knot-span": { + "args": [ + "idx", + "arg1", + "query", + "pts" + ], + "vars": { + "v0-0": "ret" + } + }, "find-parent-method": { "args": [ "child-type", @@ -9204,6 +9225,41 @@ "clut-addr" ] }, + "forward-down->inv-matrix": { + "args": [ + "dst", + "fwd", + "dn" + ] + }, + "forward-down-nopitch->inv-matrix": { + "args": [ + "dst", + "fwd", + "dn" + ] + }, + "forward-up->quaternion": { + "args": [ + "dst", + "fwd", + "up" + ] + }, + "forward-up-nopitch->inv-matrix": { + "args": [ + "dst", + "fwd", + "up" + ] + }, + "forward-up-nopitch->quaternion": { + "args": [ + "dst", + "fwd", + "up" + ] + }, "fractional-part": { "args": [ "x" @@ -9837,6 +9893,7 @@ "src" ] }, + "matrix->eul": {}, "matrix->quaternion": { "args": [ "dst", @@ -9864,6 +9921,59 @@ ] } }, + "matrix-from-two-vectors!": { + "args": [ + "dst", + "a", + "b" + ], + "vars": { + "a1-3": "rot-axis", + "f0-1": "c", + "f1-2": "s" + } + }, + "matrix-from-two-vectors-max-angle!": { + "args": [ + "dst", + "a", + "b", + "max-rot" + ], + "vars": { + "f28-0": "c", + "f30-0": "dot", + "s4-1": "rot-axis" + } + }, + "matrix-from-two-vectors-max-angle-partial!": { + "args": [ + "dst", + "a", + "b", + "max-rot", + "frac" + ], + "vars": { + "f0-2": "rot-amt", + "f28-0": "dot", + "f30-0": "c", + "s4-1": "rot-axis" + } + }, + "matrix-from-two-vectors-partial-linear!": { + "args": [ + "dst", + "a", + "b", + "frac" + ], + "vars": { + "f0-1": "dot", + "f0-4": "cosine", + "gp-1": "rot-axis" + } + }, "matrix-identity": { "args": [ "mat" @@ -9897,6 +10007,25 @@ "alpha" ] }, + "matrix-remove-z-rot": { + "args": [ + "dst", + "src" + ] + }, + "matrix-rot-diff!": { + "args": [ + "axis", + "m0", + "m1" + ], + "vars": { + "f30-1": "angle", + "s2-0": "q1", + "s3-0": "q0", + "s5-0": "q1-q0" + } + }, "matrix-rotate-x!": { "args": [ "dst", @@ -10234,6 +10363,14 @@ "lst" ] }, + "normal-of-plane": { + "args": [ + "dst", + "p0", + "p1", + "p2" + ] + }, "num-func-loop!": { "args": [ "chan", @@ -10300,6 +10437,20 @@ "v1-0": "i" } }, + "point-in-plane-<-point+normal!": { + "args": [ + "pt", + "p0", + "normal" + ], + "vars": { + "f0-3": "offset", + "f1-7": "nx", + "f2-3": "ny", + "f3-1": "nz" + } + }, + "point-in-triangle-cross": {}, "point-inside-poly?": { "vars": { "a0-3": [ @@ -10430,6 +10581,7 @@ } }, "quad-copy!": {}, + "quat->eul": {}, "quaterion<-rotate-y-vector": { "args": [ "quat", @@ -10529,6 +10681,35 @@ "f0-1": "inv" } }, + "quaternion-from-two-vectors!": { + "args": [ + "dst", + "a", + "b" + ], + "vars": { + "f0-0": "rot-axis-length", + "f0-1": "scale", + "f1-1": "dot", + "s5-0": "rot-axis" + } + }, + "quaternion-from-two-vectors-max-angle!": { + "args": [ + "dst", + "a", + "b", + "max-rot" + ], + "vars": { + "f0-12": "scacle", + "f0-5": "limit", + "f26-0": "dot", + "f28-0": "rot-amt", + "f30-0": "rot-axis-len", + "s5-0": "rot-axis" + } + }, "quaternion-i!": { "args": [ "quat" @@ -10680,6 +10861,20 @@ "a1-3": "new-rot" } }, + "quaternion-seek": { + "args": [ + "dst", + "q0", + "q1", + "unused", + "max-rot" + ], + "vars": { + "s2-1": "q0-to-q1", + "s4-0": "m1", + "s5-0": "m0" + } + }, "quaternion-set!": { "args": [ "quat", @@ -11030,6 +11225,15 @@ "y" ] }, + "set-eul!": { + "args": [ + "angs", + "arg1", + "arg2", + "arg3", + "arg4" + ] + }, "set-font-color-alpha": { "args": [ "idx", @@ -12350,6 +12554,14 @@ }, "vector+!": {}, "vector-!": {}, + "vector-3pt-cross!": { + "args": [ + "dst", + "p0", + "p1", + "p2" + ] + }, "vector-angle<-quaternion!": { "args": [ "axis-angle", @@ -12360,6 +12572,8 @@ "f30-0": "inv-mag" } }, + "vector-circle-tangent": {}, + "vector-circle-tangent-new": {}, "vector-copy!": {}, "vector-cross!": {}, "vector-deg-lerp-clamp!": { @@ -12370,6 +12584,30 @@ "in" ] }, + "vector-deg-seek": { + "args": [ + "dst", + "vec0", + "vec1", + "max-rot" + ], + "vars": { + "s4-0": "mat" + } + }, + "vector-deg-slerp": { + "args": [ + "dst", + "a", + "b", + "frac" + ], + "vars": { + "a2-3": "b-dir", + "s1-0": "rot", + "s2-0": "a-dir" + } + }, "vector-dot": {}, "vector-dot-vu": {}, "vector-flatten!": { @@ -12395,6 +12633,33 @@ "alpha" ] }, + "vector-line-distance": { + "args": [ + "query", + "p0", + "p1" + ], + "vars": { + "a1-3": "line-dir", + "f0-1": "frac", + "gp-1": "pt-offset", + "v1-3": "offset-to-closest-point" + } + }, + "vector-line-distance-point!": { + "args": [ + "query", + "p0", + "p1", + "ret" + ], + "vars": { + "a1-3": "line-dir", + "f0-1": "frac", + "s4-1": "query-offset", + "v1-4": "closest-pt-offset" + } + }, "vector-matrix*!": { "args": [ "dst", @@ -12402,6 +12667,14 @@ "mat" ] }, + "vector-orient-by-quat!": { + "args": [ + "dst", + "src", + "rot" + ] + }, + "vector-plane-distance": {}, "vector-reflect!": { "args": [ "dst", @@ -12498,6 +12771,7 @@ "f3-7": "step-scale" } }, + "vector-segment-distance-point!": {}, "vector-v*float!": { "args": [ "delta-p", @@ -12533,6 +12807,22 @@ "velocity" ] }, + "vector-vector-deg-slerp!": { + "args": [ + "dst", + "a", + "b", + "frac", + "up" + ], + "vars": { + "a1-6": "ab", + "a2-5": "b-quat", + "s0-0": "a-dir", + "s0-1": "a-quat", + "s1-0": "b-dir" + } + }, "vector-x-angle": { "args": [ "vec" diff --git a/docs/jak1_cleanup_inputs/method_names.jsonc b/docs/jak1_cleanup_inputs/method_names.jsonc index 28dfa1b8bc..1c2269b2b0 100644 --- a/docs/jak1_cleanup_inputs/method_names.jsonc +++ b/docs/jak1_cleanup_inputs/method_names.jsonc @@ -1590,6 +1590,26 @@ "entity-actor-lookup", "Get an `entity-actor` from a lump by name and index, return #f if invalid.\nThe lump can contain either an actor name or aid." ], + "forward-down->inv-matrix": [ + "forward-down->inv-matrix", + "Create transformation matrix where `fwd` is forward and `dn` is down. If these are not perpendicular, `fwd`\ndetermines the pitch of the frame." + ], + "forward-down-nopitch->inv-matrix": [ + "forward-down-nopitch->inv-matrix", + "Create transformation matrix where `fwd` is forward and `dn` is down. If these are not perpendicular, `dn`\ndetermines the pitch of the frame." + ], + "forward-up->quaternion": [ + "forward-up->quaternion", + "Create the inverse transform for a coordinate frame where `fwd` is forward and `up` is up.\nUses the pitch of `fwd` to determine pitch when axes aren't perpendicular." + ], + "forward-up-nopitch->inv-matrix": [ + "forward-up-nopitch->inv-matrix", + "Create the inverse transform for a coordinate frame where `fwd` is forward and `up` is up.\nUses the pitch of `up` to determine pitch when axes aren't perpendicular." + ], + "forward-up-nopitch->quaternion": [ + "forward-up-nopitch->quaternion", + "Create the inverse transform for a coordinate frame where `fwd` is forward and `up` is up.\nUses the pitch of `up` to determine pitch when axes aren't perpendicular." + ], "handle->process-safe": [ "handle->process-safe", "Strange unused implementation of `handle->process`." @@ -1626,6 +1646,30 @@ "matrix->quaternion", "Convert rotation matrix to quaternion." ], + "matrix-from-two-vectors!": [ + "matrix-from-two-vectors!", + "Create a rotation matrix representing the rotation between two vectors." + ], + "matrix-from-two-vectors-max-angle!": [ + "matrix-from-two-vectors-max-angle!", + "Create a rotation matrix representing the rotation between two vectors, allowing at most a rotation of\n`max-rot` degrees." + ], + "matrix-from-two-vectors-max-angle-partial!": [ + "matrix-from-two-vectors-max-angle-partial!", + "Create a rotation matrix representing fraction `frac` of the rotation between `a` and `b`, limited to\n`max-rot` degrees." + ], + "matrix-from-two-vectors-partial-linear!": [ + "matrix-from-two-vectors-partial-linear!", + "Create a rotation matrix representing fraction `frac` of the rotation from `a` to `b`." + ], + "matrix-remove-z-rot": [ + "matrix-remove-z-rot", + "Remove z rotation (roll) from a matrix. Not sure how this works, it's unused and I think it could be wrong." + ], + "matrix-rot-diff!": [ + "matrix-rot-diff!", + "Get the rotation between two matrices, in degrees. Returns the rotation axis in `axis`." + ], "matrix-with-scale->quaternion": [ "matrix-with-scale->quaternion", "Convert a matrix which contains scaling in addition to rotation to a quaternion." @@ -1634,6 +1678,10 @@ "name=", "Are `a` and `b` the same name? This works for strings and symbols." ], + "normal-of-plane": [ + "normal-of-plane", + "Compute normal of plane given three points on it." + ], "point-in-air-box-area?": [ "point-in-air-box-area?", "Check if point `x, z` (relative to air-box origin) is within the projected area of the air-box. Effectively doesn't check height." @@ -1646,6 +1694,10 @@ "point-in-air?", "Check if `pt` is in any of the boxes." ], + "point-in-plane-<-point+normal!": [ + "point-in-plane-<-point+normal!", + "Given a plane's normal and `p0` a point on the plane, generate a second point on the plane.\nThe generated point is somewhat arbitrary - it is spaced out by 1 meter on the two axes that are least\nparallel to the plane's normal (avoiding numerical issues)" + ], "points-in-air?": [ "points-in-air?", "Are both `p1` and `p2` inside any of the boxes?" @@ -1702,6 +1754,14 @@ "quaternion-float/!", "Divide each element in the quaternion by `x`." ], + "quaternion-from-two-vectors!": [ + "quaternion-from-two-vectors!", + "Create a quaternion representing the rotation between two vectors." + ], + "quaternion-from-two-vectors-max-angle!": [ + "quaternion-from-two-vectors-max-angle!", + "Create a quaternion representing the rotation between two vectors, allowing at most a rotation of `max-rot`\ndegrees." + ], "quaternion-i!": [ "quaternion-i!", "Create unit `i` quaternion." @@ -1782,6 +1842,10 @@ "quaternion-rotate-z!", "Rotate existing quaternion along world z-axis." ], + "quaternion-seek": [ + "quaternion-seek", + "Unused function to seek toward an orientation." + ], "quaternion-set!": [ "quaternion-set!", "Set quaternion components." @@ -1818,6 +1882,10 @@ "quaternion-zxy!", "Make a quaternion from a sequence of z, x, y axis rotations." ], + "set-eul!": [ + "set-eul!", + "Set euler angles and a flag (as a float)." + ], "string->int": [ "string->int", "String to int. Supports binary, hex, and decimal, and negatives." @@ -1890,14 +1958,42 @@ "string>?", "In dictionary order, is a > b?" ], + "vector-3pt-cross!": [ + "vector-3pt-cross!", + "Cross product of (2 - 1) and (3 - 1), giving a vector in the direction of the plane normal, but not\nmagnitude of 1." + ], "vector-angle<-quaternion!": [ "vector-angle<-quaternion!", "Convert quaternion into axis-angle with normalized axis and angle in radians in `w`." ], + "vector-deg-seek": [ + "vector-deg-seek", + "Move `vec1` toward `vec0` by rotating it by at most `max-rot` degrees." + ], + "vector-deg-slerp": [ + "vector-deg-slerp", + "Spherical linear interpolation of orientations represented as the z-axis of two frames." + ], + "vector-line-distance": [ + "vector-line-distance", + "Compute the distance between `query` and the closest point on the infinite line containing `p0` and `p1`." + ], + "vector-line-distance-point!": [ + "vector-line-distance-point!", + "Compute the distance between `query` and the closest point on the infinite line containing `p0` and `p1`.\nReturn the point in `ret`." + ], + "vector-orient-by-quat!": [ + "vector-orient-by-quat!", + "Rotate a vector by a quaternion." + ], "vector-rotate-y!": [ "vector-rotate-y!", "Rotate a vector along the y-axis, not very efficient." ], + "vector-vector-deg-slerp!": [ + "vector-vector-deg-slerp!", + "Spherical linear interpolation of coordinate frames produced by `(forward-up vec up)`." + ], "vector-x-angle": [ "vector-x-angle", "Get the pitch angle of a vector." diff --git a/docs/jak1_cleanup_inputs/var_names.jsonc b/docs/jak1_cleanup_inputs/var_names.jsonc new file mode 100644 index 0000000000..87c1553a10 --- /dev/null +++ b/docs/jak1_cleanup_inputs/var_names.jsonc @@ -0,0 +1,4298 @@ +// Proposed variable names (decompiler var_names.jsonc format), keyed "(method N type)" per defmethod. +{ + "(method 10 cam-index)": { + "args": [ + "this", + "pos" + ], + "vars": { + "s5-0": "delta" + } + }, + "(method 10 cavecrystal-light-control)": { + "args": [ + "this", + "probe-pos" + ], + "vars": { + "s5-1": "cur", + "f30-0": "max-intensity", + "f26-0": "fade-start", + "f28-0": "fade-range", + "f1-1": "clamped-dist", + "f0-7": "contribution" + } + }, + "(method 10 effect-control)": { + "args": [ + "this", + "effect-name", + "frame", + "joint" + ], + "vars": { + "s3-0": "effect-value", + "s5-0": "joint-index", + "v0-0": "joint-lookup", + "v1-10": "name-str", + "v1-18": "name-str-2", + "s3-1": "root", + "v1-14": "moving-shape", + "t1-1": "ground-pat", + "v0-5": "launch-group", + "v1-67": "draw", + "a1-42": "vertex-skip", + "a0-55": "death-timer", + "a2-29": "run-time" + } + }, + "(method 10 rigid-body)": { + "args": [ + "this", + "dt" + ], + "vars": { + "s4-0": "spin-quat" + } + }, + "(method 10 swamp-blimp-oscillator)": { + "args": [ + "this", + "target-offset" + ], + "vars": { + "gp-0": "delta", + "f0-2": "speed" + } + }, + "(method 10 swamp-rope-oscillator)": { + "args": [ + "this", + "target-offset" + ], + "vars": { + "f0-3": "accel-delta" + } + }, + "(method 10 tippy)": { + "args": [ + "this", + "proc", + "target-pos" + ], + "vars": { + "s4-0": "active?", + "s3-0": "tip-dir", + "f0-6": "dir-len", + "f30-0": "target-angle" + } + }, + "(method 10 torus)": { + "args": [ + "this", + "prim-core", + "out-delta" + ], + "vars": { + "gp-0": "to-sphere", + "s5-0": "ring-point", + "f30-0": "hit-radius" + } + }, + "(method 10 tracking-spline)": { + "args": [ + "this", + "start-pos" + ], + "vars": { + "v1-6": "idx" + } + }, + "(method 10 vehicle-controller)": { + "args": [ + "this", + "forward-dir", + "throttle-val", + "sample-idx" + ], + "vars": { + "s3-0": "dir", + "f30-0": "elapsed-sec", + "f28-0": "sample-speed", + "f0-4": "turn-angle", + "f26-0": "turn-radius" + } + }, + "(method 10 water-control)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "old-flag" + } + }, + "(method 11 effect-control)": { + "args": [ + "this", + "effect-name", + "frame", + "joint", + "res-lump", + "surface" + ], + "vars": { + "s1-0": "sound", + "a0-4": "run-time", + "v1-15": "material", + "v1-20": "material", + "v1-24": "material", + "v1-29": "material", + "v1-33": "material", + "v1-36": "material", + "v1-61": "material", + "s0-0": "part-id", + "s0-1": "part-id" + } + }, + "(method 11 nav-control)": { + "args": [ + "this", + "destination" + ], + "vars": { + "s5-1": "gap-info" + } + }, + "(method 11 torus)": { + "args": [ + "this", + "out-delta" + ], + "vars": { + "s4-0": "target-prims", + "s3-0": "prim-idx", + "v1-9": "prim" + } + }, + "(method 11 twister)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "joint-idx", + "s4-0": "last-joint", + "f0-2": "delta-to-target", + "f30-1": "accum-ry", + "s4-1": "joint", + "f0-9": "delta" + } + }, + "(method 11 vehicle-controller)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "idx", + "s5-1": "idx-1" + } + }, + "(method 12 cavecrystal-light-control)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "prev-time", + "a1-1": "now", + "v1-1": "idx", + "a1-5": "crystal", + "v1-4": "prev", + "a1-7": "cur", + "a2-4": "next-crystal" + } + }, + "(method 12 curve-control)": { + "args": [ + "this", + "ret", + "idx" + ], + "vars": {} + }, + "(method 12 effect-control)": { + "args": [ + "this", + "effect-name", + "frame", + "joint", + "res-lump", + "sound-name" + ], + "vars": { + "sv-144": "lump", + "s0-0": "snd-name", + "gp-0": "spec", + "s5-0": "joint-pos", + "sv-112": "param-tag", + "a1-7": "param-data", + "sv-128": "name-charp" + } + }, + "(method 12 nav-control)": { + "args": [ + "this", + "gap-info" + ], + "vars": { + "s4-0": "poly", + "s3-1": "body-local", + "s2-0": "landing-pt" + } + }, + "(method 12 path-control)": { + "args": [ + "this", + "ret", + "idx" + ], + "vars": { + "v1-3": "num-cverts", + "f0-3": "vert-idx", + "f0-4": "capped-idx" + } + }, + "(method 12 torus)": { + "args": [ + "this", + "out-point" + ], + "vars": { + "f30-0": "full-turn", + "f30-1": "tube-angle", + "s2-0": "rot-mat", + "f30-2": "full-turn-2" + } + }, + "(method 12 tracking-spline)": { + "args": [ + "obj" + ], + "vars": { + "s5-0": "point-idx" + } + }, + "(method 12 twister)": { + "args": [ + "this", + "proc" + ], + "vars": { + "s4-0": "rot-matrix", + "s3-0": "joint-idx", + "s2-0": "bone-transform" + } + }, + "(method 12 vehicle-controller)": { + "args": [ + "this", + "dest-index", + "cur-pos" + ], + "vars": { + "f30-0": "speed-mag", + "f28-0": "heading-angle", + "s5-1": "tangent-dir", + "s3-0": "to-dest" + } + }, + "(method 12 wobbler)": { + "args": [ + "this", + "out-quat" + ], + "vars": { + "s5-0": "tilt-axis", + "f0-8": "tilt-ratio", + "f0-9": "tilt-angle" + } + }, + "(method 13 nav-control)": { + "args": [ + "this", + "destination", + "prev-travel" + ], + "vars": { + "sv-80": "body-local", + "sv-84": "cur-pos", + "sv-88": "clip-poly", + "sv-92": "target-pt", + "sv-96": "portal", + "sv-100": "in-corridor", + "s4-0": "target-local", + "s5-1": "clip-info", + "v1-82": "delta" + } + }, + "(method 13 rigid-body)": { + "args": [ + "this", + "point", + "force" + ], + "vars": { + "v1-2": "offset", + "a1-2": "torque-add" + } + }, + "(method 13 tracking-spline)": { + "args": [ + "this", + "pt" + ], + "vars": { + "v1-3": "next-pt", + "v1-11": "after-pt" + } + }, + "(method 14 collide-edge-work)": { + "args": [ + "this", + "out-pt", + "test-pt", + "prim-index" + ], + "vars": { + "f30-0": "best-dist", + "s2-0": "closest-pt", + "s1-0": "edge-idx", + "v1-3": "edge", + "f0-0": "dist" + } + }, + "(method 14 curve-control)": { + "args": [ + "this", + "ret", + "u" + ], + "vars": { + "s4-0": "next-point" + } + }, + "(method 14 effect-control)": { + "args": [ + "this", + "window-lo", + "window-hi", + "exact-frame" + ], + "vars": { + "s2-0": "tag", + "f0-0": "key-frame", + "v1-7": "res", + "a1-1": "tag-data" + } + }, + "(method 14 path-control)": { + "args": [ + "this", + "ret", + "percent" + ], + "vars": {} + }, + "(method 14 rigid-body)": { + "args": [ + "this", + "local-point", + "local-force" + ], + "vars": { + "s5-0": "world-point", + "s4-0": "world-force" + } + }, + "(method 14 snow-ball)": { + "args": [ + "this", + "junctions", + "path-speed", + "path-idx" + ], + "vars": { + "v1-0": "u-table", + "a0-4": "speed-per-frame", + "a1-1": "cur-junction", + "a2-2": "now", + "a3-1": "idx" + } + }, + "(method 14 tracking-spline)": { + "args": [ + "this", + "sampler" + ], + "vars": { + "v1-0": "cur-pt" + } + }, + "(method 14 vehicle-controller)": { + "args": [ + "this", + "from-pos", + "out-point" + ], + "vars": { + "s5-0": "to-center", + "s3-0": "tangent-dir", + "f30-0": "center-dist", + "f28-0": "circle-radius", + "f0-9": "tangent-len", + "f28-1": "tangent-comp", + "f0-12": "radial-comp" + } + }, + "(method 15 rigid-body)": { + "args": [ + "this", + "force" + ], + "vars": {} + }, + "(method 15 snow-ball)": { + "args": [ + "this", + "new-junctions", + "path-idx" + ], + "vars": { + "v0-0": "result", + "v1-0": "roller", + "a0-1": "new-junction", + "a3-1": "roller-junction", + "t0-0": "idx" + } + }, + "(method 15 tracking-spline)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "sampler", + "a2-0": "sample-pos", + "v1-15": "cur-pt", + "a0-14": "next-pt", + "a1-1": "best-pt", + "f0-2": "best-dot", + "f1-2": "dot" + } + }, + "(method 15 vehicle-controller)": { + "args": [ + "this", + "boat-shape" + ], + "vars": { + "s3-0": "dest-vel-dir", + "s4-0": "to-dest-point", + "f30-0": "along-dot", + "s4-2": "throttle-index", + "s3-1": "forward-axis", + "s4-3": "right-axis", + "v1-16": "boat-pos", + "f0-9": "forward-err", + "f3-0": "lateral-err" + } + }, + "(method 15 water-control)": { + "args": [ + "this" + ], + "vars": { + "f0-4": "ground-height", + "f30-0": "splash-scale" + } + }, + "(method 16 nav-control)": { + "args": [ + "this", + "world-point" + ], + "vars": {} + }, + "(method 16 nav-mesh)": { + "args": [ + "this", + "start-pos", + "poly", + "travel", + "slide?", + "max-len", + "info" + ], + "vars": { + "s0-0": "ray", + "sv-96": "done", + "sv-112": "clip-count", + "sv-128": "iter", + "v1-10": "walk-done", + "v1-22": "edge-v0", + "a0-15": "edge-v1", + "f2-2": "edge-nx", + "f3-1": "edge-nz", + "f1-5": "travel-x", + "f0-4": "travel-z" + } + }, + "(method 16 rigid-body)": { + "args": [ + "this", + "point", + "force", + "max-arm" + ], + "vars": { + "a0-3": "offset", + "s4-1": "torque-add", + "f0-0": "arm-length" + } + }, + "(method 16 seagullflock)": { + "args": [ + "this", + "arg0" + ], + "vars": { + "gp-0": "to-bird" + } + }, + "(method 16 tracking-spline)": { + "args": [ + "this", + "budget" + ], + "vars": { + "s4-0": "sampler", + "a2-0": "sample-pos", + "s4-1": "cur-pt", + "v1-11": "next-pt" + } + }, + "(method 17 rigid-body)": { + "args": [ + "this", + "point", + "out-velocity" + ], + "vars": { + "v1-1": "offset" + } + }, + "(method 17 tracking-spline)": { + "args": [ + "this", + "new-pos", + "min-dist", + "prune-budget", + "can-prune" + ], + "vars": { + "s3-0": "free-pt", + "s2-0": "tail-pt" + } + }, + "(method 18 nav-mesh)": { + "args": [ + "this", + "from-poly", + "src-centroid", + "cur-poly", + "visited", + "depth" + ], + "vars": { + "s1-1": "cur-poly-ptr", + "s0-0": "neighbor-centroid", + "sv-32": "edge-idx", + "sv-48": "neighbor-idx", + "v0-3": "visible" + } + }, + "(method 18 rigid-body)": { + "args": [ + "this", + "out-position" + ], + "vars": { + "gp-0": "cm-offset-world" + } + }, + "(method 18 tracking-spline)": { + "args": [ + "this", + "arc-len", + "out-pos", + "sampler" + ], + "vars": { + "f0-4": "advanced", + "s5-0": "lerp-pos" + } + }, + "(method 19 nav-control)": { + "args": [ + "this", + "out-pos", + "body", + "goal", + "turn-speed" + ], + "vars": { + "f30-0": "max-turn", + "s0-0": "body-cs", + "s1-0": "goal-pos", + "f28-0": "angle-diff", + "s2-1": "new-dir" + } + }, + "(method 19 path-control)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "curr-point", + "s4-0": "next-point", + "s3-0": "target-point", + "f30-0": "closest-dist", + "f28-0": "closest-vert-idx", + "s2-0": "closest-point", + "s1-1": "idx", + "f0-5": "dist" + } + }, + "(method 19 tracking-spline)": { + "args": [ + "this", + "arc-len", + "out-pos", + "sampler" + ], + "vars": {} + }, + "(method 20 balloonlurker-pilot)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 blue-eco-charger-orb)": { + "args": [ + "this", + "rotv-scale" + ], + "vars": {} + }, + "(method 20 bully)": { + "args": [ + "this" + ], + "vars": { + "s5-1": "bounced", + "s4-0": "sphere-info", + "s5-2": "wall-normal", + "s5-3": "mesh-info", + "s4-1": "boundary-normal" + } + }, + "(method 20 cave-trap)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "work", + "s4-0": "search-pos", + "v1-2": "i", + "s3-2": "actor-idx", + "v1-10": "actor", + "s1-0": "proc", + "s2-2": "candidate", + "f30-0": "dist", + "a0-12": "bsphere", + "v1-16": "slot3", + "v1-18": "slot2", + "v1-19": "slot1", + "v1-21": "slot0", + "s4-1": "slot-idx", + "v1-29": "chosen-idx", + "v1-32": "chosen-actor", + "s2-3": "chosen-proc", + "s3-3": "chosen", + "s2-4": "spawn-dir", + "s1-1": "params", + "v1-40": "spawned" + } + }, + "(method 20 caveelevator)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "now", + "s5-0": "bounced-pos" + } + }, + "(method 20 citb-sagecage)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 dark-crystal)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "crystal-pos", + "s3-0": "tgt-pos", + "s4-0": "dir", + "t2-0": "probe-result" + } + }, + "(method 20 driller-lurker)": { + "args": [ + "this", + "bounce-at-ends?", + "look-at-target?" + ], + "vars": { + "v1-1": "now", + "f0-0": "old-speed", + "f1-1": "new-speed", + "f0-5": "old-u", + "f30-0": "move-dist", + "s4-0": "moved?", + "f0-6": "new-u", + "s3-1": "prev-trans", + "f0-7": "moved-dist", + "s4-1": "tangent", + "f0-13": "path-heading", + "a0-13": "player-pos", + "v1-26": "to-player", + "f0-16": "heading-to-player", + "f30-2": "player-proximity", + "f0-34": "player-xz-dist", + "f28-1": "turn-blend", + "s3-2": "to-player-vec", + "f1-27": "pitch-to-player", + "f1-29": "pitch-clamped", + "f0-46": "pitch-blend", + "f0-47": "blended-up", + "f30-3": "drill-spd", + "v1-56": "cur-mode", + "f0-69": "new-drill-rz", + "s5-2": "drill-quat" + } + }, + "(method 20 drop-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 exit-chamber)": { + "args": [ + "this", + "wave-scale" + ], + "vars": {} + }, + "(method 20 flutflutegg)": { + "args": [ + "this", + "vel-impulse", + "wobble-x-impulse", + "wobble-y-impulse" + ], + "vars": {} + }, + "(method 20 flying-lurker)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "shadow-ctrl", + "s4-0": "shadow-valid", + "s3-1": "probe-result", + "a1-1": "probe-start", + "a2-0": "probe-dir", + "s2-2": "bbox", + "s1-1": "joint-pos", + "f0-17": "bounds-radius" + } + }, + "(method 20 gnawer)": { + "args": [ + "this", + "seg-idx" + ], + "vars": { + "v1-3": "seg", + "a0-1": "prev-seg", + "v0-0": "dst-mat", + "a2-3": "src-mat", + "v1-4": "col0", + "a0-2": "col1", + "a1-5": "col2", + "a2-4": "col3" + } + }, + "(method 20 joint-exploder)": { + "args": [ + "this", + "list", + "joint-idx" + ], + "vars": { + "v1-0": "joints", + "a3-0": "joint", + "a0-4": "old-head-idx" + } + }, + "(method 20 junglesnake)": { + "args": [ + "this" + ], + "vars": { + "v1-3": "player-pos", + "f0-7": "ry-diff", + "f30-1": "prev-ry", + "s5-0": "joint-idx", + "s4-0": "joint", + "f28-0": "max-drag-delta", + "f26-0": "target-ry", + "f0-14": "ry-to-prev", + "f0-16": "ry-to-target" + } + }, + "(method 20 lurkerworm)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "to-target", + "f0-5": "horiz-dist", + "f0-6": "pitch" + } + }, + "(method 20 mother-spider)": { + "args": [ + "this", + "out-pos", + "out-normal" + ], + "vars": { + "s3-1": "try-iter", + "f28-0": "base-angle", + "f30-0": "radius", + "s1-0": "dir", + "s2-1": "offset", + "f28-1": "angle", + "s2-2": "probe-result", + "a1-12": "probe-start", + "s3-2": "probe-result2" + } + }, + "(method 20 orbit-plat-bottom)": { + "args": [ + "this", + "from-point", + "to-point" + ], + "vars": { + "s5-1": "delta", + "f30-0": "gap-dist", + "f28-0": "scaled-dist" + } + }, + "(method 20 puffer)": { + "args": [ + "this", + "dest" + ], + "vars": { + "f30-0": "travel-speed", + "f0-11": "travel-heading", + "s5-1": "desired-travel", + "f0-16": "travel-dist", + "f28-0": "look-ahead-dist", + "f26-0": "obstacle-dist", + "s4-0": "look-ahead-vec", + "s3-1": "clip-info", + "s3-2": "sphere-info", + "f0-26": "sphere-dist", + "f26-1": "turn-frac" + } + }, + "(method 20 ram)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "launch-ctrl", + "a2-0": "node8-mat", + "s5-0": "spawn-pos" + } + }, + "(method 20 snow-gears)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "spawn-pos" + } + }, + "(method 20 steam-cap)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "target-pos", + "f0-0": "target-y", + "f0-1": "dist-sq", + "s5-0": "should-shove?", + "a1-1": "overlap-params" + } + }, + "(method 20 sunken-pipegame)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "mask" + } + }, + "(method 20 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "f0-8": "cur-offset-x", + "f1-3": "offset-x-delta" + } + }, + "(method 20 swamp-rat-nest-dummy-a)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 swamp-rat-nest-dummy-b)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 swamp-rat-nest-dummy-c)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 tracking-spline)": { + "args": [ + "this", + "move", + "stop-pt" + ], + "vars": { + "s3-0": "trail-dir", + "s2-0": "seg-dir" + } + }, + "(method 20 whirlpool)": { + "args": [ + "this", + "spin-speed" + ], + "vars": { + "gp-0": "target-pos", + "f28-0": "target-dist", + "f26-0": "pull-strength", + "f0-7": "angle-to-center", + "f30-0": "rotate-delta", + "f24-0": "new-angle", + "f28-1": "new-radius", + "s4-1": "new-pos", + "gp-1": "target-control", + "s3-0": "saved-status" + } + }, + "(method 20 yeti)": { + "args": [ + "this", + "out-spawn-pos", + "out-spawn-dir" + ], + "vars": { + "s3-0": "num-verts", + "s1-0": "vert-idx", + "s2-0": "tries-left" + } + }, + "(method 21 blue-eco-charger)": { + "args": [ + "this", + "active?" + ], + "vars": { + "v1-0": "master", + "a0-1": "master-proc", + "v1-3": "master2" + } + }, + "(method 21 caveelevator)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "joint-pos", + "gp-0": "bounds" + } + }, + "(method 21 citb-base-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 21 citb-donut)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 21 citb-generator)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "mushroom-angle" + } + }, + "(method 21 citb-rotatebox)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 21 citb-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-1": "bar-y", + "f4-0": "far-pos", + "f1-0": "far-neg", + "f2-0": "near-pos", + "f3-0": "near-neg" + } + }, + "(method 21 dark-crystal)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "all-destroyed?", + "s4-0": "task-ctrl", + "s3-0": "reminder" + } + }, + "(method 21 drop-plat)": { + "args": [ + "this" + ], + "vars": { + "s3-0": "angles", + "s5-0": "sin-vec", + "s4-0": "cos-vec" + } + }, + "(method 21 exit-chamber)": { + "args": [ + "this", + "items" + ], + "vars": { + "s5-0": "bone-mat" + } + }, + "(method 21 gnawer)": { + "args": [ + "this", + "seg-idx", + "bbox", + "first?", + "dist" + ], + "vars": { + "gp-0": "seg", + "f0-1": "surface-end", + "f0-3": "approach-frac", + "f30-0": "along-frac", + "f28-0": "angle", + "f0-19": "retract-frac", + "s4-1": "flat-dir", + "f0-24": "heading", + "s3-1": "surf-dir-rot" + } + }, + "(method 21 helix-water)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "next-idx", + "v1-5": "next-actor", + "s4-0": "next-proc", + "a0-3": "next-pd" + } + }, + "(method 21 joint-exploder)": { + "args": [ + "this", + "list", + "joint" + ], + "vars": { + "a1-1": "joint-pos" + } + }, + "(method 21 junglesnake)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "joint-idx", + "a1-2": "joint", + "v1-3": "head-tilt-joint", + "v1-4": "head-twist-joint", + "v0-0": "flag" + } + }, + "(method 21 mother-spider)": { + "args": [ + "this", + "hit-dir", + "impulse-mag", + "do-damage?" + ], + "vars": { + "f30-0": "swing-radius", + "s1-0": "swing-dir", + "s2-0": "perp-dir", + "s2-1": "impulse-vec", + "s4-1": "leg-index", + "s3-1": "root-prim", + "s2-2": "detach-iter", + "s1-1": "leg-info", + "s0-0": "leg-base", + "sv-128": "leg-dir", + "sv-144": "launch-dir", + "sv-112": "leg-proc", + "v1-43": "leg-prim" + } + }, + "(method 21 nav-control)": { + "args": [ + "this", + "world-point" + ], + "vars": {} + }, + "(method 21 puffer)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim-group", + "s3-0": "prim-head", + "s3-1": "prim-mouth", + "s3-2": "prim-tail" + } + }, + "(method 21 ram)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "launch-ctrl", + "s3-0": "wheel-pos", + "s4-0": "puff-pos", + "s3-1": "wheel-pos-1", + "s4-1": "puff-pos-1" + } + }, + "(method 21 steam-cap)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "going-down?", + "f0-0": "phase", + "f30-0": "up-frac", + "s4-0": "cap-idx", + "s3-0": "pt", + "f30-1": "down-frac", + "a1-8": "spread-pos", + "s4-3": "cap-idx", + "s2-0": "pt", + "s3-3": "new-pos", + "f0-20": "vel-y", + "f0-22": "bounce-vel", + "f0-24": "approach", + "f1-24": "vel-y", + "f1-29": "dist-to-up", + "v1-62": "was-positive?", + "f0-26": "vel-y", + "f0-31": "y-sum", + "v1-71": "i", + "f0-32": "avg-y", + "a1-16": "root-pos", + "v1-77": "edge0", + "a0-35": "edge1", + "s5-1": "normal" + } + }, + "(method 21 sunken-pipegame)": { + "args": [ + "this", + "pause?" + ], + "vars": { + "v1-4": "child-proc" + } + }, + "(method 21 sunkenfisha)": { + "args": [ + "this", + "out-position", + "path-u", + "local-offset" + ], + "vars": { + "s2-0": "path-tangent", + "f0-2": "path-yaw", + "s4-1": "rotated-offset" + } + }, + "(method 21 swamp-rat-nest-dummy-a)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "joint-idx", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "(method 21 swamp-rat-nest-dummy-b)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "joint-idx", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "(method 21 swamp-rat-nest-dummy-c)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "joint-idx", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "(method 21 tracking-spline)": { + "args": [ + "this", + "pos", + "accel", + "max-speed" + ], + "vars": { + "v1-0": "cur-pt", + "f0-0": "partial", + "s4-0": "sampler", + "s4-1": "delta", + "a2-3": "cursor-pt" + } + }, + "(method 22 citb-chain-plat)": { + "args": [ + "this", + "pos", + "time" + ], + "vars": {} + }, + "(method 22 citb-stair-plat)": { + "args": [ + "this" + ], + "vars": { + "f0-7": "scale" + } + }, + "(method 22 dark-eco-pool)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "ripple-ctrl" + } + }, + "(method 22 gnawer)": { + "args": [ + "this", + "route-dist" + ], + "vars": { + "s4-0": "bbox", + "a3-0": "first?", + "gp-0": "at-dest?", + "s2-0": "seg-idx", + "v1-4": "place", + "f0-1": "seg-dist", + "f0-10": "dx", + "f1-12": "dy", + "f2-7": "dz", + "f0-14": "radius", + "a0-3": "bounds", + "v1-21": "root-prim", + "f0-15": "sphere-r" + } + }, + "(method 22 joint-exploder)": { + "args": [ + "this", + "list" + ], + "vars": { + "gp-1": "joints", + "v1-2": "cur-idx", + "s5-1": "joint", + "s4-0": "pos", + "a2-1": "delta", + "s3-0": "probe-result", + "f28-0": "xz-speed", + "f30-0": "y-speed" + } + }, + "(method 22 jungle-water)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "ripple" + } + }, + "(method 22 junglesnake)": { + "args": [ + "this", + "base-ry" + ], + "vars": { + "v1-0": "joint-idx", + "a2-2": "joint", + "f1-1": "cumulative-delta", + "f0-0": "prev-cumulative-delta" + } + }, + "(method 22 lavatube-lava)": { + "args": [ + "this" + ], + "vars": { + "t9-0": "parent-method", + "v1-2": "ripple" + } + }, + "(method 22 mistycannon)": { + "args": [ + "this", + "launch-speed", + "flight-time", + "blast-radius" + ], + "vars": { + "s3-0": "origin", + "s2-0": "launch-vel", + "v1-3": "rot-tracker", + "f30-0": "yaw", + "v1-8": "tilt-tracker", + "f26-0": "pitch", + "f28-0": "time-scale", + "f24-0": "cos-pitch" + } + }, + "(method 22 mother-spider)": { + "args": [ + "this", + "mat", + "target-pos" + ], + "vars": {} + }, + "(method 22 mud)": { + "args": [ + "this" + ], + "vars": { + "t9-0": "parent-method", + "gp-0": "ripple", + "v1-9": "fade-dist" + } + }, + "(method 22 nav-control)": { + "args": [ + "this", + "world-point", + "y-tolerance" + ], + "vars": {} + }, + "(method 22 ogre-lava)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "ripple" + } + }, + "(method 22 puffer)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "buddy", + "v1-0": "buddy-proc" + } + }, + "(method 22 qbert-plat)": { + "args": [ + "this", + "pos", + "time" + ], + "vars": {} + }, + "(method 22 ram)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "incomplete-count", + "v1-3": "perm" + } + }, + "(method 22 rigid-body)": { + "args": [ + "this", + "position", + "rotation", + "lin-damping", + "ang-damping" + ], + "vars": {} + }, + "(method 22 rigid-body-platform)": { + "args": [ + "this", + "pos", + "time" + ], + "vars": { + "v1-0": "wanim" + } + }, + "(method 22 rolling-water)": { + "args": [ + "this" + ], + "vars": { + "t9-0": "parent-method", + "v1-2": "ripple" + } + }, + "(method 22 snow-ball-roller)": { + "args": [ + "this", + "victim" + ], + "vars": { + "s4-0": "push-dir", + "s3-0": "path-dir", + "f28-0": "angle-to-victim", + "f30-0": "path-angle", + "f0-11": "angle-diff", + "f30-1": "clamped-angle", + "f30-2": "push-dist" + } + }, + "(method 22 sunken-pipegame)": { + "args": [ + "this", + "restore?" + ], + "vars": { + "v1-0": "challenge-idx", + "a2-0": "challenge-idx2", + "v1-5": "prize-proc", + "v1-13": "prize-proc2" + } + }, + "(method 22 sunken-water)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "ripple" + } + }, + "(method 22 tar-plat)": { + "args": [ + "this", + "pos", + "time" + ], + "vars": {} + }, + "(method 22 tracking-spline)": { + "args": [ + "this", + "max-len" + ], + "vars": { + "s5-0": "sampler", + "a2-0": "tmp-pos" + } + }, + "(method 22 training-water)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "ripple-ctrl" + } + }, + "(method 22 villagea-water)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "ripple" + } + }, + "(method 22 villageb-water)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "ripple" + } + }, + "(method 22 villagec-lava)": { + "args": [ + "this" + ], + "vars": { + "t9-0": "parent-method", + "v1-2": "ripple" + } + }, + "(method 22 water-anim)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "look-idx", + "s5-1": "look", + "s4-0": "skel-group", + "s3-0": "skel-group-check", + "s4-1": "channel", + "a2-2": "sound-spec", + "a3-0": "sound-pos" + } + }, + "(method 23 balloonlurker)": { + "args": [ + "this", + "time" + ], + "vars": { + "s5-0": "force", + "s4-0": "mat", + "s2-0": "idx", + "s1-0": "control-point", + "f30-0": "dest-dist", + "f0-0": "dest-old-dist", + "f0-6": "submerge-fraction", + "s3-0": "rudder-dir", + "s2-1": "rudder-point", + "f30-1": "rudder-angle", + "s3-1": "engine-point", + "s4-1": "mine-idx", + "v1-43": "mine-point" + } + }, + "(method 23 bone-platform)": { + "args": [ + "this", + "sim-time" + ], + "vars": {} + }, + "(method 23 citb-chain-plat)": { + "args": [ + "this", + "time" + ], + "vars": {} + }, + "(method 23 driller-lurker)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "now", + "s5-0": "path", + "s4-0": "closest-u-fn" + } + }, + "(method 23 exit-chamber)": { + "args": [ + "this", + "move-fcell-too?" + ], + "vars": { + "s5-0": "offset", + "s5-1": "items", + "a1-6": "player-pos", + "a0-12": "fcell-proc", + "v1-50": "perm" + } + }, + "(method 23 fishermans-boat)": { + "args": [ + "this", + "time" + ], + "vars": { + "s4-0": "force", + "s1-0": "velocity", + "s5-0": "world-pos", + "s0-0": "stab-normal", + "s2-0": "boat-forward", + "s3-0": "mat", + "sv-128": "cp-idx", + "sv-144": "control-point", + "sv-160": "stab-idx", + "sv-176": "stab-local-pos", + "f0-2": "submerge-depth", + "f30-0": "submerge-frac", + "s1-1": "anchor-pos", + "s2-1": "thrust-dir" + } + }, + "(method 23 gnawer)": { + "args": [ + "this" + ], + "vars": { + "v1-12": "seg-idx" + } + }, + "(method 23 joint-exploder)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "joints", + "s4-0": "joint-idx", + "v1-2": "static-joint", + "s3-0": "joint", + "a0-6": "parent-idx", + "s1-1": "transv-lo", + "s2-1": "transv-hi", + "v1-26": "last-joint", + "v1-27": "root-list", + "s5-1": "root-bbox", + "s4-1": "box-joint-idx" + } + }, + "(method 23 junglesnake)": { + "args": [ + "this" + ], + "vars": { + "v1-5": "root-prim" + } + }, + "(method 23 mistycannon)": { + "args": [ + "this" + ], + "vars": { + "v1-4": "rot-tracker", + "v1-12": "rot-tracker-2", + "v1-20": "rot-tracker-3", + "v1-28": "tilt-tracker", + "v1-36": "tilt-tracker-2", + "v1-44": "tilt-tracker-3", + "f0-18": "half-circle", + "f0-20": "half-circle-2", + "f0-22": "half-circle-3" + } + }, + "(method 23 mother-spider)": { + "args": [ + "this" + ], + "vars": { + "f2-0": "cur-dist", + "f1-0": "dist-error", + "f0-1": "thread-vel", + "f0-2": "new-vel", + "f3-4": "max-speed", + "f2-1": "new-dist", + "f3-8": "new-error", + "s5-0": "to-base", + "s5-1": "event-block", + "f0-4": "base-len", + "f1-11": "max-step", + "f0-5": "swing-speed", + "f0-6": "damped-speed", + "s4-0": "probe-start", + "s3-0": "probe-dir", + "v1-20": "probe-dir-tmp", + "f30-1": "elapsed-frames", + "f0-26": "swing-len", + "f30-2": "anchor-dist", + "f28-2": "swing-angle", + "f0-36": "swing-yaw", + "v1-51": "bounds", + "f0-44": "new-yaw", + "v1-59": "player-pos", + "f0-59": "target-yaw", + "v1-66": "player-pos", + "f0-69": "target-yaw" + } + }, + "(method 23 nav-control)": { + "args": [ + "this", + "travel-dir", + "info" + ], + "vars": { + "s2-1": "body-local", + "f30-0": "best-hit", + "s3-0": "best-sphere-idx", + "s1-0": "sphere-idx", + "s0-0": "sphere", + "f0-1": "hit", + "v1-5": "to-center", + "a1-4": "hit-sphere", + "v1-19": "sphere-world" + } + }, + "(method 23 nav-mesh)": { + "args": [ + "this", + "poly", + "start-pos", + "out-travel", + "desired-travel", + "portal" + ], + "vars": { + "s1-0": "verts", + "s0-0": "clipped-edge", + "a0-8": "edge-v0", + "a1-7": "edge-v1", + "f0-1": "edge-nx", + "f1-2": "edge-nz", + "f2-4": "edge-dist", + "f0-3": "travel-proj", + "f0-4": "frac", + "v1-11": "neighbor-idx", + "sv-16": "edge-vert1", + "a1-8": "edge-vert0" + } + }, + "(method 23 ogre-plat)": { + "args": [ + "this", + "sim-time" + ], + "vars": {} + }, + "(method 23 pontoon)": { + "args": [ + "this", + "sim-time" + ], + "vars": {} + }, + "(method 23 puffer)": { + "args": [ + "this", + "away-from-buddy" + ], + "vars": { + "v1-0": "buddy-proc", + "a0-1": "buddy", + "s4-0": "num-points", + "s5-0": "work", + "s3-0": "point-idx", + "f0-6": "dir-dot", + "s3-1": "remaining-points", + "s4-1": "candidate", + "s5-1": "start-point-idx" + } + }, + "(method 23 qbert-plat)": { + "args": [ + "this", + "time" + ], + "vars": {} + }, + "(method 23 rigid-body-platform)": { + "args": [ + "this", + "time" + ], + "vars": { + "s4-0": "mat", + "s3-0": "idx", + "s2-0": "control-point" + } + }, + "(method 23 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "target-rot" + } + }, + "(method 23 tar-plat)": { + "args": [ + "this", + "sim-time" + ], + "vars": {} + }, + "(method 23 tra-pontoon)": { + "args": [ + "this", + "sim-time" + ], + "vars": {} + }, + "(method 23 tracking-spline)": { + "args": [ + "obj" + ], + "vars": { + "s5-0": "cur-idx", + "s4-0": "next-idx", + "s3-0": "sample-pos", + "s5-1": "delta" + } + }, + "(method 24 citb-iris-door)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 citb-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 citb-plat-eco)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 citb-stopbox)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 driller-lurker)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "player-pos", + "f0-1": "height-diff", + "f0-2": "player-xz-dist", + "f0-3": "player-u", + "f1-5": "self-u" + } + }, + "(method 24 eco-door)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 exit-chamber)": { + "args": [ + "this", + "radius" + ], + "vars": { + "s4-0": "bone-mat", + "f30-0": "angle", + "f28-0": "height", + "gp-0": "spawn-pos" + } + }, + "(method 24 flutflut-plat-large)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim" + } + }, + "(method 24 flutflut-plat-med)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim" + } + }, + "(method 24 flutflut-plat-small)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim" + } + }, + "(method 24 gnawer)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "best-src", + "s4-0": "best-dest", + "f30-0": "best-dist", + "s3-0": "num-cverts", + "s2-0": "try-idx", + "s1-0": "cand-src", + "s0-0": "cand-dest", + "sv-48": "src-pos", + "sv-64": "dest-pos", + "f0-4": "dist", + "v1-13": "src-idx", + "s5-1": "dest-idx", + "f30-1": "src-y", + "f30-2": "dest-y", + "f30-3": "src-angle", + "f0-15": "dest-angle", + "f30-4": "raw-delta-ang", + "v0-13": "roll", + "f0-17": "turn-amount", + "f30-5": "horiz-dist", + "f28-0": "vert-dist", + "f0-25": "surf-dist" + } + }, + "(method 24 jng-iris-door)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 joint-exploder)": { + "args": [ + "this", + "list", + "joint-idx" + ], + "vars": { + "v0-0": "next-idx", + "v1-1": "joints", + "v1-2": "joint" + } + }, + "(method 24 junglesnake)": { + "args": [ + "this" + ], + "vars": { + "v1-4": "root-prim" + } + }, + "(method 24 mother-spider-proj)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "sound-param", + "a1-1": "sound-trans", + "s4-0": "proc", + "f0-5": "shadow-radius" + } + }, + "(method 24 nav-control)": { + "args": [ + "this", + "max-dist", + "info" + ], + "vars": { + "v1-0": "body-local" + } + }, + "(method 24 plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 plat-eco)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 projectile-yellow)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "sound-param", + "a1-3": "sound-pos", + "gp-1": "current-pp" + } + }, + "(method 24 puffer)": { + "args": [ + "this", + "point" + ], + "vars": {} + }, + "(method 24 ram-boss-proj)": { + "args": [ + "this" + ], + "vars": { + "f0-9": "shadow-radius", + "s5-0": "sound-param", + "a1-4": "sound-trans", + "gp-1": "proc" + } + }, + "(method 24 rigid-body-platform)": { + "args": [ + "this", + "control-point", + "time" + ], + "vars": { + "s4-0": "force", + "f0-2": "submerge-depth", + "f30-0": "submerge-fraction" + } + }, + "(method 24 rounddoor)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 seagull)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "to-target", + "v1-5": "bird-bit", + "v1-15": "bird", + "v1-18": "bird", + "f1-2": "heading-delta", + "f1-12": "heading-delta", + "f0-7": "tilt-val", + "f0-20": "tilt-val", + "f2-0": "max-tilt", + "f2-2": "max-tilt", + "f0-15": "target-angle", + "f0-28": "horiz-dist-sq" + } + }, + "(method 24 side-to-side-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 sidedoor)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 24 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "offset-delta", + "s3-0": "rotation-matrix", + "gp-0": "offset-step" + } + }, + "(method 24 tra-iris-door)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 25 driller-lurker)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "player-pos", + "f0-1": "height-diff", + "f0-8": "heading-to-player" + } + }, + "(method 25 gnawer)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "hit", + "s4-0": "seg-idx", + "s3-0": "seg", + "s1-0": "dir", + "s2-0": "seg-pos", + "v1-20": "other-seg" + } + }, + "(method 25 joint-exploder)": { + "args": [ + "this", + "list" + ], + "vars": { + "s4-0": "joints", + "f30-0": "gravity-step", + "s3-0": "cur-idx", + "s2-0": "joint", + "s1-0": "pos", + "f0-3": "cos-approx", + "f2-1": "sin-step", + "f5-0": "m00", + "f4-0": "m01", + "f3-0": "m10", + "f1-2": "m11" + } + }, + "(method 25 plat)": { + "args": [ + "this" + ], + "vars": { + "v0-0": "lc" + } + }, + "(method 25 puffer)": { + "args": [ + "this", + "max-dist" + ], + "vars": { + "gp-0": "target-pos", + "f30-0": "target-dist", + "a0-4": "buddy", + "v1-12": "buddy-proc" + } + }, + "(method 25 seagull)": { + "args": [ + "this", + "target-heading" + ], + "vars": { + "f1-1": "heading-delta", + "f0-5": "tilt-val", + "f2-0": "max-tilt" + } + }, + "(method 25 side-to-side-plat)": { + "args": [ + "this" + ], + "vars": { + "v0-0": "launch-ctrl" + } + }, + "(method 25 sunken-water)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "use-sync", + "f0-16": "deadly-percent" + } + }, + "(method 25 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "cur-speed", + "f1-1": "new-speed", + "f30-0": "new-u" + } + }, + "(method 25 water-anim)": { + "args": [ + "this" + ], + "vars": { + "sv-16": "res-tag", + "v1-3": "trans-offset", + "f0-6": "rot-offset" + } + }, + "(method 26 basebutton)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 26 citb-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 26 citb-launcher)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "spring-height", + "s5-0": "mode" + } + }, + "(method 26 citb-plat)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "scale" + } + }, + "(method 26 driller-lurker)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "player-pos", + "f0-1": "height-diff" + } + }, + "(method 26 joint-exploder)": { + "args": [ + "this", + "list", + "joint-idx" + ], + "vars": { + "v1-0": "joints", + "a2-1": "joint", + "a0-4": "prev-idx", + "v0-0": "next-idx", + "v1-2": "next-joint" + } + }, + "(method 26 mother-spider-proj)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 26 projectile)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 26 projectile-blue)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 26 puffer)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "phase" + } + }, + "(method 26 ram-boss-proj)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 26 rigid-body-platform)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "gravity-force" + } + }, + "(method 26 seagull)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "teleport-pos", + "f30-0": "offset-base", + "f28-0": "offset-range", + "f30-1": "offset-base", + "f28-1": "offset-range", + "f30-2": "offset-base", + "f28-2": "offset-range" + } + }, + "(method 26 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "v1-3": "variant", + "s5-0": "channel" + } + }, + "(method 26 warp-gate-switch)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "task", + "s5-0": "channel", + "s5-1": "channel" + } + }, + "(method 27 basebutton)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim-group", + "s3-0": "prim", + "s3-1": "prim-2" + } + }, + "(method 27 battlecontroller)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "valid-spawner-count", + "s4-0": "path-name-list", + "s2-0": "path-name", + "s3-0": "spawner", + "s5-3": "valid-type-count", + "sv-16": "lurker-type-tag", + "f0-6": "percent-sum", + "f0-9": "percent-scale", + "s5-1": "trigger-actor-count", + "s4-1": "trigger-idx", + "s5-2": "blocker-actor-count", + "s4-2": "blocker-idx" + } + }, + "(method 27 bone-platform)": { + "args": [ + "this", + "target-pos" + ], + "vars": { + "gp-0": "horiz-delta", + "f0-1": "dist", + "f1-1": "force-mag" + } + }, + "(method 27 citb-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 27 citb-chain-plat)": { + "args": [ + "this", + "target-pos" + ], + "vars": { + "gp-0": "offset", + "f0-1": "dist", + "f1-1": "force-mag" + } + }, + "(method 27 driller-lurker)": { + "args": [ + "this" + ], + "vars": { + "a2-0": "drill-tip-mat", + "s5-0": "spawn-pos" + } + }, + "(method 27 gnawer)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "num-cverts", + "s3-0": "death-count", + "s5-0": "money-mask", + "v1-14": "green-bit" + } + }, + "(method 27 joint-exploder)": { + "args": [ + "this", + "list", + "axis" + ], + "vars": { + "s4-0": "free-list", + "v1-0": "list-idx", + "a0-4": "candidate-list", + "s3-0": "dst-list", + "s2-0": "joints", + "s1-0": "cur-idx", + "f30-0": "split-mid", + "f30-1": "split-mid", + "f30-2": "split-mid", + "s0-0": "cur-joint", + "s0-1": "cur-joint", + "s0-2": "cur-joint", + "sv-16": "next-idx", + "sv-32": "next-idx", + "sv-48": "next-idx" + } + }, + "(method 27 nav-control)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "mesh", + "s5-0": "ray", + "s3-0": "iter-count", + "v1-7": "done" + } + }, + "(method 27 orbit-plat)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "other-actor", + "s5-0": "other-proc", + "f30-1": "current-angle", + "f0-9": "reset-angle", + "s4-0": "partner-pos", + "a0-7": "delta", + "s5-1": "next-point", + "f30-2": "radius", + "v1-9": "partner-pos-tmp", + "a1-5": "other-actor2", + "s5-2": "next-point2", + "s4-1": "partner-pos2", + "v1-20": "partner-pos2-tmp", + "a0-19": "other-actor3", + "s5-3": "saved-trans", + "v0-11": "result" + } + }, + "(method 27 plat-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 27 projectile-blue)": { + "args": [ + "this" + ], + "vars": { + "s5-1": "target-proc", + "v1-20": "target-pd" + } + }, + "(method 27 projectile-yellow)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "spawn-pos", + "f30-0": "launch-angle" + } + }, + "(method 27 puffer)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "bottom-y", + "f30-1": "attack-bottom", + "f0-22": "y-error", + "f0-37": "y-step", + "f1-27": "max-up-step", + "f1-29": "max-down-step" + } + }, + "(method 27 ram-boss-proj)": { + "args": [ + "this" + ], + "vars": { + "v1-12": "boss" + } + }, + "(method 27 rigid-body-platform)": { + "args": [ + "this", + "target-pos" + ], + "vars": { + "gp-0": "offset", + "f0-1": "dist", + "f1-1": "force-mag" + } + }, + "(method 27 seagull)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "displacement", + "a0-2": "cur-pos", + "s5-0": "velocity", + "a1-1": "next-pos", + "a2-0": "displacement", + "f0-0": "dt" + } + }, + "(method 27 square-platform)": { + "args": [ + "this", + "rising?" + ], + "vars": { + "s4-0": "probe-pos", + "v1-1": "water-ent", + "a0-4": "water-proc", + "v1-4": "water-ent2", + "f0-2": "surface-y", + "s3-0": "surface-pos", + "v1-21": "splash-count", + "v1-25": "submerge-count" + } + }, + "(method 27 sunken-elevator)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 27 sunkenfisha)": { + "args": [ + "this" + ], + "vars": { + "sv-16": "max-offset-tag", + "v1-5": "max-offset-data", + "sv-32": "trans-offset-tag", + "v1-16": "trans-offset-data", + "sv-48": "speed-tag", + "v1-23": "speed-data", + "f28-0": "min-speed", + "f30-0": "max-speed", + "f0-35": "path-len", + "s4-0": "path-tangent" + } + }, + "(method 27 warp-gate-switch)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim-group", + "s3-0": "prim-mesh" + } + }, + "(method 27 wedge-plat)": { + "args": [ + "this" + ], + "vars": { + "a0-1": "master", + "v1-0": "master-proc", + "s4-0": "center", + "f30-0": "dist", + "f28-0": "angle", + "s5-0": "tipped?", + "f0-16": "cos-angle" + } + }, + "(method 27 wedge-plat-outer)": { + "args": [ + "this" + ], + "vars": { + "a0-1": "master", + "v1-0": "master-proc", + "s4-0": "center", + "f30-0": "dist", + "f28-0": "angle", + "s5-0": "tipped?", + "f0-16": "sin-angle" + } + }, + "(method 28 citb-exit-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim", + "s3-0": "prim1", + "s3-1": "prim2" + } + }, + "(method 28 gnawer)": { + "args": [ + "this", + "num-bits", + "used-mask" + ], + "vars": { + "v1-1": "start-bit", + "a0-2": "bit-idx", + "a1-2": "bit" + } + }, + "(method 28 joint-exploder)": { + "args": [ + "this", + "list" + ], + "vars": { + "a1-2": "split-list", + "a1-5": "split-list", + "a1-8": "split-list" + } + }, + "(method 28 mother-spider-proj)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "target-pt", + "f0-2": "dist", + "a2-0": "player-vel", + "f0-3": "lead-scale" + } + }, + "(method 28 nav-control)": { + "args": [ + "this", + "collide-mask" + ], + "vars": { + "s4-0": "user-list", + "s3-0": "tmp-sphere", + "s1-0": "target-control", + "v1-71": "conn", + "s2-2": "next-conn", + "s0-3": "other-shape" + } + }, + "(method 28 orbit-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "player-pos" + } + }, + "(method 28 plat-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim", + "s3-0": "prim1", + "s3-1": "prim2" + } + }, + "(method 28 projectile-blue)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "target-proc", + "v1-4": "target-pd" + } + }, + "(method 28 projectile-yellow)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "best-target", + "s4-0": "mid-target", + "v1-10": "near-target", + "a1-8": "target-proc" + } + }, + "(method 28 puffer)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "ground-probe", + "a1-0": "probe-start", + "a2-0": "probe-dir" + } + }, + "(method 28 ram-boss-proj)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "target-pt", + "a2-0": "player-vel", + "f0-2": "dist", + "f0-3": "lead-scale" + } + }, + "(method 28 rigid-body-platform)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "dt", + "f28-0": "sim-time" + } + }, + "(method 29 basebutton)": { + "args": [ + "this", + "event", + "actor" + ], + "vars": { + "v1-0": "event-block", + "a1-1": "proc" + } + }, + "(method 29 gnawer)": { + "args": [ + "this", + "pt-index", + "pickup-pos", + "jump-vec" + ], + "vars": { + "s1-0": "num-cverts", + "s2-0": "tmp-pos", + "f30-0": "min-y", + "f28-0": "max-y", + "f30-1": "lowest-y", + "f28-1": "highest-y", + "f0-9": "jump-len" + } + }, + "(method 29 mother-spider)": { + "args": [ + "this", + "do-shadow?", + "do-look?" + ], + "vars": { + "v1-1": "now", + "f0-1": "stretch-dist", + "f0-2": "scale-frac", + "s4-1": "socket-mask", + "s3-0": "socket-index", + "v1-20": "leg-info", + "s2-0": "socket-pos" + } + }, + "(method 29 rigid-body-platform)": { + "args": [ + "this", + "constants" + ], + "vars": {} + }, + "(method 30 balloonlurker)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim", + "s3-0": "prim", + "s3-1": "prim", + "s3-2": "prim", + "s3-3": "prim" + } + }, + "(method 30 bone-platform)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 citb-chain-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 fishermans-boat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "group-prim", + "s3-0": "mesh-prim" + } + }, + "(method 30 gnawer)": { + "args": [ + "this", + "picker" + ], + "vars": { + "gp-0": "perm", + "s5-0": "money-mask", + "s2-0": "best-pt", + "f30-0": "best-dist", + "s1-0": "num-cverts", + "s0-0": "pt-idx", + "a2-0": "pickup-pos", + "sv-48": "jump-vec", + "f0-0": "dist", + "v0-2": "new-mask" + } + }, + "(method 30 nav-control)": { + "args": [ + "this", + "ray-origin", + "ray-dir", + "hit-out" + ], + "vars": { + "s5-0": "best-sphere", + "f30-0": "best-hit", + "s1-0": "sphere-idx", + "s0-0": "sphere", + "f0-1": "hit" + } + }, + "(method 30 ogre-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 pontoonfive)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 pontoonten)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 puffer)": { + "args": [ + "this" + ], + "vars": { + "v1-3": "root-prim", + "v0-0": "mouth-sphere" + } + }, + "(method 30 qbert-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 rigid-body-platform)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 tar-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 30 tra-pontoon)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 31 balloonlurker)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "idx", + "s4-0": "control-point", + "f30-0": "angle", + "v1-22": "rudder-point", + "v1-24": "engine-point", + "v1-26": "cm-point" + } + }, + "(method 31 bone-platform)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "point-count", + "s4-0": "point-idx", + "s3-0": "control-point", + "f30-0": "angle" + } + }, + "(method 31 citb-chain-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "point-count", + "s4-0": "point-idx", + "s3-0": "point", + "f30-0": "angle" + } + }, + "(method 31 fishermans-boat)": { + "args": [ + "this" + ], + "vars": { + "v1-39": "cp0", + "v1-41": "cp1", + "v1-43": "cp2", + "v1-45": "cp3", + "v1-47": "cp4", + "v1-49": "cp5", + "v1-50": "stabs" + } + }, + "(method 31 ogre-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "point-count", + "s4-0": "idx", + "s3-0": "point", + "f30-0": "angle", + "f28-0": "radius" + } + }, + "(method 31 ogre-step)": { + "args": [ + "this" + ], + "vars": { + "a0-5": "alt-actor" + } + }, + "(method 31 pontoonfive)": { + "args": [ + "this" + ], + "vars": { + "v1-6": "cp0", + "v1-8": "cp1", + "v1-10": "cp2", + "v1-12": "cp3" + } + }, + "(method 31 pontoonten)": { + "args": [ + "this" + ], + "vars": { + "v1-6": "cp0", + "v1-8": "cp1", + "v1-10": "cp2", + "v1-12": "cp3" + } + }, + "(method 31 puffer)": { + "args": [ + "this" + ], + "vars": { + "v1-3": "root-prim", + "v0-0": "mouth-sphere" + } + }, + "(method 31 qbert-plat)": { + "args": [ + "this" + ], + "vars": { + "v1-11": "cp0", + "v1-13": "cp1", + "v1-15": "cp2", + "v1-17": "cp3" + } + }, + "(method 31 rigid-body-platform)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "count", + "s4-0": "idx", + "s3-0": "control-point", + "f30-0": "angle" + } + }, + "(method 31 tar-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "num-points", + "s4-0": "point-idx", + "s3-0": "control-point", + "f26-0": "angle", + "f28-0": "radius", + "f30-0": "clamp" + } + }, + "(method 31 tra-pontoon)": { + "args": [ + "this" + ], + "vars": { + "v1-6": "cp0", + "v1-8": "cp1", + "v1-10": "cp2", + "v1-12": "cp3" + } + }, + "(method 32 nav-control)": { + "args": [ + "this", + "out-travel", + "start-pos", + "desired-travel", + "fallback-dir", + "unused" + ], + "vars": { + "gp-0": "work", + "s0-0": "sphere-idx", + "sv-208": "sphere", + "v1-31": "i", + "f0-21": "turn-cost", + "s1-1": "side", + "v1-38": "hit-sphere", + "v1-40": "i", + "s2-1": "inside-sphere", + "f30-2": "blend", + "f30-3": "dot0", + "f28-0": "dot1" + } + }, + "(method 32 qbert-plat)": { + "args": [ + "this" + ], + "vars": { + "v1-0": "master", + "a0-1": "master-proc", + "v1-3": "new-on?", + "gp-2": "child" + } + }, + "(method 33 nav-control)": { + "args": [ + "this", + "out-travel", + "start-pos", + "desired-travel", + "fallback-dir", + "unused" + ], + "vars": { + "f30-0": "orig-len", + "f0-0": "new-len" + } + }, + "(method 33 process-taskable)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim" + } + }, + "(method 33 qbert-plat)": { + "args": [ + "this" + ], + "vars": { + "a1-0": "master", + "v1-0": "master-proc" + } + }, + "(method 35 nav-control)": { + "args": [ + "this", + "out-travel", + "world-pos", + "desired-travel", + "fallback-dir", + "unused" + ], + "vars": { + "v1-0": "local-pos" + } + }, + "(method 37 sharkey)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "travel-dir" + } + }, + "(method 38 swamp-rat)": { + "args": [ + "this" + ], + "vars": { + "a1-1": "clamped-pos" + } + }, + "(method 40 process-taskable)": { + "args": [ + "this", + "actor", + "skel-group", + "center-joint", + "cam-joint", + "local-sphere", + "neck-joint" + ], + "vars": {} + }, + "(method 40 sharkey)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "horiz-dist", + "f30-0": "climb-ratio" + } + }, + "(method 41 nav-enemy)": { + "args": [ + "this" + ], + "vars": { + "f0-3": "speed-error", + "f1-4": "speed-step", + "f0-12": "travel-speed", + "v1-15": "travel-vel" + } + }, + "(method 41 sharkey)": { + "args": [ + "this" + ], + "vars": { + "f0-1": "speed-error", + "f1-3": "speed-step", + "f0-9": "travel-speed" + } + }, + "(method 43 assistant)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "ambient-pos", + "f0-2": "roll" + } + }, + "(method 43 assistant-bluehut)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "roll" + } + }, + "(method 43 assistant-villagec)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand-val", + "v1-16": "lava-status", + "v1-21": "lava-status-2", + "v1-26": "lava-status-3" + } + }, + "(method 43 billy)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "rng" + } + }, + "(method 43 bird-lady)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 blue-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand" + } + }, + "(method 43 explorer)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 farmer)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand-val" + } + }, + "(method 43 fisher)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll", + "f0-5": "roll-1" + } + }, + "(method 43 gambler)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 geologist)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "chatter-roll" + } + }, + "(method 43 mayor)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 minershort)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 red-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand" + } + }, + "(method 43 sage)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "ambient-dir", + "f0-2": "roll" + } + }, + "(method 43 sage-bluehut)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand" + } + }, + "(method 43 sage-villagec)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "chatter-roll" + } + }, + "(method 43 sculptor)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "chatter-roll" + } + }, + "(method 43 warrior)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "roll" + } + }, + "(method 43 yellow-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "rand" + } + }, + "(method 45 sage-finalboss)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "assistant-entity", + "s5-1": "assistant-proc" + } + }, + "(method 46 process-taskable)": { + "args": [ + "this" + ], + "vars": { + "s5-1": "to-target", + "s5-3": "to-target" + } + }, + "(method 48 baby-spider)": { + "args": [ + "this" + ], + "vars": { + "v1-11": "shadow-settings" + } + }, + "(method 48 double-lurker)": { + "args": [ + "this" + ], + "vars": { + "v1-7": "perm", + "s5-0": "spawn-pos", + "v1-29": "perm2" + } + }, + "(method 48 double-lurker-top)": { + "args": [ + "this" + ], + "vars": { + "v1-5": "parent" + } + }, + "(method 48 ram-boss)": { + "args": [ + "this" + ], + "vars": { + "v1-23": "jmod" + } + }, + "(method 50 nav-enemy)": { + "args": [ + "this", + "point" + ], + "vars": { + "s4-0": "saved-trans", + "gp-0": "nav", + "v1-8": "mesh-origin", + "f0-1": "point-off-x", + "f1-2": "point-off-z", + "a0-10": "sphere", + "f2-2": "dx", + "f3-1": "dz" + } + }, + "(method 51 baby-spider)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "rand01", + "f1-1": "speed-scale", + "f2-4": "inv-speed-scale", + "f0-2": "target-speed-scale" + } + }, + "(method 51 double-lurker)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "root-prim", + "a0-1": "prim-idx", + "a2-2": "prim", + "a0-4": "i", + "a1-3": "prim2" + } + }, + "(method 51 green-eco-lurker)": { + "args": [ + "this", + "candidate-point" + ], + "vars": { + "v1-3": "test-sphere" + } + }, + "(method 51 ice-cube)": { + "args": [ + "this", + "in-point", + "out-point" + ], + "vars": { + "s5-0": "probe-pt", + "s4-0": "probe-result", + "f0-0": "up-offset", + "f30-0": "probe-length" + } + }, + "(method 51 muse)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "idx", + "v1-2": "node-idx" + } + }, + "(method 51 ram-boss)": { + "args": [ + "this", + "throw-dir" + ], + "vars": { + "f30-0": "facing-y", + "f0-2": "throw-dir-angle", + "f0-3": "angle-diff" + } + }, + "(method 51 snow-bunny)": { + "args": [ + "this", + "in-point", + "out-point" + ], + "vars": { + "s5-0": "probe-pos", + "s4-0": "tri-result", + "f0-0": "gnd-popup", + "f30-0": "probe-dist", + "f0-2": "probe-frac" + } + }, + "(method 52 assistant)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl-1", + "a0-4": "shadow-ctrl-2" + } + }, + "(method 52 assistant-levitator)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl", + "a0-4": "shadow-ctrl" + } + }, + "(method 52 assistant-villagec)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl-2" + } + }, + "(method 52 baby-spider)": { + "args": [ + "this", + "base-pos" + ], + "vars": { + "a1-2": "to-spider", + "s2-0": "side-dir", + "v1-4": "wiggled-pos", + "v0-3": "nav-target" + } + }, + "(method 52 bird-lady)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl", + "a0-4": "shadow-ctrl" + } + }, + "(method 52 blue-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow", + "a0-1": "shadow", + "a0-3": "shadow" + } + }, + "(method 52 double-lurker)": { + "args": [ + "this", + "out-fall-dest" + ], + "vars": { + "a1-2": "nav-target", + "a1-5": "probe-start", + "s4-0": "ground-result" + } + }, + "(method 52 explorer)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl", + "a0-4": "shadow-ctrl" + } + }, + "(method 52 fisher)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl-1", + "a0-4": "shadow-ctrl-2" + } + }, + "(method 52 green-eco-lurker)": { + "args": [ + "this", + "out-point" + ], + "vars": { + "s4-0": "num-verts", + "s2-0": "vert-idx", + "s3-0": "remaining" + } + }, + "(method 52 ice-cube)": { + "args": [ + "this", + "candidate-pt" + ], + "vars": { + "f0-0": "dist-to-player", + "a0-4": "test-sphere" + } + }, + "(method 52 mayor)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl" + } + }, + "(method 52 minershort)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "sc", + "a0-4": "sc" + } + }, + "(method 52 minertall)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "sc", + "a0-4": "sc" + } + }, + "(method 52 process-taskable)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "a0-1": "shadow-ctrl" + } + }, + "(method 52 ram-boss)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "root-prim", + "v1-2": "shield-prim", + "v0-0": "shield-sphere" + } + }, + "(method 52 red-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow", + "a0-1": "shadow", + "a0-3": "shadow" + } + }, + "(method 52 sculptor)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl" + } + }, + "(method 52 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "dest", + "s5-2": "to-dest", + "f28-0": "dist-to-dest", + "f30-0": "hop-dist", + "s3-0": "hop-pos", + "s5-3": "travel", + "a2-3": "hop-target" + } + }, + "(method 52 warrior)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl-alias" + } + }, + "(method 52 yellow-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow", + "a0-1": "shadow", + "a0-3": "shadow" + } + }, + "(method 53 double-lurker)": { + "args": [ + "this", + "out-point" + ], + "vars": { + "s3-0": "verts-remaining", + "s4-0": "vert-index" + } + }, + "(method 53 green-eco-lurker)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "dest-y", + "v1-7": "shadow-ctrl" + } + }, + "(method 53 ice-cube)": { + "args": [ + "this", + "out-pos", + "out-dir" + ], + "vars": { + "s1-0": "vtx-idx", + "s2-0": "remaining", + "s3-0": "num-verts", + "a1-3": "probe-start", + "s3-1": "probe-result" + } + }, + "(method 53 ram-boss)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "prims", + "a0-1": "body-prim-0", + "a0-2": "body-prim-1", + "a0-3": "body-prim-2", + "v1-2": "shield-prim" + } + }, + "(method 53 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "num-verts", + "s2-0": "vert-idx", + "s5-0": "candidate-pos", + "s3-0": "i", + "f30-0": "dist-to-candidate" + } + }, + "(method 54 ice-cube)": { + "args": [ + "this", + "arg0" + ], + "vars": { + "s4-0": "num-verts", + "s2-0": "vtx-idx", + "s5-0": "candidate-pt", + "s3-0": "i" + } + }, + "(method 54 ram-boss)": { + "args": [ + "this", + "out-point" + ], + "vars": { + "a2-0": "joint-mat" + } + }, + "(method 54 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s5-1": "to-dest", + "f30-0": "dist-to-dest", + "f1-0": "halfway-dist", + "f0-1": "hop-scale", + "f28-0": "hop-dist", + "s4-0": "hop-pos", + "s5-2": "travel", + "a2-2": "hop-target" + } + }, + "(method 55 ram-boss)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "eye-pos", + "s4-0": "to-target", + "t2-0": "probe-result", + "v0-0": "clear?" + } + }, + "(method 55 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "work", + "s4-0": "nav", + "s4-1": "target-pos", + "s3-0": "player-yaw", + "a0-9": "away-yaw", + "s3-1": "rel-yaw", + "s2-0": "attempt", + "f30-0": "yaw-bias", + "f0-7": "yaw-offset", + "s1-0": "offset-vec", + "f30-1": "base-yaw", + "f0-10": "yaw", + "s1-1": "offset-vec2", + "s1-3": "to-dest", + "f0-12": "dist-to-dest", + "f1-4": "dist-scale", + "s1-4": "gap-info", + "s0-0": "travel", + "f30-2": "travel-len", + "s1-5": "hop-target" + } + }, + "(method 57 ram-boss)": { + "args": [ + "this", + "prev-interp" + ], + "vars": { + "f0-0": "pitch-factor", + "s3-0": "to-target", + "f0-1": "pitch-angle" + } + }, + "(method 57 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "xz-dist", + "f0-1": "approach-dist", + "f0-2": "approach-dist-adj", + "v1-13": "frames-to-reach" + } + }, + "(method 58 collide-shape-moving)": { + "args": [ + "this", + "arg0" + ], + "vars": { + "a1-1": "overlap-params" + } + }, + "(method 60 ice-cube)": { + "args": [ + "this", + "update-target?" + ], + "vars": { + "gp-0": "to-target" + } + }, + "(method 76 snow-bunny)": { + "args": [ + "this", + "airborne?" + ], + "vars": { + "f0-0": "bot-plane-y", + "v1-3": "shadow" + } + }, + "(method 9 cam-index)": { + "args": [ + "this", + "prop-name", + "entity", + "cam-pos", + "fallback-curve" + ], + "vars": { + "s3-2": "points-data", + "s0-1": "struct-getter", + "v0-8": "offset-vec", + "s4-1": "tmp-vec" + } + }, + "(method 9 cavecrystal-light-control)": { + "args": [ + "this", + "crystal-id", + "intensity", + "source-process" + ], + "vars": { + "s3-0": "crystal" + } + }, + "(method 9 edge-grab-info)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "actor-prim", + "v1-1": "prim-offset", + "a0-5": "actor-proc", + "s4-0": "bone-mat", + "s3-0": "vert-idx", + "f1-0": "cos-45", + "v1-21": "work", + "v1-22": "work", + "a1-14": "probe-params", + "a0-24": "jump-state", + "v1-40": "actor-cshape" + } + }, + "(method 9 effect-control)": { + "args": [ + "this" + ], + "vars": { + "a0-1": "skel", + "v1-3": "channel", + "s5-0": "frame-group", + "f30-0": "frame-num", + "a0-3": "num-func", + "f28-0": "prev-frame", + "f26-0": "cur-frame", + "v1-6": "name-tag-idx", + "f0-6": "param-frame" + } + }, + "(method 9 rigid-body)": { + "args": [ + "this", + "mass", + "size-x", + "size-y", + "size-z" + ], + "vars": {} + }, + "(method 9 swamp-bat-idle-path)": { + "args": [ + "this", + "out-pos", + "path-param" + ], + "vars": { + "f30-0": "angle" + } + }, + "(method 9 tippy)": { + "args": [ + "this", + "proc", + "ratio", + "damp" + ], + "vars": {} + }, + "(method 9 torus)": { + "args": [ + "this", + "color" + ], + "vars": { + "s0-0": "spoke", + "s4-0": "line-start", + "s3-0": "line-end", + "s2-0": "rot-mat", + "s1-0": "ring-verts", + "sv-256": "idx", + "sv-272": "seg-idx", + "sv-288": "ring-idx", + "s0-1": "ring-step", + "v1-21": "vert-idx" + } + }, + "(method 9 tracking-spline)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "live-count", + "s5-0": "live-mask", + "v1-0": "cur-pt", + "v1-9": "free-pt", + "a3-1": "free-count", + "v1-21": "idx" + } + }, + "(method 9 twister)": { + "args": [ + "this", + "start-joint", + "end-joint", + "max-dry-val" + ], + "vars": { + "v1-1": "joint-idx", + "a1-2": "end-idx" + } + }, + "(method play-anim! minershort)": { + "args": [ + "this", + "arg0" + ], + "vars": { + "s5-1": "task-ctrl", + "s4-0": "save-fn", + "s5-2": "task-ctrl", + "s4-1": "save-fn", + "s4-2": "reminder-idx", + "v1-59": "cur-idx", + "s4-3": "reward-count" + } + }, + "draw-npc-shadow": { + "args": [ + "this" + ], + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "initialize-collision": { + "args": [ + "this", + "arg0", + "arg1" + ], + "vars": { + "s5-0": "cshape", + "s4-0": "root-prim", + "s3-0": "sphere-prim", + "s3-1": "sphere-prim2" + } + }, + "play-anim!": { + "args": [ + "this", + "arg0" + ], + "vars": { + "s5-2": "alt-actor-idx", + "s4-2": "event-block", + "s3-0": "send-fn", + "v1-25": "alt-actor" + } + } +} diff --git a/goal_src/jak1/levels/jungleb/aphid.gc b/goal_src/jak1/levels/jungleb/aphid.gc index 54007e1e74..c7ece42dbe 100644 --- a/goal_src/jak1/levels/jungleb/aphid.gc +++ b/goal_src/jak1/levels/jungleb/aphid.gc @@ -8,6 +8,7 @@ (deftype aphid (nav-enemy) ((try int32))) + (defskelgroup *aphid-sg* aphid-lurker aphid-lurker-lod0-jg @@ -17,33 +18,35 @@ :shadow aphid-lurker-shadow-mg) (defbehavior aphid-invulnerable aphid () + "Make aphid invulnerable." (logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5)) - (set-collide-offense (-> self collide-info) 2 (collide-offense indestructible)) + (set-collide-offense (-> self root) 2 (collide-offense indestructible)) (none)) (defbehavior aphid-vulnerable aphid () + "remove invulnerability" (logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5)) - (set-collide-offense (-> self collide-info) 2 (collide-offense touch)) + (set-collide-offense (-> self root) 2 (collide-offense touch)) (none)) -(defmethod attack-handler ((this aphid) (arg0 process) (arg1 event-message-block)) +(defmethod attack-handler ((this aphid) (proc process) (msg-block event-message-block)) (cond - ((or (logtest? (-> this nav-enemy-flags) (nav-enemy-flags navenmf5)) (= arg0 (ppointer->process (-> this parent)))) - (send-event arg0 'get-attack-count 1) + ((or (logtest? (-> this nav-enemy-flags) (nav-enemy-flags navenmf5)) (= proc (ppointer->process (-> this parent)))) + (send-event proc 'get-attack-count 1) (logclear! (-> this mask) (process-mask actor-pause attackable)) (go (method-of-object this nav-enemy-die))) - (else (touch-handler this arg0 arg1)))) + (else (touch-handler this proc msg-block)))) (defstate nav-enemy-chase (aphid) :virtual #t :exit aphid-vulnerable :code (behavior () - (let ((gp-0 (cond - ((>= (-> self try) 15) 450) - ((>= (-> self try) 10) 300) - ((>= (-> self try) 5) 150) - (else 0)))) + (let ((time-adjust (cond + ((>= (-> self try) 15) 450) + ((>= (-> self try) 10) 300) + ((>= (-> self try) 5) 150) + (else 0)))) (loop (ja-channel-push! 1 (seconds 0.05)) (sound-play "aphid-spike-out") @@ -55,42 +58,42 @@ (ja-channel-push! 1 (seconds 0.1)) (ja :group! aphid-lurker-walk-deadly-ja) (ja :num-func num-func-identity :frame-num 0.0) - (let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)) - (s5-1 (current-time)) - (s4-1 (- (the int (nav-enemy-rnd-float-range 900.0 1440.0)) gp-0))) - (until (time-elapsed? s5-1 s4-1) + (let ((speed (nav-enemy-rnd-float-range 0.9 1.1))) + (let ((invuln-start-time (current-time)) + (invuln-duration (- (the int (nav-enemy-rnd-float-range 900.0 1440.0)) time-adjust))) + (until (time-elapsed? invuln-start-time invuln-duration) + (suspend) + (ja :num! (loop! speed)))) + (aphid-vulnerable) + (ja-channel-push! 1 (seconds 0.05)) + (sound-play "aphid-spike-in") + (ja-no-eval :group! aphid-lurker-spike-out-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) (suspend) - (ja :num! (loop! f30-0)))) - (aphid-vulnerable) - (ja-channel-push! 1 (seconds 0.05)) - (sound-play "aphid-spike-in") - (ja-no-eval :group! aphid-lurker-spike-out-ja :num! (seek! 0.0) :frame-num max) - (until (ja-done? 0) - (suspend) - (ja :num! (seek! 0.0))) - (ja-channel-push! 1 (seconds 0.1)) - (ja :group! (-> self draw art-group data (-> self nav-info run-anim))) - (ja :num-func num-func-identity :frame-num 0.0) - (let ((f30-1 (nav-enemy-rnd-float-range 0.9 1.1)) - (s5-3 (current-time)) - (s4-3 (+ (the int (nav-enemy-rnd-float-range 660.0 900.0)) gp-0))) - (until (time-elapsed? s5-3 s4-3) - (suspend) - (ja :num! (loop! f30-1)))))))) + (ja :num! (seek! 0.0))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self nav-info run-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (set! speed (nav-enemy-rnd-float-range 0.9 1.1)) + (let ((run-start (current-time)) + (run-duration (+ (the int (nav-enemy-rnd-float-range 660.0 900.0)) time-adjust))) + (until (time-elapsed? run-start run-duration) + (suspend) + (ja :num! (loop! speed))))))))) (defstate nav-enemy-stare (aphid) :virtual #t :code (behavior () (set! (-> self turn-time) (seconds 0.2)) - (let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2))) - (when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)) + (let ((speed (nav-enemy-rnd-float-range 0.8 1.2))) + (when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags just-attacked)) (and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))) (ja-channel-push! 1 (seconds 0.1)) - (ja-no-eval :group! aphid-lurker-win-ja :num! (seek! max f30-0) :frame-num 0.0) + (ja-no-eval :group! aphid-lurker-win-ja :num! (seek! max speed) :frame-num 0.0) (until (ja-done? 0) (suspend) - (ja :num! (seek! max f30-0)))) + (ja :num! (seek! max speed)))) (loop (when (not (nav-enemy-facing-player? 2730.6667)) (logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)) @@ -105,10 +108,10 @@ (logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))) (when (nav-enemy-rnd-percent? 0.3) (if (not (ja-group? aphid-lurker-win-ja)) (ja-channel-push! 1 (seconds 0.1))) - (ja-no-eval :group! aphid-lurker-win-ja :num! (seek! max f30-0) :frame-num 0.0) + (ja-no-eval :group! aphid-lurker-win-ja :num! (seek! max speed) :frame-num 0.0) (until (ja-done? 0) (suspend) - (ja :num! (seek! max f30-0)))))))) + (ja :num! (seek! max speed)))))))) (defstate nav-enemy-give-up (aphid) :virtual #t @@ -117,9 +120,9 @@ (set! (-> self rotate-speed) 218453.33) (set! (-> self turn-time) (seconds 0.5)) (ja-channel-push! 1 (seconds 0.15)) - (let ((s4-0 (-> self collide-info)) - (s5-0 (target-pos 0))) - (when (< (fabs (deg-diff (y-angle s4-0) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans))))) + (let ((root (-> self root)) + (tgt-pos (target-pos 0))) + (when (< (fabs (deg-diff (y-angle root) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) tgt-pos (-> root trans))))) 12743.111) (ja-no-eval :group! aphid-lurker-give-up-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) @@ -129,10 +132,7 @@ (nav-enemy-get-new-patrol-point) (ja-no-eval :group! aphid-lurker-give-up-hop-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) - (seek-to-point-toward-point! (-> self collide-info) - (-> self nav destination-pos) - (-> self rotate-speed) - (-> self turn-time)) + (seek-to-point-toward-point! (-> self root) (-> self nav destination-pos) (-> self rotate-speed) (-> self turn-time)) (suspend) (ja :num! (seek!))) (go-virtual nav-enemy-patrol))) @@ -192,25 +192,26 @@ :debug-draw-jump #f)) (defmethod initialize-collision ((this aphid)) - (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) - (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) - (set! (-> s5-0 reaction) default-collision-reaction) - (set! (-> s5-0 no-reaction) (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)) - (let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) - (set! (-> s4-0 prim-core collide-as) (collide-kind enemy)) - (set! (-> s4-0 collide-with) (collide-kind target)) - (set! (-> s4-0 prim-core action) (collide-action solid)) - (set! (-> s4-0 prim-core offense) (collide-offense touch)) - (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 4096.0) - (set-root-prim! s5-0 s4-0)) - (set! (-> s5-0 nav-radius) 6144.0) - (backup-collide-with-as s5-0) - (set! (-> s5-0 max-iteration-count) (the-as uint 2)) - (set! (-> this collide-info) s5-0)) + (let ((cshape (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> cshape dynam) (copy *standard-dynamics* 'process)) + (set! (-> cshape reaction) default-collision-reaction) + (set! (-> cshape no-reaction) + (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)) + (let ((sph (new 'process 'collide-shape-prim-sphere cshape (the-as uint 3)))) + (set! (-> sph prim-core collide-as) (collide-kind enemy)) + (set! (-> sph collide-with) (collide-kind target)) + (set! (-> sph prim-core action) (collide-action solid)) + (set! (-> sph prim-core offense) (collide-offense touch)) + (set-vector! (-> sph local-sphere) 0.0 4096.0 0.0 4096.0) + (set-root-prim! cshape sph)) + (set! (-> cshape nav-radius) 6144.0) + (backup-collide-with-as cshape) + (set! (-> cshape max-iteration-count) (the-as uint 2)) + (set! (-> this root) cshape)) 0 (none)) -(defmethod nav-enemy-method-48 ((this aphid)) +(defmethod setup-enemy! ((this aphid)) (initialize-skeleton this *aphid-sg* '()) (init-defaults! this *aphid-nav-enemy-info*) (set! (-> this neck up) (the-as uint 0)) @@ -219,18 +220,19 @@ 0 (none)) -(defbehavior aphid-init-by-other aphid ((arg0 nav-enemy) (arg1 vector) (arg2 vector)) +(defbehavior aphid-init-by-other aphid ((parent-boss nav-enemy) (pos vector) (dest vector)) + "Initialize an `aphid` and enter chase state." (initialize-collision self) (logior! (-> self mask) (process-mask actor-pause)) - (set! (-> self collide-info trans quad) (-> arg1 quad)) - (set! (-> self event-param-point quad) (-> arg2 quad)) - (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) - (set! (-> s3-1 y) 0.0) - (vector-normalize! s3-1 1.0) - (forward-up->quaternion (-> self collide-info quat) s3-1 *up-vector*)) - (vector-identity! (-> self collide-info scale)) - (set! (-> self entity) (-> arg0 entity)) - (nav-enemy-method-48 self) + (set! (-> self root trans quad) (-> pos quad)) + (set! (-> self event-param-point quad) (-> dest quad)) + (let ((to-dest (vector-! (new 'stack-no-clear 'vector) dest pos))) + (set! (-> to-dest y) 0.0) + (vector-normalize! to-dest 1.0) + (forward-up->quaternion (-> self root quat) to-dest *up-vector*)) + (vector-identity! (-> self root scale)) + (set! (-> self entity) (-> parent-boss entity)) + (setup-enemy! self) (logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf12)) (set! (-> self try) (the-as int (send-event (ppointer->process (-> self parent)) 'try))) (go-virtual nav-enemy-chase) diff --git a/scripts/gsrc/var-name-editor-v2.py b/scripts/gsrc/var-name-editor-v2.py new file mode 100755 index 0000000000..d1d9aa6513 --- /dev/null +++ b/scripts/gsrc/var-name-editor-v2.py @@ -0,0 +1,999 @@ +#!/usr/bin/env python3 +"""Qt editor for decompiler var_names and method docstrings.""" + +import argparse +import bisect +import json +import re +import sys +from dataclasses import dataclass, field +from pathlib import Path + +from PyQt5 import QtCore, QtGui, QtWidgets + + +DEFAULT_VAR_NAMES = Path("decompiler/config/jak1/ntsc_v1/var_names.jsonc") +DEFAULT_METHOD_DOCS = Path("docs/jak1_cleanup_inputs/method_names.jsonc") + +FUNCTION_COMMENT_RE = re.compile( + r"^;; definition (?:\(debug\) )?for (?:function|behavior) (?P.+?)\s*$" +) +METHOD_COMMENT_RE = re.compile(r"^;; definition for method (?P\d+) of type (?P\S+)\s*$") +DEF_HEADER_RE = re.compile(r"\((?:defun|defun-debug|defmethod|defbehavior)\s+(?P\S+)") +STATE_HEADER_RE = re.compile( + r"^[ \t]*\(\s*defstate\s+(?P\S+)\s+\(\s*(?P\S+)\s*\)", re.MULTILINE +) +BEHAVIOR_HEADER_RE = re.compile(r"\(\s*behavior\b") +LOCAL_VAR_RE = re.compile(r"\b(?:(?:[avts]\d)|(?:f\d+)|(?:sv\d*)|gp|sp|fp|ra|r0|pp)-\d+\b") +STATE_HANDLER_NAMES = ("event", "enter", "post", "trans", "exit", "code") + + +@dataclass +class DefinitionBlock: + key: str + kind: str + display_name: str + text: str + start_line: int + end_line: int + method_id: int | None = None + type_name: str | None = None + args: list[str] = field(default_factory=list) + + @property + def label(self) -> str: + return f"{self.kind:8} {self.key} ({self.start_line}-{self.end_line})" + + +def strip_jsonc(text: str) -> str: + out = [] + i = 0 + in_string = False + escaped = False + + while i < len(text): + char = text[i] + if in_string: + out.append(char) + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + i += 1 + continue + + if char == '"': + in_string = True + out.append(char) + i += 1 + continue + + if char == "/" and i + 1 < len(text) and text[i + 1] == "/": + i += 2 + while i < len(text) and text[i] not in "\r\n": + i += 1 + continue + + if char == "/" and i + 1 < len(text) and text[i + 1] == "*": + i += 2 + while i + 1 < len(text) and not (text[i] == "*" and text[i + 1] == "/"): + i += 1 + i += 2 + continue + + out.append(char) + i += 1 + + return "".join(out) + + +def remove_trailing_commas(text: str) -> str: + out = [] + i = 0 + in_string = False + escaped = False + + while i < len(text): + char = text[i] + if in_string: + out.append(char) + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + i += 1 + continue + + if char == '"': + in_string = True + out.append(char) + i += 1 + continue + + if char == ",": + j = i + 1 + while j < len(text) and text[j].isspace(): + j += 1 + if j < len(text) and text[j] in "}]": + i += 1 + continue + + out.append(char) + i += 1 + + return "".join(out) + + +def load_jsonc(path: Path) -> dict: + if not path or not path.exists(): + return {} + return json.loads(remove_trailing_commas(strip_jsonc(path.read_text()))) + + +def save_json(path: Path, data: dict) -> None: + path.write_text(json.dumps(data, indent=2, sort_keys=True) + "\n") + + +def monospace_font() -> QtGui.QFont: + font = QtGui.QFont("monospace") + font.setStyleHint(QtGui.QFont.Monospace) + return font + + +def sexpr_text_from_header(text: str) -> str: + start = text.find("(def") + if start < 0: + return "" + + depth = 0 + in_string = False + escaped = False + for idx, char in enumerate(text[start:], start): + if in_string: + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + continue + + if char == '"': + in_string = True + elif char == "(": + depth += 1 + elif char == ")": + depth -= 1 + if depth == 0: + return text[start : idx + 1] + return "" + + +def first_list_after_def_name(header: str) -> str: + if not header: + return "" + header_match = DEF_HEADER_RE.search(header) + if not header_match: + return "" + start = header.find("(", header_match.end()) + if start < 0: + return "" + + depth = 0 + in_string = False + escaped = False + for idx, char in enumerate(header[start:], start): + if in_string: + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + continue + + if char == '"': + in_string = True + elif char == "(": + depth += 1 + elif char == ")": + depth -= 1 + if depth == 0: + return header[start : idx + 1] + return "" + + +def parse_arg_names_from_list(arg_list: str) -> list[str]: + if len(arg_list) < 2: + return [] + + args = [] + inner = arg_list[1:-1] + depth = 0 + start = None + bare_token_start = None + for idx, char in enumerate(inner): + if char == "(": + if depth == 0 and bare_token_start is not None: + args.append(inner[bare_token_start:idx].strip()) + bare_token_start = None + if depth == 0: + start = idx + depth += 1 + elif char == ")": + depth -= 1 + if depth == 0 and start is not None: + arg_expr = inner[start : idx + 1] + arg_match = re.match(r"\(\s*(\S+)", arg_expr) + if arg_match: + args.append(arg_match.group(1)) + start = None + elif depth == 0 and char.isspace(): + if bare_token_start is not None: + args.append(inner[bare_token_start:idx].strip()) + bare_token_start = None + elif depth == 0 and bare_token_start is None: + bare_token_start = idx + + if bare_token_start is not None: + args.append(inner[bare_token_start:].strip()) + + return [arg for arg in args if arg] + + +def parse_args_from_header(header: str) -> list[str]: + return parse_arg_names_from_list(first_list_after_def_name(header)) + + +def first_list_after_behavior_name(header: str) -> str: + if not header: + return "" + header_match = BEHAVIOR_HEADER_RE.search(header) + if not header_match: + return "" + start = header.find("(", header_match.end()) + if start < 0: + return "" + + depth = 0 + in_string = False + escaped = False + for idx, char in enumerate(header[start:], start): + if in_string: + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + continue + + if char == '"': + in_string = True + elif char == "(": + depth += 1 + elif char == ")": + depth -= 1 + if depth == 0: + return header[start : idx + 1] + return "" + + +def parse_args_from_behavior(header: str) -> list[str]: + return parse_arg_names_from_list(first_list_after_behavior_name(header)) + + +def line_start_offsets(text: str) -> list[int]: + starts = [0] + for idx, char in enumerate(text): + if char == "\n": + starts.append(idx + 1) + return starts + + +def line_number_for_offset(starts: list[int], offset: int) -> int: + return bisect.bisect_right(starts, offset) + + +def skip_ws_and_line_comments(text: str, pos: int, end: int | None = None) -> int: + if end is None: + end = len(text) + while pos < end: + if text[pos].isspace(): + pos += 1 + continue + if text[pos] == ";": + newline = text.find("\n", pos, end) + if newline < 0: + return end + pos = newline + 1 + continue + break + return pos + + +def find_matching_paren(text: str, open_idx: int, limit: int | None = None) -> int: + if limit is None: + limit = len(text) + + depth = 0 + in_string = False + escaped = False + in_line_comment = False + idx = open_idx + while idx < limit: + char = text[idx] + if in_line_comment: + if char == "\n": + in_line_comment = False + idx += 1 + continue + + if in_string: + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + idx += 1 + continue + + if char == ";": + in_line_comment = True + elif char == '"': + in_string = True + elif char == "(": + depth += 1 + elif char == ")": + depth -= 1 + if depth == 0: + return idx + idx += 1 + + return -1 + + +def read_expr_range(text: str, pos: int, limit: int) -> tuple[int, int] | None: + pos = skip_ws_and_line_comments(text, pos, limit) + if pos >= limit: + return None + + if text[pos] == "(": + end = find_matching_paren(text, pos, limit) + if end < 0: + return None + return pos, end + 1 + + end = pos + while end < limit and not text[end].isspace() and text[end] not in "()": + end += 1 + return pos, end + + +def iter_state_handler_exprs(text: str, form_start: int, form_end: int): + depth = 1 + in_string = False + escaped = False + in_line_comment = False + idx = form_start + 1 + + while idx < form_end: + char = text[idx] + if in_line_comment: + if char == "\n": + in_line_comment = False + idx += 1 + continue + + if in_string: + if escaped: + escaped = False + elif char == "\\": + escaped = True + elif char == '"': + in_string = False + idx += 1 + continue + + if char == ";": + in_line_comment = True + idx += 1 + continue + if char == '"': + in_string = True + idx += 1 + continue + + if depth == 1 and char == ":": + for handler in STATE_HANDLER_NAMES: + keyword = f":{handler}" + keyword_end = idx + len(keyword) + if text.startswith(keyword, idx) and ( + keyword_end >= form_end or text[keyword_end].isspace() or text[keyword_end] in "()" + ): + expr_range = read_expr_range(text, keyword_end, form_end) + if expr_range: + expr_start, expr_end = expr_range + yield handler, idx, expr_start, expr_end + idx = expr_end + break + else: + idx += 1 + continue + + if char == "(": + depth += 1 + elif char == ")": + depth -= 1 + idx += 1 + + +def parse_state_blocks(path: Path) -> list[DefinitionBlock]: + text = path.read_text() + starts = line_start_offsets(text) + blocks = [] + + for match in STATE_HEADER_RE.finditer(text): + form_start = match.start() + form_end = find_matching_paren(text, form_start) + if form_end < 0: + continue + + state_name = match.group("state") + type_name = match.group("type") + for handler, keyword_start, expr_start, expr_end in iter_state_handler_exprs(text, form_start, form_end): + expr_text = text[expr_start:expr_end] + if not BEHAVIOR_HEADER_RE.match(expr_text.lstrip()): + continue + + block_text = f";; state {handler} for {state_name} ({type_name})\n{text[keyword_start:expr_end]}\n" + key = f"({handler} {state_name} {type_name})" + blocks.append( + DefinitionBlock( + key=key, + kind=f"state-{handler}", + display_name=f"{handler} {state_name} {type_name}", + text=block_text, + start_line=line_number_for_offset(starts, keyword_start), + end_line=line_number_for_offset(starts, expr_end), + type_name=type_name, + args=parse_args_from_behavior(expr_text), + ) + ) + + return blocks + + +def parse_display_name(header: str, fallback: str) -> str: + match = DEF_HEADER_RE.search(header) + return match.group("name") if match else fallback + + +def parse_disasm(path: Path) -> list[DefinitionBlock]: + lines = path.read_text().splitlines() + starts = [] + + for idx, line in enumerate(lines): + function_match = FUNCTION_COMMENT_RE.match(line) + if function_match: + name = function_match.group("name") + starts.append((idx, "function", name, None, None)) + continue + + method_match = METHOD_COMMENT_RE.match(line) + if method_match: + method_id = int(method_match.group("id")) + type_name = method_match.group("type") + key = f"(method {method_id} {type_name})" + starts.append((idx, "method", key, method_id, type_name)) + + blocks = [] + for start_idx, (line_idx, kind, key, method_id, type_name) in enumerate(starts): + end_idx = starts[start_idx + 1][0] if start_idx + 1 < len(starts) else len(lines) + text = "\n".join(lines[line_idx:end_idx]) + if end_idx > line_idx: + text += "\n" + header = sexpr_text_from_header(text) + blocks.append( + DefinitionBlock( + key=key, + kind=kind, + display_name=parse_display_name(header, key), + text=text, + start_line=line_idx + 1, + end_line=end_idx, + method_id=method_id, + type_name=type_name, + args=parse_args_from_header(header), + ) + ) + + blocks.extend(parse_state_blocks(path)) + blocks.sort(key=lambda block: (block.start_line, block.end_line, block.kind)) + return blocks + + +def get_local_override_name(value): + if isinstance(value, str): + return value + if isinstance(value, list) and value: + return value[0] + return None + + +def set_local_override(entry: dict, var_id: str, new_name: str) -> None: + vars_entry = entry.setdefault("vars", {}) + existing = vars_entry.get(var_id) + if isinstance(existing, list) and len(existing) >= 2: + updated = list(existing) + updated[0] = new_name + vars_entry[var_id] = updated + else: + vars_entry[var_id] = new_name + + +class DefinitionTextEdit(QtWidgets.QTextEdit): + clicked_at = QtCore.pyqtSignal(QtCore.QPoint) + + def mousePressEvent(self, event): + super().mousePressEvent(event) + self.clicked_at.emit(event.pos()) + + +class ColumnGuideTextEdit(QtWidgets.QTextEdit): + def __init__(self, column: int, parent=None): + super().__init__(parent) + self.column = column + self.setFont(monospace_font()) + self.setLineWrapMode(QtWidgets.QTextEdit.NoWrap) + + def paintEvent(self, event): + super().paintEvent(event) + font_metrics = QtGui.QFontMetrics(self.font()) + column_x = ( + self.document().documentMargin() + + font_metrics.horizontalAdvance(" ") * self.column + - self.horizontalScrollBar().value() + ) + if column_x < 0 or column_x > self.viewport().width(): + return + + painter = QtGui.QPainter(self.viewport()) + pen = QtGui.QPen(QtGui.QColor("#d1d5db")) + pen.setWidth(1) + painter.setPen(pen) + x = int(column_x) + painter.drawLine(x, 0, x, self.viewport().height()) + + +class VarNameEditor(QtWidgets.QMainWindow): + def __init__(self, args): + super().__init__() + self.setWindowTitle("OpenGOAL Variable Name Editor") + self.resize(1320, 840) + + self.disasm_path = Path(args.disasm).resolve() if args.disasm else None + self.var_names_path = Path(args.var_names).resolve() if args.var_names else DEFAULT_VAR_NAMES.resolve() + self.method_docs_path = ( + Path(args.method_docs).resolve() if args.method_docs else DEFAULT_METHOD_DOCS.resolve() + ) + + self.blocks: list[DefinitionBlock] = [] + self.filtered_blocks: list[DefinitionBlock] = [] + self.current_block: DefinitionBlock | None = None + self.var_names = {} + self.method_docs = {} + self.disasm_files: list[Path] = [] + self.filtered_disasm_files: list[Path] = [] + self.token_ranges = [] + self.selected_token = None + self.dirty_vars = False + self.dirty_docs = False + + self._build_ui() + self._load_initial_files() + + def _build_ui(self) -> None: + root = QtWidgets.QWidget() + self.setCentralWidget(root) + layout = QtWidgets.QVBoxLayout(root) + + toolbar = QtWidgets.QHBoxLayout() + layout.addLayout(toolbar) + + open_disasm = QtWidgets.QPushButton("Open Disasm") + open_disasm.clicked.connect(self.open_disasm) + toolbar.addWidget(open_disasm) + self.disasm_edit = QtWidgets.QLineEdit() + toolbar.addWidget(self.disasm_edit, 2) + + load_vars = QtWidgets.QPushButton("Load Vars") + load_vars.clicked.connect(self.load_var_names_dialog) + toolbar.addWidget(load_vars) + self.var_path_edit = QtWidgets.QLineEdit() + toolbar.addWidget(self.var_path_edit, 2) + save_vars = QtWidgets.QPushButton("Save Vars") + save_vars.clicked.connect(self.save_var_names) + toolbar.addWidget(save_vars) + + load_docs = QtWidgets.QPushButton("Load Docs") + load_docs.clicked.connect(self.load_method_docs_dialog) + toolbar.addWidget(load_docs) + self.docs_path_edit = QtWidgets.QLineEdit() + toolbar.addWidget(self.docs_path_edit, 2) + save_docs = QtWidgets.QPushButton("Save Docs") + save_docs.clicked.connect(self.save_method_docs) + toolbar.addWidget(save_docs) + + filter_layout = QtWidgets.QHBoxLayout() + layout.addLayout(filter_layout) + filter_layout.addWidget(QtWidgets.QLabel("Definition Filter")) + self.filter_edit = QtWidgets.QLineEdit() + self.filter_edit.textChanged.connect(self.refresh_definition_list) + filter_layout.addWidget(self.filter_edit) + + splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal) + layout.addWidget(splitter, 1) + + file_panel = QtWidgets.QWidget() + file_layout = QtWidgets.QVBoxLayout(file_panel) + file_layout.setContentsMargins(0, 0, 0, 0) + file_layout.addWidget(QtWidgets.QLabel("File Filter")) + self.file_filter_edit = QtWidgets.QLineEdit() + self.file_filter_edit.setPlaceholderText("Partial filename") + self.file_filter_edit.textChanged.connect(lambda _text: self.apply_file_filter()) + file_layout.addWidget(self.file_filter_edit) + self.file_list = QtWidgets.QListWidget() + self.file_list.currentRowChanged.connect(self.on_file_selected) + file_layout.addWidget(self.file_list, 1) + splitter.addWidget(file_panel) + + self.definition_list = QtWidgets.QListWidget() + self.definition_list.currentRowChanged.connect(self.on_definition_selected) + splitter.addWidget(self.definition_list) + + self.text = DefinitionTextEdit() + self.text.setReadOnly(False) + self.text.setLineWrapMode(QtWidgets.QTextEdit.NoWrap) + self.text.setFont(monospace_font()) + self.text.clicked_at.connect(self.on_text_click) + splitter.addWidget(self.text) + splitter.setStretchFactor(0, 1) + splitter.setStretchFactor(1, 2) + splitter.setStretchFactor(2, 6) + + bottom = QtWidgets.QGridLayout() + layout.addLayout(bottom) + bottom.addWidget(QtWidgets.QLabel("Selected"), 0, 0) + self.selected_edit = QtWidgets.QLineEdit() + self.selected_edit.setReadOnly(True) + bottom.addWidget(self.selected_edit, 0, 1) + bottom.addWidget(QtWidgets.QLabel("Rename To"), 0, 2) + self.rename_edit = QtWidgets.QLineEdit() + self.rename_edit.returnPressed.connect(self.apply_rename) + bottom.addWidget(self.rename_edit, 0, 3) + apply_rename = QtWidgets.QPushButton("Apply Rename") + apply_rename.clicked.connect(self.apply_rename) + bottom.addWidget(apply_rename, 0, 4) + + doc_group = QtWidgets.QGroupBox("Function/Method Docstring") + doc_layout = QtWidgets.QHBoxLayout(doc_group) + self.doc_text = ColumnGuideTextEdit(110) + self.doc_text.setFixedHeight(90) + doc_layout.addWidget(self.doc_text, 1) + apply_doc = QtWidgets.QPushButton("Apply Docstring") + apply_doc.clicked.connect(self.apply_docstring) + doc_layout.addWidget(apply_doc) + bottom.addWidget(doc_group, 1, 0, 1, 5) + + self.statusBar() + + def _load_initial_files(self) -> None: + self.var_path_edit.setText(str(self.var_names_path)) + self.docs_path_edit.setText(str(self.method_docs_path)) + self.var_names = load_jsonc(self.var_names_path) + self.method_docs = load_jsonc(self.method_docs_path) + if self.disasm_path: + self.load_disasm(self.disasm_path) + else: + self.set_status("Open a *_disasm.gc file to begin.") + + def set_status(self, text: str) -> None: + self.statusBar().showMessage(text) + + def open_disasm(self) -> None: + path, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "Open decompiler output", "", "GOAL disassembly (*_disasm.gc);;GOAL (*.gc);;All (*)" + ) + if path: + self.load_disasm(Path(path)) + + def load_disasm(self, path: Path) -> None: + self.disasm_path = path.resolve() + self.disasm_edit.setText(str(self.disasm_path)) + self.refresh_file_list(self.disasm_path.parent, self.disasm_path) + self.blocks = parse_disasm(self.disasm_path) + self.refresh_definition_list() + if self.blocks: + self.definition_list.setCurrentRow(0) + self.set_status(f"Loaded {len(self.blocks)} definitions from {self.disasm_path}") + + def refresh_file_list(self, directory: Path, current_path: Path | None = None) -> None: + self.disasm_files = sorted(directory.glob("*_disasm.gc")) + self.apply_file_filter(current_path) + + def apply_file_filter(self, current_path: Path | None = None) -> None: + query = self.file_filter_edit.text().strip().lower() + self.filtered_disasm_files = [ + path for path in self.disasm_files if not query or query in path.name.lower() + ] + self.file_list.blockSignals(True) + self.file_list.clear() + selected_row = -1 + active_path = current_path or self.disasm_path + for index, path in enumerate(self.filtered_disasm_files): + self.file_list.addItem(path.name) + if active_path and path.resolve() == active_path.resolve(): + selected_row = index + if selected_row >= 0: + self.file_list.setCurrentRow(selected_row) + self.file_list.blockSignals(False) + + def on_file_selected(self, row: int) -> None: + if row < 0 or row >= len(self.filtered_disasm_files): + return + path = self.filtered_disasm_files[row] + if self.disasm_path and path.resolve() == self.disasm_path.resolve(): + return + self.load_disasm(path) + + def load_var_names_dialog(self) -> None: + path, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "Load var_names.jsonc", "", "JSONC (*.jsonc);;JSON (*.json);;All (*)" + ) + if path: + self.var_names_path = Path(path).resolve() + self.var_path_edit.setText(str(self.var_names_path)) + self.var_names = load_jsonc(self.var_names_path) + self.dirty_vars = False + self.render_current_block() + self.set_status(f"Loaded variable names from {self.var_names_path}") + + def load_method_docs_dialog(self) -> None: + path, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "Load method docstrings", "", "JSONC (*.jsonc);;JSON (*.json);;All (*)" + ) + if path: + self.method_docs_path = Path(path).resolve() + self.docs_path_edit.setText(str(self.method_docs_path)) + self.method_docs = load_jsonc(self.method_docs_path) + self.dirty_docs = False + self.render_current_block() + self.set_status(f"Loaded method docstrings from {self.method_docs_path}") + + def save_var_names(self) -> None: + path = Path(self.var_path_edit.text()).expanduser() + save_json(path, self.var_names) + self.var_names_path = path.resolve() + self.dirty_vars = False + self.set_status(f"Saved variable names to {self.var_names_path}") + + def save_method_docs(self) -> None: + path = Path(self.docs_path_edit.text()).expanduser() + save_json(path, self.method_docs) + self.method_docs_path = path.resolve() + self.dirty_docs = False + self.set_status(f"Saved method docstrings to {self.method_docs_path}") + + def refresh_definition_list(self) -> None: + query = self.filter_edit.text().strip().lower() + self.filtered_blocks = [ + block + for block in self.blocks + if not query or query in block.label.lower() or query in block.display_name.lower() + ] + self.definition_list.clear() + for block in self.filtered_blocks: + self.definition_list.addItem(block.label) + + def on_definition_selected(self, row: int) -> None: + if row < 0 or row >= len(self.filtered_blocks): + return + self.current_block = self.filtered_blocks[row] + self.selected_token = None + self.selected_edit.clear() + self.rename_edit.clear() + self.render_current_block() + + def entry_for_current_block(self) -> dict: + if not self.current_block: + return {} + return self.var_names.setdefault(self.current_block.key, {}) + + def current_arg_names(self) -> list[str]: + block = self.current_block + if not block: + return [] + entry = self.entry_for_current_block() + configured = entry.get("args", []) + result = [] + for index, original in enumerate(block.args): + result.append(configured[index] if index < len(configured) else original) + return result + + def current_docstring(self) -> str: + block = self.current_block + if not block: + return "" + entry = self.method_docs.get(block.key) + if isinstance(entry, list) and len(entry) >= 2: + return entry[1] + return "" + + def render_current_block(self) -> None: + block = self.current_block + self.text.clear() + self.doc_text.clear() + self.token_ranges = [] + + if not block: + return + + self.doc_text.setEnabled(block.kind in ("function", "method")) + if block.kind in ("function", "method"): + self.doc_text.setPlainText(self.current_docstring()) + + entry = self.entry_for_current_block() + local_overrides = { + key: get_local_override_name(value) for key, value in entry.get("vars", {}).items() + } + arg_names = self.current_arg_names() + arg_index_by_original = {arg: index for index, arg in enumerate(block.args)} + + arg_pattern = "|".join(re.escape(arg) for arg in sorted(block.args, key=len, reverse=True)) + token_re = re.compile(f"{LOCAL_VAR_RE.pattern}|\\b(?:{arg_pattern})\\b") if arg_pattern else LOCAL_VAR_RE + + output = [] + cursor = 0 + out_pos = 0 + for match in token_re.finditer(block.text): + prefix = block.text[cursor : match.start()] + output.append(prefix) + out_pos += len(prefix) + + token = match.group(0) + kind = "local" + token_id = token + replacement = local_overrides.get(token, token) + if token in arg_index_by_original: + kind = "arg" + token_id = str(arg_index_by_original[token]) + replacement = arg_names[arg_index_by_original[token]] + + start_pos = out_pos + output.append(replacement) + out_pos += len(replacement) + self.token_ranges.append((start_pos, out_pos, kind, token_id, replacement)) + cursor = match.end() + + output.append(block.text[cursor:]) + self.text.setPlainText("".join(output)) + self.apply_token_formatting() + + def apply_token_formatting(self) -> None: + self.update_extra_selections() + + def update_extra_selections(self) -> None: + selections = [] + + token_format = QtGui.QTextCharFormat() + token_format.setForeground(QtGui.QBrush(QtGui.QColor("#075985"))) + for start, end, _kind, _token_id, _replacement in self.token_ranges: + cursor = self.text.textCursor() + cursor.setPosition(start) + cursor.setPosition(end, QtGui.QTextCursor.KeepAnchor) + selection = QtWidgets.QTextEdit.ExtraSelection() + selection.cursor = cursor + selection.format = token_format + selections.append(selection) + + if self.selected_token: + kind, token_id, _replacement = self.selected_token + selection_format = QtGui.QTextCharFormat() + selection_format.setBackground(QtGui.QBrush(QtGui.QColor("#fde68a"))) + for start, end, range_kind, range_token_id, _range_replacement in self.token_ranges: + if range_kind == kind and range_token_id == token_id: + cursor = self.text.textCursor() + cursor.setPosition(start) + cursor.setPosition(end, QtGui.QTextCursor.KeepAnchor) + selection = QtWidgets.QTextEdit.ExtraSelection() + selection.cursor = cursor + selection.format = selection_format + selections.append(selection) + + self.text.setExtraSelections(selections) + + def token_at_position(self, position: int): + for start, end, kind, token_id, replacement in self.token_ranges: + if start <= position < end: + return kind, token_id, replacement + return None + + def on_text_click(self, point: QtCore.QPoint) -> None: + cursor = self.text.cursorForPosition(point) + token = self.token_at_position(cursor.position()) + if not token: + return + self.selected_token = token + kind, token_id, replacement = token + self.selected_edit.setText(f"arg[{token_id}]" if kind == "arg" else token_id) + self.rename_edit.setText(replacement) + self.rename_edit.setFocus(QtCore.Qt.MouseFocusReason) + self.rename_edit.selectAll() + self.highlight_selected_token() + + def highlight_selected_token(self) -> None: + self.update_extra_selections() + + def apply_rename(self) -> None: + if not self.current_block or not self.selected_token: + QtWidgets.QMessageBox.information(self, "No Variable Selected", "Click a variable first.") + return + new_name = self.rename_edit.text().strip() + if not new_name: + QtWidgets.QMessageBox.information(self, "Missing Name", "Enter a replacement name.") + return + + kind, token_id, _replacement = self.selected_token + entry = self.entry_for_current_block() + if kind == "arg": + index = int(token_id) + args = list(entry.get("args", [])) + while len(args) < len(self.current_block.args): + args.append(self.current_block.args[len(args)]) + args[index] = new_name + entry["args"] = args + else: + set_local_override(entry, token_id, new_name) + + self.dirty_vars = True + self.render_current_block() + self.set_status(f"Renamed {self.selected_edit.text()} to {new_name} in {self.current_block.key}") + + def apply_docstring(self) -> None: + block = self.current_block + if not block or block.kind not in ("function", "method"): + QtWidgets.QMessageBox.information( + self, "No Function/Method Selected", "Select a function or method first." + ) + return + docstring = self.doc_text.toPlainText().strip() + entry = self.method_docs.get(block.key) + if isinstance(entry, list) and len(entry) >= 2: + entry[1] = docstring + else: + self.method_docs[block.key] = [block.display_name, docstring] + self.dirty_docs = True + self.set_status(f"Updated docstring for {block.key}") + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("disasm", nargs="?", help="input *_disasm.gc file") + parser.add_argument("--var-names", default=str(DEFAULT_VAR_NAMES), help="var_names JSON/JSONC file") + parser.add_argument("--method-docs", default=str(DEFAULT_METHOD_DOCS), help="method docstrings JSON/JSONC file") + args = parser.parse_args() + + app = QtWidgets.QApplication(sys.argv) + window = VarNameEditor(args) + window.show() + sys.exit(app.exec_()) + + +if __name__ == "__main__": + main()