25 return (int16_t)((int32_t)((uint32_t)value * (uint32_t)weight) >>
MATH_Q12_SHIFT);
31 const int16_t *indices = table + 2;
35 for (uint32_t i = (int32_t)table[0]; i; --i, ++indices, ++source)
41 for (uint32_t i = (int32_t)table[1]; i; --i, ++indices, ++source)
69 }
while (--remaining);
97 const int16_t *indices = table + 2;
98 int32_t normal_count = table[0], vertex_count = table[1];
101 for (
int layer = 0; layer < count; ++layer)
104 const int16_t *index = indices;
105 for (uint32_t i = normal_count; i; --i, ++index, ++
delta)
110 for (uint32_t i = vertex_count; i; --i, ++index, ++delta)
116 int32_t weight, uint32_t count)
139 if ((uintptr_t)channels == UINT32_MAX)
145 if ((uintptr_t)table != 1)
165 const struct SkinWeight *layer = &weights[--count];
167 if ((uintptr_t)table != 1)
188 uint32_t count = vertex_count;
192 dst_vertices->
pos.
x = skin_vertices->
pos.
x;
193 dst_vertices->
pos.
y = skin_vertices->
pos.
y;
194 dst_vertices->
pos.
z = skin_vertices->
pos.
z;
207 skin_tables[0], (int16_t)mesh_piece->
vert_count);
211 for (
int i = 0; i < 4 && weights[i]; ++i)
215 uint32_t count = (int16_t)mesh_piece->
vert_count;
216 int32_t weight = weights[i];
239 int64_t dot = (int64_t)row[0] * v.
x + (int64_t)row[1] * v.
y + (int64_t)row[2] * v.
z;
249 for (
int row = 0; row < 3; ++row)
250 for (
int col = 0; col < 3; ++col)
255 for (
int row = 0; row < 3; ++row)
256 for (
int col = row + 1; col < 3; ++col)
281 return (int32_t)((uint32_t)(row[0] * v.
x) + (uint32_t)(row[1] * v.
y) + (uint32_t)(row[2] * v.
z));
290 if (z <= render_list_state->projection_near_fp)
298 if (sx != (int16_t)sx || sy != (int16_t)sy)
#define ANIMATION_SPLINE_NESTED_CHANNEL_ARRAY
void Bone_ComputeNormalsPostTransform(struct Bone_SkinningOwnerView *actor, struct Submesh_Entry *mesh_piece)
#define g_cameraTransformMatrix
#define GAME_TRANSITION_SPRITE_PENDING
#define Game_FrameTransitionFlags
#define g_spriteLastPositionZ
#define g_projectedSpriteVertices
#define g_spriteLastPositionX
#define Graphics_WindowWidth
#define render_list_state
#define Graphics_WindowHeight
#define g_spriteLastPositionY
void Math_MulMat3x3Q12(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *right_factor, struct Math_Matrix3x3I16 const *left_factor)
#define g_renderWorldTransformPtr
static void add_morph_delta(struct Math_Vec3I16 *out, const struct Animation_MorphTargetVertex *delta, int32_t weight)
void Bone_InitVertexBufferFromSkin(struct Bone_SkinningOwnerView *actor, struct Mesh_RuntimeVertex *dst_vertices, struct Animation_FrameVertex *skin_vertices, int32_t vertex_count)
static void prepare_weighted_view(void)
static int32_t rotate_long_coordinate(const int16_t *row, struct Math_Vec3I32 v)
static int collect_skin_weights(uint32_t time, const struct Animation_SplineChannelMorph *track, struct SkinWeight *weights)
static void add_skin_vertices(struct Mesh_RuntimeVertex *dst, const struct Animation_FrameVertex *src, int32_t weight, uint32_t count)
void Bone_TransformVerticesMorphed(uint32_t sample_time, struct Animation_SplineChannelMorph *morph_channels, struct Actor_State *actor)
void Bone_TransformVerticesWeighted(uint32_t sample_time, struct Animation_SplineChannelMorph *bone_channels, struct Bone_SkinningOwnerView *actor, struct Submesh_Entry *mesh_piece)
static void project_skin_vertex(int index, struct Math_Vec3I16 local)
void Bone_BlendVerticesMultiWeight(struct Submesh_Entry *mesh_piece, struct Bone_SkinningOwnerView *actor, struct Animation_FrameVertex **skin_tables, int32_t *weights)
static void clear_skin_normal(struct Bone_SkinningOwnerView *actor, struct Mesh_RuntimeVertex *v)
static void copy_morph_base(struct Actor_State *actor)
static int32_t rotate_skin_coordinate(const int16_t *row, struct Math_Vec3I16 v)
void Bone_TransformWeightedVerticesForRender(struct Scene_Node *node, struct Submesh_RenderSpan *span, const struct Math_TransformQ12Q6 *world)
static int16_t scale_skin_coordinate(int16_t value, int32_t weight)
static int32_t sample_scalar_keys(uint32_t frame_time, struct Animation_SplineChannelScalar *channel, bool signed_time)
static int32_t spline_mul_q12(int32_t a, int32_t b)
void * morph_normal_buffer
int16_t ** morph_table_list
struct Mesh_RuntimeVertex * runtime_vertex_array
struct Animation_FrameVertex::@311120214253062041274205007045313305221045115020::@125226036063040207110103344344057165001114352331::@262040241030104153031226016256062266243312142350 pos
uint32_t position_z_padding
uint32_t normal_z_padding
struct Math_Vec3I16 normal
struct Animation_MorphTargetVertex::@201261164316150365332005325104317215313175057013 delta
int32_t packed_timing_or_direct_target_index
struct Animation_SplineChannelScalar * nested_scalar_channels_or_minus_one_sentinel
Animation_SplineChannelFlags channel_flags
uint8_t nested_scalar_channel_count
struct Mesh_AccumulatedNormal * normal_accumulators
struct Mesh_RuntimeVertex * runtime_vertices
struct Animation_FrameVertex ** skin_frame_tables
struct Math_Vec3I16 local_pos
struct Math_Vec3I32 node_view_translation
struct Math_Matrix3x3I16 node_view_matrix
struct Math_Vec3I32XZY eye_pos
struct Math_ScreenPointI16 screen
struct Math_ColorRGB8 color
struct Math_Vec3I16 normal
uint32_t position_z_normal_group
int16_t normal_group_index
struct Math_ColorRGB8 color
struct Mesh_RuntimeVertex * runtime_vertices
struct Bone_WeightedVertex * weighted_vertices
uint16_t vert_start_index
int16_t weighted_vertex_count
int16_t weighted_vertex_start_index
int16_t polygon_ref_count
#define g_nodeViewTranslationY
#define g_nodeViewTranslationZ
#define g_nodeViewTranslationX
#define g_renderNodeInvRotMatrix