12 zoneID =
test_ray_zones(posX, posY, posZ, 0.0f, -1.0f, 0.0f, &
hitX, &
hitY, &
hitZ, &
hitDepth, &
nX, &
nY, &
nZ);
23s32
calculate_segment_intersection(
f32 A1x,
f32 A1z,
f32 A2x,
f32 A2z,
f32 B1x,
f32 B1z,
f32 B2x,
f32 B2z,
f32*
interX,
f32*
interZ,
f32*
squared_dist) {
53 }
else if (
disc > 0.0f) {
62 }
else if (
disc > 0.0f) {
123s32
calculate_line_segment_intersection(
f32 A1x,
f32 A1z,
f32 A2x,
f32 A2z,
f32 B1x,
f32 B1z,
f32 B2x,
f32 B2z,
f32*
interX,
f32*
interZ,
f32*
squared_dist) {
151 }
else if (
disc > 0.0f) {
160 }
else if (
disc > 0.0f) {
194 if (camSettings ==
NULL) {
237 camera->leadInterpAlpha = 1.0f;
238 camera->targetLeadAmount = 0.0f;
253 if (stickX != 0.0f) {
255 if (
camera->accumulatedStickLead > 0.0f) {
257 camera->accumulatedStickLead = stickX;
259 camera->accumulatedStickLead += stickX;
261 if (
camera->accumulatedStickLead <= -300.0f) {
264 if (
camera->targetLeadAmount > 0.0f) {
265 camera->leadInterpAlpha = 0.0f;
268 camera->accumulatedStickLead = -300.0f;
271 if (
camera->accumulatedStickLead < 0.0f) {
273 camera->accumulatedStickLead = stickX;
275 camera->accumulatedStickLead += stickX;
277 if (
camera->accumulatedStickLead >= 300.0f) {
280 if (
camera->targetLeadAmount < 0.0f) {
281 camera->leadInterpAlpha = 0.0f;
284 camera->accumulatedStickLead = 300.0f;
289 if (
camera->increasingLeadInterp) {
290 camera->leadInterpAlpha += 0.01f;
291 if (
camera->leadInterpAlpha > 1.0f) {
292 camera->leadInterpAlpha = 1.0f;
297 if (
camera->targetLeadAmount -
camera->leadAmount == 0.0f) {
298 camera->leadInterpAlpha = 0.0f;
303 if (
camera->targetLeadAmount -
camera->leadAmount > 0.0f) {
305 if (
camera->targetLeadAmount -
camera->leadAmount < 0.1) {
314 if (
camera->targetLeadAmount -
camera->leadAmount > -0.1) {
326 camera->leadInterpAlpha = 0.0f;
339 leadAmount =
camera->leadAmount;
342 if (settings !=
NULL) {
347 if (
camera->needsInitialConstrainDir) {
354 1.0f, &
X, &
Y, &
Z, &
W);
360 camera->leadConstrainDir = (
X > 0.0f) ? 1 : (
X < 0.0f) ? -1 : 0;
384 camera->leadInterpAlpha = 0.0f;
385 camera->leadAmount = 0.0f;
387 camera->prevLeadSettings = settings;
394 camera->leadConstrainDir = 0;
395 camera->prevLeadSettings = settings;
406 if (settings ==
NULL) {
420 settings =
camera->prevLeadSettings;
443 for (s32 i = 0; i <
zone->numTriangles; i++) {
445 zone->triangleTable[i].v2->x,
zone->triangleTable[i].v2->z,
452 zone->triangleTable[i].v3->x,
zone->triangleTable[i].v3->z,
459 zone->triangleTable[i].v1->x,
zone->triangleTable[i].v1->z,
469 camera->leadAmount = 0.0f;
473 camera->leadInterpAlpha = 0.0f;
BSS s32 PopupMenu_SelectedIndex
s32 calculate_segment_intersection(f32 A1x, f32 A1z, f32 A2x, f32 A2z, f32 B1x, f32 B1z, f32 B2x, f32 B2z, f32 *interX, f32 *interZ, f32 *squared_dist)
void apply_constraints_to_lead_amount(Camera *camera)
void update_camera_lead_amount(Camera *camera, f32 candidateLeadAmount)
CameraControlSettings * test_ray_zone(f32 posX, f32 posY, f32 posZ, Collider **zone)
void create_camera_leadplayer_matrix(Camera *camera)
s32 func_800328A4(CameraControlSettings *camSettings, f32 Px, f32 Pz)
s32 calculate_line_segment_intersection(f32 A1x, f32 A1z, f32 A2x, f32 A2z, f32 B1x, f32 B1z, f32 B2x, f32 B2z, f32 *interX, f32 *interZ, f32 *squared_dist)
union CameraControlSettings::@14 points
@ CAM_CONTROL_FIXED_POS_AND_ORIENTATION
@ CAM_CONTROL_CONSTRAIN_TO_LINE
@ CAM_CONTROL_CONSTAIN_BETWEEN_POINTS
@ CAM_CONTROL_LOOK_AT_POINT_CONSTAIN_TO_LINE
@ CAMERA_FLAG_SUPRESS_LEADING
s32 test_ray_zones(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32 *hitX, f32 *hitY, f32 *hitZ, f32 *hitDepth, f32 *nx, f32 *ny, f32 *nz)
PlayerStatus * gPlayerStatusPtr
CollisionData gZoneCollisionData
PartnerStatus gPartnerStatus