//============================================================================== // // GlobalSettings.cpp // //============================================================================== #include "GlobalSettings.hpp" #include "Configuration/GameConfig.hpp" #include "AudioMgr/AudioMgr.hpp" #include "MemCardMgr/MemCardMgr.hpp" #include "StateMgr.hpp" #include "NetworkMgr/Voice/VoiceMgr.hpp" #include "StringMgr\StringMgr.hpp" const s32 DEFAULT_CHECKSUM = 0x4afb0001; #if defined(TARGET_DEV) #if defined(bwatson) const char* DEFAULT_NAME="DEV.BISCUIT"; #elif defined(cgalley) const char* DEFAULT_NAME="DEV.CRAIG"; #elif defined(mtraub) const char* DEFAULT_NAME="DEV.MICHAEL"; #elif defined(rbrannon) const char* DEFAULT_NAME="DEV.ROB"; #elif defined(athyssen) const char* DEFAULT_NAME="DEV.ANDY"; #elif defined(sbroumley) const char* DEFAULT_NAME="DEV.STEVE"; #elif defined(mbillington) const char* DEFAULT_NAME="DEV.MARKB"; #elif defined(aharp) const char* DEFAULT_NAME="DEV.AHARP"; #elif defined(mreed) const char* DEFAULT_NAME="DEV.MREED"; #elif defined(jpcossigny) const char* DEFAULT_NAME="DEV.JP"; #else const char* DEFAULT_NAME="DEV.Undefined"; #endif #else #ifdef LAN_PARTY_BUILD const char* DEFAULT_NAME="A51 LAN Party"; #else const char* DEFAULT_NAME="SERVER NAME"; #endif #endif //============================================================================== global_settings::global_settings( void ) { Reset( RESET_ALL ); } //============================================================================== global_settings::~global_settings( void ) { x_memset( this, -1, sizeof(this) ); } //============================================================================== void global_settings::Reset( s32 ResetFlags ) { s32 i; if( ResetFlags == RESET_ALL ) { x_memset( this, 0, sizeof(this) ); m_Checksum = DEFAULT_CHECKSUM; // initialize game configs m_MultiplayerSettings.m_GameTypeID = GAME_DM; m_MultiplayerSettings.m_ScoreLimit = -1; m_MultiplayerSettings.m_TimeLimit = -1; m_MultiplayerSettings.m_MutationMode = MUTATE_CHANGE_AT_WILL; m_MultiplayerSettings.m_MapSettings.m_bUseDefault = TRUE; m_MultiplayerSettings.m_MapSettings.m_MapCycleCount = 0; m_MultiplayerSettings.m_MapSettings.m_MapCycleIdx = 0; for( i=0; i