5#define LERP(a, b, alpha) ((a) * (alpha) + (b) * (1.0f-(alpha)))
7#define QUADRATIC_SINE_INTERP(alpha) (1.0f - sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2))
8#define CUBIC_SINE_INTERP(alpha) (1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2))
10static f32 BattleCam_PosX;
11static f32 BattleCam_PosY;
12static f32 BattleCam_PosZ;
13static s16 BattleCam_SubjectActor;
14static s16 BattleCam_SubjectActorPart;
15static s16 BattleCam_BoomLength;
16static s16 BattleCam_BoomYaw;
17static s16 BattleCam_BoomPitch;
18static s16 BattleCam_BoomOffsetY;
19static f32 BattleCam_InitialBoomLength;
20static f32 BattleCam_InitialBoomYaw;
21static f32 BattleCam_InitialBoomPitch;
22static f32 BattleCam_InitialBoomOffsetY;
23static b8 BattleCam_DoneMoving;
24static s16 BattleCam_MoveTimeLeft;
25static s16 BattleCam_MoveTimeTotal;
26static s8 BattleCam_AdjustTargetXMode;
27static s8 BattleCam_AdjustTargetYMode;
28static b8 BattleCam_SetImmediately;
29static b8 BattleCam_UseLinearInterp;
30static b8 BattleCam_ClampPosX;
31static s8 BattleCam_ExtraOffsetX;
32static f32 BattleCam_InitialPosX;
33static f32 BattleCam_InitialPosY;
34static f32 BattleCam_InitialPosZ;
51 if (BattleCam_ClampPosX) {
52 f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0;
53 f32 lowerBound = -upperBound;
56 x += (lowerBound - x) / 2;
59 x += (upperBound - x) / 2;
67 s32 actorID = BattleCam_SubjectActor & 0xFF;
82 if (usePart && actor != NULL) {
112 if (targetActor == NULL) {
128 switch (actorClass) {
130 switch (BattleCam_AdjustTargetYMode) {
154 switch (BattleCam_AdjustTargetYMode) {
168 switch (BattleCam_AdjustTargetYMode) {
191API_CALLABLE(BattleCam_Update_Interrupt) {
192 BattleCam_DoneMoving = TRUE;
206API_CALLABLE(BattleCam_Update_FocusMidpointA) {
211 f32 targetBoomLength;
220 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
x - 24.0);
221 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
y - 24.0);
223 if (BattleCam_SetImmediately) {
228 camera->
params.basic.dist = BattleCam_BoomLength;
229 camera->
params.basic.pitch = BattleCam_BoomPitch;
230 camera->
params.basic.yaw = BattleCam_BoomYaw;
231 camera->
params.basic.offsetY = BattleCam_BoomOffsetY * 256;
238 BattleCam_InitialBoomLength = camera->
params.basic.dist;
239 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
240 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
241 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
243 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
246 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
247 if (!BattleCam_UseLinearInterp) {
259 targetBoomLength = BattleCam_BoomLength;
263 targetBoomLength -= 64.0f;
266 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, targetBoomLength, alpha);
267 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
268 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
269 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
271 if (BattleCam_MoveTimeLeft == 0) {
272 BattleCam_DoneMoving = TRUE;
274 BattleCam_MoveTimeLeft--;
290API_CALLABLE(BattleCam_Update_FocusMidpointB) {
295 f32 targetBoomLength;
304 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
x - 24.0);
305 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
y - 24.0);
307 if (BattleCam_SetImmediately) {
312 camera->
params.basic.dist = BattleCam_BoomLength;
313 camera->
params.basic.pitch = BattleCam_BoomPitch;
314 camera->
params.basic.yaw = BattleCam_BoomYaw;
315 camera->
params.basic.offsetY = BattleCam_BoomOffsetY * 256;
322 BattleCam_InitialBoomLength = camera->
params.basic.dist;
323 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
324 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
325 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
327 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
330 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
331 if (!BattleCam_UseLinearInterp) {
343 targetBoomLength = BattleCam_BoomLength;
349 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, targetBoomLength, alpha);
350 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
351 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
352 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
354 if (BattleCam_MoveTimeLeft == 0) {
355 BattleCam_DoneMoving = TRUE;
357 BattleCam_MoveTimeLeft--;
373API_CALLABLE(BattleCam_Update_FocusActorPart) {
385 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
x - 24.0);
386 BattleCam_BoomLength += MAX(0, subjects.
actorSize.
y - 24.0);
388 if (BattleCam_SetImmediately) {
393 camera->
params.basic.dist = BattleCam_BoomLength;
394 camera->
params.basic.pitch = BattleCam_BoomPitch;
395 camera->
params.basic.yaw = BattleCam_BoomYaw;
396 camera->
params.basic.offsetY = BattleCam_BoomOffsetY * 256;
403 BattleCam_InitialBoomLength = camera->
params.basic.dist;
404 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
405 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
406 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
408 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
411 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
412 if (!BattleCam_UseLinearInterp) {
420 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
421 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
422 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
423 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
425 if (BattleCam_MoveTimeLeft == 0) {
426 BattleCam_DoneMoving = TRUE;
428 BattleCam_MoveTimeLeft--;
441API_CALLABLE(BattleCam_Update_FocusActor) {
444 f32 actorX, actorY, actorZ;
447 f32 targetBoomLength;
449 s32 actorID = BattleCam_SubjectActor & 0xFF;
451 switch (actorClass) {
462 actorSize = (actor->
size.
x + actor->
size.
y) / 2;
474 actorSize = (actor->
size.
x + actor->
size.
y) / 2;
486 actorSize = (actor->
size.
x + actor->
size.
y) / 2;
495 BattleCam_BoomLength += MAX(0, actor->
size.
x - 24.0);
496 BattleCam_BoomLength += MAX(0, actor->
size.
y - 24.0);
502 BattleCam_InitialBoomLength = camera->
params.basic.dist;
503 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
504 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
505 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
507 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
510 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
511 if (!BattleCam_UseLinearInterp) {
523 targetBoomLength = BattleCam_BoomLength;
524 targetBoomLength += actorSize - 32.0f;
526 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, targetBoomLength, alpha);
527 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
528 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
529 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
531 if (BattleCam_MoveTimeLeft == 0) {
532 BattleCam_DoneMoving = TRUE;
534 BattleCam_MoveTimeLeft--;
547API_CALLABLE(BattleCam_Update_FocusGoal) {
550 s32 actorID = BattleCam_SubjectActor & 0xFF;
552 f32 goalX, goalY, goalZ;
555 f32 targetBoomLength;
558 switch (actorClass) {
569 actorSizeAvg = (actor->
size.
y + actor->
size.
x) / 2;
581 actorSizeAvg = (actor->
size.
y + actor->
size.
x) / 2;
593 actorSizeAvg = (actor->
size.
y + actor->
size.
x) / 2;
600 f32 delta = actorY - goalY;
601 goalY += delta / 2 + delta / 6.0f;
605 goalX = (actorX + goalX) / 2;
607 goalX -=
fabsf(75.0f - goalX);
618 BattleCam_InitialBoomLength = camera->
params.basic.dist;
619 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
620 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
621 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
623 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
626 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
627 if (!BattleCam_UseLinearInterp) {
635 targetBoomLength = BattleCam_BoomLength;
636 targetBoomLength += actorSizeAvg - 32.0f;
638 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, targetBoomLength, alpha);
639 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
640 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
641 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
643 if (BattleCam_MoveTimeLeft == 0) {
644 BattleCam_DoneMoving = TRUE;
646 BattleCam_MoveTimeLeft--;
660API_CALLABLE(BattleCam_Update_SimpleLerp_Unskippable) {
665 BattleCam_InitialBoomLength = camera->
params.basic.dist;
666 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
667 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
668 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
673 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
676 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
677 if (!BattleCam_UseLinearInterp) {
685 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
686 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
687 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
688 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
690 if (BattleCam_MoveTimeLeft == 0) {
691 BattleCam_DoneMoving = TRUE;
693 BattleCam_MoveTimeLeft--;
705API_CALLABLE(BattleCam_Update_ResetToNeutral_Skippable) {
710 BattleCam_PosX = 0.0f;
711 BattleCam_PosY = 60.0f;
712 BattleCam_PosZ = 0.0f;
714 BattleCam_BoomYaw = 0;
715 BattleCam_BoomOffsetY = 0;
717 if (BattleCam_SetImmediately) {
722 camera->
params.basic.dist = BattleCam_BoomLength;
723 camera->
params.basic.pitch = BattleCam_BoomPitch;
724 camera->
params.basic.yaw = BattleCam_BoomYaw;
725 camera->
params.basic.offsetY = BattleCam_BoomOffsetY;
728 BattleCam_InitialBoomLength = camera->
params.basic.dist;
729 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
730 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
731 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
736 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
739 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
740 if (!BattleCam_UseLinearInterp) {
748 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
749 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
750 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
751 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
753 if (BattleCam_MoveTimeLeft == 0) {
754 BattleCam_DoneMoving = TRUE;
756 BattleCam_MoveTimeLeft--;
768API_CALLABLE(BattleCam_Update_ViewAllEnemies) {
773 BattleCam_PosX = 35.0f;
774 BattleCam_PosY = 60.0f;
775 BattleCam_PosZ = 0.0f;
777 BattleCam_BoomYaw = 0;
779 BattleCam_InitialBoomLength = camera->
params.basic.dist;
780 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
781 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
782 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
787 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
790 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
791 if (!BattleCam_UseLinearInterp) {
799 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
800 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
801 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
802 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
804 if (BattleCam_MoveTimeLeft == 0) {
805 BattleCam_DoneMoving = TRUE;
807 BattleCam_MoveTimeLeft--;
820API_CALLABLE(BattleCam_Update_ViewAllEnemies_MaintainY) {
825 BattleCam_PosX = 35.0f;
827 BattleCam_PosZ = 0.0f;
829 BattleCam_BoomYaw = 0;
830 BattleCam_InitialBoomLength = camera->
params.basic.dist;
831 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
832 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
833 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
838 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
841 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
842 if (!BattleCam_UseLinearInterp) {
850 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
851 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
852 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
853 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
855 if (BattleCam_MoveTimeLeft == 0) {
856 BattleCam_DoneMoving = TRUE;
858 BattleCam_MoveTimeLeft--;
873API_CALLABLE(BattleCam_Update_SimpleLerp_Skippable) {
878 if (BattleCam_SetImmediately) {
883 BattleCam_InitialBoomLength = camera->
params.basic.dist;
884 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
885 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
886 BattleCam_InitialBoomOffsetY = camera->
params.basic.offsetY / 256;
891 BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
894 alpha = (f32) BattleCam_MoveTimeLeft / BattleCam_MoveTimeTotal;
895 if (!BattleCam_UseLinearInterp) {
903 camera->
params.basic.dist =
LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
904 camera->
params.basic.yaw =
LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
905 camera->
params.basic.pitch =
LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);
906 camera->
params.basic.offsetY =
LERP(BattleCam_InitialBoomOffsetY, BattleCam_BoomOffsetY, alpha) * 256.0f;
908 if (BattleCam_MoveTimeLeft == 0) {
909 BattleCam_DoneMoving = TRUE;
911 BattleCam_MoveTimeLeft--;
919API_CALLABLE(BattleCam_Update_FollowActorY) {
921 s32 screenX, screenY, screenZ;
931 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
932 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
936 actorID = BattleCam_SubjectActor & 0xFF;
938 switch (actorClass) {
965 if (actorY < BattleCam_PosY) {
966 actorY = BattleCam_PosY;
970 if (
fabsf(delta) < 0.01) {
981API_CALLABLE(BattleCam_Update_FollowActorPos) {
984 s32 actorID = BattleCam_SubjectActor & 0xFF;
985 f32 actorX, actorY, actorZ;
986 s32 screenX, screenY, screenZ;
989 switch (actorClass) {
1016 if (isInitialCall) {
1020 BattleCam_InitialBoomYaw = camera->
params.basic.yaw;
1021 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
1026 if (screenY < 100) {
1029 if (actorY < BattleCam_PosY) {
1030 actorY = BattleCam_PosY;
1033 if (screenX < 100) {
1036 if (actorX < BattleCam_PosX) {
1037 actorX = BattleCam_PosX;
1039 if (screenX > 220) {
1044 if (
fabsf(delta) < 0.01) {
1051 if (
fabsf(delta) < 0.01) {
1058 if (
fabsf(delta) < 0.01) {
1067API_CALLABLE(BattleCam_Init) {
1069 camera->
params.basic.yaw = 0;
1070 camera->
params.basic.offsetY = 0;
1072 BattleCam_BoomPitch = 8;
1073 BattleCam_BoomYaw = 0;
1074 BattleCam_BoomOffsetY = 0;
1078 BattleCam_InitialBoomLength = camera->
params.basic.dist;
1079 BattleCam_InitialBoomPitch = camera->
params.basic.pitch;
1080 BattleCam_InitialBoomOffsetY = BattleCam_InitialBoomYaw = 0.0f;
1085 Call(BattleCam_Update_Interrupt)
1091 Call(BattleCam_Update_FocusMidpointA)
1097 Call(BattleCam_Update_FocusMidpointB)
1103 Call(BattleCam_Update_FocusActorPart)
1109 Call(BattleCam_Update_FocusActor)
1115 Call(BattleCam_Update_FocusGoal)
1121 Call(BattleCam_Update_SimpleLerp_Unskippable)
1127 Call(BattleCam_Update_ResetToNeutral_Skippable)
1133 Call(BattleCam_Update_ViewAllEnemies)
1139 Call(BattleCam_Update_ViewAllEnemies_MaintainY)
1145 Call(BattleCam_Update_SimpleLerp_Skippable)
1151 Call(BattleCam_Update_FollowActorY)
1157 Call(BattleCam_Update_FollowActorPos)
1163 Call(ForceBattleCamTarget, 0, 15, 0)
1181 Call(BattleCamTargetActor, 0)
1182 Call(BattleCam_Init)
1195 BattleCam_ClampPosX = TRUE;
1198 BattleCam_UseLinearInterp = FALSE;
1199 BattleCam_ExtraOffsetX = 0;
1212 BattleCam_BoomLength = 500;
1213 BattleCam_MoveTimeLeft = 30;
1220 BattleCam_BoomLength = 480;
1221 BattleCam_BoomOffsetY = 0;
1222 BattleCam_MoveTimeLeft = 20;
1229 BattleCam_BoomLength = 500;
1230 BattleCam_BoomOffsetY = 0;
1231 BattleCam_MoveTimeLeft = 10;
1237 BattleCam_BoomLength = 300;
1238 BattleCam_MoveTimeLeft = 20;
1244 BattleCam_BoomLength = 300;
1245 BattleCam_MoveTimeLeft = 20;
1249 BattleCam_BoomLength = 300;
1250 BattleCam_MoveTimeLeft = 20;
1256 BattleCam_BoomLength = 300;
1257 BattleCam_MoveTimeLeft = 20;
1264 BattleCam_BoomLength = 500;
1265 BattleCam_MoveTimeLeft = 120;
1271 BattleCam_BoomLength = 200;
1272 BattleCam_BoomPitch = 8;
1273 BattleCam_BoomYaw = 0;
1274 BattleCam_BoomOffsetY = 15;
1275 BattleCam_MoveTimeLeft = 20;
1281 BattleCam_BoomLength = 300;
1282 BattleCam_BoomPitch = 8;
1283 BattleCam_BoomYaw = 0;
1284 BattleCam_BoomOffsetY = 16;
1285 BattleCam_MoveTimeLeft = 20;
1291 BattleCam_BoomLength = 400;
1292 BattleCam_BoomPitch = 8;
1293 BattleCam_BoomYaw = 0;
1294 BattleCam_BoomOffsetY = 30;
1295 BattleCam_MoveTimeLeft = 20;
1301 BattleCam_BoomLength = 200;
1302 BattleCam_BoomPitch = 8;
1303 BattleCam_BoomYaw = 0;
1304 BattleCam_BoomOffsetY = 15;
1305 BattleCam_MoveTimeLeft = 20;
1311 BattleCam_BoomLength = 300;
1312 BattleCam_BoomPitch = 8;
1313 BattleCam_BoomYaw = 0;
1314 BattleCam_BoomOffsetY = 16;
1315 BattleCam_MoveTimeLeft = 20;
1321 BattleCam_BoomLength = 400;
1322 BattleCam_BoomPitch = 8;
1323 BattleCam_BoomYaw = 0;
1324 BattleCam_BoomOffsetY = 30;
1325 BattleCam_MoveTimeLeft = 20;
1329 BattleCam_BoomLength = 267;
1330 BattleCam_BoomPitch = 8;
1331 BattleCam_BoomYaw = 0;
1332 BattleCam_BoomOffsetY = 23;
1333 BattleCam_MoveTimeLeft = 20;
1337 BattleCam_BoomLength = 300;
1338 BattleCam_BoomPitch = 8;
1339 BattleCam_BoomYaw = 0;
1340 BattleCam_BoomOffsetY = 8;
1341 BattleCam_MoveTimeLeft = 20;
1345 BattleCam_BoomLength = 400;
1346 BattleCam_BoomPitch = 8;
1347 BattleCam_BoomYaw = 0;
1348 BattleCam_BoomOffsetY = 0;
1349 BattleCam_MoveTimeLeft = 20;
1353 BattleCam_MoveTimeLeft = 20;
1357 BattleCam_BoomOffsetY = 0;
1358 BattleCam_MoveTimeLeft = 20;
1362 BattleCam_BoomOffsetY = 0;
1363 BattleCam_MoveTimeLeft = 20;
1368 BattleCam_BoomLength = 266;
1369 BattleCam_BoomPitch = 8;
1370 BattleCam_BoomYaw = 0;
1371 BattleCam_BoomOffsetY = 40;
1373 BattleCam_MoveTimeLeft = 20;
1380 BattleCam_BoomLength = 250;
1381 BattleCam_BoomPitch = 8;
1382 BattleCam_BoomYaw = 0;
1383 BattleCam_BoomOffsetY = 14;
1384 BattleCam_ClampPosX = FALSE;
1386 BattleCam_MoveTimeLeft = 20;
1393 BattleCam_BoomLength = 255;
1394 BattleCam_BoomPitch = 8;
1395 BattleCam_BoomYaw = 0;
1396 BattleCam_BoomOffsetY = 29;
1398 BattleCam_MoveTimeLeft = 20;
1403 BattleCam_BoomLength = 230;
1404 BattleCam_BoomPitch = 8;
1405 BattleCam_BoomYaw = 0;
1406 BattleCam_BoomOffsetY = 0;
1407 BattleCam_MoveTimeLeft = 20;
1414 BattleCam_BoomLength = 310;
1415 BattleCam_BoomPitch = 8;
1416 BattleCam_BoomYaw = 0;
1417 BattleCam_BoomOffsetY = 16;
1418 BattleCam_ClampPosX = FALSE;
1419 BattleCam_MoveTimeLeft = 30;
1426 BattleCam_BoomLength = 320;
1427 BattleCam_BoomPitch = 8;
1428 BattleCam_BoomYaw = 0;
1429 BattleCam_BoomOffsetY = 0;
1430 BattleCam_ClampPosX = FALSE;
1431 BattleCam_MoveTimeLeft = 5;
1438 BattleCam_BoomLength = 340;
1439 BattleCam_BoomPitch = 8;
1440 BattleCam_BoomYaw = 0;
1441 BattleCam_BoomOffsetY = 0;
1442 BattleCam_ClampPosX = FALSE;
1443 BattleCam_MoveTimeLeft = 5;
1451 BattleCam_BoomLength = 300;
1452 BattleCam_BoomPitch = 8;
1453 BattleCam_BoomYaw = 0;
1454 BattleCam_BoomOffsetY = -32;
1455 BattleCam_ExtraOffsetX = 20;
1456 BattleCam_MoveTimeLeft = 15;
1462 BattleCam_PosX = -65.0f;
1463 BattleCam_PosY = 30.0f;
1464 BattleCam_PosZ = 0.0f;
1465 BattleCam_BoomLength = 300;
1466 BattleCam_BoomPitch = 8;
1467 BattleCam_BoomYaw = 0;
1468 BattleCam_BoomOffsetY = 10;
1469 BattleCam_MoveTimeLeft = 10;
1476 BattleCam_BoomLength = 220;
1477 BattleCam_BoomPitch = 8;
1478 BattleCam_BoomYaw = 0;
1479 BattleCam_BoomOffsetY = 24;
1480 BattleCam_ClampPosX = FALSE;
1481 BattleCam_MoveTimeLeft = 30;
1488 BattleCam_BoomLength = 280;
1489 BattleCam_BoomPitch = 8;
1490 BattleCam_BoomYaw = 0;
1491 BattleCam_BoomOffsetY = -4;
1492 BattleCam_ClampPosX = FALSE;
1493 BattleCam_MoveTimeLeft = 30;
1500 BattleCam_BoomLength = 380;
1501 BattleCam_BoomPitch = 8;
1502 BattleCam_BoomYaw = 0;
1503 BattleCam_BoomOffsetY = 0;
1504 BattleCam_ClampPosX = FALSE;
1505 BattleCam_UseLinearInterp = TRUE;
1506 BattleCam_MoveTimeLeft = 60;
1513 BattleCam_BoomLength = 300;
1514 BattleCam_BoomPitch = 8;
1515 BattleCam_BoomYaw = 0;
1516 BattleCam_BoomOffsetY = 0;
1517 BattleCam_ClampPosX = FALSE;
1518 BattleCam_UseLinearInterp = TRUE;
1519 BattleCam_MoveTimeLeft = 60;
1527 BattleCam_BoomLength = 320;
1528 BattleCam_BoomPitch = 8;
1529 BattleCam_BoomYaw = 0;
1530 BattleCam_BoomOffsetY = -4;
1531 BattleCam_ClampPosX = FALSE;
1532 BattleCam_MoveTimeLeft = 30;
1539 BattleCam_BoomLength = 320;
1540 BattleCam_BoomPitch = 8;
1541 BattleCam_BoomYaw = 0;
1542 BattleCam_BoomOffsetY = 0;
1543 BattleCam_ClampPosX = FALSE;
1544 BattleCam_MoveTimeLeft = 30;
1551 BattleCam_BoomLength = 360;
1552 BattleCam_BoomPitch = 8;
1553 BattleCam_BoomYaw = 0;
1554 BattleCam_BoomOffsetY = -4;
1555 BattleCam_ClampPosX = FALSE;
1556 BattleCam_MoveTimeLeft = 20;
1561 BattleCam_BoomLength = 200;
1562 BattleCam_MoveTimeTotal = 7;
1563 BattleCam_DoneMoving = FALSE;
1564 BattleCam_ClampPosX = FALSE;
1565 BattleCam_MoveTimeLeft = 7;
1566 preset = BattleCam_ControlScript;
1572 BattleCam_BoomLength = 214;
1573 BattleCam_BoomPitch = 8;
1574 BattleCam_BoomYaw = 0;
1575 BattleCam_BoomOffsetY = 16;
1576 BattleCam_ClampPosX = FALSE;
1577 BattleCam_MoveTimeLeft = 20;
1584 BattleCam_BoomLength = 300;
1585 BattleCam_BoomPitch = 8;
1586 BattleCam_BoomYaw = 0;
1587 BattleCam_BoomOffsetY = 16;
1588 BattleCam_ClampPosX = FALSE;
1589 BattleCam_MoveTimeLeft = 8;
1596 BattleCam_PosX = 60.0f;
1597 BattleCam_PosY = 40.0f;
1598 BattleCam_PosZ = 0.0f;
1599 BattleCam_BoomLength = 430;
1600 BattleCam_BoomPitch = 8;
1601 BattleCam_BoomYaw = 0;
1602 BattleCam_BoomOffsetY = 16;
1603 BattleCam_MoveTimeLeft = 10;
1609 BattleCam_PosX = 60.0f;
1610 BattleCam_PosY = 40.0f;
1611 BattleCam_PosZ = 0.0f;
1612 BattleCam_BoomLength = 460;
1613 BattleCam_BoomPitch = 8;
1614 BattleCam_BoomYaw = 0;
1615 BattleCam_BoomOffsetY = 27;
1616 BattleCam_MoveTimeLeft = 10;
1620 BattleCam_BoomLength = 390;
1621 BattleCam_BoomPitch = 8;
1622 BattleCam_BoomYaw = 0;
1623 BattleCam_BoomOffsetY = 45;
1625 BattleCam_ClampPosX = FALSE;
1626 BattleCam_MoveTimeLeft = 10;
1630 BattleCam_BoomLength = 500;
1631 BattleCam_BoomPitch = 8;
1632 BattleCam_BoomYaw = 0;
1633 BattleCam_BoomOffsetY = 45;
1635 BattleCam_ClampPosX = FALSE;
1636 BattleCam_MoveTimeLeft = 40;
1641 BattleCam_BoomLength = 300;
1642 BattleCam_BoomPitch = 8;
1643 BattleCam_BoomYaw = 0;
1644 BattleCam_BoomOffsetY = 45;
1646 BattleCam_ClampPosX = FALSE;
1647 BattleCam_MoveTimeLeft = 20;
1653 BattleCam_PosX = -75.0f;
1654 BattleCam_PosY = 150.0f;
1655 BattleCam_PosZ = 0.0f;
1656 BattleCam_BoomLength = 166;
1657 BattleCam_BoomPitch = 8;
1658 BattleCam_BoomYaw = 0;
1659 BattleCam_BoomOffsetY = 17;
1660 BattleCam_MoveTimeLeft = 1;
1667 BattleCam_BoomLength = 310;
1668 BattleCam_BoomPitch = 8;
1669 BattleCam_BoomYaw = 0;
1670 BattleCam_BoomOffsetY = 16;
1671 BattleCam_ClampPosX = FALSE;
1672 BattleCam_MoveTimeLeft = 30;
1679 BattleCam_BoomLength = 250;
1680 BattleCam_BoomPitch = 8;
1681 BattleCam_BoomYaw = 0;
1682 BattleCam_BoomOffsetY = 16;
1683 BattleCam_ClampPosX = FALSE;
1684 BattleCam_UseLinearInterp = TRUE;
1685 BattleCam_MoveTimeLeft = 120;
1692 BattleCam_BoomLength = 300;
1693 BattleCam_BoomPitch = 8;
1694 BattleCam_BoomYaw = 0;
1695 BattleCam_BoomOffsetY = 16;
1696 BattleCam_ClampPosX = FALSE;
1697 BattleCam_UseLinearInterp = TRUE;
1698 BattleCam_MoveTimeLeft = 120;
1705 BattleCam_BoomLength = 320;
1706 BattleCam_BoomPitch = 8;
1707 BattleCam_BoomYaw = 0;
1708 BattleCam_BoomOffsetY = 0;
1709 BattleCam_ClampPosX = FALSE;
1710 BattleCam_MoveTimeLeft = 5;
1715 BattleCam_BoomLength = 500;
1716 BattleCam_BoomOffsetY = 0;
1717 BattleCam_MoveTimeLeft = 50;
1724 BattleCam_BoomLength = 280;
1725 BattleCam_BoomPitch = 8;
1726 BattleCam_BoomYaw = 0;
1727 BattleCam_BoomOffsetY = -4;
1728 BattleCam_ClampPosX = FALSE;
1729 BattleCam_MoveTimeLeft = 30;
1736 BattleCam_BoomLength = 380;
1737 BattleCam_BoomPitch = 8;
1738 BattleCam_BoomYaw = 0;
1739 BattleCam_BoomOffsetY = 0;
1740 BattleCam_ClampPosX = FALSE;
1741 BattleCam_UseLinearInterp = TRUE;
1742 BattleCam_MoveTimeLeft = 60;
1749 BattleCam_BoomLength = 220;
1750 BattleCam_BoomPitch = 8;
1751 BattleCam_BoomYaw = 0;
1752 BattleCam_BoomOffsetY = 24;
1753 BattleCam_ClampPosX = FALSE;
1754 BattleCam_MoveTimeLeft = 30;
1760 BattleCam_PosX = -95.0f;
1761 BattleCam_PosY = 22.0f;
1762 BattleCam_PosZ = 0.0f;
1763 BattleCam_BoomLength = 210;
1764 BattleCam_BoomPitch = 8;
1765 BattleCam_BoomYaw = 0;
1766 BattleCam_BoomOffsetY = 10;
1767 BattleCam_MoveTimeLeft = 20;
1774 BattleCam_BoomLength = 320;
1775 BattleCam_BoomPitch = 8;
1776 BattleCam_BoomYaw = 0;
1777 BattleCam_BoomOffsetY = -4;
1778 BattleCam_MoveTimeLeft = 30;
1785 BattleCam_BoomLength = 320;
1786 BattleCam_BoomPitch = 8;
1787 BattleCam_BoomYaw = 0;
1788 BattleCam_BoomOffsetY = 0;
1789 BattleCam_MoveTimeLeft = 30;
1795 BattleCam_PosX = 25.0f;
1796 BattleCam_PosY = 60.0f;
1797 BattleCam_PosZ = 0.0f;
1798 BattleCam_BoomLength = 400;
1799 BattleCam_BoomPitch = 8;
1800 BattleCam_BoomYaw = 0;
1801 BattleCam_BoomOffsetY = 10;
1802 BattleCam_MoveTimeLeft = 30;
1809 BattleCam_BoomLength = 200;
1810 BattleCam_BoomPitch = 8;
1811 BattleCam_BoomYaw = 0;
1812 BattleCam_BoomOffsetY = 11;
1813 BattleCam_ClampPosX = FALSE;
1814 BattleCam_UseLinearInterp = TRUE;
1815 BattleCam_MoveTimeLeft = 60;
1822 BattleCam_BoomLength = 300;
1823 BattleCam_BoomPitch = 8;
1824 BattleCam_BoomYaw = 0;
1825 BattleCam_BoomOffsetY = 16;
1826 BattleCam_MoveTimeLeft = 8;
1834 BattleCam_BoomLength = 300;
1835 BattleCam_BoomPitch = 8;
1836 BattleCam_BoomYaw = 0;
1837 BattleCam_BoomOffsetY = -32;
1838 BattleCam_ExtraOffsetX = 20;
1839 BattleCam_MoveTimeLeft = 15;
1845 BattleCam_BoomLength = 400;
1846 BattleCam_BoomPitch = 8;
1847 BattleCam_BoomYaw = 0;
1848 BattleCam_BoomOffsetY = 27;
1849 BattleCam_MoveTimeLeft = 20;
1855 BattleCam_BoomLength = 358;
1856 BattleCam_BoomPitch = 8;
1857 BattleCam_BoomYaw = 0;
1858 BattleCam_BoomOffsetY = 16;
1859 BattleCam_MoveTimeLeft = 10;
1863 BattleCam_BoomLength = 500;
1864 BattleCam_MoveTimeLeft = 50;
1870 BattleCam_BoomLength = 267;
1871 BattleCam_BoomPitch = 8;
1872 BattleCam_BoomYaw = 0;
1873 BattleCam_BoomOffsetY = 16;
1874 BattleCam_MoveTimeLeft = 20;
1880 BattleCam_BoomLength = 214;
1881 BattleCam_BoomPitch = 8;
1882 BattleCam_BoomYaw = 0;
1883 BattleCam_BoomOffsetY = 16;
1884 BattleCam_MoveTimeLeft = 20;
1890 BattleCam_BoomLength = 300;
1891 BattleCam_BoomPitch = 8;
1892 BattleCam_BoomOffsetY = 16;
1893 BattleCam_BoomYaw = 0;
1894 BattleCam_MoveTimeLeft = 4;
1905 BattleCam_ControlScript = preset;
1909 BattleCam_DoneMoving = FALSE;
1914 BattleCam_SetImmediately = TRUE;
1921 BattleCam_SetImmediately = FALSE;
1928 BattleCam_SubjectActor = actorID;
1934 BattleCam_SubjectActor = actorID;
1935 BattleCam_SubjectActorPart = actorPartIndex;
1939void btl_cam_set_params(
b16 skipRecalc, s16 boomLength, s16 vfovScale, s16 boomPitch, s32 boomYaw, s32 boomZOffset, s32 zoomPercent) {
1943 camera->
params.basic.skipRecalc = skipRecalc;
1944 camera->
params.basic.dist = boomLength;
1945 camera->
params.basic.fovScale = vfovScale;
1946 camera->
params.basic.pitch = boomPitch;
1947 camera->
params.basic.yaw = boomYaw;
1948 camera->
params.basic.offsetY = boomZOffset * 256;
1949 camera->
params.basic.zoomPercent = zoomPercent;
1955 BattleCam_MoveTimeLeft = moveTime;
1981 return BattleCam_DoneMoving;
1986 BattleCam_BoomLength = zoom;
1992 BattleCam_BoomLength += zoom;
1998 BattleCam_BoomOffsetY = zOffset;
2007 BattleCam_ClampPosX = FALSE;
2010API_CALLABLE(UseBattleCamPreset) {
2011 Bytecode* args = script->ptrReadPos;
2019 BattleCam_SetImmediately = FALSE;
2025API_CALLABLE(UseBattleCamPresetImmediately) {
2026 Bytecode* args = script->ptrReadPos;
2034 BattleCam_SetImmediately = TRUE;
2040API_CALLABLE(UseBattleCamPresetWait) {
2041 Bytecode* args = script->ptrReadPos;
2047 if (isInitialCall) {
2060API_CALLABLE(SetBattleCamParam) {
2062 Bytecode* args = script->ptrReadPos;
2075 camera->
params.basic.skipRecalc = val;
2078 camera->
params.basic.dist = val;
2081 camera->
params.basic.fovScale = val;
2084 camera->
params.basic.pitch = val;
2087 camera->
params.basic.yaw = val;
2090 camera->
params.basic.offsetY = val * 256;
2093 camera->
params.basic.zoomPercent = val;
2099API_CALLABLE(SetBattleCamParams) {
2100 Bytecode* args = script->ptrReadPos;
2118API_CALLABLE(SetBattleCamTarget) {
2119 Bytecode* args = script->ptrReadPos;
2131API_CALLABLE(ForceBattleCamTarget) {
2132 Bytecode* args = script->ptrReadPos;
2146API_CALLABLE(SetBattleCamOffsetY) {
2147 Bytecode* args = script->ptrReadPos;
2157API_CALLABLE(AddBattleCamOffsetY) {
2158 Bytecode* args = script->ptrReadPos;
2168API_CALLABLE(SetBattleCamYaw) {
2169 Bytecode* args = script->ptrReadPos;
2179API_CALLABLE(BattleCamTargetActor) {
2180 Bytecode* args = script->ptrReadPos;
2190 actorID = script->owner1.actorID;
2198API_CALLABLE(BattleCamTargetActorPart) {
2199 Bytecode* args = script->ptrReadPos;
2209 actorID = script->owner1.actorID;
2217API_CALLABLE(MoveBattleCamOver) {
2218 Bytecode* args = script->ptrReadPos;
2234API_CALLABLE(SetBattleCamDist) {
2235 Bytecode* args = script->ptrReadPos;
2245API_CALLABLE(AddBattleCamDist) {
2246 Bytecode* args = script->ptrReadPos;
2256API_CALLABLE(SetBattleCamTargetingModes) {
2257 Bytecode* args = script->ptrReadPos;
2269API_CALLABLE(FreezeBattleCam) {
2274API_CALLABLE(DisableBattleCamClampX) {
2275 BattleCam_ClampPosX = FALSE;
#define LERP(a, b, alpha)
void btl_cam_set_zoom(s16 zoom)
EvtScript EVS_BattleCam_FocusActorPart
EvtScript EVS_BattleCam_FocusActor
void btl_cam_set_pos(f32 x, f32 y, f32 z)
#define CUBIC_SINE_INTERP(alpha)
void btl_cam_set_params(b16 skipRecalc, s16 boomLength, s16 vfovScale, s16 boomPitch, s32 boomYaw, s32 boomZOffset, s32 zoomPercent)
void btl_cam_use_preset_impl(s32 id)
#define QUADRATIC_SINE_INTERP(alpha)
EvtScript EVS_BattleCam_Interrupt
EvtScript EVS_BattleCam_SimpleLerp_Unskippable
EvtScript EVS_BattleCam_Reset
EvtScript EVS_BattleCam_FocusMidpointA
s32 BattleCam_CurrentPresetID
void btl_cam_target_actor_part(s32 actorID, s32 actorPartIndex)
void btl_cam_add_zoom(s32 zoom)
EvtScript EVS_BattleCam_SimpleLerp_Skippable
void btl_cam_disable_clamp_x(void)
EvtScript EVS_BattleCam_ResetNeutral
void btl_cam_set_target_pos(f32 x, f32 y, f32 z)
EvtScript EVS_BattleCam_FocusMidpointB
void btl_cam_move(s16 moveTime)
s32 btl_cam_is_moving_done(void)
EvtScript EVS_BattleCam_ViewEnemies
EvtScript EVS_BattleCam_FollowActorY
void btl_cam_target_actor(s32 actorID)
EvtScript EVS_OnBattleInit
void btl_cam_set_zoffset(s16 zOffset)
EvtScript EVS_BattleCam_ViewEnemies_MaintainY
void btl_cam_use_preset_immediately(s32 preset)
void btl_cam_unfreeze(void)
EvtScript EVS_BattleCam_FollowActorPos
f32 clamp_edge_pos_x(f32 x)
b32 get_cam_subject_properties(CamSubjects *subjects, b32 usePart)
void btl_cam_use_preset(s32 preset)
EvtScript EVS_BattleCam_FocusGoal
@ BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2
@ BTL_CAM_MIDPOINT_NORMAL
@ BTL_CAM_ACTOR_TARGET_MIDPOINT
@ BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1
@ BTL_CAM_PLAYER_HAMMER_QUAKE
@ BTL_CAM_PRESET_UNUSED_2A
@ BTL_CAM_CLOSER_PARTNER_APPROACH
@ BTL_CAM_PARTNER_INJURED
@ BTL_CAM_PRESET_UNUSED_46
@ BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH
@ BTL_CAM_PRESET_UNUSED_3C
@ BTL_CAM_ACTOR_GOAL_SIMPLE
@ BTL_CAM_PLAYER_PRE_JUMP_FINISH
@ BTL_CAM_PRESET_UNUSED_2D
@ BTL_CAM_PLAYER_AIM_HAMMER
@ BTL_CAM_PLAYER_HIT_HAZARD
@ BTL_CAM_PRESET_UNUSED_43
@ BTL_CAM_PRESET_UNUSED_48
@ BTL_CAM_PRESET_UNUSED_39
@ BTL_CAM_ACTOR_GOAL_NEAR
@ BTL_CAM_PLAYER_JUMP_FINISH_CLOSE
@ BTL_CAM_PRESET_UNUSED_3A
@ BTL_CAM_PLAYER_MULTIBOUNCE
@ BTL_CAM_PLAYER_SUPER_JUMP_MIDAIR
@ BTL_CAM_PRESET_UNUSED_40
@ BTL_CAM_PLAYER_HAMMER_STRIKE
@ BTL_CAM_PLAYER_UNUSED_ULTRA_JUMP
@ BTL_CAM_PRESET_UNUSED_38
@ BTL_CAM_PRESET_UNUSED_44
@ BTL_CAM_PARTNER_HIT_SPIKE
@ BTL_CAM_FOLLOW_ACTOR_POS
@ BTL_CAM_PLAYER_JUMP_FINISH
@ BTL_CAM_PARTNER_CLOSE_UP
@ BTL_CAM_PRESET_UNUSED_31
@ BTL_CAM_PLAYER_JUMP_MIDAIR
@ BTL_CAM_PARTNER_HIT_HAZARD
@ BTL_CAM_PRESET_UNUSED_47
@ BTL_CAM_PLAYER_HIT_SPIKE
@ BTL_CAM_PLAYER_CHARGE_UP
@ BTL_CAM_PLAYER_ULTRA_JUMP_MIDAIR
@ BTL_CAM_PLAYER_ATTACK_APPROACH
@ BTL_CAM_PLAYER_STATUS_AFFLICTED
@ BTL_CAM_PARTNER_MISTAKE
@ BTL_CAM_PRESET_UNUSED_29
@ BTL_CAM_PARTNER_APPROACH
@ CAM_PARAM_BOOM_Y_OFFSET
@ EVT_FLAG_RUN_IMMEDIATELY
don't wait for next update_scripts call
s32 evt_get_variable(Evt *script, Bytecode var)
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32 *screenX, s32 *screenY, s32 *screenZ)
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
ActorPart * get_actor_part(Actor *actor, s32 partID)
Actor * get_actor(s32 actorID)
void kill_script_by_ID(s32 id)
Evt * restart_script(Evt *script)
ApiStatus SetCamEnabled(Evt *script, b32 isInitialCall)
ApiStatus SetCamViewport(Evt *script, b32 isInitialCall)
ApiStatus InitVirtualEntityList(Evt *script, b32 isInitialCall)
ApiStatus InitAnimatedModels(Evt *script, b32 isInitialCall)
ApiStatus SetCamLookTarget(Evt *script, b32 isInitialCall)
ApiStatus SetCamBGColor(Evt *script, b32 isInitialCall)
ApiStatus SetNoInterpCamParams(Evt *script, b32 isInitialCall)
ApiStatus SetCamPerspective(Evt *script, b32 isInitialCall)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Return
Kills the current EVT thread.
struct Evt * camMovementScript
struct Actor * partnerActor
struct Actor * playerActor
struct Actor * enemyActors[24]
BattleStatus gBattleStatus
PlayerStatus gPlayerStatus