102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
lifecycle.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
15#include "pcdogs/actor/types.h"
24#include "pcdogs/entity/types.h"
25#include "pcdogs/game/globals.h"
26#include "pcdogs/game/types.h"
27#include "pcdogs/math/types.h"
33#include "pcdogs/scene/types.h"
35#include <math.h>
36#include <stdarg.h>
37#include <string.h>
38
39// Original pcdogs.exe: 0x402800
40// Runs actor collision, movement, animation, and rendering updates, deferring destruction until references permit removal.
42{
44
45 struct Actor **actor_link = &Actor_CollisionListHead;
46
47 while (true)
48 {
49 struct Actor *actor_cursor = *actor_link;
50
51 if (!actor_cursor)
52 {
53 struct Scene_Node *deferred_list_root = g_objectNodeRoot;
54
55 actor_cursor = deferred_list_root->deferred_actor_list;
56
57 if (!actor_cursor)
58 return;
59
60 deferred_list_root->deferred_actor_list = NULL;
61 *actor_link = actor_cursor;
62 }
63
64 if (!(actor_cursor->lifecycle_flags & ACTOR_LIFECYCLE_DESTROYING))
65 {
66 struct Actor *parent_actor = actor_cursor->parent_actor;
67
69 {
70 *actor_link = actor_cursor->list_next;
71 // Process the parent before its attached actor.
72 actor_cursor->list_next = g_objectNodeRoot->deferred_actor_list;
73 g_objectNodeRoot->deferred_actor_list = actor_cursor;
74
75 continue;
76 }
77
78 Physics_UpdateActorBehavior((struct Actor_State *)(actor_cursor));
79 Actor_ProcessRendering((struct Actor_State *)(actor_cursor));
80 actor_link = &actor_cursor->list_next;
81 }
82 else
83 {
84 Actor_DetachFromParent((struct Actor_State *)(actor_cursor));
86
87 int32_t behavior_flags = actor_cursor->behavior_flags;
88
90 {
91 *actor_link = actor_cursor->list_next;
92 Actor_Destroy((struct Actor_State *)(actor_cursor));
93
94 continue;
95 }
96
99 actor_cursor->behavior_flags = behavior_flags;
100 Actor_ProcessRendering((struct Actor_State *)(actor_cursor));
101 actor_link = &actor_cursor->list_next;
102 }
103 }
104}
105
106// Original pcdogs.exe: 0x403c00
107// Updates live projectile movement and rendering, then detaches and stops audio for dying projectiles. Referenced projectiles remain linked until safe destruction.
109{
110 struct Actor *actor = Projectile_LiveActorListHead;
111 struct Actor **projectile_link_cursor = &Projectile_LiveActorListHead;
112
113 for (; actor; actor = (struct Actor *)(*(uint32_t *)projectile_link_cursor))
114 {
116 {
117 int32_t behavior_flags_1;
118
119 if (!actor->parent_actor)
120 behavior_flags_1 = actor->behavior_flags;
121
122 if (actor->parent_actor || behavior_flags_1 & ACTOR_BEHAVIOR_GROUND_TILT_ENABLED)
123 Physics_UpdateActorBehavior((struct Actor_State *)(actor));
124 else if ((*(struct Scene_Node **)actor->node_list)->traversal_flags & SCENE_NODE_DISABLED || Game_FrameOverlayFlags & GAME_OVERLAY_SKIP_OBJECT_RENDER)
125 {
126 behavior_flags_1 |= ACTOR_BEHAVIOR_SKIP_UPDATE;
127 actor->behavior_flags = behavior_flags_1;
128 Model_AdvanceAnimation((struct Actor_State *)(actor));
129 }
130 else
131 {
132 behavior_flags_1 &= ~ACTOR_BEHAVIOR_SKIP_UPDATE;
133 actor->behavior_flags = behavior_flags_1;
134 Model_AdvanceAnimation((struct Actor_State *)(actor));
135 }
136
137 Actor_ProcessRendering((struct Actor_State *)(actor));
138 projectile_link_cursor = (struct Actor **)(actor);
139 }
140 else
141 {
142 Actor_DetachFromParent((struct Actor_State *)(actor));
144
145 int32_t behavior_flags = actor->behavior_flags;
146
148 {
152 Actor_ProcessRendering((struct Actor_State *)(actor));
153 projectile_link_cursor = (struct Actor **)(actor);
154 }
155 else
156 {
157 *(uint32_t *)projectile_link_cursor = (uint32_t)(actor->list_next);
158 Actor_Destroy((struct Actor_State *)(actor));
159 }
160 }
161 }
162}
163
164// Original pcdogs.exe: 0x404960
165// Copies owning-entity slot flags into the actor's current behavior and collision state.
167{
168 if (!actor)
169 return;
170
171 int32_t behavior_flags = actor->behavior_flags;
172
174
175 uint8_t lifecycle_flags = actor->lifecycle_flags;
176
178
179 int32_t behavior_flags_2 = behavior_flags;
180 int32_t entity_index = (int32_t)((struct Actor_MovementRecordView *)actor->record_ptr)->entity_index;
181 struct Entity *entity_array = pkg_resource_current_level_data->entity_array;
182
183 actor->movement_handler_index = 1;
185
186 struct Entity *owner_entity = &entity_array[entity_index];
187
188 if (!(lifecycle_flags & ACTOR_LIFECYCLE_COLLISION_ENABLED))
189 {
190 if (!owner_entity->shared_ref_50 && !owner_entity->shared_ref_54)
191 {
192 actor->movement_handler_index = 0;
194 }
195
196 behavior_flags_2 &= ~ACTOR_BEHAVIOR_GROUND_TILT_ENABLED;
197 actor->collision_class = 0;
198 actor->behavior_flags = behavior_flags_2 | ACTOR_BEHAVIOR_BYPASS_COLLISION;
199 }
200 else
201 actor->collision_class = 2;
202
203 uint32_t flags = owner_entity->flags;
204
206 {
207 int32_t behavior_flags_1 = actor->behavior_flags;
208
209 actor->collision_class = 0;
210 actor->behavior_flags = behavior_flags_1 | ACTOR_BEHAVIOR_BYPASS_COLLISION;
211
212 return;
213 }
214
217}
218
219// Original pcdogs.exe: 0x404a20
220// Starts transition phase three, clearing movement and collision state and resetting component transition data while marking the owning entity.
222{
223 uint8_t transition_lifecycle_flags = actor->lifecycle_flags | ACTOR_LIFECYCLE_DISABLED;
224
225 // TRANSITION START: Initiates camera transition. Sets actor flags 0x240, marks for transition state
226 // (0xC4-0xC6), clears component pointer. Sets room 0x2000 flag (force active).
228
229 uint8_t component_count = actor->component_count;
230
231 actor->lifecycle_flags = transition_lifecycle_flags;
232 actor->movement_handler_index = 0;
234 actor->collision_class = 0;
235 actor->ground_collision_node = NULL;
236
237 if (component_count)
238 __builtin_memset(&record->contact_slots, 0, 0x20);
239
240 struct Entity *owner_entity =
241 &pkg_resource_current_level_data->entity_array[(int32_t)record->entity_index];
242 uint32_t flags = owner_entity->flags;
243
245 owner_entity->flags = flags;
246}
247
248// Original pcdogs.exe: 0x4058b0
249// Copies entity movement defaults into the actor record unless an override flag prevents it. Health and runtime movement overrides are preserved except where death-state handling replaces them.
251{
252 int32_t health_or_energy;
253 struct Player_ControllerRecordView *runtime_record = actor->record_ptr;
254
256 return;
257
258 health_or_energy = runtime_record->health_or_energy;
259
260 int32_t movement_param_40 = runtime_record->movement_param_40;
261 int32_t movement_param_4c = runtime_record->movement_param_4c;
262 struct Entity *owner_entity =
263 &pkg_resource_current_level_data->entity_array[(int32_t)runtime_record->owner_entity_index];
264
265 memcpy(&runtime_record->position_ptr, &owner_entity->position_ptr, 0x68);
266
268 {
269 runtime_record->movement_param_40 = movement_param_40;
270 runtime_record->movement_param_4c = movement_param_4c;
271 }
272
273 bool has_no_death_stage = !runtime_record->death_stage;
274
275 runtime_record->health_or_energy = health_or_energy;
276
277 if (has_no_death_stage || runtime_record->movement_mode < PHYSICS_MOVE_FACING_DRIVE_AIR_ROLL)
278 return;
279
280 runtime_record->movement_param_4c = owner_entity->param_max_speed_2;
281 runtime_record->movement_param_40 = owner_entity->param_max_speed_0;
282 runtime_record->movement_param_44 = owner_entity->param_max_speed_1;
283}
284
285// Original pcdogs.exe: 0x412f10
286// Cleans up powerups and projectiles, clears the global actor-list head, and destroys the detached actor list.
288{
291
292 struct Actor *collision_head = Actor_CollisionListHead;
293
294 if (!collision_head)
295 return;
296
298
299 struct Actor *list_next;
300
301 do
302 {
303 list_next = collision_head->list_next;
304 Actor_Destroy((struct Actor_State *)(collision_head));
305 collision_head = list_next;
306 } while (list_next);
307}
308
309// Original pcdogs.exe: 0x43a770
310// Reuses a shared template or allocates and copies one, resetting runtime links and optionally linking the actor into the live list. Only template-owned pointers are rebased; external vertex and polygon buffers remain shared. Missing input or allocation failure returns null.
311struct Actor_State *Actor_CloneTemplateWithTemplateRelativeFixups(struct Actor_State *template_actor, struct Actor_State **list_head)
312{
313 struct Actor_State *actor = template_actor;
314
315 if (!template_actor)
316 return 0;
317
318 if (!(template_actor->lifecycle_flags & ACTOR_LIFECYCLE_DESTROY_QUEUED))
319 {
320 actor = Pkg_AllocateResourceMemory(template_actor->alloc_size);
321
322 if (!actor)
323 return 0;
324
325 int32_t alloc_size = template_actor->alloc_size;
326
327 memcpy(actor, template_actor, (uint32_t)alloc_size);
328
329 bool record_is_absent = !actor->record_ptr;
330
332
333 if (!record_is_absent)
334 actor->record_ptr = template_actor->record_ptr - (uintptr_t)template_actor + (uintptr_t)actor;
335
336 struct Actor_State *child_actor = actor->child_actor;
337
338 if (child_actor)
339 {
340 struct Actor_State *relocated_child = (struct Actor_State *)((char *)child_actor - (uintptr_t)template_actor + (uintptr_t)actor);
341
342 actor->child_actor = relocated_child;
343 relocated_child->anim_seq_timer = 0;
344
345 struct Math_Matrix3x3I16 *child_contact_basis = &actor->child_actor->contact_basis;
346
347 child_contact_basis->m00 = PHYSICS_Q14_ONE;
348 child_contact_basis->m10 = 0;
349 child_contact_basis->m02 = 0;
350 child_contact_basis->m01 = 0;
351
352 struct Math_Matrix3x3I16 identity_basis_components;
353
354 identity_basis_components.m00 = child_contact_basis->m00;
355 identity_basis_components.m01 = child_contact_basis->m01;
356
357 int16_t basis_m02 = child_contact_basis->m02;
358 int16_t basis_m10 = child_contact_basis->m10;
359
360 child_contact_basis->m11 = identity_basis_components.m00;
361 child_contact_basis->m12 = identity_basis_components.m01;
362 child_contact_basis->m20 = basis_m02;
363 child_contact_basis->m21 = basis_m10;
364 }
365
366 struct Component_Instance *collision_component_or_parent_component =
368
369 if (collision_component_or_parent_component)
370 actor->collision_component_or_parent_component = (struct Component_Instance *)((char *)collision_component_or_parent_component - (uintptr_t)template_actor + (uintptr_t)actor);
371
372 struct Component_TrailObject *trail_chain_ptr = actor->trail_chain_ptr;
373
374 if (trail_chain_ptr)
375 {
376 struct Component_TrailObject *relocated_trails = (struct Component_TrailObject *)((char *)trail_chain_ptr - (uintptr_t)template_actor + (uintptr_t)actor);
377 int32_t trail_count = (uint8_t)(actor->trail_count);
378
379 actor->trail_chain_ptr = relocated_trails;
380
381 int32_t trails_remaining = trail_count;
382 int32_t *trail_fixup_cursor = (int32_t *)(&relocated_trails->controller_group);
383 int32_t trails_before_decrement;
384
385 do
386 {
387 int32_t original_controller_address = *(uint32_t *)trail_fixup_cursor;
388
389 if (original_controller_address)
390 {
391 int32_t relocated_controller_address = original_controller_address - (uintptr_t)template_actor + (uintptr_t)actor;
392
393 *(uint32_t *)trail_fixup_cursor = relocated_controller_address;
394
395 int32_t original_slot_array_address = (int32_t)(uintptr_t)((struct Animation_ControllerGroup *)(uintptr_t)relocated_controller_address)->controller_slot_array;
396
397 if (original_slot_array_address)
398 {
399 int32_t controller_slots_remaining = (int32_t)(uint16_t)((const struct Animation_ControllerGroup *)(uintptr_t)relocated_controller_address)->controller_count;
400 int32_t *relocated_slot_cursor = (int32_t *)(original_slot_array_address - (uintptr_t)template_actor + (uintptr_t)actor);
401
402 ((struct Animation_ControllerGroup *)(uintptr_t)relocated_controller_address)->controller_slot_array = (struct Animation_ControllerSlot **)relocated_slot_cursor;
403
404 int32_t slots_before_decrement;
405
406 do
407 {
408 *(uint32_t *)relocated_slot_cursor += (uint32_t)((char *)actor - (uintptr_t)template_actor);
409 relocated_slot_cursor = &relocated_slot_cursor[1];
410 slots_before_decrement = controller_slots_remaining;
411 controller_slots_remaining -= 1;
412 } while (slots_before_decrement != 1);
413 }
414 }
415
416 int32_t original_segment_array_address = trail_fixup_cursor[2];
417
418 trail_fixup_cursor = &trail_fixup_cursor[8];
419 trails_before_decrement = trails_remaining;
420 trails_remaining -= 1;
421 trail_fixup_cursor[-6] = (int32_t)(original_segment_array_address + (char *)actor - (uintptr_t)template_actor);
422 } while (trails_before_decrement != 1);
423 }
424
425 struct Bone_JointTrackState *component_array = actor->component_array;
426
427 if (component_array)
428 {
429 struct Bone_JointTrackState *relocated_components = (struct Bone_JointTrackState *)((char *)component_array - (uintptr_t)template_actor + (uintptr_t)actor);
430 uint32_t components_remaining = actor->component_count;
431
432 actor->component_array = relocated_components;
433
434 struct Scene_Node **component_node_slot = &relocated_components->node;
435
436 do
437 {
438 struct Scene_Node *node = (*component_node_slot);
439
440 if (node)
441 (*component_node_slot) = (struct Scene_Node *)((char *)node - (uintptr_t)template_actor + (uintptr_t)actor);
442
443 component_node_slot = &component_node_slot[0xa];
444 } while (--components_remaining);
445 }
446
447 struct Animation_ControllerGroup *anim_ctrl_ptr = actor->anim_ctrl_ptr;
448
449 if (anim_ctrl_ptr)
450 {
451 struct Animation_ControllerGroup *relocated_controller_group = (struct Animation_ControllerGroup *)((char *)anim_ctrl_ptr - (uintptr_t)template_actor + (uintptr_t)actor);
452
453 actor->anim_ctrl_ptr = relocated_controller_group;
454
455 if (!(relocated_controller_group->group_flags & ACTOR_RENDER_CONTROLLER_GROUP_RELOCATED))
456 {
457 relocated_controller_group->controller_slot_array = (void *)((uintptr_t)relocated_controller_group->controller_slot_array + (uintptr_t)actor - (uintptr_t)template_actor);
458
459 struct Animation_ControllerGroup *anim_ctrl_ptr_1 = actor->anim_ctrl_ptr;
460 struct Animation_ControllerSlot **controller_slot_array =
461 anim_ctrl_ptr_1->controller_slot_array;
462 uint32_t controllers_remaining = (int32_t)anim_ctrl_ptr_1->controller_count;
463
464 do
465 {
466 struct Mesh_Command *relocated_command =
467 (struct Mesh_Command *)((uintptr_t)*controller_slot_array + (uintptr_t)actor - (uintptr_t)template_actor);
468
469 *controller_slot_array = (struct Animation_ControllerSlot *)relocated_command;
470
471 // Vertex-color commands own two arrays within the cloned actor allocation.
472 if (relocated_command->type == MESH_COMMAND_VERTEX_COLOR)
473 {
474 struct Animation_VertexColorController *color_controller =
475 (struct Animation_VertexColorController *)relocated_command;
476
477 color_controller->keyframe_array = (struct Animation_VertexColorKeyframe *)((uintptr_t)color_controller->keyframe_array + (uintptr_t)actor - (uintptr_t)template_actor);
478
479 struct Animation_VertexColorController *stored_color_controller =
480 (struct Animation_VertexColorController *)*controller_slot_array;
481
482 stored_color_controller->target_array = (struct Animation_VertexColorTarget *)((uintptr_t)stored_color_controller->target_array + (uintptr_t)actor - (uintptr_t)template_actor);
483 }
484
485 controller_slot_array = &controller_slot_array[1];
486 } while (--controllers_remaining);
487 }
488 }
489 }
490
491 actor->attach_refcount = 0;
492 actor->ground_collision_node = NULL;
493 actor->ground_contact_polygon = NULL;
494 actor->next_actor = NULL;
495
496 uint8_t inherited_lifecycle_flags = template_actor->lifecycle_flags & ACTOR_LIFECYCLE_COLLISION_ENABLED;
497
499 actor->lifecycle_flags = inherited_lifecycle_flags;
500 actor->anim_tick = 0;
501 Model_ResetState(actor);
502
503 int32_t retained_behavior_flags = actor->behavior_flags & ACTOR_BEHAVIOR_DEFERRED_DESTROY;
504 bool render_nodes_absent = !actor->render_node_list;
505
506 actor->anim_seq_index = 0;
507 actor->anim_seq_timer = 0;
508 actor->anim_frame_time = 0;
509 actor->behavior_flags = retained_behavior_flags;
510 actor->parent_actor = NULL;
511 actor->attachment_transform_node = NULL;
512 actor->velocity = (struct Math_Vec3I32){
513 .z = 0,
514 .y = 0,
515 .x = 0};
516
517 actor->sub_pos = (struct Math_Vec3I32){
518 .z = 0,
519 .y = 0,
520 .x = 0};
521
522 if (!render_nodes_absent)
523 {
524 struct Scene_Node **relocated_render_node_slots = (struct Scene_Node **)((char *)template_actor->render_node_list - (uintptr_t)template_actor + (uintptr_t)actor);
525
526 actor->render_node_list = relocated_render_node_slots;
527
528 struct Scene_Node *original_render_node = (struct Scene_Node *)(*(uint32_t *)relocated_render_node_slots);
529
530 while (original_render_node)
531 {
532 struct Scene_Node *relocated_render_node = (struct Scene_Node *)((uintptr_t)original_render_node + (uintptr_t)actor - (uintptr_t)template_actor);
533
534 relocated_render_node->first_child = (void *)((uintptr_t)relocated_render_node->first_child + (uintptr_t)actor - (uintptr_t)template_actor);
535
536 uint8_t retained_traversal_flags = relocated_render_node->traversal_flags & ((uint8_t)~(SCENE_NODE_DISABLED | SCENE_NODE_VISIBILITY_HIDDEN | SCENE_NODE_FORCE_REINITIALIZE));
537
538 relocated_render_node->anim_update_sentinel = 0;
539 relocated_render_node->cached_anim_tick = 0;
540 relocated_render_node->traversal_flags = retained_traversal_flags | SCENE_NODE_DISABLED;
541
542 bool is_not_type_eleven = relocated_render_node->node_type != SCENE_SOUND_EVENT_INDEX;
543
544 relocated_render_node->animation_delay = 0;
545
546 if (!is_not_type_eleven)
547 relocated_render_node->render_entry_index_for_type_6 &= ((uint8_t)~ACTOR_RENDER_ENTRY_INITIALIZED);
548
549 *(uint32_t *)relocated_render_node_slots = (uint32_t)(relocated_render_node);
550 original_render_node = relocated_render_node_slots[1];
551 relocated_render_node_slots = &relocated_render_node_slots[1];
552 }
553 }
554
556
557 if (list_head)
558 {
559 actor->list_next = (struct Actor_State *)(*(uint32_t *)list_head);
560 *(uint32_t *)list_head = (uint32_t)(actor);
561 }
562
563 return actor;
564}
565
566// Original pcdogs.exe: 0x43aa30
567// Marks a shared or deferred actor for removal, or frees an owned actor according to its lifecycle flags.
568void Actor_Destroy(struct Actor_State *actor)
569{
571 {
573
574 return;
575 }
576
577 uint8_t lifecycle_flags = actor->lifecycle_flags;
578
580 {
582
583 return;
584 }
585
587}
588
589// Original pcdogs.exe: 0x443310
590// Performs no work and returns to the caller.
591void Actor_RunNullCallback(struct Actor_State *unused_actor)
592{
593 (void)unused_actor;
594 return;
595}
596
597// Original pcdogs.exe: 0x443320
598// Rejects the collision probe by returning zero without changing state.
599int32_t Actor_RejectCollisionProbe(void *subject, void *other_object, struct Collision_Polygon *collision_poly, int32_t collision_depth)
600{
601 (void)collision_depth;
602 (void)other_object;
603 (void)collision_poly;
604 (void)subject;
605 return 0;
606}
#define ACTOR_BEHAVIOR_SKIP_UPDATE
Definition constants.h:7
#define ACTOR_BEHAVIOR_MOVEMENT_LOCKED
Definition constants.h:16
#define ACTOR_LIFECYCLE_COLLISION_ENABLED
Definition constants.h:42
#define ACTOR_BEHAVIOR_AIRBORNE
Definition constants.h:13
#define ACTOR_RENDER_CONTROLLER_GROUP_RELOCATED
Definition constants.h:88
#define ACTOR_LIFECYCLE_DESTROY_QUEUED
Definition constants.h:41
#define ACTOR_LIFECYCLE_DISABLED
Definition constants.h:39
#define ACTOR_BEHAVIOR_GROUND_TILT_ENABLED
Definition constants.h:21
#define ACTOR_RENDER_ENTRY_INITIALIZED
Definition constants.h:85
#define ACTOR_BEHAVIOR_DEFERRED_DESTROY
Definition constants.h:8
#define ACTOR_ANIMATION_DEFAULT_SPEED_Q6
Definition constants.h:248
#define ACTOR_LIFECYCLE_DESTROYING
Definition constants.h:43
@ ACTOR_PHASE_NONE
Definition constants.h:149
@ ACTOR_PHASE_ACTIVE
Definition constants.h:150
@ ACTOR_PHASE_LEAVING
Definition constants.h:152
#define ACTOR_CONTROLLER_PRESERVE_DEFAULTS
Definition constants.h:49
@ ACTOR_OBJECT_RUNTIME
Definition constants.h:143
#define ACTOR_BEHAVIOR_BYPASS_COLLISION
Definition constants.h:18
#define ACTOR_BEHAVIOR_PREPROCESSED
Definition constants.h:20
#define ACTOR_BEHAVIOR_COLLISION_CORRECTION
Definition constants.h:33
void Actor_ProcessRendering(struct Actor_State *actor)
Definition rendering.c:86
void Actor_DetachFromParent(struct Actor_State *actor)
#define Actor_CollisionListHead
Definition globals.h:58
void Actor_DestroyAll()
Definition lifecycle.c:287
void Actor_UpdateProjectileList()
Definition lifecycle.c:108
struct Actor_State * Actor_CloneTemplateWithTemplateRelativeFixups(struct Actor_State *template_actor, struct Actor_State **list_head)
Definition lifecycle.c:311
void Actor_CopyEntityDefaultsToRecord(struct Actor_State *actor)
Definition lifecycle.c:250
int32_t Actor_RejectCollisionProbe(void *subject, void *other_object, struct Collision_Polygon *collision_poly, int32_t collision_depth)
Definition lifecycle.c:599
void Actor_StartTransition(struct Actor_State *actor, struct Actor_MovementRecordView *record)
Definition lifecycle.c:221
void Actor_ApplyEntitySlotFlags(struct Actor_State *actor)
Definition lifecycle.c:166
void Actor_UpdateList()
Definition lifecycle.c:41
void Actor_RunNullCallback(struct Actor_State *unused_actor)
Definition lifecycle.c:591
void Actor_Destroy(struct Actor_State *actor)
Definition lifecycle.c:568
@ MESH_COMMAND_VERTEX_COLOR
Definition enums.h:148
void Model_AdvanceAnimation(struct Actor_State *actor)
Definition model.c:21
void Model_ResetState(struct Actor_State *actor)
Definition model.c:92
#define AUDIO_DETACH_EMITTER_MODE
Definition constants.h:50
void Audio_StopOrUpdateSoundsAtPosition(int32_t sound_index_or_mode, struct Math_Vec3I32 *position, char looping_only)
Definition spatial.c:76
void Collision_ProcessActorToActorCollisions(void)
Definition actors.c:496
void Projectile_DestroyAllLiveActors(void)
Definition lifecycle.c:655
#define Projectile_LiveActorListHead
Definition globals.h:15
#define ENTITY_FLAG_PERSISTENT_BIT_17
Definition constants.h:24
#define ENTITY_FLAG_SCRIPT_PAUSED
Definition constants.h:20
#define ENTITY_FLAG_PERSISTENT_BIT_15
Definition constants.h:22
#define GAME_OVERLAY_SKIP_OBJECT_RENDER
Definition constants.h:36
#define Game_FrameOverlayFlags
Definition globals.h:44
void Pkg_FreeResourceMemory(void *user_ptr)
Definition resources.c:342
void * Pkg_AllocateResourceMemory(uint32_t size)
Definition resources.c:317
#define pkg_resource_current_level_data
Definition globals.h:117
#define PHYSICS_Q14_ONE
Definition constants.h:11
@ PHYSICS_MOVE_FACING_DRIVE_AIR_ROLL
Definition constants.h:26
void Physics_UpdateActorBehavior(struct Actor_State *actor)
Definition behavior.c:565
void Powerup_Cleanup(void)
Definition lifecycle.c:76
#define SCENE_NODE_VISIBILITY_HIDDEN
Definition constants.h:25
#define SCENE_NODE_FORCE_REINITIALIZE
Definition constants.h:32
#define SCENE_SOUND_EVENT_INDEX
Definition constants.h:52
#define SCENE_NODE_DISABLED
Definition constants.h:24
#define g_objectNodeRoot
Definition globals.h:12
struct Actor_ContactSlot contact_slots[0x4]
Definition types.h:327
uint8_t collision_class
Definition types.h:435
int16_t anim_seq_timer
Definition types.h:389
uint8_t component_count
Definition types.h:430
struct Math_Vec3I32 velocity
Definition types.h:446
int16_t move_anim_speed
Definition types.h:428
struct Component_Instance * collision_component_or_parent_component
Definition types.h:437
struct Scene_Node ** render_node_list
Definition types.h:440
int32_t anim_frame_time
Definition types.h:390
struct Scene_TransformNodePrefix * attachment_transform_node
Definition types.h:379
uint8_t transition_phase
Definition types.h:434
uint8_t lifecycle_flags
Definition types.h:392
uint8_t movement_handler_index
Definition types.h:433
struct Actor_State * child_actor
Definition types.h:478
struct Collision_Polygon * ground_contact_polygon
Definition types.h:452
struct Actor_State * next_actor
Definition types.h:378
struct Collision_Node * ground_collision_node
Definition types.h:451
int32_t behavior_flags
Definition types.h:407
int32_t alloc_size
Definition types.h:512
int32_t anim_tick
Definition types.h:427
int16_t anim_seq_index
Definition types.h:388
struct Actor_State * parent_actor
Definition types.h:488
void * record_ptr
Definition types.h:477
struct Math_Vec3I32 sub_pos
Definition types.h:386
uint8_t attach_refcount
Definition types.h:436
struct Actor_State * list_next
Definition types.h:377
Definition types.h:118
uint8_t lifecycle_flags
Definition types.h:139
struct Math_Vec3I32 position
Definition types.h:132
struct Actor * list_next
Definition types.h:119
int32_t behavior_flags
Definition types.h:160
uint8_t actor_type
Definition types.h:138
struct Actor * parent_actor
Definition types.h:218
uint8_t attach_refcount
Definition types.h:189
uint8_t behavior_flags_high
Definition types.h:165
struct Scene_Node ** node_list
Definition types.h:196
struct Animation_ControllerSlot ** controller_slot_array
Definition types.h:86
struct Animation_VertexColorKeyframe * keyframe_array
Definition types.h:443
struct Animation_VertexColorTarget * target_array
Definition types.h:442
struct Scene_Node * node
Definition types.h:897
struct MaterialControllerGroup * controller_group
Definition types.h:239
Definition types.h:22
uint32_t flags
Definition types.h:25
void * shared_ref_54
Definition types.h:48
int32_t param_max_speed_1
Definition types.h:83
int32_t param_max_speed_2
Definition types.h:85
struct Math_Vec3I32 * position_ptr
Definition types.h:78
void * shared_ref_50
Definition types.h:47
int32_t param_max_speed_0
Definition types.h:82
int16_t m21
Definition types.h:169
int16_t m00
Definition types.h:162
int16_t m01
Definition types.h:163
int16_t m12
Definition types.h:167
int16_t m11
Definition types.h:166
int16_t m20
Definition types.h:168
int16_t m02
Definition types.h:164
int16_t m10
Definition types.h:165
int32_t z
Definition types.h:472
enum Mesh_CommandType type
Definition types.h:508
struct Math_Vec3I32 * position_ptr
Definition types.h:137
uint16_t anim_update_sentinel
Definition types.h:126
int32_t cached_anim_tick
Definition types.h:128
uint16_t animation_delay
Definition types.h:127
struct Actor * deferred_actor_list
Definition types.h:194
uint8_t traversal_flags
Definition types.h:130
uint8_t node_type
Definition types.h:129
char render_entry_index_for_type_6
Definition types.h:131
struct Scene_Node * first_child
Definition types.h:114