MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / LoadSWIs

Method LoadSWIs

ogsr_engine/Layers/xrRenderPC_R4/r4_loader.cpp:466–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466void CRender::LoadSWIs(CStreamReader* base_fs)
467{
468 // allocate memory for portals
469 if (base_fs->find_chunk(fsL_SWIS))
470 {
471 CStreamReader* fs = base_fs->open_chunk(fsL_SWIS);
472 const u32 item_count = fs->r_u32();
473
474 xr_vector<FSlideWindowItem>::iterator it = SWIs.begin();
475 const xr_vector<FSlideWindowItem>::iterator it_e = SWIs.end();
476
477 for (; it != it_e; ++it)
478 xr_free((*it).sw);
479
480 SWIs.clear();
481
482 SWIs.resize(item_count);
483 for (u32 c = 0; c < item_count; c++)
484 {
485 FSlideWindowItem& swi = SWIs[c];
486 swi.reserved[0] = fs->r_u32();
487 swi.reserved[1] = fs->r_u32();
488 swi.reserved[2] = fs->r_u32();
489 swi.reserved[3] = fs->r_u32();
490 swi.count = fs->r_u32();
491 VERIFY(NULL == swi.sw);
492 swi.sw = xr_alloc<FSlideWindow>(swi.count);
493 fs->r(swi.sw, sizeof(FSlideWindow) * swi.count);
494 }
495 fs->close();
496 }
497}
498
499void CRender::Load3DFluid()
500{

Callers

nothing calls this directly

Calls 10

xr_freeFunction · 0.85
find_chunkMethod · 0.80
open_chunkMethod · 0.45
r_u32Method · 0.45
beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45
resizeMethod · 0.45
rMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected