mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 22:35:07 -04:00
joint
This commit is contained in:
@@ -11029,7 +11029,7 @@ intended for uncompressed animation objects."
|
||||
(root-channel (inline-array joint-control-channel) :offset 16)
|
||||
(blend-index int32 :offset-assert 20)
|
||||
(active-channels int32 :offset-assert 24)
|
||||
(generate-frame-function (function (inline-array vector) int process-drawable int) :offset-assert 28)
|
||||
(generate-frame-function (function joint-anim-frame int process-drawable none) :offset-assert 28)
|
||||
(prebind-function (function pointer int process-drawable none) :offset-assert 32)
|
||||
(postbind-function (function process-drawable none) :offset-assert 36)
|
||||
(effect effect-control :offset-assert 40)
|
||||
@@ -19651,7 +19651,7 @@ to matrix-bits in the compressed header."
|
||||
(define-extern create-interpolated-joint-animation-frame
|
||||
"Generate a drawable's blended joint-animation frame. The GOAL decompressor is normally used;
|
||||
the original scratchpad decompressor remains available through the development switch."
|
||||
(function (inline-array vector) int process-drawable int))
|
||||
(function joint-anim-frame int process-drawable none))
|
||||
(define-extern mem-size
|
||||
"Collect value's memory categories using flags, optionally print the complete category table,
|
||||
and return the sum of aligned total bytes."
|
||||
|
||||
@@ -166,7 +166,6 @@ set(RUNTIME_SOURCE
|
||||
mips2c/jak1_functions/generic_effect2.cpp
|
||||
mips2c/jak1_functions/generic_merc.cpp
|
||||
mips2c/jak1_functions/generic_tie.cpp
|
||||
mips2c/jak1_functions/joint.cpp
|
||||
mips2c/jak1_functions/merc_blend_shape.cpp
|
||||
mips2c/jak1_functions/ocean_vu0.cpp
|
||||
mips2c/jak1_functions/ocean.cpp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,9 +68,7 @@ namespace method_16_collide_edge_work { extern void link(); }
|
||||
namespace method_15_collide_edge_work { extern void link(); }
|
||||
namespace method_10_collide_edge_hold_list { extern void link(); }
|
||||
namespace method_18_collide_edge_work { extern void link(); }
|
||||
namespace calc_animation_from_spr { extern void link(); }
|
||||
namespace bones_mtx_calc { extern void link(); }
|
||||
namespace cspace_parented_transformq_joint { extern void link(); }
|
||||
namespace draw_bones_merc { extern void link(); }
|
||||
namespace draw_bones_check_longest_edge_asm { extern void link(); }
|
||||
namespace blerc_execute { extern void link(); }
|
||||
@@ -429,7 +427,6 @@ PerGameVersion<std::unordered_map<std::string, std::vector<void (*)()>>> gMips2C
|
||||
{"collide-edge-grab",
|
||||
{jak1::method_16_collide_edge_work::link, jak1::method_15_collide_edge_work::link,
|
||||
jak1::method_10_collide_edge_hold_list::link, jak1::method_18_collide_edge_work::link}},
|
||||
{"joint", {jak1::calc_animation_from_spr::link, jak1::cspace_parented_transformq_joint::link}},
|
||||
{"bones",
|
||||
{jak1::bones_mtx_calc::link, jak1::draw_bones_merc::link,
|
||||
jak1::draw_bones_check_longest_edge_asm::link}},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
||||
|
||||
(define-extern create-interpolated-joint-animation-frame
|
||||
"Generate a drawable's blended joint animation frame."
|
||||
(function (inline-array vector) int process-drawable int))
|
||||
(function joint-anim-frame int process-drawable none))
|
||||
|
||||
(defenum janim-status
|
||||
:type uint16
|
||||
@@ -65,7 +65,7 @@
|
||||
(root-channel (inline-array joint-control-channel) :offset 16)
|
||||
(blend-index int32)
|
||||
(active-channels int32)
|
||||
(generate-frame-function (function (inline-array vector) int process-drawable int))
|
||||
(generate-frame-function (function joint-anim-frame int process-drawable none))
|
||||
(prebind-function (function pointer int process-drawable none))
|
||||
(postbind-function (function process-drawable none))
|
||||
(effect effect-control)
|
||||
|
||||
+124
-2253
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,8 @@
|
||||
"Check if a ray intersects a sphere at the origin.
|
||||
Return the fraction along the ray where the intersection occurs, or COLLISION_MISS
|
||||
if there is no collision."
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
;; Parameterize the ray with:
|
||||
;; ray(t) = origin + t * direction with 0 <= t <= 1
|
||||
@@ -109,6 +111,9 @@
|
||||
"Compute intersection between a ray and a sphere.
|
||||
Return the fraction along the ray where the intersection occurs, or COLLISION_MISS
|
||||
if there is no collision."
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
(#when COLLIDE_FUNC_COUNTERS
|
||||
(+! *ray-sphere-intersect-count* 1))
|
||||
|
||||
@@ -122,6 +127,9 @@
|
||||
The y components of all arguments are ignored.
|
||||
Return the fraction along the ray where the intersection occurs, or COLLISION_MISS
|
||||
if there is no collision."
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
(#when COLLIDE_FUNC_COUNTERS
|
||||
(+! *ray-circle-intersect-count* 1))
|
||||
|
||||
@@ -146,6 +154,9 @@
|
||||
If the ray enters through the end cap, returns COLLISION_MISS, even if it later
|
||||
exits the cylinder through a curved wall!"
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
|
||||
(#when COLLIDE_FUNC_COUNTERS
|
||||
(+! *ray-cylinder-intersect-count* 1))
|
||||
|
||||
@@ -210,6 +221,8 @@
|
||||
"Sweep a sphere against the vertices and edges of a triangle, returning the
|
||||
earliest contact fraction or COLLISION_MISS. The triangle face is handled by
|
||||
moving-sphere-triangle-intersect."
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
;; These intentionally capture the function's arguments and the best-hit locals below.
|
||||
(defmacro check-vertex (vertex-index)
|
||||
@@ -278,6 +291,8 @@
|
||||
"Sweep a sphere against a triangle, returning the fraction where the first
|
||||
collision occurs or COLLISION_MISS. This checks the face first, then the
|
||||
rounded vertex and edge boundary."
|
||||
|
||||
;; This function is rewritten in plain GOAL
|
||||
|
||||
;; This intentionally captures edge-a, edge-c, and normal below.
|
||||
(defmacro inside-triangle? (point)
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
(let ((frame-node-count (+ joint-count 2)))
|
||||
(+ frame-node-count 1)
|
||||
((-> this skel generate-frame-function)
|
||||
(the-as (inline-array vector) (+ 2416 (the-as int (the-as terrain-context (scratchpad-object int)))))
|
||||
(the-as joint-anim-frame (+ 2416 (the-as int (the-as terrain-context (scratchpad-object int)))))
|
||||
frame-node-count
|
||||
this)
|
||||
(if (-> this skel prebind-function)
|
||||
|
||||
@@ -5,6 +5,15 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; GOAL uses the convention or row-major matrices, but row-vector points
|
||||
|
||||
;; [ Xx Xy Xz 0 ] local X basis row
|
||||
;; [ Yx Yy Yz 0 ] local Y basis row
|
||||
;; [ Zx Zy Zz 0 ] local Z basis row
|
||||
;; [ Tx Ty Tz 1 ] translation row
|
||||
|
||||
;; with pt' = pt * M
|
||||
|
||||
;; A row-major 4x4 matrix. Some operations require an affine transform, and the
|
||||
;; fastest inverse operations additionally require rotation without scale or shear.
|
||||
(deftype matrix (structure)
|
||||
|
||||
Reference in New Issue
Block a user