/* * Read entire world (both brushes and current state). */ void CWorld::Read_t(CTStream *pistrm) // throw char * { _pfWorldEditingProfile.IncrementAveragingCounter(); _bFileReplacingApplied = FALSE; // need high FPU precision CSetFPUPrecision FPUPrecision(FPT_53BIT); // clear eventual old data in the world Clear(); // lock all arrays and containers LockAll(); pistrm->ExpectID_t("WRLD"); // 'world' // read the world brushes from the file ReadBrushes_t(pistrm); // read current world state from the file ReadState_t(pistrm); pistrm->ExpectID_t("WEND"); // 'world end' // unlock all arrays and containers UnlockAll(); if( _bFileReplacingApplied) WarningMessage("Some of files needed to load world have been replaced while loading"); }
/* * Write entire world (both brushes and current state). */ void CWorld::Write_t(CTStream *postrm) // throw char * { // need high FPU precision CSetFPUPrecision FPUPrecision(FPT_53BIT); // delete all predictor entities before saving UnmarkForPrediction(); DeletePredictors(); // lock all arrays and containers LockAll(); postrm->WriteID_t("WRLD"); // 'world' // write the world brushes to the file WriteBrushes_t(postrm); // write current world state to the file WriteState_t(postrm); postrm->WriteID_t("WEND"); // 'world end' // unlock all arrays and containers UnlockAll(); }
void ShardLockManager::Shutdown() { UnlockAll(); numLocked = 0; }