Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Core/GameEngine/Source/Common/Audio/GameAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,22 @@ AudioManager::~AudioManager()
void AudioManager::init()
{
INI ini;
ini.loadFileDirectory( AsciiString( "Data\\INI\\AudioSettings" ), INI_LOAD_OVERWRITE, NULL);
ini.loadFileDirectory( "Data\\INI\\AudioSettings", INI_LOAD_OVERWRITE, NULL);

ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\Music" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( AsciiString( "Data\\INI\\Music" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Default\\Music", INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Music", INI_LOAD_OVERWRITE, NULL );

ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\SoundEffects" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( AsciiString( "Data\\INI\\SoundEffects" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Default\\SoundEffects", INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\SoundEffects", INI_LOAD_OVERWRITE, NULL );

ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\Speech" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( AsciiString( "Data\\INI\\Speech" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Default\\Speech", INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Speech", INI_LOAD_OVERWRITE, NULL );

ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\Voice" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( AsciiString( "Data\\INI\\Voice" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Default\\Voice", INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Voice", INI_LOAD_OVERWRITE, NULL );

// do the miscellaneous sound files last so that we find the AudioEventRTS associated with the events.
ini.loadFileDirectory( AsciiString( "Data\\INI\\MiscAudio" ), INI_LOAD_OVERWRITE, NULL);
ini.loadFileDirectory( "Data\\INI\\MiscAudio", INI_LOAD_OVERWRITE, NULL);

// determine if one of the music tracks exists. Since their now BIGd, one implies all.
// If they don't exist, then attempt to load them from the CD.
Expand Down Expand Up @@ -407,7 +407,7 @@ void AudioManager::getInfoForAudioEvent( const AudioEventRTS *eventToFindAndFill
//-------------------------------------------------------------------------------------------------
AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
{
if (eventToAdd->getEventName().isEmpty() || eventToAdd->getEventName() == AsciiString("NoSound")) {
if (eventToAdd->getEventName().isEmpty() || eventToAdd->getEventName() == "NoSound") {
return AHSV_NoSound;
}

Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/Common/System/ArchiveFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void ArchiveFileSystem::loadIntoDirectoryTree(ArchiveFile *archiveFile, Bool ove

FilenameList filenameList;

archiveFile->getFileListInDirectory(AsciiString(""), AsciiString(""), AsciiString("*"), filenameList, TRUE);
archiveFile->getFileListInDirectory("", "", "*", filenameList, TRUE);

FilenameListIter it = filenameList.begin();

Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/GameClient/VideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ void VideoPlayer::init( void )
// Load this here so that WB doesn't have to link to BinkLib, costing us (potentially)
// an extra license.
INI ini;
ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\Video" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( AsciiString( "Data\\INI\\Video" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Default\\Video", INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Video", INI_LOAD_OVERWRITE, NULL );
}

//============================================================================
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameNetwork/FirewallHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ void FirewallHelperClass::flagNeedToRefresh(Bool flag)
{
OptionPreferences pref;

(pref)["FirewallNeedToRefresh"] = flag ? AsciiString("TRUE") : AsciiString("FALSE");
(pref)["FirewallNeedToRefresh"] = flag ? "TRUE" : "FALSE";

pref.write();
}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameNetwork/GameInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void GameInfo::reset( void )
m_inGame = false;
m_inProgress = false;
m_gameID = 0;
m_mapName = AsciiString("NOMAP");
m_mapName = "NOMAP";
m_mapMask = 0;
m_seed = GetTickCount(); //GameClientRandomValue(0, INT_MAX - 1);
m_useStats = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameNetwork/GameSpy/LadderDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ void LadderList::loadLocalLadders( void )
AsciiString dirname;
dirname.format("%sGeneralsOnline\\Ladders\\", TheGlobalData->getPath_UserData().str());
FilenameList filenameList;
TheFileSystem->getFileListInDirectory(dirname, AsciiString("*.ini"), filenameList, TRUE);
TheFileSystem->getFileListInDirectory(dirname, "*.ini", filenameList, TRUE);

Int index = -1;

Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Source/GameNetwork/GameSpy/MainMenuUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void StartDownloadingPatches( void )
}

WindowLayout *layout;
layout = TheWindowManager->winCreateLayout( AsciiString( "Menus/DownloadMenu.wnd" ) );
layout = TheWindowManager->winCreateLayout( "Menus/DownloadMenu.wnd" );
layout->runInit();
layout->hide( FALSE );
layout->bringForward();
Expand Down Expand Up @@ -233,10 +233,10 @@ static void startOnline( void )
UserPreferences::const_iterator it = pref.find("useProfiles");
if (it != pref.end() && it->second.compareNoCase("yes") == 0)
#endif // ALLOW_NON_PROFILED_LOGIN
TheShell->push( AsciiString("Menus/GameSpyLoginProfile.wnd") );
TheShell->push( "Menus/GameSpyLoginProfile.wnd" );
#ifdef ALLOW_NON_PROFILED_LOGIN
else
TheShell->push( AsciiString("Menus/GameSpyLoginQuick.wnd") );
TheShell->push( "Menus/GameSpyLoginQuick.wnd" );
#endif // ALLOW_NON_PROFILED_LOGIN
}

Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void LANAPI::OnGameJoin( ReturnType ret, LANGameInfo *theGame )
if (ret == RET_OK)
{
LANbuttonPushed = true;
TheShell->push( AsciiString("Menus/LanGameOptionsMenu.wnd") );
TheShell->push( "Menus/LanGameOptionsMenu.wnd" );
//lanUpdateSlotList();

LANPreferences pref;
Expand Down Expand Up @@ -597,7 +597,7 @@ void LANAPI::OnGameCreate( ReturnType ret )
{

LANbuttonPushed = true;
TheShell->push( AsciiString("Menus/LanGameOptionsMenu.wnd") );
TheShell->push( "Menus/LanGameOptionsMenu.wnd" );

RequestLobbyLeave( false );
//RequestGameAnnounce( ); // can't do this here, since we don't have a map set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void WebBrowser::init()
{
m_urlList = NULL;
INI ini;
ini.loadFileDirectory( AsciiString( "Data\\INI\\Webpages" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Webpages", INI_LOAD_OVERWRITE, NULL );
}

/******************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void StdBIGFileSystem::closeAllFiles() {
Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fileMask, Bool overwrite) {

FilenameList filenameList;
TheLocalFileSystem->getFileListInDirectory(dir, AsciiString(""), fileMask, filenameList, TRUE);
TheLocalFileSystem->getFileListInDirectory(dir, "", fileMask, filenameList, TRUE);

Bool actuallyAdded = FALSE;
FilenameListIter it = filenameList.begin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void Win32BIGFileSystem::closeAllFiles() {
Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fileMask, Bool overwrite) {

FilenameList filenameList;
TheLocalFileSystem->getFileListInDirectory(dir, AsciiString(""), fileMask, filenameList, TRUE);
TheLocalFileSystem->getFileListInDirectory(dir, "", fileMask, filenameList, TRUE);

Bool actuallyAdded = FALSE;
FilenameListIter it = filenameList.begin();
Expand Down
24 changes: 12 additions & 12 deletions Core/Tools/Autorun/autorun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2276,7 +2276,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Install" ),
#else
AsciiString("Autorun:Install"),
"Autorun:Install",
#endif
TTButtonFontPtr );

Expand All @@ -2295,7 +2295,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Play" ),
#else
AsciiString("Autorun:Play"),
"Autorun:Play",
#endif
TTButtonFontPtr );
/*
Expand All @@ -2314,7 +2314,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Worldbuilder" ),
#else
AsciiString("Autorun:Worldbuilder"),
"Autorun:Worldbuilder",
#endif
TTButtonFontPtr );
*/
Expand All @@ -2333,7 +2333,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:CheckForUpdates" ),
#else
AsciiString("Autorun:CheckForUpdates"),
"Autorun:CheckForUpdates",
#endif
TTButtonFontPtr );
}
Expand All @@ -2351,7 +2351,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:ExploreCD" ),
#else
AsciiString("Autorun:ExploreCD"),
"Autorun:ExploreCD",
#endif
TTButtonFontPtr );
// strcpy( next_button_name, ButtonImages[button_index] );
Expand All @@ -2372,7 +2372,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Website" ),
#else
AsciiString("Autorun:Website"),
"Autorun:Website",
#endif
TTButtonFontPtr );

Expand All @@ -2395,7 +2395,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Uninstall" ),
#else
AsciiString("Autorun:Uninstall"),
"Autorun:Uninstall",
#endif
TTButtonFontPtr );

Expand All @@ -2417,7 +2417,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Previews" ),
#else
AsciiString("Autorun:Previews"),
"Autorun:Previews",
#endif
TTButtonFontPtr );

