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

Function PKR_LayerMemRelease

src/SB/Core/x/xpkrsvc.cpp:442–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442void PKR_LayerMemRelease(st_PACKER_READ_DATA* pr, st_PACKER_LTOC_NODE* layer)
443{
444 switch (PKR_layerLoadDest(layer->laytyp))
445 {
446 case PKR_LDDEST_SKIP:
447 break;
448 case PKR_LDDEST_RWHANDOFF:
449 PKR_relmem('LYR\0', layer->laysize, layer->laymem, layer->laytyp + 0x8000, 0);
450 PKR_pop_memmark();
451 layer->laymem = NULL;
452 break;
453 case PKR_LDDEST_KEEPSTATIC:
454 PKR_relmem('LYR\0', layer->laysize, layer->laymem, layer->laytyp + 0x8000, 0);
455 break;
456 case PKR_LDDEST_KEEPMALLOC:
457 PKR_relmem('LYR\0', layer->laysize, layer->laytru, layer->laytyp + 0x8000, 1);
458 layer->laymem = NULL;
459 layer->laytru = NULL;
460 break;
461 }
462}
463
464void PKR_drv_guardLayer(st_PACKER_LTOC_NODE*)
465{

Callers 2

PKR_ReadDoneFunction · 0.70
PKR_LoadStep_AsyncFunction · 0.70

Calls 3

PKR_layerLoadDestFunction · 0.85
PKR_relmemFunction · 0.85
PKR_pop_memmarkFunction · 0.85

Tested by

no test coverage detected