MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xCameraFXUpdate

Function xCameraFXUpdate

src/SB/Core/x/xCamera.cpp:1103–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101}
1102
1103void xCameraFXUpdate(xCamera* cam, F32 dt)
1104{
1105 S32 i;
1106 cameraFX* f;
1107 cameraFXTableEntry* t;
1108
1109 for (i = 0; i < 10; i++)
1110 {
1111 f = &sCameraFX[i];
1112
1113 if (f->flags & 0x1)
1114 {
1115 f->elapsedTime += dt;
1116
1117 // non-matching: 0.0f is loaded too early
1118
1119 if ((f->maxTime > 0.0f && f->elapsedTime > f->maxTime) || f->flags & 0x2)
1120 {
1121 f->flags = 0;
1122
1123 t = &sCameraFXTable[f->type];
1124
1125 if (t->funcKill)
1126 {
1127 t->funcKill(f);
1128 }
1129 }
1130 else
1131 {
1132 t = &sCameraFXTable[f->type];
1133
1134 if (t->func)
1135 {
1136 t->func(f, dt, &sCameraFXMatOld, &cam->mat);
1137 }
1138 }
1139 }
1140 }
1141
1142 iCameraUpdatePos(cam->lo_cam, &cam->mat);
1143}
1144
1145void xCameraFXEnd(xCamera* cam)
1146{

Callers

nothing calls this directly

Calls 1

iCameraUpdatePosFunction · 0.70

Tested by

no test coverage detected