Expand All @@ -2434,7 +2434,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Help" ),
#else
AsciiString("Autorun:Help"),
"Autorun:Help",
#endif
TTButtonFontPtr );

Expand All @@ -2451,7 +2451,7 @@ void MainWindow::Create_Buttons( HWND hWnd, RECT *dlg_rect )
#ifdef LEAN_AND_MEAN
Locale_GetString( "Autorun:Cancel" ),
#else
AsciiString("Autorun:Cancel"),
"Autorun:Cancel",
#endif
TTButtonFontPtr );

Expand Down Expand Up @@ -3856,7 +3856,7 @@ BOOL CALLBACK Dialog_Box_Proc( HWND window_handle, UINT message, WPARAM w_param

Reformat_Volume_Name( PRODUCT_VOLUME_CD2, volume_to_match );
// result = Prompt_For_CD( window_handle, volume_to_match, IDS_INSERT_CDROM_WITH_VOLUME2, IDS_EXIT_MESSAGE2, &cd_drive );
result = Prompt_For_CD( window_handle, volume_to_match, AsciiString("Autorun:InsertCDROMWithVolume2"), AsciiString("Autorun:ExitMessage2"), &cd_drive );
result = Prompt_For_CD( window_handle, volume_to_match, "Autorun:InsertCDROMWithVolume2", "Autorun:ExitMessage2", &cd_drive );
}

