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

Function load_anim_list

src/SB/Game/zUI.cpp:330–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 }
329
330 void load_anim_list(_zUI& ui)
331 {
332 if (ui.model)
333 {
334 zUIAsset& a = *ui.sasset;
335
336 if (a.animListID)
337 {
338 ui.atbl = NULL;
339
340 S32 used = zAnimListGetNumUsed(a.animListID);
341
342 if (used > 0)
343 {
344 ui.atbl = zAnimListGetTable(a.animListID);
345
346 xAnimPoolAlloc(&globals.sceneCur->mempool, &ui, ui.atbl, ui.model);
347
348 xAnimState* ast = xAnimTableGetState(ui.atbl, "idle");
349
350 if (ast)
351 {
352 xAnimSingle* single = ui.model->Anim->Single;
353
354 single->State = ast;
355 single->Time = 0.0f;
356 single->CurrentSpeed = 1.0f;
357 }
358 }
359 }
360 }
361 }
362} // namespace
363
364void zUI_Init(_zUI* ent, xEntAsset* asset)

Callers 1

zUI_InitFunction · 0.70

Calls 4

xAnimTableGetStateFunction · 0.85
zAnimListGetNumUsedFunction · 0.70
zAnimListGetTableFunction · 0.70
xAnimPoolAllocFunction · 0.50

Tested by

no test coverage detected