34 if (source_shadow_actor)
42 int32_t actor_y = source_shadow_actor->
position.
y;
43 int32_t actor_z = source_shadow_actor->
position.
z;
44 int32_t camera_delta[3];
48 int32_t camera_delta_y = camera_list_state->
eye_pos.
z - actor_y;
50 camera_delta[1] = camera_delta_y;
53 int32_t camera_delta_z = camera_list_state->
eye_pos.
y - actor_z;
55 camera_delta[2] = camera_delta_z;
60 first_vertex_xy.
x = runtime_vertices->
pos.
x;
61 first_vertex_xy.
y = runtime_vertices->
pos.
y;
65 first_vertex_z_group.
pos.
z = runtime_vertices->
pos.
z;
73 int32_t second_vertex_xy_bits = *(int32_t *)&runtime_vertices[1].pos.x;
78 int32_t second_vertex_z_group_bits = *(int32_t *)&runtime_vertices[1].pos.z;
80 *(uint32_t *)&clip_input_vertices[1].
position_q6.
x = second_vertex_xy_bits;
82 int32_t third_vertex_xy_bits = *(int32_t *)&runtime_vertices[2].pos.x;
84 *(uint32_t *)&clip_input_vertices[1].
position_q6.
z = second_vertex_z_group_bits;
86 int32_t third_vertex_z_group_bits = *(int32_t *)&runtime_vertices[2].pos.z;
89 *(uint32_t *)&clip_input_vertices[2].position_q6.x = third_vertex_xy_bits;
90 *(uint32_t *)&clip_input_vertices[2].position_q6.z = third_vertex_z_group_bits;
92 int32_t fourth_vertex_z_group_bits = *(int32_t *)&runtime_vertices[3].
pos.
z;
94 *(uint32_t *)&clip_input_vertices[3].position_q6.x =
95 *(int32_t *)&runtime_vertices[3].
pos.
x;
96 *(uint32_t *)&clip_input_vertices[3].position_q6.z = fourth_vertex_z_group_bits;
100 clip_input_vertices[0].
next = &clip_input_vertices[1];
101 clip_input_vertices[1].
next = &clip_input_vertices[2];
105 clip_input_vertices[2].
next = &clip_input_vertices[3];
106 clip_input_vertices[3].
next = clip_input_vertices;
109 clip_input_vertices[2].
next = clip_input_vertices;
114 int32_t planes_remaining = 4;
115 int32_t *camera_delta_components = &camera_delta[0];
116 int32_t plane_byte_offset = 0x30;
117 int32_t minimum_plane_distance;
118 int32_t maximum_plane_distance;
119 bool has_more_clip_planes;
124 int32_t plane_xy_bits =
129 int32_t plane_camera_offset =
131 *(int32_t *)camera_delta_components) +
136 int32_t current_distance_or_fraction_q12 = (((int32_t)clip_vertex->
position_q6.
y * (int32_t)*(int16_t *)((
char *)&plane_xy_bits + 2) + (int32_t)clip_vertex->
position_q6.
z * (int32_t)plane_normal_z + (int32_t)clip_vertex->
position_q6.
x * (int32_t)(int16_t)plane_xy_bits) >> 2) + plane_camera_offset;
137 int32_t current_distance_snapshot = current_distance_or_fraction_q12;
139 maximum_plane_distance = current_distance_or_fraction_q12;
140 minimum_plane_distance = current_distance_or_fraction_q12;
147 next_clip_vertex = clip_vertex->
next;
149 int32_t next_plane_distance = ((
150 (int32_t)next_clip_vertex->
position_q6.
y * (int32_t)*(int16_t *)((
char *)&plane_xy_bits + 2) + (int32_t)next_clip_vertex->
position_q6.
z * (int32_t)plane_normal_z + (int32_t)next_clip_vertex->
position_q6.
x * (int32_t)(int16_t)plane_xy_bits) >>
154 if (next_plane_distance < minimum_plane_distance)
155 minimum_plane_distance = next_plane_distance;
156 else if (next_plane_distance > maximum_plane_distance)
157 maximum_plane_distance = next_plane_distance;
159 if ((next_plane_distance ^ current_distance_or_fraction_q12) >= 0)
160 intersection_or_cursor = intersection_cursor;
161 else if (next_plane_distance >= 0)
163 current_distance_or_fraction_q12 = ((int64_t)next_plane_distance *
MATH_Q12_ONE) / (next_plane_distance - current_distance_or_fraction_q12);
165 (int32_t)next_clip_vertex->
position_q6.
x * (0x1000 - current_distance_or_fraction_q12) + (int32_t)clip_vertex->
position_q6.
x * current_distance_or_fraction_q12) >>
168 (int32_t)clip_vertex->
position_q6.
y * current_distance_or_fraction_q12 + (int32_t)next_clip_vertex->
position_q6.
y * (0x1000 - current_distance_or_fraction_q12)) >>
171 (int32_t)clip_vertex->
position_q6.
z * current_distance_or_fraction_q12 + (int32_t)next_clip_vertex->
position_q6.
z * (0x1000 - current_distance_or_fraction_q12)) >>
173 intersection_cursor->
next = next_clip_vertex;
175 if (first_intersection)
179 first_intersection->
next = closing_intersection;
180 intersection_or_cursor = closing_intersection;
185 first_intersection = intersection_cursor;
186 intersection_or_cursor = intersection_cursor + 1;
187 intersection_cursor = intersection_or_cursor;
191 current_distance_or_fraction_q12 = ((int64_t)current_distance_snapshot *
MATH_Q12_ONE) / (current_distance_or_fraction_q12 - next_plane_distance);
193 (int32_t)clip_vertex->
position_q6.
x * (0x1000 - current_distance_or_fraction_q12) + (int32_t)next_clip_vertex->
position_q6.
x * current_distance_or_fraction_q12) >>
196 (int32_t)clip_vertex->
position_q6.
y * (0x1000 - current_distance_or_fraction_q12) + (int32_t)next_clip_vertex->
position_q6.
y * current_distance_or_fraction_q12) >>
198 intersection_or_cursor = intersection_cursor;
200 (int32_t)clip_vertex->
position_q6.
z * (0x1000 - current_distance_or_fraction_q12) + (int32_t)next_clip_vertex->
position_q6.
z * current_distance_or_fraction_q12) >>
202 clip_vertex->
next = intersection_or_cursor;
204 if (first_intersection)
206 intersection_or_cursor->
next = first_intersection;
211 first_intersection = intersection_or_cursor;
212 intersection_or_cursor = &intersection_or_cursor[1];
213 intersection_cursor = intersection_or_cursor;
216 current_distance_or_fraction_q12 = next_plane_distance;
217 current_distance_snapshot = current_distance_or_fraction_q12;
218 clip_vertex = next_clip_vertex;
219 }
while (next_clip_vertex != clip_ring_start);
221 if (!first_intersection)
223 if (current_distance_or_fraction_q12 < 0)
226 clipped_ring = clip_vertex;
230 clipped_ring = intersection_or_cursor;
231 intersection_cursor = &intersection_or_cursor[1];
234 planes_remaining -= 1;
235 has_more_clip_planes = plane_byte_offset;
236 plane_byte_offset -= 0xc;
237 }
while (has_more_clip_planes);
239 if (planes_remaining < 0)
244 if (distance_culling_disabled || minimum_plane_distance >> 4 <= depth_list_state->
dynamic_level_scale)
253 else if (!distance_culling_disabled && maximum_plane_distance >> 4 > depth_list_state->
dynamic_level_scale)
260 int32_t camera_relative_or_edge_x = ((int32_t)edge_vertex_cursor->
pos.
x << 6) - camera_delta[0];
263 int32_t oriented_face_dot =
264 (int32_t)((((uint64_t)((int64_t)(int32_t)
face_normal->x * camera_relative_or_edge_x) + (uint64_t)((int64_t)(int32_t)
face_normal->y * (((int32_t)edge_vertex_cursor->
pos.
y << 6) - camera_delta_y)) + (uint64_t)((int64_t)(int32_t)
face_normal->z * (((int32_t)edge_vertex_cursor->
pos.
z << 6) - camera_delta_z))) >> 12));
265 int32_t saved_face_dot = oriented_face_dot;
267 if (oriented_face_dot)
270 current_shadow_actor;
274 if (oriented_face_dot >= 0)
278 oriented_face_dot = -(oriented_face_dot);
279 saved_face_dot = oriented_face_dot;
282 edge_plane_actor = current_shadow_actor;
291 uint32_t normal_y_address =
294 *(uint16_t *)&((
struct Mesh_FaceNormal *)(uintptr_t)normal_y_address)->normal.y =
295 -(*(uint16_t *)&((
struct Mesh_FaceNormal *)(uintptr_t)normal_y_address)->normal.y);
297 uint32_t normal_z_address =
300 *(uint16_t *)&((
struct Mesh_FaceNormal *)(uintptr_t)normal_z_address)->normal.z =
301 -(*(uint16_t *)&((
struct Mesh_FaceNormal *)(uintptr_t)normal_z_address)->normal.z);
303 uint32_t normal_distance_address =
306 *(uint32_t *)normal_distance_address = -(*(uint32_t *)normal_distance_address);
315 oriented_face_dot = -(oriented_face_dot);
316 saved_face_dot = oriented_face_dot;
322 int32_t outer_edges_remaining = 4;
323 int32_t camera_delta_y_q6 = camera_delta_y >> 6;
324 int32_t camera_delta_z_q6 = camera_delta_z >> 6;
326 &runtime_vertices[3];
327 int32_t outer_plane_cross[3];
328 int32_t *outer_cross_right = &outer_plane_cross[0];
330 camera_delta[0] >>= 6;
332 int32_t *outer_cross_left = &outer_plane_cross[0];
337 int32_t outer_edge_z;
338 int32_t outer_edge_x;
339 int32_t outer_edge_y;
341 if (oriented_face_dot <= 0)
343 outer_edge_x = (int32_t)edge_vertex_cursor->
pos.
x - (int32_t)previous_outer_vertex->
pos.
x;
344 camera_relative_or_edge_x = outer_edge_x;
345 outer_edge_y = (int32_t)edge_vertex_cursor->
pos.
y - (int32_t)previous_outer_vertex->
pos.
y;
346 current_outer_vertex = edge_vertex_cursor;
348 outer_edge_z = (int32_t)edge_vertex_cursor->
pos.
z - (int32_t)previous_outer_vertex->
pos.
z;
352 current_outer_vertex = edge_vertex_cursor;
354 (int32_t)previous_outer_vertex->
pos.
x - (int32_t)current_outer_vertex->
pos.
x;
355 camera_relative_or_edge_x = outer_edge_x;
357 (int32_t)previous_outer_vertex->
pos.
y - (int32_t)current_outer_vertex->
pos.
y;
360 (int32_t)previous_outer_vertex->
pos.
z - (int32_t)current_outer_vertex->
pos.
z;
363 int32_t outer_relative_x_q10 = ((int32_t)current_outer_vertex->
pos.
x - camera_delta[0]) << 4;
364 int32_t outer_relative_y_q10 = ((int32_t)current_outer_vertex->
pos.
y - camera_delta_y_q6) << 4;
365 int32_t outer_relative_z_q10 = ((int32_t)current_outer_vertex->
pos.
z - camera_delta_z_q6) << 4;
366 int32_t outer_edge_x_q10 = outer_edge_x << 4;
367 int32_t outer_edge_y_q10 = outer_edge_y << 4;
368 int32_t outer_edge_z_q10 = outer_edge_z << 4;
369 int64_t outer_cross_zy_product = (int64_t)outer_relative_z_q10 * outer_edge_y_q10;
370 int64_t outer_cross_yz_product = (int64_t)outer_edge_z_q10 * outer_relative_y_q10;
372 outer_plane_cross[0] = ((int32_t)(uint32_t)((uint64_t)outer_cross_zy_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)outer_cross_yz_product >> 12));
374 int64_t outer_cross_xz_product = (int64_t)outer_relative_x_q10 * outer_edge_z_q10;
375 int64_t outer_cross_zx_product = (int64_t)outer_edge_x_q10 * outer_relative_z_q10;
377 outer_plane_cross[1] = ((int32_t)(uint32_t)((uint64_t)outer_cross_xz_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)outer_cross_zx_product >> 12));
379 int64_t outer_cross_yx_product = (int64_t)outer_relative_y_q10 * outer_edge_x_q10;
380 int64_t outer_cross_xy_product = (int64_t)outer_edge_y_q10 * outer_relative_x_q10;
382 outer_plane_cross[2] = ((int32_t)(uint32_t)((uint64_t)outer_cross_yx_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)outer_cross_xy_product >> 12));
384 int32_t outer_plane_length =
Math_SqrtFP12((int32_t)((((uint64_t)((int64_t)*(int32_t *)outer_cross_left * *(int32_t *)outer_cross_right) + (uint64_t)((int64_t)outer_cross_left[1] * outer_cross_right[1]) + (uint64_t)((int64_t)outer_cross_left[2] * outer_cross_right[2])) >> 12)));
387 if (outer_plane_length)
389 int32_t outer_inverse_length = INT64_C(0x100000000) / outer_plane_length;
390 int64_t outer_normalize_x_product = (int64_t)outer_inverse_length * outer_plane_cross[0];
392 edge_plane_write_cursor->
nx =
393 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_normalize_x_product >> 12)) >> 8);
395 int64_t outer_normalize_y_product = (int64_t)outer_inverse_length * outer_plane_cross[1];
397 edge_plane_write_cursor->
ny =
398 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_normalize_y_product >> 12)) >> 8);
400 int64_t outer_normalize_z_product = (int64_t)outer_inverse_length * outer_plane_cross[2];
402 edge_plane_write_cursor->
nz =
403 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_normalize_z_product >> 12)) >> 8);
404 edge_plane_write_cursor_next = edge_plane_write_cursor;
408 edge_plane_write_cursor_next = edge_plane_write_cursor;
409 edge_plane_write_cursor_next->
nz = 0;
410 edge_plane_write_cursor_next->
ny = 0;
411 edge_plane_write_cursor_next->
nx = 0;
414 int32_t outer_normal_y = (int32_t)edge_plane_write_cursor_next->
ny;
415 int32_t outer_normal_z = (int32_t)edge_plane_write_cursor_next->
nz;
416 int32_t outer_normal_x = (int32_t)edge_plane_write_cursor_next->
nx;
418 if ((outer_normal_y * outer_normal_y + outer_normal_z * outer_normal_z + outer_normal_x * outer_normal_x) >> 0xc > 0x1004)
420 int32_t *outer_retry_cross_right = &outer_plane_cross[0];
421 int32_t *outer_retry_cross_left = &outer_plane_cross[0];
422 int32_t outer_retry_normal_x;
423 int32_t outer_retry_normal_z;
424 int32_t outer_retry_normal_y;
428 outer_plane_cross[0] >>= 1;
429 outer_plane_cross[1] >>= 1;
430 outer_plane_cross[2] >>= 1;
432 int32_t *outer_retry_right_components = outer_retry_cross_right;
433 int32_t outer_retry_length =
Math_SqrtFP12((int32_t)((((uint64_t)((int64_t)*(int32_t *)outer_retry_cross_left * *(int32_t *)outer_retry_right_components) + (uint64_t)((int64_t)outer_retry_cross_left[1] * outer_retry_right_components[1]) + (uint64_t)((int64_t)outer_retry_cross_left[2] * outer_retry_right_components[2])) >> 12)));
436 if (outer_retry_length)
438 int32_t outer_retry_inverse_length = INT64_C(0x100000000) / outer_retry_length;
439 int64_t outer_retry_normalize_x_product = (int64_t)outer_retry_inverse_length * outer_plane_cross[0];
441 edge_plane_write_cursor->
nx =
442 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_retry_normalize_x_product >> 12)) >> 8);
444 int64_t outer_retry_normalize_y_product = (int64_t)outer_retry_inverse_length * outer_plane_cross[1];
446 edge_plane_write_cursor->
ny =
447 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_retry_normalize_y_product >> 12)) >> 8);
449 int64_t outer_retry_normalize_z_product = (int64_t)outer_retry_inverse_length * outer_plane_cross[2];
451 edge_plane_write_cursor->
nz =
452 (int16_t)(((int32_t)(uint32_t)((uint64_t)outer_retry_normalize_z_product >> 12)) >> 8);
453 outer_retry_plane = edge_plane_write_cursor;
457 outer_retry_plane = edge_plane_write_cursor;
458 outer_retry_plane->
nz = 0;
459 outer_retry_plane->
ny = 0;
460 outer_retry_plane->
nx = 0;
463 outer_retry_normal_y = (int32_t)outer_retry_plane->
ny;
464 outer_retry_normal_z = (int32_t)outer_retry_plane->
nz;
465 outer_retry_normal_x = (int32_t)outer_retry_plane->
nx;
466 }
while ((outer_retry_normal_y * outer_retry_normal_y + outer_retry_normal_z * outer_retry_normal_z + outer_retry_normal_x * outer_retry_normal_x) >> 0xc > 0x1004);
468 edge_plane_write_cursor_next = edge_plane_write_cursor;
471 edge_plane_write_cursor = &edge_plane_write_cursor_next[1];
472 previous_outer_vertex = edge_vertex_cursor;
474 edge_vertex_cursor = &edge_vertex_cursor[1];
475 outer_edges_remaining -= 1;
477 if (!outer_edges_remaining)
480 oriented_face_dot = saved_face_dot;
484 current_shadow_actor;
491 int32_t inner_plane_cross[3];
492 int32_t *inner_cross_right = &inner_plane_cross[0];
493 int32_t *inner_cross_left = &inner_plane_cross[0];
499 int32_t inner_edges_remaining = 4;
501 ¤t_inner_vertex[3];
505 int32_t inner_edge_start_z;
506 int32_t inner_edge_end_z;
507 int32_t inner_edge_x;
508 int32_t inner_edge_y;
510 if (saved_face_dot <= 0)
512 inner_edge_x = (int32_t)current_inner_vertex->
pos.
x - (int32_t)previous_inner_vertex->
pos.
x;
513 camera_relative_or_edge_x = inner_edge_x;
514 inner_edge_y = (int32_t)current_inner_vertex->
pos.
y - (int32_t)previous_inner_vertex->
pos.
y;
516 inner_edge_start_z = (int32_t)previous_inner_vertex->
pos.
z;
517 inner_edge_end_z = (int32_t)current_inner_vertex->
pos.
z;
521 inner_edge_x = (int32_t)previous_inner_vertex->
pos.
x - (int32_t)current_inner_vertex->
pos.
x;
522 camera_relative_or_edge_x = inner_edge_x;
523 inner_edge_y = (int32_t)previous_inner_vertex->
pos.
y - (int32_t)current_inner_vertex->
pos.
y;
525 inner_edge_end_z = (int32_t)previous_inner_vertex->
pos.
z;
526 inner_edge_start_z = (int32_t)current_inner_vertex->
pos.
z;
529 int32_t inner_edge_z = inner_edge_end_z - inner_edge_start_z;
530 int32_t inner_edge_x_q10 = inner_edge_x << 4;
531 int32_t inner_edge_y_q10 = inner_edge_y << 4;
532 int32_t inner_edge_z_q10 = inner_edge_z << 4;
533 int32_t inner_relative_x_q10 =
534 ((int32_t)current_inner_vertex->
pos.
x - camera_delta[0]) << 4;
535 int32_t inner_relative_y_q10 =
536 ((int32_t)current_inner_vertex->
pos.
y - camera_delta_y_q6) << 4;
537 int32_t inner_relative_z_q10 =
538 ((int32_t)current_inner_vertex->
pos.
z - camera_delta_z_q6) << 4;
539 int64_t inner_cross_yz_product = (int64_t)inner_edge_z_q10 * inner_relative_y_q10;
540 int64_t inner_cross_zy_product = (int64_t)inner_relative_z_q10 * inner_edge_y_q10;
542 inner_plane_cross[0] = ((int32_t)(uint32_t)((uint64_t)inner_cross_yz_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)inner_cross_zy_product >> 12));
544 int64_t inner_cross_zx_product = (int64_t)inner_edge_x_q10 * inner_relative_z_q10;
545 int64_t inner_cross_xz_product = (int64_t)inner_relative_x_q10 * inner_edge_z_q10;
547 inner_plane_cross[1] = ((int32_t)(uint32_t)((uint64_t)inner_cross_zx_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)inner_cross_xz_product >> 12));
549 int64_t inner_cross_xy_product = (int64_t)inner_edge_y_q10 * inner_relative_x_q10;
550 int64_t inner_cross_yx_product = (int64_t)inner_relative_y_q10 * inner_edge_x_q10;
552 inner_plane_cross[2] = ((int32_t)(uint32_t)((uint64_t)inner_cross_xy_product >> 12)) - ((int32_t)(uint32_t)((uint64_t)inner_cross_yx_product >> 12));
554 int32_t inner_plane_length =
Math_SqrtFP12((int32_t)((((uint64_t)((int64_t)*(int32_t *)inner_cross_left * *(int32_t *)inner_cross_right) + (uint64_t)((int64_t)inner_cross_left[1] * inner_cross_right[1]) + (uint64_t)((int64_t)inner_cross_left[2] * inner_cross_right[2])) >> 12)));
557 if (inner_plane_length)
559 int32_t inner_inverse_length = INT64_C(0x100000000) / inner_plane_length;
560 int64_t inner_normalize_x_product = (int64_t)inner_inverse_length * inner_plane_cross[0];
562 inner_plane = edge_plane_write_cursor;
564 (int16_t)(((int32_t)(uint32_t)((uint64_t)inner_normalize_x_product >> 12)) >> 8);
566 int64_t inner_normalize_y_product = (int64_t)inner_inverse_length * inner_plane_cross[1];
569 (int16_t)(((int32_t)(uint32_t)((uint64_t)inner_normalize_y_product >> 12)) >> 8);
571 int64_t inner_normalize_z_product = (int64_t)inner_inverse_length * inner_plane_cross[2];
574 (int16_t)(((int32_t)(uint32_t)((uint64_t)inner_normalize_z_product >> 12)) >> 8);
578 inner_plane = edge_plane_write_cursor;
584 int32_t inner_normal_x = (int32_t)inner_plane->
nx;
585 int32_t inner_normal_y = (int32_t)inner_plane->
ny;
586 int32_t inner_normal_z = (int32_t)inner_plane->
nz;
588 if ((inner_normal_x * inner_normal_x + inner_normal_y * inner_normal_y + inner_normal_z * inner_normal_z) >> 0xc > 0x1004)
590 int32_t *inner_retry_cross_right = &inner_plane_cross[0];
591 int32_t *inner_retry_cross_left = &inner_plane_cross[0];
592 int32_t inner_retry_normal_x;
593 int32_t inner_retry_normal_z;
594 int32_t inner_retry_normal_y;
598 inner_plane_cross[0] >>= 1;
599 inner_plane_cross[1] >>= 1;
600 inner_plane_cross[2] >>= 1;
603 (int32_t)((((uint64_t)((int64_t)*(int32_t *)inner_retry_cross_left * *(int32_t *)inner_retry_cross_right) + (uint64_t)((int64_t)inner_retry_cross_left[1] * inner_retry_cross_right[1]) + (uint64_t)((int64_t)inner_retry_cross_left[2] * inner_retry_cross_right[2])) >> 12)));
606 if (inner_retry_length)
608 int32_t inner_retry_inverse_length = INT64_C(0x100000000) / inner_retry_length;
609 int64_t inner_retry_normalize_x_product = (int64_t)inner_retry_inverse_length * inner_plane_cross[0];
611 edge_plane_write_cursor->
nx = (int16_t)((
612 (int32_t)(uint32_t)((uint64_t)inner_retry_normalize_x_product >> 12)) >>
615 int64_t inner_retry_normalize_y_product = (int64_t)inner_retry_inverse_length * inner_plane_cross[1];
617 edge_plane_write_cursor->
ny = (int16_t)((
618 (int32_t)(uint32_t)((uint64_t)inner_retry_normalize_y_product >> 12)) >>
621 int64_t inner_retry_normalize_z_product = (int64_t)inner_retry_inverse_length * inner_plane_cross[2];
623 edge_plane_write_cursor->
nz = (int16_t)((
624 (int32_t)(uint32_t)((uint64_t)inner_retry_normalize_z_product >> 12)) >>
627 edge_plane_write_cursor;
632 edge_plane_write_cursor;
633 inner_retry_plane->
nz = 0;
634 inner_retry_plane->
ny = 0;
635 inner_retry_plane->
nx = 0;
638 inner_retry_normal_z = (int32_t)inner_retry_plane->
nz;
639 inner_retry_normal_y = (int32_t)inner_retry_plane->
ny;
640 inner_retry_normal_x = (int32_t)inner_retry_plane->
nx;
642 (inner_retry_normal_x * inner_retry_normal_x + inner_retry_normal_y * inner_retry_normal_y + inner_retry_normal_z * inner_retry_normal_z) >> 0xc > 0x1004);
644 inner_plane = edge_plane_write_cursor;
647 edge_plane_write_cursor = &inner_plane[1];
648 previous_inner_vertex = edge_vertex_cursor;
650 edge_vertex_cursor = &edge_vertex_cursor[1];
651 inner_edges_remaining -= 1;
653 if (!inner_edges_remaining)
656 current_inner_vertex = edge_vertex_cursor;
659 inner_groups_remaining -= 1;
660 }
while (inner_groups_remaining);
662 linked_shadow_actor = current_shadow_actor;
671 source_shadow_actor = current_shadow_actor;
676 current_shadow_actor = list_next;
681 source_shadow_actor = current_shadow_actor;
687 if (!ground_test_actor)
705 ground_test_actor = next_actor;
706 }
while (next_actor);