if ( result ) {
Expand All @@ -3883,7 +3883,7 @@ BOOL CALLBACK Dialog_Box_Proc( HWND window_handle, UINT message, WPARAM w_param
}
else
{
Error_Message( Main::hInstance, AsciiString("Autorun:Generals"), AsciiString("Autorun:CantFindExplorer"), GAME_WEBSITE );
Error_Message( Main::hInstance, "Autorun:Generals", "Autorun:CantFindExplorer", GAME_WEBSITE );
}
break;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameLogic/ArmorSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ArmorTemplateSet
inline Int getConditionsYesCount() const { return 1; }
inline const ArmorSetFlags& getNthConditionsYes(Int i) const { return m_types; }
#if defined(RTS_DEBUG)
inline AsciiString getDescription() const { return AsciiString("ArmorTemplateSet"); }
inline AsciiString getDescription() const { return "ArmorTemplateSet"; }
#endif

void parseArmorTemplateSet( INI* ini );
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameLogic/WeaponSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class WeaponTemplateSet
inline Int getConditionsYesCount() const { return 1; }
inline const WeaponSetFlags& getNthConditionsYes(Int i) const { return m_types; }
#if defined(RTS_DEBUG)
inline AsciiString getDescription() const { return AsciiString("ArmorTemplateSet"); }
inline AsciiString getDescription() const { return "ArmorTemplateSet"; }
#endif
};

Expand Down
8 changes: 4 additions & 4 deletions Generals/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void GameEngine::init()

