52 int16_t saved_child_height;
53 int16_t saved_child_width;
55 if (needs_visibility_update)
85 uint32_t distance_gate_frame_flags;
128 if ((uint16_t)child_width_bits)
132 saved_child_height = child_height_bits;
134 if ((uint16_t)child_height_bits)
141 int32_t child_position_y = interpolated_child->
position.
y;
142 int32_t child_position_z = interpolated_child->
position.
z;
146 int32_t interpolated_child_y = child_position_y - interpolated_child->
sub_pos.
y;
148 interpolated_child->
position.
y = interpolated_child_y;
149 interpolated_child->
position.
z = child_position_z - interpolated_child->
sub_pos.
z;
151 int32_t parent_child_y_distance = render_actor->
position.
y - render_actor->
sub_pos.
y - interpolated_child_y;
158 int32_t child_lod_scale_q12;
163 int32_t distance_ramp_high = (int32_t)((uint64_t)distance_ramp_wide >> 32);
164 int32_t distance_ramp_low = (uint32_t)distance_ramp_wide;
202 int32_t lod_flags_or_distance_limit = render_actor->
behavior_flags;
206 if (!use_primary_mesh)
211 use_primary_mesh =
true;
220 use_primary_mesh = camera_distance >> 6 <= lod_flags_or_distance_limit ||
225 if (use_primary_mesh)
229 if (base_command_list)
231 int16_t saved_command_count = base_command_list->
count;
243 base_command_list->
count = saved_command_count;
258 if (lod_command_list)
260 uint32_t lod_command_slice_index = (uint32_t)(lod_command_list->
cmdPtrs);
268 alternate_render_owner);
275 if (interpolated_child)
284 .
x = saved_child_width,
285 .y = saved_child_height};
296 int32_t effective_previous_state = previous_animation_state;
301 int32_t next_animation_state = previous_animation_state;
311 effective_previous_state = UINT32_MAX;
316 bool use_default_animation = !component_records[1].
definition;
318 if (!use_default_animation)
322 if (attachment_ticks_1 <= 0)
326 if (attachment_ticks_1)
327 use_default_animation =
true;
339 if (use_default_animation)
346 next_animation_state = default_anim_state;
359 effective_previous_state = UINT32_MAX;
361 else if (surface_trail_mode)
365 if (input_axis_x || record->
input.
axis.
y != input_axis_x)
367 int32_t input_axis_y = (int32_t)record->
input.
axis.
y;
368 int32_t wide_input_axis_x = (int32_t)input_axis_x;
406 effective_previous_state = UINT32_MAX;
416 int32_t action_index_value = 0;
417 int32_t animation_slot_byte_offset = 0x20;
424 if (
flags & action_flag_mask)
426 action_owner_entity->
flags = ~action_flag_mask &
flags;
435 animation_actor = actor;
438 animation_slot_byte_offset += 4;
439 action_index_value += 1;
440 }
while (animation_slot_byte_offset < 0x28);
443 previous_animation_state = effective_previous_state;
450 if (attachment_ticks)
467 if (!spawned_attachment)
505 else if (reaction_animation_ticks &&
511 if (next_animation_state != previous_animation_state)
536 if (keyframe_span <= 0)
540 return (int32_t)(elapsed << 6) / keyframe_span;
547 struct Actor *animation_actor = (
struct Actor *)(actor);
549 if (!animation_actor)
564 return actor_animation_pending;
573 struct Scene_Node **next_node_slot = &node_list[1];
575 while (animation_node)
579 if (node_sequence_index == anim_seq_index)
584 return node_animation_pending;
587 animation_node = (
struct Scene_Node *)(uintptr_t)(*(uint32_t *)next_node_slot);
588 next_node_slot = &next_node_slot[1];
602 if (position_channel_index >= 0)
607 int32_t applied_tick_delta;
611 applied_tick_delta = tick_delta;
616 applied_tick_delta = tick_delta;
620 if (applied_tick_delta <= 0)
624 if (reverse_animation_tick <= 0)
626 if (reverse_animation_tick < applied_tick_delta)
702 uint16_t threshold = (uint16_t)record->
hit_depths[count];
703 uint32_t target = (uint32_t)(uintptr_t)record->
hit_actors[count];
705 if (threshold <= (int32_t)actor->
scale_factor && target == (uintptr_t)other_actor)
733 if (!remaining_components)
738 for (; remaining_components != 0; --remaining_components)
740 component_yaw_cursor[1] = 0;
741 component_yaw_cursor[0] = 0;
742 component_yaw_cursor = &component_yaw_cursor[0x14];
750 if (chain_index >= 0)
#define ACTOR_BEHAVIOR_SKIP_UPDATE
#define ACTOR_ROOT_MOTION_WRAP
#define ACTOR_ATTACHMENT_HAS_TIMED_EVENT
@ ACTOR_ANIMATION_PRIMARY_ACTION
@ ACTOR_ANIMATION_SURFACE_MOVE
@ ACTOR_ANIMATION_ATTACHMENT_ACTION
@ ACTOR_ANIMATION_JUMP_START
@ ACTOR_ANIMATION_NO_BONE
@ ACTOR_ANIMATION_BONE_ACTION
@ ACTOR_ANIMATION_SURFACE_IDLE
@ ACTOR_ANIMATION_AIRBORNE
#define ACTOR_BEHAVIOR_ANIMATION_PENDING
#define ACTOR_LOD_SHRINK_RAMP_MULTIPLIER
#define ACTOR_BEHAVIOR_AIRBORNE
#define ACTOR_BEHAVIOR_CULL_MODE
#define ACTOR_BEHAVIOR_FORCE_ALTERNATE_LOD
#define ACTOR_CONTROLLER_BONE_ACTION
#define ACTOR_LIFECYCLE_HIDDEN
#define ACTOR_BEHAVIOR_SKIP_ANIMATION
#define ACTOR_ANIMATION_INTERRUPTS_MOVEMENT
#define ACTOR_LIFECYCLE_DISABLED
#define ACTOR_LOD_SHRINK_END_DISTANCE
#define ACTOR_RUNNING_INPUT_MAGNITUDE_Q12
#define ACTOR_BEHAVIOR_WORKLIST_MEMBER
#define ACTOR_FADE_ACTIVE
#define ACTOR_RENDER_FADE_COLOR_MASK
#define ACTOR_ATTACHMENT_RETRY_TICKS
#define ACTOR_BEHAVIOR_VISIBILITY_PENDING
#define ACTOR_LOD_MINIMUM_SCALE_Q12
#define ACTOR_LOD_SHRINK_START_DISTANCE
#define ACTOR_BEHAVIOR_BYPASS_COLLISION
#define ACTOR_BEHAVIOR_FORCE_PRIMARY_LOD
#define ACTOR_BEHAVIOR_UPPER_WORD_MASK
#define ACTOR_BEHAVIOR_FORCE_VISIBLE
#define ACTOR_BEHAVIOR_MOVEMENT_ACTIVE
#define ACTOR_REACTION_ANIMATION_TICKS
#define ACTOR_ROOT_MOTION_LOOP
#define ACTOR_LIFECYCLE_FORCE_HIDDEN
BOOL Actor_PassesPauseCameraCoordinateGate(struct Actor_State *actor)
void Actor_ReleaseAttachment(struct Actor_MovementRecordView *record)
void Actor_ApplySplineMovement(struct Scene_Type1RenderOwnerView *owner, struct Animation_SplineChannelVec3 *spline_track, int32_t tick_delta)
int32_t Actor_GetAnimationProgress(struct Actor_State *actor)
#define ANIMATION_DATA_NODE_STATE
#define ANIMATION_SPLINE_DISTANCE_BUDGETED_POSITION
void Animation_QueueStateChange(int32_t anim_state)
void Actor_ResetChainState(struct Actor_State *actor, int32_t chain_index)
int32_t Actor_GetAnimationWaitStatus(struct Actor_State *actor, int32_t anim_seq_index)
bool Actor_CheckAnimationTrigger(struct Actor_State *actor, struct Actor_State *other_actor)
void Actor_UpdateAnimationAndVisibility(struct Actor_State *actor)
void Actor_UpdateAnimationState(struct Actor_State *actor, struct Player_ControllerRecordView *record, int32_t surface_trail_mode)
void Actor_AdvanceRootMotionTick(struct Scene_Type1RenderOwnerView *owner, int32_t tick_delta)
int32_t Actor_GetAnimSeqIndex(struct Actor_State *actor)
void Actor_ResetComponentAnimations(struct Actor_State *actor)
void Actor_ResetAnimationChains(struct Actor_State *actor)
int32_t Actor_GetAnimationProgress(struct Actor_State *actor)
#define CAMERA_DEFINITION_ORBIT
#define CAMERA_DEFINITION_MODE_MASK
struct Actor_State * Component_SpawnFromCollisionRecord(struct Actor_State *owner_actor, struct Actor_State *target_actor, struct Component_CollisionRecord *collision_record)
#define ENTITY_FLAG_BIT_1
#define ENTITY_FLAG_BIT_0
#define GAME_TRANSITION_RUNNING
#define GAME_TRANSITION_COLOR_FADE
#define GAME_TRANSITION_SCRIPT_PAUSED
#define GAME_TRANSITION_OBJECT_VISIBLE
#define Game_FrameTransitionFlags
void Graphics_RenderPolygonMesh(struct Graphics_Render_FlatQuadActorView *actor)
void Graphics_ProcessMeshCommands(struct Mesh_CmdList *cmd_list, struct Material_Node **material_nodes, void *owner_context)
int32_t Graphics_CheckFrustumCull(struct Math_Vec3I32 *position, int32_t cull_radius, uint32_t cull_flags)
#define g_graphicsCapabilityFlags
#define render_list_state
int32_t Math_ApproxDistance3DWeighted(int32_t dx, int32_t dy, int32_t dz)
struct Math_TransformQ12Q6 * global_type_g_renderWorldTransformPtr
#define g_renderWorldTransformPtr
#define pkg_resource_current_level_data
#define PHYSICS_WORD_SHIFT_MASK
#define PHYSICS_FIXED_ONE
#define PHYSICS_ANIMATION_FRAME_TICKS
#define PHYSICS_FIXED_FRACTION_BITS
#define SCENE_NODE_DISABLED
#define SCENE_NODE_TRANSFORM_DIRTY
#define g_scriptPauseToggleState
#define Signal_TimedEventListHead
struct Math_Vec3I32 velocity
void * level_local_lod_redirect_record
struct Animation_ControllerGroup * anim_ctrl_ptr
struct Scene_Node ** render_node_list
struct Bone_JointTrackState * component_array
struct Actor_State * child_actor
struct Collision_Node * ground_collision_node
struct Math_Vec2I16 visual_scale
struct Animation_StateTable * anim_asset_table
uint8_t attach_slot_index
struct Math_Vec3I32 world_render_pos
struct Math_Vec3I32 sub_pos
struct Math_Matrix3x3I16 rot_mat
struct Component_TrailObject * trail_chain_ptr
struct Math_Vec3I32 position
struct Animation_StateTable * anim_asset_table
struct Scene_Node ** node_list
struct Animation_ControllerSlot ** controller_slot_array
Animation_DataBlockFixupFlags fixup_flags
struct Animation_SplineChannelVec3 * position_channels
struct Math_RangeI16 keyframe_range
Animation_SplineChannelFlags channel_flags
struct Animation_DataBlock * anim_ptrs[0x2b]
struct Component_Definition * definition
struct Actor * hit_actors[0x6]
struct Math_Vec3I32XZY eye_pos
struct Pkg_CameraDef * cam_current
int16_t current_entity_index
uint8_t base_command_count
struct Mesh_Command ** cmdPtrs
uint16_t lod_distance_threshold
struct PKG_ObjectNodeFixupView * alternate_lod_node
uint8_t configured_jump_hold_ticks
uint8_t forced_animation_ticks
uint16_t reaction_animation_ticks
struct Component_CollisionRecord * component_records
int16_t owner_entity_index
uint8_t configured_jump_startup_ticks
struct Actor_State * attached_actors[2]
uint8_t input_source_index
uint16_t anim_update_sentinel
struct Scene_TransformNodePrefix transform
uint16_t animation_frame_count
union Scene_AnimationSource animation_source
struct Mesh_CmdList * command_list
int32_t Trail_CheckBoneAvailable(void)
struct Animation_DataBlock * direct_block
#define g_renderingStateFlag
#define g_confirmTextEnabled