123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864 |
- #pragma hdrstop
- #include "../idlib/precompiled.h"
- #include "sys_savegame.h"
- #include "sys_session_local.h"
- #include "sys_session_savegames.h"
- extern idCVar saveGame_verbose;
- idCVar savegame_error( "savegame_error", "0", CVAR_INTEGER, "Combination of bits that will simulate and error, see 'savegamePrintErrors'. 0 = no error" );
- void OutputDetailList( const saveGameDetailsList_t & savegameList );
- #pragma region PROCESSORS
- bool idSaveGameProcessorLoadFiles::InitLoadFiles( const char * folder_, const saveFileEntryList_t & files, idSaveGameManager::packageType_t type ) {
- if ( !idSaveGameProcessor::Init() ) {
- return false;
- }
-
- parms.directory = AddSaveFolderPrefix( folder_, type );
- parms.description.slotName = folder_;
- parms.mode = SAVEGAME_MBF_LOAD;
- for ( int i = 0; i < files.Num(); ++i ) {
- parms.files.Append( files[i] );
- }
- return true;
- }
- bool idSaveGameProcessorLoadFiles::Process() {
-
-
-
- Sys_ExecuteSavegameCommandAsync( &parms );
- return false;
- }
- bool idSaveGameProcessorDelete::InitDelete( const char * folder_, idSaveGameManager::packageType_t type ) {
- if ( !idSaveGameProcessor::Init() ) {
- return false;
- }
- parms.description.slotName = folder_;
- parms.directory = AddSaveFolderPrefix( folder_, type );
- parms.mode = SAVEGAME_MBF_DELETE_FOLDER;
- return true;
- }
- bool idSaveGameProcessorDelete::Process() {
-
-
-
- Sys_ExecuteSavegameCommandAsync( &parms );
- return false;
- }
- bool idSaveGameProcessorSaveFiles::InitSave( const char * folder, const saveFileEntryList_t & files, const idSaveGameDetails & descriptionForPS3, idSaveGameManager::packageType_t type ) {
- if ( !idSaveGameProcessor::Init() ) {
- return false;
- }
- if ( files.Num() == 0 ) {
- idLib::Warning( "No files to save." );
- return false;
- }
-
- parms.directory = AddSaveFolderPrefix( folder, type );
- parms.mode = SAVEGAME_MBF_SAVE;
- for ( int i = 0; i < files.Num(); ++i ) {
- parms.files.Append( files[i] );
- }
- this->parms.description = descriptionForPS3;
- parms.description.slotName = folder;
- return true;
- }
- bool idSaveGameProcessorSaveFiles::Process() {
-
-
-
- Sys_ExecuteSavegameCommandAsync( &parms );
- return false;
- }
- bool idSaveGameProcessorEnumerateGames::Process() {
- parms.mode = SAVEGAME_MBF_ENUMERATE | SAVEGAME_MBF_READ_DETAILS;
-
-
-
- Sys_ExecuteSavegameCommandAsync( &parms );
- return false;
- }
- #pragma endregion
- saveGameHandle_t idSessionLocal::SaveGameSync( const char * name, const saveFileEntryList_t & files, const idSaveGameDetails & description ) {
- saveGameHandle_t handle = 0;
-
- saveFileEntryList_t filesWithDetails( files );
- idFile_SaveGame * gameDetailsFile = new (TAG_SAVEGAMES) idFile_SaveGame( SAVEGAME_DETAILS_FILENAME, SAVEGAMEFILE_TEXT | SAVEGAMEFILE_AUTO_DELETE );
- gameDetailsFile->MakeWritable();
- description.descriptors.WriteToIniFile( gameDetailsFile );
- filesWithDetails.Append( gameDetailsFile );
- if ( processorSaveFiles->InitSave( name, filesWithDetails, description ) ) {
- processorSaveFiles->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnSaveCompleted, &processorSaveFiles->GetParmsNonConst() ) );
- handle = GetSaveGameManager().ExecuteProcessorAndWait( processorSaveFiles );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorSaveFiles->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
-
- OnSaveCompleted( &parms );
- }
- return handle;
- }
- saveGameHandle_t idSessionLocal::SaveGameAsync( const char * name, const saveFileEntryList_t & files, const idSaveGameDetails & description ) {
- saveGameHandle_t handle = 0;
-
- struct local_t {
- local_t( idSaveLoadParms * localparms ) : parms( localparms ) {
-
- }
- ~local_t() {
-
- }
- idSaveLoadParms * parms;
- } local( &processorSaveFiles->GetParmsNonConst() );
-
- saveFileEntryList_t filesWithDetails( files );
- idFile_SaveGame * gameDetailsFile = new (TAG_SAVEGAMES) idFile_SaveGame( SAVEGAME_DETAILS_FILENAME, SAVEGAMEFILE_TEXT | SAVEGAMEFILE_AUTO_DELETE );
- gameDetailsFile->MakeWritable();
- description.descriptors.WriteToIniFile( gameDetailsFile );
- filesWithDetails.Append( gameDetailsFile );
- if ( processorSaveFiles->InitSave( name, filesWithDetails, description ) ) {
- processorSaveFiles->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnSaveCompleted, &processorSaveFiles->GetParmsNonConst() ) );
- handle = GetSaveGameManager().ExecuteProcessor( processorSaveFiles );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorSaveFiles->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
- common->Dialog().ShowSaveIndicator( false );
-
- OnSaveCompleted( &parms );
- }
- return handle;
- }
- void idSessionLocal::OnSaveCompleted( idSaveLoadParms * parms ) {
- idLocalUser * master = session->GetSignInManager().GetMasterLocalUser();
- if ( parms->GetError() != SAVEGAME_E_INSUFFICIENT_ROOM ) {
-
- GetSaveGameManager().ClearRetryInfo();
- }
-
- if ( master != NULL && master->GetProfile() != NULL && !master->GetProfile()->IsDirty() ) {
- common->Dialog().ShowSaveIndicator( false );
- }
- if ( parms->GetError() == SAVEGAME_E_NONE ) {
-
- if ( master != NULL && master->GetProfile() != NULL ) {
- master->GetProfile()->SaveSettings( false );
- }
-
- saveGameDetailsList_t & detailList = session->GetSaveGameManager().GetEnumeratedSavegamesNonConst();
- idSaveGameDetails * details = detailList.Find( parms->description );
- if ( details == NULL ) {
-
- detailList.Append( parms->description );
- } else {
-
- *details = parms->description;
- }
- }
-
- common->OnSaveCompleted( *parms );
- }
- saveGameHandle_t idSessionLocal::LoadGameSync( const char * name, saveFileEntryList_t & files ) {
- idSaveLoadParms & parms = processorLoadFiles->GetParmsNonConst();
- saveGameHandle_t handle = 0;
- {
-
-
-
-
-
- struct local_t {
- local_t( idSaveLoadParms * parms_ ) : parms( parms_ ) {
-
- {
-
- }
- }
- ~local_t() {
-
- {
- }
- common->OnLoadCompleted( *parms );
- }
- idSaveLoadParms * parms;
- } local( &parms );
-
- saveFileEntryList_t filesWithDetails( files );
- std::auto_ptr< idFile_SaveGame > gameDetailsFile( new (TAG_SAVEGAMES) idFile_SaveGame( SAVEGAME_DETAILS_FILENAME, SAVEGAMEFILE_TEXT ) );
- filesWithDetails.Append( gameDetailsFile.get() );
-
- const saveGameDetailsList_t details = GetSaveGameManager().GetEnumeratedSavegames();
- for ( int i = 0; i < details.Num(); ++i ) {
- if ( idStr::Cmp( name, details[i].slotName ) == 0 ) {
- if ( details[i].GetSaveVersion() > BUILD_NUMBER ) {
- parms.errorCode = SAVEGAME_E_INCOMPATIBLE_NEWER_VERSION;
- return 0;
- }
- }
- }
-
- if ( processorLoadFiles->InitLoadFiles( name, filesWithDetails ) ) {
- handle = GetSaveGameManager().ExecuteProcessorAndWait( processorLoadFiles );
- }
- if ( handle == 0 ) {
- parms.errorCode = SAVEGAME_E_UNKNOWN;
- }
- if ( parms.GetError() != SAVEGAME_E_NONE ) {
- return 0;
- }
-
- if ( !LoadGameCheckDescriptionFile( parms ) ) {
- return 0;
- }
-
-
- if ( !IsDLCAvailable( parms.description.GetMapName() ) ) {
- parms.errorCode = SAVEGAME_E_DLC_NOT_FOUND;
- return 0;
- }
- }
- common->OnLoadFilesCompleted( parms );
- return handle;
- }
- void idSessionLocal::OnLoadCompleted( idSaveLoadParms * parms ) {
- }
- saveGameHandle_t idSessionLocal::EnumerateSaveGamesSync() {
- saveGameHandle_t handle = 0;
-
- struct local_t {
- local_t() {
-
- {
-
- }
- }
- ~local_t() {
-
- {
- }
- }
- } local;
-
- GetSaveGameManager().GetEnumeratedSavegamesNonConst().Clear();
- if ( processorEnumerate->Init() ) {
- processorEnumerate->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnEnumerationCompleted, &processorEnumerate->GetParmsNonConst() ) );
- handle = GetSaveGameManager().ExecuteProcessorAndWait( processorEnumerate );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorEnumerate->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
-
- OnEnumerationCompleted( &parms );
- }
- return handle;
- }
- saveGameHandle_t idSessionLocal::EnumerateSaveGamesAsync() {
- saveGameHandle_t handle = 0;
-
- GetSaveGameManager().GetEnumeratedSavegamesNonConst().Clear();
- if ( processorEnumerate->Init() ) {
- processorEnumerate->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnEnumerationCompleted, &processorEnumerate->GetParmsNonConst() ) );
- handle = GetSaveGameManager().ExecuteProcessor( processorEnumerate );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorEnumerate->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
-
- OnEnumerationCompleted( &parms );
- }
- return handle;
- }
- int idSort_EnumeratedSavegames( const idSaveGameDetails * a, const idSaveGameDetails * b ) {
- return b->date - a->date;
- }
- void idSessionLocal::OnEnumerationCompleted( idSaveLoadParms * parms ) {
-
-
-
- std::sort( parms->detailList.Ptr(), parms->detailList.Ptr() + parms->detailList.Num() );
- if ( parms->GetError() == SAVEGAME_E_NONE ) {
-
- saveGameDetailsList_t & detailsList = session->GetSaveGameManager().GetEnumeratedSavegamesNonConst();
-
- detailsList = parms->detailList;
-
-
-
- for ( int i = 0; i < detailsList.Num(); i++ ) {
- idSaveGameDetails & details = detailsList[i];
- const idStr original = details.slotName;
- const idStr stripped = RemoveSaveFolderPrefix( original, idSaveGameManager::PACKAGE_GAME );
- details.slotName = stripped;
- }
- if ( saveGame_verbose.GetBool() ) {
- OutputDetailList( detailsList );
- }
- }
- common->OnEnumerationCompleted( *parms );
- }
- saveGameHandle_t idSessionLocal::DeleteSaveGameSync( const char * name ) {
- saveGameHandle_t handle = 0;
-
- struct local_t {
- local_t() {
-
- {
-
- }
- }
- ~local_t() {
-
- {
- }
- }
- } local;
- if ( processorDelete->InitDelete( name ) ) {
- processorDelete->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnDeleteCompleted, &processorDelete->GetParmsNonConst() ) );
- handle = GetSaveGameManager().ExecuteProcessorAndWait( processorDelete );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorDelete->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
-
- OnDeleteCompleted( &parms );
- }
- return handle;
- }
- saveGameHandle_t idSessionLocal::DeleteSaveGameAsync( const char * name ) {
- saveGameHandle_t handle = 0;
- if ( processorDelete->InitDelete( name ) ) {
- processorDelete->AddCompletedCallback( MakeCallback( this, &idSessionLocal::OnDeleteCompleted, &processorDelete->GetParmsNonConst() ) );
- common->Dialog().ShowSaveIndicator( true );
- handle = GetSaveGameManager().ExecuteProcessor( processorDelete );
- }
-
-
- if ( handle == 0 ) {
- idSaveLoadParms & parms = processorDelete->GetParmsNonConst();
- parms.errorCode = SAVEGAME_E_UNKNOWN;
-
- OnDeleteCompleted( &parms );
- }
- return handle;
- }
- void idSessionLocal::OnDeleteCompleted( idSaveLoadParms * parms ) {
- common->Dialog().ShowSaveIndicator( false );
- if ( parms->GetError() == SAVEGAME_E_NONE ) {
-
- saveGameDetailsList_t & details = session->GetSaveGameManager().GetEnumeratedSavegamesNonConst();
- details.Remove( parms->description );
- }
- common->OnDeleteCompleted( *parms );
- }
- bool idSessionLocal::IsEnumerating() const {
- return !session->IsSaveGameCompletedFromHandle( processorEnumerate->GetHandle() );
- }
- saveGameHandle_t idSessionLocal::GetEnumerationHandle() const {
- return processorEnumerate->GetHandle();
- }
- bool idSessionLocal::IsDLCAvailable( const char * mapName ) {
- bool hasContentPackage = true;
- return hasContentPackage;
- }
- bool idSessionLocal::LoadGameCheckDiscNumber( idSaveLoadParms & parms ) {
- #if 0
- idStr mapName = parms.description.GetMapName();
- assert( !discSwapStateMgr->IsWorking() );
- discSwapStateMgr->Init( &parms.callbackSignal, idDiscSwapStateManager::DISC_SWAP_COMMAND_LOAD );
-
-
-
-
-
- discSwapStateMgr->user = session->GetSignInManager().GetMasterLocalUser();
- discSwapStateMgr->map = mapName;
- discSwapStateMgr->Pump();
- while ( discSwapStateMgr->IsWorking() ) {
- Sys_Sleep( 15 );
-
- discSwapStateMgr->Pump();
- }
- idDiscSwapStateManager::discSwapStateError_t discSwapError = discSwapStateMgr->GetError();
- if ( discSwapError == idDiscSwapStateManager::DSSE_CANCEL ) {
- parms.errorCode = SAVEGAME_E_CANCELLED;
- } else if ( discSwapError == idDiscSwapStateManager::DSSE_INSUFFICIENT_ROOM ) {
- parms.errorCode = SAVEGAME_E_INSUFFICIENT_ROOM;
- parms.requiredSpaceInBytes = discSwapStateMgr->GetRequiredStorageBytes();
- } else if ( discSwapError == idDiscSwapStateManager::DSSE_CORRECT_DISC_ALREADY ) {
- parms.errorCode = SAVEGAME_E_NONE;
- } else if ( discSwapError != idDiscSwapStateManager::DSSE_OK ) {
- parms.errorCode = SAVEGAME_E_DISC_SWAP;
- }
- if ( parms.errorCode == SAVEGAME_E_UNKNOWN ) {
- parms.errorCode = SAVEGAME_E_DISC_SWAP;
- }
- #endif
- return ( parms.GetError() == SAVEGAME_E_NONE );
- }
- bool idSessionLocal::LoadGameCheckDescriptionFile( idSaveLoadParms & parms ) {
- idFile_SaveGame ** detailsFile = FindFromGenericPtr( parms.files, SAVEGAME_DETAILS_FILENAME );
- if ( detailsFile == NULL ) {
- parms.errorCode = SAVEGAME_E_FILE_NOT_FOUND;
- return false;
- }
- assert( *detailsFile != NULL );
- (*detailsFile)->MakeReadOnly();
- if ( !SavegameReadDetailsFromFile( *detailsFile, parms.description ) ) {
- parms.errorCode = SAVEGAME_E_CORRUPTED;
- } else {
- if ( parms.description.GetSaveVersion() > BUILD_NUMBER ) {
- parms.errorCode = SAVEGAME_E_INCOMPATIBLE_NEWER_VERSION;
- }
- }
- return ( parms.GetError() == SAVEGAME_E_NONE );
- }
- #pragma region COMMANDS
- CONSOLE_COMMAND( testSavegameDeleteAll, "delete all savegames without confirmation", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- idSaveLoadParms parms;
- parms.SetDefaults();
- parms.mode = SAVEGAME_MBF_DELETE_ALL_FOLDERS | SAVEGAME_MBF_NO_COMPRESS;
- Sys_ExecuteSavegameCommandAsync( &parms );
- parms.callbackSignal.Wait();
- idLib::Printf( "Completed process.\n" );
- idLib::Printf( "Error = 0x%08X, %s\n", parms.GetError(), GetSaveGameErrorString( parms.GetError() ).c_str() );
- }
- CONSOLE_COMMAND( testSavegameDelete, "deletes a savegames without confirmation", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- if ( args.Argc() != 2 ) {
- idLib::Printf( "Usage: testSavegameDelete <folder (without 'GAMES-')>\n" );
- return;
- }
- idStr folder = args.Argv( 1 );
- idSaveGameProcessorDelete testDeleteSaveGamesProc;
- if ( testDeleteSaveGamesProc.InitDelete( folder ) ) {
- session->GetSaveGameManager().ExecuteProcessorAndWait( &testDeleteSaveGamesProc );
- }
- idLib::Printf( "Completed process.\n" );
- idLib::Printf( "Error = 0x%08X, %s\n", testDeleteSaveGamesProc.GetParms().GetError(), GetSaveGameErrorString( testDeleteSaveGamesProc.GetParms().GetError() ).c_str() );
- }
- CONSOLE_COMMAND( testSavegameEnumerateFiles, "enumerates all the files in a folder (blank for 'current slot' folder, use 'autosave' for the autosave slot)", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- idStr folder = session->GetCurrentSaveSlot();
- if ( args.Argc() > 1 ) {
- folder = args.Argv( 1 );
- }
- idLib::Printf( "Testing folder: %s\n\n", folder.c_str() );
- idSaveLoadParms parms;
- parms.SetDefaults();
- parms.mode = SAVEGAME_MBF_ENUMERATE_FILES;
-
-
-
- Sys_ExecuteSavegameCommandAsync( &parms );
- parms.callbackSignal.Wait();
- for ( int i = 0; i < parms.files.Num(); i++ ) {
- idLib::Printf( S_COLOR_YELLOW "\t%d: %s\n" S_COLOR_DEFAULT, i, parms.files[i]->GetName() );
- }
- }
- void OutputDetailList( const saveGameDetailsList_t & savegameList ) {
- for ( int i = 0; i < savegameList.Num(); ++i ) {
- idLib::Printf( S_COLOR_YELLOW "\t%s - %s\n" S_COLOR_DEFAULT
- "\t\tMap: %s\n"
- "\t\tTime: %s\n",
- savegameList[i].slotName.c_str(),
- savegameList[i].damaged ? S_COLOR_RED "CORRUPT" : S_COLOR_GREEN "OK",
- savegameList[i].damaged ? "?" : savegameList[i].descriptors.GetString( SAVEGAME_DETAIL_FIELD_MAP, "" ),
- Sys_TimeStampToStr( savegameList[i].date )
- );
- }
- }
- CONSOLE_COMMAND( testSavegameEnumerate, "enumerates the savegames available", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- saveGameHandle_t handle = session->EnumerateSaveGamesSync();
- if ( handle == 0 ) {
- idLib::Printf( "Error enumerating.\n" );
- return;
- }
- const saveGameDetailsList_t gameList = session->GetSaveGameManager().GetEnumeratedSavegames();
- idLib::Printf( "Savegames found: %d\n\n", gameList.Num() );
- OutputDetailList( gameList );
- }
- CONSOLE_COMMAND( testSaveGameCheck, "tests existence of savegame", 0 ) {
- bool exists;
- bool autosaveExists;
- Sys_SaveGameCheck( exists, autosaveExists );
- idLib::Printf( "Savegame check: exists = %d, autosaveExists = %d\n", exists, autosaveExists );
- }
- CONSOLE_COMMAND( testSaveGameOutputEnumeratedSavegames, "outputs the list of savegames already enumerated, this does not re-enumerate", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- const saveGameDetailsList_t & savegames = session->GetSaveGameManager().GetEnumeratedSavegames();
- OutputDetailList( savegames );
- }
- CONSOLE_COMMAND( testSavegameGetCurrentSlot, "returns the current slot in use", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- idLib::Printf( "Current slot: %s\n", session->GetCurrentSaveSlot() );
- }
- CONSOLE_COMMAND( testSavegameSetCurrentSlot, "returns the current slot in use", 0 ) {
- if ( session == NULL ) {
- idLib::Printf( "Invalid session.\n" );
- return;
- }
- if ( args.Argc() != 2 ) {
- idLib::Printf( "Usage: testSavegameSetCurrentSlot name\n" );
- return;
- }
- const char * slot = args.Argv( 1 );
- session->SetCurrentSaveSlot( slot );
- idLib::Printf( "Current slot: %s\n", session->GetCurrentSaveSlot() );
- }
- CONSOLE_COMMAND( savegameSetErrorBit, "Allows you to set savegame_error by bit instead of integer value", 0 ) {
- int bit = atoi( args.Argv( 1 ) );
- savegame_error.SetInteger( savegame_error.GetInteger() | ( 1 << bit ) );
- }
- #pragma endregion
|