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

Function zCutsceneMgrPlayStart

src/SB/Game/zCutsceneMgr.cpp:189–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void zCutsceneMgrPlayStart(zCutsceneMgr* t)
190{
191 gCutsceneSkipOK = 1;
192 for (U32 i = 0; i < 14; i++)
193 {
194 if (t->csn->Info->AssetID == xStrHash(zCutSceneNamesTable[i].name))
195 {
196 zCutSceneNamesTable[i].played = 1;
197 gCutsceneSkipOK = zCutSceneNamesTable[i].skipOK;
198 break;
199 }
200 }
201
202 for (U32 i = 0; i < 58; i++)
203 {
204 U32 cinid = xStrHash(cutsceneHackTable[i].cinname);
205 if (t->tasset->cutsceneAssetID != cinid)
206 {
207 continue;
208 }
209
210 U32 hackid = xStrHash(cutsceneHackTable[i].modelname);
211 for (U32 j = 0; j < t->csn->Info->NumData; j++)
212 {
213 if (hackid != t->csn->Data[j].AssetID || (t->csn->Data[j].DataType & 0xfffffff) != 1 ||
214 t->csn->Data[j].DataPtr == NULL)
215 {
216 continue;
217 }
218
219 if (cutsceneHackTable[i].radius != 0.0f)
220 {
221 RpClumpForAllAtomics((RpClump*)*((int*)(t->csn->Data[j].DataPtr) + 0xf),
222 HackBoundCB, &cutsceneHackTable[i].radius);
223 t->csn->Data[j].DataType = t->csn->Data[j].DataType | 0x40000000;
224 }
225 if (cutsceneHackTable[i].tworoot != 0)
226 {
227 t->csn->Data[j].DataType = t->csn->Data[j].DataType | 0x20000000;
228 }
229 if (cutsceneHackTable[i].noshadow != 0)
230 {
231 t->csn->Data[j].DataType = t->csn->Data[j].DataType | 0x10000000;
232 }
233 if (cutsceneHackTable[i].alphaBits != 0)
234 {
235 s_atomicNumber = 0;
236 RpClumpForAllAtomics((RpClump*)*((int*)(t->csn->Data[j].DataPtr) + 15), HackAlphaCB,
237 (void*)cutsceneHackTable[i].alphaBits);
238 }
239 if (cutsceneHackTable[i].renderCB != NULL)
240 {
241 typedef RpAtomic* (*cb)(RpAtomic*);
242 *(cb*)((int*)t->csn->Data[j].DataPtr + 0x12) = cutsceneHackTable[i].renderCB;
243
244 if (*(cb*)((int*)t->csn->Data[j].DataPtr + 0x12) == 0)
245 {
246 *(cb*)((int*)t->csn->Data[j].DataPtr + 0x12) = AtomicDefaultRenderCallBack;

Callers 2

zCutsceneMgrFinishLoadFunction · 0.70
zCutsceneMgrUpdateFunction · 0.70

Calls 1

xStrHashFunction · 0.50

Tested by

no test coverage detected