#if defined(RTS_DEBUG)
// If we're in Debug, load the Debug settings as well.
ini.loadFileDirectory( AsciiString( "Data\\INI\\GameDataDebug" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\GameDataDebug", INI_LOAD_OVERWRITE, NULL );
#endif

// special-case: parse command-line parameters after loading global data
Expand All @@ -421,8 +421,8 @@ void GameEngine::init()
#endif

// read the water settings from INI (must do prior to initing GameClient, apparently)
ini.loadFileDirectory( AsciiString( "Data\\INI\\Default\\Water" ), INI_LOAD_OVERWRITE, &xferCRC );
ini.loadFileDirectory( AsciiString( "Data\\INI\\Water" ), INI_LOAD_OVERWRITE, &xferCRC );
ini.loadFileDirectory( "Data\\INI\\Default\\Water", INI_LOAD_OVERWRITE, &xferCRC );
ini.loadFileDirectory( "Data\\INI\\Water", INI_LOAD_OVERWRITE, &xferCRC );

#ifdef DEBUG_CRC
initSubsystem(TheDeepCRCSanityCheck, "TheDeepCRCSanityCheck", MSGNEW("GameEngineSubystem") DeepCRCSanityCheck, NULL);
Expand Down Expand Up @@ -522,7 +522,7 @@ void GameEngine::init()
}

// load the initial shell screen
//TheShell->push( AsciiString("Menus/MainMenu.wnd") );
//TheShell->push( "Menus/MainMenu.wnd" );

// This allows us to run a map from the command line
if (TheGlobalData->m_initialFile.isEmpty() == FALSE)
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Source/Common/GameLOD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ void GameLODManager::init(void)
{
INI ini;
//Get Presets for each LOD level.
ini.loadFileDirectory( AsciiString( "Data\\INI\\GameLOD" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\GameLOD", INI_LOAD_OVERWRITE, NULL );

//Get presets for each known hardware configuration
ini.loadFileDirectory( AsciiString( "Data\\INI\\GameLODPresets"), INI_LOAD_OVERWRITE, NULL);
ini.loadFileDirectory( "Data\\INI\\GameLODPresets", INI_LOAD_OVERWRITE, NULL);

//Get Presets for custom LOD level by pulling them out of initial globaldata (which should
//have all settings already applied).
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ RecorderModeType RecorderClass::getMode() {
///< Show or Hide the Replay controls
void RecorderClass::initControls()
{
NameKeyType parentReplayControlID = TheNameKeyGenerator->nameToKey( AsciiString("ReplayControl.wnd:ParentReplayControl") );
NameKeyType parentReplayControlID = TheNameKeyGenerator->nameToKey( "ReplayControl.wnd:ParentReplayControl" );
GameWindow *parentReplayControl = TheWindowManager->winGetWindowFromId( NULL, parentReplayControlID );

Bool show = (getMode() != RECORDERMODETYPE_PLAYBACK);
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Source/Common/System/DataChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ AsciiString DataChunkInput::openDataChunk(DataChunkVersionType *ver )
c->next = m_chunkStack;
m_chunkStack = c;
if (this->atEndOfFile()) {
return (AsciiString(""));
Comment thread
Skyaero42 marked this conversation as resolved.
return AsciiString::TheEmptyString;
}
return m_contents.getName( c->id );
}
Expand Down Expand Up @@ -779,7 +779,7 @@ AsciiString DataChunkInput::getChunkLabel( void )
{
// TODO: Throw exception
DEBUG_CRASH(("Bad."));
return AsciiString("");
return AsciiString::TheEmptyString;
}

return m_contents.getName( m_chunkStack->id );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ SaveCode GameState::missionSave( void )
desc.format( format, TheGameText->fetch( campaign->m_campaignNameLabel ).str(), missionNumber );

// do an automatic mission save
return TheGameState->saveGame( AsciiString(""), desc, SAVE_FILE_TYPE_MISSION );
return TheGameState->saveGame( "", desc, SAVE_FILE_TYPE_MISSION );

}

Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/TerrainTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ TerrainType *TerrainTypeCollection::newTerrain( AsciiString name )
terrain = newInstance(TerrainType);

// copy default values from the default terrain entry
TerrainType *defaultTerrain = findTerrain( AsciiString( "DefaultTerrain" ) );
TerrainType *defaultTerrain = findTerrain( "DefaultTerrain" );
if( defaultTerrain )
*terrain = *defaultTerrain;
/*
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Source/Common/Thing/ThingFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ ThingTemplate *ThingFactory::newTemplate( const AsciiString& name )
newTemplate = newInstance(ThingTemplate);

// if the default template is present, get it and copy over any data to the new template
const ThingTemplate *defaultT = findTemplate( AsciiString( "DefaultThingTemplate" ) );
const ThingTemplate *defaultT = findTemplate( "DefaultThingTemplate" );
if( defaultT )
{

Expand Down Expand Up @@ -276,7 +276,7 @@ ThingTemplate *ThingFactory::findTemplateInternal( const AsciiString& name )
#ifdef LOAD_TEST_ASSETS
if (!strncmp(name.str(), TEST_STRING, strlen(TEST_STRING)))
{
ThingTemplate *tmplate = newTemplate( AsciiString( "Un-namedTemplate" ) );
ThingTemplate *tmplate = newTemplate( "Un-namedTemplate" );

// load the values
tmplate->initForLTA( name );
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/GameClient/Credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void CreditsManager::load(void )
{
INI ini;
// Read from INI all the ControlBarSchemes
ini.loadFileDirectory( AsciiString( "Data\\INI\\Credits" ), INI_LOAD_OVERWRITE, NULL );
ini.loadFileDirectory( "Data\\INI\\Credits", INI_LOAD_OVERWRITE, NULL );

if(m_scrollRatePerFrames <=0)
m_scrollRatePerFrames = 1;
Expand Down
Loading
Loading