diff --git a/Core/GameEngine/Source/Common/CRCDebug.cpp b/Core/GameEngine/Source/Common/CRCDebug.cpp index db8dbee0a20..6b46e248bbc 100644 --- a/Core/GameEngine/Source/Common/CRCDebug.cpp +++ b/Core/GameEngine/Source/Common/CRCDebug.cpp @@ -80,7 +80,7 @@ CRCVerification::~CRCVerification() { if (TheInGameUI) { - TheInGameUI->message(UnicodeString(L"GameLogic changed outside of GameLogic::update() - call Matt (x36804)!")); + TheInGameUI->message(L"GameLogic changed outside of GameLogic::update() - call Matt (x36804)!"); } CRCDEBUG_LOG(("GameLogic changed outside of GameLogic::update()!!!")); } diff --git a/Core/GameEngine/Source/Common/System/UnicodeString.cpp b/Core/GameEngine/Source/Common/System/UnicodeString.cpp index 3f0fe47b04f..31bf39d373c 100644 --- a/Core/GameEngine/Source/Common/System/UnicodeString.cpp +++ b/Core/GameEngine/Source/Common/System/UnicodeString.cpp @@ -437,7 +437,7 @@ Bool UnicodeString::nextToken(UnicodeString* tok, UnicodeString delimiters) return false; if (delimiters.isEmpty()) - delimiters = UnicodeString(L" \t\n\r"); + delimiters = L" \t\n\r"; Int offset; diff --git a/Core/GameEngine/Source/GameNetwork/ConnectionManager.cpp b/Core/GameEngine/Source/GameNetwork/ConnectionManager.cpp index 6bd869f1bff..7b3450a960b 100644 --- a/Core/GameEngine/Source/GameNetwork/ConnectionManager.cpp +++ b/Core/GameEngine/Source/GameNetwork/ConnectionManager.cpp @@ -651,7 +651,7 @@ void ConnectionManager::processChat(NetChatCommandMsg *msg) const Player *player = ThePlayerList->findPlayerWithNameKey( TheNameKeyGenerator->nameToKey( playerName ) ); if (!player) { - TheInGameUI->message(UnicodeString(L"%ls"), unitext.str()); + TheInGameUI->message(L"%ls", unitext.str()); return; } @@ -663,7 +663,7 @@ void ConnectionManager::processChat(NetChatCommandMsg *msg) { RGBColor rgb; rgb.setFromInt(player->getPlayerColor()); - TheInGameUI->messageColor(&rgb, UnicodeString(L"%ls"), unitext.str()); + TheInGameUI->messageColor(&rgb, L"%ls", unitext.str()); // feedback for received chat messages in-game AudioEventRTS audioEvent("GUICommunicatorIncoming"); @@ -2120,7 +2120,7 @@ UnsignedShort ConnectionManager::sendFileAnnounce(AsciiString path, UnsignedByte log.format(L"Not sending file '%hs' to %X", path.str(), playerMask); DEBUG_LOG_LEVEL(DEBUG_LEVEL_NET, ("%ls", log.str())); if (TheLAN) - TheLAN->OnChat(UnicodeString(L"sendFile"), 0, log, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"sendFile", 0, log, LANAPI::LANCHAT_SYSTEM); return 0; } @@ -2158,7 +2158,7 @@ void ConnectionManager::sendFile(AsciiString path, UnsignedByte playerMask, Unsi log.format(L"Not sending file '%hs' to %X", path.str(), playerMask); DEBUG_LOG_LEVEL(DEBUG_LEVEL_NET, ("%ls", log.str())); if (TheLAN) - TheLAN->OnChat(UnicodeString(L"sendFile"), 0, log, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"sendFile", 0, log, LANAPI::LANCHAT_SYSTEM); return; } diff --git a/Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp b/Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp index a14969bd880..7ac0d39b852 100644 --- a/Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp +++ b/Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp @@ -613,8 +613,8 @@ static Int insertGame( GameWindow *win, GameSpyStagingRoom *game, Bool showMap ) } else { - GadgetListBoxAddEntryText(win, UnicodeString(L" "), gameColor, index, COLUMN_MAP); - GadgetListBoxAddEntryText(win, UnicodeString(L" "), gameColor, index, COLUMN_LADDER); + GadgetListBoxAddEntryText(win, L" ", gameColor, index, COLUMN_MAP); + GadgetListBoxAddEntryText(win, L" ", gameColor, index, COLUMN_LADDER); } s.format(L"%d/%d", game->getReportedNumPlayers(), game->getReportedMaxPlayers()); @@ -633,7 +633,7 @@ static Int insertGame( GameWindow *win, GameSpyStagingRoom *game, Bool showMap ) } else { - GadgetListBoxAddEntryText(win, UnicodeString(L" "), gameColor, index, COLUMN_PASSWORD); + GadgetListBoxAddEntryText(win, L" ", gameColor, index, COLUMN_PASSWORD); } if (game->getAllowObservers()) @@ -643,7 +643,7 @@ static Int insertGame( GameWindow *win, GameSpyStagingRoom *game, Bool showMap ) } else { - GadgetListBoxAddEntryText(win, UnicodeString(L" "), gameColor, index, COLUMN_OBSERVER); + GadgetListBoxAddEntryText(win, L" ", gameColor, index, COLUMN_OBSERVER); } #if !RTS_GENERALS diff --git a/Core/GameEngine/Source/GameNetwork/LANAPI.cpp b/Core/GameEngine/Source/GameNetwork/LANAPI.cpp index 87963c5beff..9549e58c781 100644 --- a/Core/GameEngine/Source/GameNetwork/LANAPI.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANAPI.cpp @@ -308,7 +308,7 @@ void LANAPI::checkMOTD( void ) UnicodeString uniLine; uniLine.translate(line); - OnChat( UnicodeString(L"MOTD"), 0, uniLine, LANCHAT_SYSTEM ); + OnChat( L"MOTD", 0, uniLine, LANCHAT_SYSTEM ); } } } @@ -773,7 +773,7 @@ void LANAPI::RequestHasMap( void ) text.format(TheGameText->fetch("GUI:LocalPlayerNoMapWillTransfer"), mapDisplayName.str()); else text.format(TheGameText->fetch("GUI:LocalPlayerNoMap"), mapDisplayName.str()); - OnChat(UnicodeString(L"SYSTEM"), m_localIP, text, LANCHAT_SYSTEM); + OnChat(L"SYSTEM", m_localIP, text, LANCHAT_SYSTEM); } } @@ -921,7 +921,7 @@ void LANAPI::RequestGameCreate( UnicodeString gameName, Bool isDirectConnect ) /// @todo: Need to initialize the players elsewere. /* for (int player = 1; player < MAX_SLOTS; ++player) { - myGame->setPlayerName(player, UnicodeString(L"")); + myGame->setPlayerName(player, L""); myGame->setIP(player, 0); myGame->setAccepted(player, false); }*/ diff --git a/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp b/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp index 8c179202056..9c9fd2a0a06 100644 --- a/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp @@ -124,7 +124,7 @@ void LANAPI::OnAccept( UnsignedInt playerIP, Bool status ) { UnicodeString text; text = TheGameText->fetch("GUI:HostWantsToStart"); - OnChat(UnicodeString(L"SYSTEM"), m_localIP, text, LANCHAT_SYSTEM); + OnChat(L"SYSTEM", m_localIP, text, LANCHAT_SYSTEM); } } } @@ -165,7 +165,7 @@ void LANAPI::OnHasMap( UnsignedInt playerIP, Bool status ) text.format(TheGameText->fetch("GUI:PlayerNoMapWillTransfer"), m_currentGame->getLANSlot(i)->getName().str(), mapDisplayName.str()); else text.format(TheGameText->fetch("GUI:PlayerNoMap"), m_currentGame->getLANSlot(i)->getName().str(), mapDisplayName.str()); - OnChat(UnicodeString(L"SYSTEM"), m_localIP, text, LANCHAT_SYSTEM); + OnChat(L"SYSTEM", m_localIP, text, LANCHAT_SYSTEM); } lanUpdateSlotList(); } @@ -179,7 +179,7 @@ void LANAPI::OnGameStartTimer( Int seconds ) text.format(TheGameText->fetch("LAN:GameStartTimerSingular"), seconds); else text.format(TheGameText->fetch("LAN:GameStartTimerPlural"), seconds); - OnChat(UnicodeString(L"SYSTEM"), m_localIP, text, LANCHAT_SYSTEM); + OnChat(L"SYSTEM", m_localIP, text, LANCHAT_SYSTEM); } void LANAPI::OnGameStart( void ) diff --git a/Generals/Code/GameEngine/Source/Common/version.cpp b/Generals/Code/GameEngine/Source/Common/version.cpp index a5eca5b66fd..0c6375cfafa 100644 --- a/Generals/Code/GameEngine/Source/Common/version.cpp +++ b/Generals/Code/GameEngine/Source/Common/version.cpp @@ -309,7 +309,7 @@ UnicodeString Version::getUnicodeBuildUserOrGitCommitAuthorName() const UnicodeString Version::getUnicodeProductTitle() const { // @todo Make configurable - return UnicodeString(L"Community Patch"); + return L"Community Patch"; } UnicodeString Version::getUnicodeProductVersion() const diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index c08c490fc9c..112243daa59 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -455,7 +455,7 @@ void ControlBar::populatePurchaseScience( Player* player ) u.translate(foo); GadgetListBoxAddEntryText(win, u, color, -1, -1); } - GadgetListBoxAddEntryText(win, UnicodeString(L"Cancel"), color, -1, -1);*/ + GadgetListBoxAddEntryText(win, L"Cancel", color, -1, -1);*/ } @@ -2481,7 +2481,7 @@ void ControlBar::setControlCommand( GameWindow *button, const CommandButton *com button->winSetTooltipFunc(commandButtonTooltip); } else - GadgetButtonSetText( button, UnicodeString( L"" ) ); + GadgetButtonSetText( button, L"" ); // save the command in the user data of the window GadgetButtonSetData(button, (void*)commandButton); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp index 530304c4929..f70dcc6612d 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp @@ -519,7 +519,7 @@ void ControlBar::populateBuildQueue( Object *producer ) m_queueData[ i ].control->winClearStatus( WIN_STATUS_USE_OVERLAY_STATES ); // set the text of the window to nothing by default - GadgetButtonSetText( m_queueData[ i ].control, UnicodeString( L"" ) ); + GadgetButtonSetText( m_queueData[ i ].control, L"" ); //Clear any potential veterancy rank, or else we'll see it when it's empty! GadgetButtonDrawOverlayImage( m_queueData[ i ].control, NULL ); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp index ebaacbb63f4..e249a7fe964 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp @@ -133,7 +133,7 @@ void DisconnectMenu::setPlayerName(Int playerNum, UnicodeString name) { if (control != NULL) { if (name.getLength() > 0) { - GadgetStaticTextSetText(control, UnicodeString(L"")); + GadgetStaticTextSetText(control, L""); } } @@ -241,7 +241,7 @@ void DisconnectMenu::showPacketRouterTimeout() { control = TheWindowManager->winGetWindowFromId(NULL, id); if (control != NULL) { - GadgetStaticTextSetText(control, UnicodeString(L"")); // start it off with a blank string. + GadgetStaticTextSetText(control, L""); // start it off with a blank string. control->winHide(FALSE); } } diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp index c55a5c984ff..9a03af81ba1 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp @@ -193,7 +193,7 @@ void IMECandidateTextAreaDraw( GameWindow *window, WinInstanceData *instData ) // calulate the widest number text Int width; - Dstring->setText(UnicodeString(L"00:")); + Dstring->setText(L"00:"); width = Dstring->getWidth(); // calc y start pos diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp index b884e58bdfd..c46ffebb005 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp @@ -254,7 +254,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:TooManyPlayers"), (md)?md->m_numPlayers:0); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -265,7 +265,7 @@ void StartPressed(void) if (TheLAN->AmIHost()) { UnicodeString text = TheGameText->fetch("GUI:NeedHumanPlayers"); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -277,7 +277,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:NeedMorePlayers"),numUsers); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -306,7 +306,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:NeedMoreTeams")); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -315,7 +315,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("GUI:SandboxMode")); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } // see if everyone's accepted and count the number of players in the game diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp index 9f654818804..89e8efd6853 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp @@ -771,7 +771,7 @@ WindowMsgHandledType LanLobbyMenuSystem( GameWindow *window, UnsignedInt msg, } else if ( controlID == buttonHostID ) { - TheLAN->RequestGameCreate( UnicodeString(L""), FALSE); + TheLAN->RequestGameCreate( L"", FALSE); } else if ( controlID == buttonClearID ) diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp index 11d3090148a..e0fc37ee682 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp @@ -536,7 +536,7 @@ void MainMenuInit( WindowLayout *layout, void *userData ) instData.init(); BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Compress/Decompress Maps"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonCompressTest = TheWindowManager->gogoGadgetPushButton( parentMainMenu, WIN_STATUS_ENABLED | WIN_STATUS_IMAGE, 25, 175, @@ -548,7 +548,7 @@ void MainMenuInit( WindowLayout *layout, void *userData ) BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Load Map"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonCampaign = TheWindowManager->gogoGadgetPushButton( parentMainMenu, WIN_STATUS_ENABLED, 25, 54, diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp index 32cd126db54..f9e73497799 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp @@ -113,7 +113,7 @@ void UpdateRemoteIPList() // UnicodeString newEntry = prefs.getRemoteIPEntry(0); UnicodeString newEntry = unisel; UnicodeString newIP; - newEntry.nextToken(&newIP, UnicodeString(L":")); + newEntry.nextToken(&newIP, L":"); Int numFields = swscanf(newIP.str(), L"%d.%d.%d.%d", &(n1[0]), &(n1[1]), &(n1[2]), &(n1[3])); if (numFields != 4) { @@ -140,7 +140,7 @@ void UpdateRemoteIPList() { UnicodeString oldEntry = uni; UnicodeString oldIP; - oldEntry.nextToken(&oldIP, UnicodeString(L":")); + oldEntry.nextToken(&oldIP, L":"); swscanf(oldIP.str(), L"%d.%d.%d.%d", &(n2[0]), &(n2[1]), &(n2[2]), &(n2[3])); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp index b783f77f34c..2b08e31bf43 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp @@ -1105,7 +1105,7 @@ void HandlePersistentStorageResponses( void ) } DEBUG_LOG(("PopulatePlayerInfoWindows() - lookAtPlayerID is %d, got %d", lookAtPlayerID, resp.player.id)); PopulatePlayerInfoWindows("PopupPlayerInfo.wnd"); - //GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L"Got info!"), GameSpyColor[GSCOLOR_DEFAULT], -1); + //GadgetListBoxAddEntryText(listboxInfo, L"Got info!", GameSpyColor[GSCOLOR_DEFAULT], -1); // also update info for player list in lobby PlayerInfoMap::iterator it = TheGameSpyInfo->getPlayerInfoMap()->begin(); @@ -1202,7 +1202,7 @@ void GameSpyPlayerInfoOverlayInit( WindowLayout *layout, void *userData ) isOverlayActive = true; - //GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L"Working"), GameSpyColor[GSCOLOR_DEFAULT], -1); + //GadgetListBoxAddEntryText(listboxInfo, L"Working", GameSpyColor[GSCOLOR_DEFAULT], -1); GameSpyCloseOverlay(GSOVERLAY_BUDDY); raiseMessageBox = true; diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp index 3571ff025de..bbad3784ad9 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp @@ -397,7 +397,7 @@ void ReplayMenuInit( WindowLayout *layout, void *userData ) instData.init(); BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Analyze Replay"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonAnalyzeReplay = TheWindowManager->gogoGadgetPushButton( parentReplayMenu, WIN_STATUS_ENABLED | WIN_STATUS_IMAGE, 4, 4, @@ -657,7 +657,7 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg, GadgetListBoxGetSelected( listboxReplayFiles, &selected ); if(selected < 0) { - MessageBoxOk(UnicodeString(L"Blah Blah"),UnicodeString(L"Please select something munkee boy"), NULL); + MessageBoxOk(L"Blah Blah",L"Please select something munkee boy", NULL); break; } diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp index e0d0f03cc4f..c5133b30d1c 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp @@ -2333,7 +2333,7 @@ Bool handleGameSetupSlashCommands(UnicodeString uText) else if (token == "slots") { g_debugSlots = !g_debugSlots; - TheGameSpyInfo->addText(UnicodeString(L"Toggled SlotList debug"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled SlotList debug", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } else if (token == "discon") diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp index a86b514f679..e719999f2f0 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp @@ -201,13 +201,13 @@ Bool handleLobbySlashCommands(UnicodeString uText) else if (token == "fakecrc") { g_fakeCRC = !g_fakeCRC; - TheGameSpyInfo->addText(UnicodeString(L"Toggled CRC fakery"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled CRC fakery", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } else if (token == "slots") { g_debugSlots = !g_debugSlots; - TheGameSpyInfo->addText(UnicodeString(L"Toggled SlotList debug"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled SlotList debug", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } #endif @@ -1135,7 +1135,7 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData) { case PEER_CLEAR: TheGameSpyInfo->clearStagingRoomList(); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_CLEAR"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_CLEAR", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; case PEER_ADD: case PEER_UPDATE: @@ -1238,29 +1238,29 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData) if (resp.stagingRoom.action == PEER_ADD) { TheGameSpyInfo->addStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_ADD"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_ADD", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } else { TheGameSpyInfo->updateStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_UPDATE"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_UPDATE", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } } else { room.setID(resp.stagingRoom.id); TheGameSpyInfo->removeStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_UPDATE FAILED"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_UPDATE FAILED", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } break; } case PEER_REMOVE: room.setID(resp.stagingRoom.id); TheGameSpyInfo->removeStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_REMOVE"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_REMOVE", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; default: - //TheGameSpyInfo->addText( UnicodeString(L"gameList: Unknown"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: Unknown", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; } } diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp index e3d7e353f6e..74f8f49bbdd 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp @@ -830,7 +830,7 @@ void WOLLoginMenuUpdate( WindowLayout * layout, void *userData) room.m_groupID = resp.groupRoom.id; room.m_maxWaiting = resp.groupRoom.maxWaiting; room.m_name = resp.groupRoomName.c_str(); - room.m_translatedName = UnicodeString(L"TEST"); + room.m_translatedName = L"TEST"; room.m_numGames = resp.groupRoom.numGames; room.m_numPlaying = resp.groupRoom.numPlaying; room.m_numWaiting = resp.groupRoom.numWaiting; diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp index a50d2f6a934..35d8a0bf6e5 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp @@ -1207,7 +1207,7 @@ void WOLQuickMatchMenuUpdate( WindowLayout * layout, void *userData) switch( resp.qmStatus.status ) { case QM_IDLE: - //TheGameSpyInfo->addText(UnicodeString(L"Status: QM_IDLE"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); + //TheGameSpyInfo->addText(L"Status: QM_IDLE", GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); break; case QM_JOININGQMCHANNEL: TheGameSpyInfo->addText(TheGameText->fetch("QM:JOININGQMCHANNEL"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp index 0a011d40c6b..894a3f0e70b 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp @@ -238,7 +238,7 @@ static void updateNumPlayersOnline(void) UnicodeString headingStr; headingStr.format(TheGameText->fetch("MOTD:NumPlayersHeading"), lastNumPlayersOnline); - while (headingStr.nextToken(&line, UnicodeString(L"\n"))) + while (headingStr.nextToken(&line, L"\n")) { if (line.getCharAt(line.getLength()-1) == '\r') line.removeLastChar(); // there is a trailing '\r' @@ -247,12 +247,12 @@ static void updateNumPlayersOnline(void) if (line.isEmpty()) { - line = UnicodeString(L" "); + line = L" "; } GadgetListBoxAddEntryText(listboxInfo, line, GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); } - GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L" "), GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); + GadgetListBoxAddEntryText(listboxInfo, L" ", GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); while (aMotd.nextToken(&aLine, "\n")) { @@ -458,7 +458,7 @@ void WOLWelcomeMenuInit( WindowLayout *layout, void *userData ) // Clear some defaults /* - UnicodeString questionMark = UnicodeString(L"?"); + UnicodeString questionMark = L"?"; GadgetStaticTextSetText(staticTextLastUpdated, questionMark); GadgetStaticTextSetText(staticTextLadderWins, questionMark); GadgetStaticTextSetText(staticTextLadderLosses, questionMark); @@ -624,7 +624,7 @@ void WOLWelcomeMenuUpdate( WindowLayout * layout, void *userData) room.m_groupID = resp.groupRoom.id; room.m_maxWaiting = resp.groupRoom.maxWaiting; room.m_name = resp.groupRoomName.c_str(); - room.m_translatedName = UnicodeString(L"TEST"); + room.m_translatedName = L"TEST"; room.m_numGames = resp.groupRoom.numGames; room.m_numPlaying = resp.groupRoom.numPlaying; room.m_numWaiting = resp.groupRoom.numWaiting; @@ -857,7 +857,7 @@ WindowMsgHandledType WOLWelcomeMenuSystem( GameWindow *window, UnsignedInt msg, else { GameSpyCurrentGroupRoomID = 0; - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"Unable to join title room"), NULL); + GSMessageBoxOk(L"Oops", L"Unable to join title room", NULL); } */ } diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp index 1101a2ceab7..d35381fe44b 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp @@ -2205,7 +2205,7 @@ Int GadgetListBoxAddEntryText( GameWindow *listbox, if (!listbox) return -1; if (text.isEmpty()) - text = UnicodeString(L" "); + text = L" "; Int index; AddMessageStruct addInfo; addInfo.row = row; diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp index 9a525800448..ddddb593670 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp @@ -3790,17 +3790,17 @@ Bool GameWindowManager::initTestGUI( void ) 100, 100, &instData, &listData, NULL, TRUE ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Listbox text"), + GadgetListBoxAddEntryText( window, L"Listbox text", TheWindowManager->winMakeColor( 255, 255, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"More text"), + GadgetListBoxAddEntryText( window, L"More text", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Nothing"), + GadgetListBoxAddEntryText( window, L"Nothing", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Seasons"), + GadgetListBoxAddEntryText( window, L"Seasons", TheWindowManager->winMakeColor( 105, 205, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Misery"), + GadgetListBoxAddEntryText( window, L"Misery", TheWindowManager->winMakeColor( 235, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Natural"), + GadgetListBoxAddEntryText( window, L"Natural", TheWindowManager->winMakeColor( 105, 205, 45, 255 ), -1, 0 ); window->winSetFont( TheFontLibrary->getFont( "Times New Roman", 12, FALSE ) ); @@ -3823,17 +3823,17 @@ Bool GameWindowManager::initTestGUI( void ) 100, 100, &instData, &listData, NULL, TRUE ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Listbox text"), + GadgetListBoxAddEntryText( window, L"Listbox text", TheWindowManager->winMakeColor( 255, 255, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"More text"), + GadgetListBoxAddEntryText( window, L"More text", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Nothing"), + GadgetListBoxAddEntryText( window, L"Nothing", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Seasons"), + GadgetListBoxAddEntryText( window, L"Seasons", TheWindowManager->winMakeColor( 105, 205, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Misery"), + GadgetListBoxAddEntryText( window, L"Misery", TheWindowManager->winMakeColor( 235, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Natural"), + GadgetListBoxAddEntryText( window, L"Natural", TheWindowManager->winMakeColor( 105, 205, 45, 255 ), -1, -1 ); // make a vert slider diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp index 755395afce9..191bdc81411 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp @@ -382,7 +382,7 @@ void SinglePlayerLoadScreen::init( GameInfo *game ) m_percent = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( "SinglePlayerLoadScreen.wnd:Percent" )); DEBUG_ASSERTCRASH(m_percent, ("Can't initialize the m_percent for the single player loadscreen")); - GadgetStaticTextSetText(m_percent,UnicodeString(L"0%")); + GadgetStaticTextSetText(m_percent,L"0%"); m_percent->winHide(TRUE); m_objectiveWin = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( "SinglePlayerLoadScreen.wnd:ObjectivesWin" )); diff --git a/Generals/Code/GameEngine/Source/GameClient/Input/Mouse.cpp b/Generals/Code/GameEngine/Source/GameClient/Input/Mouse.cpp index 2ae572300fb..0c8d47bb4bf 100644 --- a/Generals/Code/GameEngine/Source/GameClient/Input/Mouse.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/Input/Mouse.cpp @@ -1344,7 +1344,7 @@ void Mouse::setCursor( MouseCursor cursor ) &(cursorInfo->cursorTextColor), &(cursorInfo->cursorTextDropColor) ); else - setMouseText( UnicodeString( L"" ), NULL, NULL ); + setMouseText( L"", NULL, NULL ); } diff --git a/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp b/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp index 3b6d485e6b7..a307e715935 100644 --- a/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp @@ -89,7 +89,7 @@ void LanguageFilter::filterLine(UnicodeString &line) UnicodeString newLine(line); UnicodeString token(L""); - while (newLine.nextToken(&token, UnicodeString(L" ;,.!?:=\\/><`~()&^%#\n\t"))) { + while (newLine.nextToken(&token, L" ;,.!?:=\\/><`~()&^%#\n\t")) { wchar_t *pos = wcsstr(buf, token.str()); if (pos == NULL) { DEBUG_CRASH(("Couldn't find the token in its own string.")); diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index a8acd90d38f..0700260f124 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -1206,7 +1206,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa case GameMessage::MSG_META_DEMO_TOGGLE_HAND_OF_GOD_MODE: { TheHandOfGodSelectionMode = !TheHandOfGodSelectionMode; - TheInGameUI->message( UnicodeString( L"Hand-Of-God Mode is %s" ), TheHandOfGodSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Hand-Of-God Mode is %s", TheHandOfGodSelectionMode ? L"ON" : L"OFF" ); disp = DESTROY_MESSAGE; break; } @@ -1217,7 +1217,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa case GameMessage::MSG_META_DEMO_TOGGLE_HURT_ME_MODE: { TheHurtSelectionMode = !TheHurtSelectionMode; - TheInGameUI->message( UnicodeString( L"Hurt-Me Mode is %s" ), TheHurtSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Hurt-Me Mode is %s", TheHurtSelectionMode ? L"ON" : L"OFF" ); disp = DESTROY_MESSAGE; break; } @@ -1228,7 +1228,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa case GameMessage::MSG_META_DEMO_DEBUG_SELECTION: { TheDebugSelectionMode = !TheDebugSelectionMode; - TheInGameUI->message( UnicodeString( L"Debug-Selected-Item Mode is %s" ), TheDebugSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Debug-Selected-Item Mode is %s", TheDebugSelectionMode ? L"ON" : L"OFF" ); #ifdef DEBUG_OBJECT_ID_EXISTS TheObjectIDToDebug = INVALID_ID; #endif diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp index 4e32ce205e4..a4f18b9571b 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp @@ -521,7 +521,7 @@ void OpenContain::removeFromContainViaIterator( ContainedItemsList::iterator it, /* #ifdef RTS_DEBUG - TheInGameUI->message( UnicodeString( L"'%S(%d)' no longer contains '%S(%d)'" ), + TheInGameUI->message( L"'%S(%d)' no longer contains '%S(%d)'", getObject()->getTemplate()->getName().str(), getObject()->getID(), itemToRemove->m_object->getTemplate()->getName().str(), diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp index 03321c2be2d..b7bf72188b4 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp @@ -1352,7 +1352,7 @@ void GameLogic::startNewGame( Bool saveGame ) Dict d; d.setAsciiString(TheKey_playerName, "ReplayObserver"); d.setBool(TheKey_playerIsHuman, TRUE); - d.setUnicodeString(TheKey_playerDisplayName, UnicodeString(L"Observer")); + d.setUnicodeString(TheKey_playerDisplayName, L"Observer"); const PlayerTemplate* pt; pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") ); if (pt) diff --git a/Generals/Code/GameEngine/Source/GameNetwork/GameSpy.cpp b/Generals/Code/GameEngine/Source/GameNetwork/GameSpy.cpp index 6939d74029f..79a79303d64 100644 --- a/Generals/Code/GameEngine/Source/GameNetwork/GameSpy.cpp +++ b/Generals/Code/GameEngine/Source/GameNetwork/GameSpy.cpp @@ -305,7 +305,7 @@ void GameSpyChat::update( void ) { // login timed out m_loginTimeout = 0; - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"Timed out connecting"), NULL); + GSMessageBoxOk(L"Error connecting", L"Timed out connecting", NULL); // Enable controls again //EnableLoginControls(TRUE); @@ -440,12 +440,12 @@ void GameSpyChat::joinBestGroupRoom( void ) } else { - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"No empty group rooms"), NULL); + GSMessageBoxOk(L"Oops", L"No empty group rooms", NULL); } } else { - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"No group rooms"), NULL); + GSMessageBoxOk(L"Oops", L"No group rooms", NULL); } } @@ -920,7 +920,7 @@ void JoinRoomCallback(PEER peer, PEERBool success, PEERJoinResult result, RoomTy TheShell->pop(); TheShell->push("Menus/WOLWelcomeMenu.wnd"); } - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"Unable to join group room"), NULL); + GSMessageBoxOk(L"Oops", L"Unable to join group room", NULL); } // Update buddy location @@ -978,7 +978,7 @@ void JoinRoomCallback(PEER peer, PEERBool success, PEERJoinResult result, RoomTy else { // let the user know - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"Unable to join game"), NULL); + GSMessageBoxOk(L"Oops", L"Unable to join game", NULL); DEBUG_LOG(("JoinRoomCallback - Failed to join staging room.")); } @@ -1065,7 +1065,7 @@ void createRoomCallback(PEER peer, PEERBool success, PEERJoinResult result, Room { // join the lobby again TheGameSpyChat->joinGroupRoom(oldGroupID); - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"Unable to create game"), NULL); + GSMessageBoxOk(L"Oops", L"Unable to create game", NULL); } // Update buddy location @@ -1141,7 +1141,7 @@ void GameSpyChat::_connectCallback(PEER peer, PEERBool success, void * param) m_loginTimeout = 0; if (!success) { - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"Failed to connect"), NULL); + GSMessageBoxOk(L"Error connecting", L"Failed to connect", NULL); DEBUG_LOG(("GameSpyChat::_connectCallback - failed to connect.")); } @@ -1207,7 +1207,7 @@ void GameSpyChat::_nickErrorCallback(PEER peer, int type, const char * nick, voi } else { - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"That nickname is already taken; please choose another one."), NULL); + GSMessageBoxOk(L"Error connecting", L"That nickname is already taken; please choose another one.", NULL); // Cancel the connect. peerRetryWithNick(peer, NULL); @@ -1218,7 +1218,7 @@ void GameSpyChat::_nickErrorCallback(PEER peer, int type, const char * nick, voi } else { - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"That nickname contains at least 1 invalid character, please choose another one."), NULL); + GSMessageBoxOk(L"Error connecting", L"That nickname contains at least 1 invalid character, please choose another one.", NULL); // Cancel the connect. peerRetryWithNick(peer, NULL); @@ -1239,7 +1239,7 @@ void GameSpyChat::_GPConnectCallback(GPConnection * pconnection, GPConnectRespon if (*res != GP_NO_ERROR) { // couldn't connect. bummer. - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"Error connecting to buddy server"), NULL); + GSMessageBoxOk(L"Error connecting", L"Error connecting to buddy server", NULL); gpDisconnect(TheGPConnection); gpDestroy(TheGPConnection); m_loginTimeout = 0; @@ -1262,7 +1262,7 @@ void GameSpyChat::_GPReconnectCallback(GPConnection * pconnection, GPConnectResp if (arg->result != GP_NO_ERROR) { // couldn't connect. bummer. - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"Error connecting to buddy server"), NULL); + GSMessageBoxOk(L"Error connecting", L"Error connecting to buddy server", NULL); gpDisconnect(TheGPConnection); gpDestroy(TheGPConnection); return; @@ -1270,7 +1270,7 @@ void GameSpyChat::_GPReconnectCallback(GPConnection * pconnection, GPConnectResp else { // yay! we're back in! - GSMessageBoxOk(UnicodeString(L"Connected!"), UnicodeString(L"Reonnected to buddy server"), NULL); + GSMessageBoxOk(L"Connected!", L"Reonnected to buddy server", NULL); } } @@ -1295,7 +1295,7 @@ void GameSpyChat::loginProfile(AsciiString loginName, AsciiString password, Asci if (res != GP_NO_ERROR) { // couldn't connect. bummer. - GSMessageBoxOk(UnicodeString(L"Error connecting"), UnicodeString(L"Error connecting to buddy server"), NULL); + GSMessageBoxOk(L"Error connecting", L"Error connecting to buddy server", NULL); gpDisconnect(TheGPConnection); gpDestroy(TheGPConnection); loginTimeout = 0; @@ -1373,7 +1373,7 @@ void GameSpyChat::login(AsciiString loginName, AsciiString password, AsciiString m_peer = peerInitialize(&callbacks); if(!m_peer) { - GSMessageBoxOk(UnicodeString(L"No Peer"), UnicodeString(L"No Peer"), NULL); + GSMessageBoxOk(L"No Peer", L"No Peer", NULL); return; } @@ -1392,7 +1392,7 @@ void GameSpyChat::login(AsciiString loginName, AsciiString password, AsciiString ///////////////// if(!peerSetTitle(m_peer, "gmtest", "HA6zkS", "gmtest", "HA6zkS", 15, pingRooms, crossPingRooms)) { - GSMessageBoxOk(UnicodeString(L"Error setting title"), UnicodeString(L"Error setting title"), NULL); + GSMessageBoxOk(L"Error setting title", L"Error setting title", NULL); peerShutdown(m_peer); m_peer = NULL; return; diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp index b88d2319965..816d96ec8c2 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp @@ -324,7 +324,7 @@ static void loadText( char *filename, GameWindow *listboxText ) line.translate(buffer); line.trim(); if (line.isEmpty()) - line = UnicodeString(L" "); + line = L" "; GadgetListBoxAddEntryText(listboxText, line, color, -1, -1); } diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/AcademyStats.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/AcademyStats.cpp index eea2bf3dd00..9041f653bdb 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/AcademyStats.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/AcademyStats.cpp @@ -1079,7 +1079,7 @@ Bool AcademyStats::calculateAcademyAdvice( AcademyAdviceInfo *info ) //Build the header for each string. for( UnsignedInt i = 0; i < maxAdviceTips; i++ ) { - info->advice[ i ].format( UnicodeString( L"\n\n" ) ); + info->advice[ i ].format( L"\n\n" ); } //First look at tier 1 basic advice and pick any advice we could benefit from. diff --git a/GeneralsMD/Code/GameEngine/Source/Common/version.cpp b/GeneralsMD/Code/GameEngine/Source/Common/version.cpp index abbf0991ed6..39876290ccc 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/version.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/version.cpp @@ -309,7 +309,7 @@ UnicodeString Version::getUnicodeBuildUserOrGitCommitAuthorName() const UnicodeString Version::getUnicodeProductTitle() const { // @todo Make configurable - return UnicodeString(L"Community Patch"); + return L"Community Patch"; } UnicodeString Version::getUnicodeProductVersion() const diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index a526844127f..efbc58ed243 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -459,7 +459,7 @@ void ControlBar::populatePurchaseScience( Player* player ) u.translate(foo); GadgetListBoxAddEntryText(win, u, color, -1, -1); } - GadgetListBoxAddEntryText(win, UnicodeString(L"Cancel"), color, -1, -1);*/ + GadgetListBoxAddEntryText(win, L"Cancel", color, -1, -1);*/ } @@ -2504,7 +2504,7 @@ void ControlBar::setControlCommand( GameWindow *button, const CommandButton *com button->winSetTooltipFunc(commandButtonTooltip); } else - GadgetButtonSetText( button, UnicodeString( L"" ) ); + GadgetButtonSetText( button, L"" ); // save the command in the user data of the window GadgetButtonSetData(button, (void*)commandButton); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp index 83195053143..d76112978de 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp @@ -589,7 +589,7 @@ void ControlBar::populateBuildQueue( Object *producer ) m_queueData[ i ].control->winClearStatus( WIN_STATUS_USE_OVERLAY_STATES ); // set the text of the window to nothing by default - GadgetButtonSetText( m_queueData[ i ].control, UnicodeString( L"" ) ); + GadgetButtonSetText( m_queueData[ i ].control, L"" ); //Clear any potential veterancy rank, or else we'll see it when it's empty! GadgetButtonDrawOverlayImage( m_queueData[ i ].control, NULL ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp index 7b0a738dbba..13c80807eaf 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp @@ -132,7 +132,7 @@ void DisconnectMenu::setPlayerName(Int playerNum, UnicodeString name) { if (control != NULL) { if (name.getLength() > 0) { - GadgetStaticTextSetText(control, UnicodeString(L"")); + GadgetStaticTextSetText(control, L""); } } @@ -224,7 +224,7 @@ void DisconnectMenu::showPacketRouterTimeout() { control = TheWindowManager->winGetWindowFromId(NULL, id); if (control != NULL) { - GadgetStaticTextSetText(control, UnicodeString(L"")); // start it off with a blank string. + GadgetStaticTextSetText(control, L""); // start it off with a blank string. control->winHide(FALSE); } } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp index 3cfbe4722ce..1765157c196 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/IMECandidate.cpp @@ -193,7 +193,7 @@ void IMECandidateTextAreaDraw( GameWindow *window, WinInstanceData *instData ) // calulate the widest number text Int width; - Dstring->setText(UnicodeString(L"00:")); + Dstring->setText(L"00:"); width = Dstring->getWidth(); // calc y start pos diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp index 45f5039eae1..b697c894c19 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp @@ -261,7 +261,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:TooManyPlayers"), (md)?md->m_numPlayers:0); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -272,7 +272,7 @@ void StartPressed(void) if (TheLAN->AmIHost()) { UnicodeString text = TheGameText->fetch("GUI:NeedHumanPlayers"); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -284,7 +284,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:NeedMorePlayers"),numUsers); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -313,7 +313,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("LAN:NeedMoreTeams")); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } return; } @@ -322,7 +322,7 @@ void StartPressed(void) { UnicodeString text; text.format(TheGameText->fetch("GUI:SandboxMode")); - TheLAN->OnChat(UnicodeString(L"SYSTEM"), TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); + TheLAN->OnChat(L"SYSTEM", TheLAN->GetLocalIP(), text, LANAPI::LANCHAT_SYSTEM); } // see if everyone's accepted and count the number of players in the game diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp index e1bd2a9e424..359d9da1011 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanLobbyMenu.cpp @@ -771,7 +771,7 @@ WindowMsgHandledType LanLobbyMenuSystem( GameWindow *window, UnsignedInt msg, } else if ( controlID == buttonHostID ) { - TheLAN->RequestGameCreate( UnicodeString(L""), FALSE); + TheLAN->RequestGameCreate( L"", FALSE); } else if ( controlID == buttonClearID ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp index b52054d4e5d..fa54c213b6a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp @@ -573,7 +573,7 @@ void MainMenuInit( WindowLayout *layout, void *userData ) instData.init(); BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Compress/Decompress Maps"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonCompressTest = TheWindowManager->gogoGadgetPushButton( parentMainMenu, WIN_STATUS_ENABLED | WIN_STATUS_IMAGE, 25, 175, @@ -585,7 +585,7 @@ void MainMenuInit( WindowLayout *layout, void *userData ) BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Load Map"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonCampaign = TheWindowManager->gogoGadgetPushButton( parentMainMenu, WIN_STATUS_ENABLED, 25, 54, diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp index 5124c90b457..bd85e8826fd 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/NetworkDirectConnect.cpp @@ -113,7 +113,7 @@ void UpdateRemoteIPList() // UnicodeString newEntry = prefs.getRemoteIPEntry(0); UnicodeString newEntry = unisel; UnicodeString newIP; - newEntry.nextToken(&newIP, UnicodeString(L":")); + newEntry.nextToken(&newIP, L":"); Int numFields = swscanf(newIP.str(), L"%d.%d.%d.%d", &(n1[0]), &(n1[1]), &(n1[2]), &(n1[3])); if (numFields != 4) { @@ -140,7 +140,7 @@ void UpdateRemoteIPList() { UnicodeString oldEntry = uni; UnicodeString oldIP; - oldEntry.nextToken(&oldIP, UnicodeString(L":")); + oldEntry.nextToken(&oldIP, L":"); swscanf(oldIP.str(), L"%d.%d.%d.%d", &(n2[0]), &(n2[1]), &(n2[2]), &(n2[3])); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp index b2f488b1f5a..3dd610bcfdc 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp @@ -1195,7 +1195,7 @@ void HandlePersistentStorageResponses( void ) } DEBUG_LOG(("PopulatePlayerInfoWindows() - lookAtPlayerID is %d, got %d", lookAtPlayerID, resp.player.id)); PopulatePlayerInfoWindows("PopupPlayerInfo.wnd"); - //GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L"Got info!"), GameSpyColor[GSCOLOR_DEFAULT], -1); + //GadgetListBoxAddEntryText(listboxInfo, L"Got info!", GameSpyColor[GSCOLOR_DEFAULT], -1); // also update info for player list in lobby PlayerInfoMap::iterator it = TheGameSpyInfo->getPlayerInfoMap()->begin(); @@ -1292,7 +1292,7 @@ void GameSpyPlayerInfoOverlayInit( WindowLayout *layout, void *userData ) isOverlayActive = true; - //GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L"Working"), GameSpyColor[GSCOLOR_DEFAULT], -1); + //GadgetListBoxAddEntryText(listboxInfo, L"Working", GameSpyColor[GSCOLOR_DEFAULT], -1); GameSpyCloseOverlay(GSOVERLAY_BUDDY); raiseMessageBox = true; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp index c73221d4873..058841715ca 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp @@ -397,7 +397,7 @@ void ReplayMenuInit( WindowLayout *layout, void *userData ) instData.init(); BitSet( instData.m_style, GWS_PUSH_BUTTON | GWS_MOUSE_TRACK ); instData.m_textLabelString = "Debug: Analyze Replay"; - instData.setTooltipText(UnicodeString(L"Only Used in Debug and Internal!")); + instData.setTooltipText(L"Only Used in Debug and Internal!"); buttonAnalyzeReplay = TheWindowManager->gogoGadgetPushButton( parentReplayMenu, WIN_STATUS_ENABLED | WIN_STATUS_IMAGE, 4, 4, @@ -657,7 +657,7 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg, GadgetListBoxGetSelected( listboxReplayFiles, &selected ); if(selected < 0) { - MessageBoxOk(UnicodeString(L"Blah Blah"),UnicodeString(L"Please select something munkee boy"), NULL); + MessageBoxOk(L"Blah Blah",L"Please select something munkee boy", NULL); break; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp index d0de9eb5426..70945012319 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp @@ -2521,7 +2521,7 @@ Bool handleGameSetupSlashCommands(UnicodeString uText) else if (token == "slots") { g_debugSlots = !g_debugSlots; - TheGameSpyInfo->addText(UnicodeString(L"Toggled SlotList debug"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled SlotList debug", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } else if (token == "discon") diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp index 35dde88d59e..da15a065ab9 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp @@ -201,13 +201,13 @@ Bool handleLobbySlashCommands(UnicodeString uText) else if (token == "fakecrc") { g_fakeCRC = !g_fakeCRC; - TheGameSpyInfo->addText(UnicodeString(L"Toggled CRC fakery"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled CRC fakery", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } else if (token == "slots") { g_debugSlots = !g_debugSlots; - TheGameSpyInfo->addText(UnicodeString(L"Toggled SlotList debug"), GameSpyColor[GSCOLOR_DEFAULT], NULL); + TheGameSpyInfo->addText(L"Toggled SlotList debug", GameSpyColor[GSCOLOR_DEFAULT], NULL); return TRUE; // was a slash command } #endif @@ -1153,7 +1153,7 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData) { case PEER_CLEAR: TheGameSpyInfo->clearStagingRoomList(); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_CLEAR"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_CLEAR", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; case PEER_ADD: case PEER_UPDATE: @@ -1256,29 +1256,29 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData) if (resp.stagingRoom.action == PEER_ADD) { TheGameSpyInfo->addStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_ADD"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_ADD", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } else { TheGameSpyInfo->updateStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_UPDATE"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_UPDATE", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } } else { room.setID(resp.stagingRoom.id); TheGameSpyInfo->removeStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_UPDATE FAILED"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_UPDATE FAILED", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); } break; } case PEER_REMOVE: room.setID(resp.stagingRoom.id); TheGameSpyInfo->removeStagingRoom(room); - //TheGameSpyInfo->addText( UnicodeString(L"gameList: PEER_REMOVE"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: PEER_REMOVE", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; default: - //TheGameSpyInfo->addText( UnicodeString(L"gameList: Unknown"), GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); + //TheGameSpyInfo->addText( L"gameList: Unknown", GameSpyColor[GSCOLOR_DEFAULT], listboxLobbyChat ); break; } } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp index 0795b273aa9..52955e817d2 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLoginMenu.cpp @@ -830,7 +830,7 @@ void WOLLoginMenuUpdate( WindowLayout * layout, void *userData) room.m_groupID = resp.groupRoom.id; room.m_maxWaiting = resp.groupRoom.maxWaiting; room.m_name = resp.groupRoomName.c_str(); - room.m_translatedName = UnicodeString(L"TEST"); + room.m_translatedName = L"TEST"; room.m_numGames = resp.groupRoom.numGames; room.m_numPlaying = resp.groupRoom.numPlaying; room.m_numWaiting = resp.groupRoom.numWaiting; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp index b1f89019e86..d793702957b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp @@ -1187,11 +1187,11 @@ void WOLQuickMatchMenuUpdate( WindowLayout * layout, void *userData) /* if (resp.joinGroupRoom.ok) { - TheGameSpyInfo->addText(UnicodeString(L"Joined group room"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); + TheGameSpyInfo->addText(L"Joined group room", GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); } else { - TheGameSpyInfo->addText(UnicodeString(L"Didn't join group room"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); + TheGameSpyInfo->addText(L"Didn't join group room", GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); } */ break; @@ -1284,7 +1284,7 @@ void WOLQuickMatchMenuUpdate( WindowLayout * layout, void *userData) switch( resp.qmStatus.status ) { case QM_IDLE: - //TheGameSpyInfo->addText(UnicodeString(L"Status: QM_IDLE"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); + //TheGameSpyInfo->addText(L"Status: QM_IDLE", GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); break; case QM_JOININGQMCHANNEL: TheGameSpyInfo->addText(TheGameText->fetch("QM:JOININGQMCHANNEL"), GameSpyColor[GSCOLOR_DEFAULT], quickmatchTextWindow); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp index 4729001bf32..f098089806f 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp @@ -243,7 +243,7 @@ static void updateNumPlayersOnline(void) //This was a Harvard initiated fix. headingStr.format(TheGameText->fetch("MOTD:NumPlayersHeading")); - while (headingStr.nextToken(&line, UnicodeString(L"\n"))) + while (headingStr.nextToken(&line, L"\n")) { if (line.getCharAt(line.getLength()-1) == '\r') line.removeLastChar(); // there is a trailing '\r' @@ -252,12 +252,12 @@ static void updateNumPlayersOnline(void) if (line.isEmpty()) { - line = UnicodeString(L" "); + line = L" "; } GadgetListBoxAddEntryText(listboxInfo, line, GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); } - GadgetListBoxAddEntryText(listboxInfo, UnicodeString(L" "), GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); + GadgetListBoxAddEntryText(listboxInfo, L" ", GameSpyColor[GSCOLOR_MOTD_HEADING], -1, -1); while (aMotd.nextToken(&aLine, "\n")) { @@ -475,7 +475,7 @@ void WOLWelcomeMenuInit( WindowLayout *layout, void *userData ) // Clear some defaults /* - UnicodeString questionMark = UnicodeString(L"?"); + UnicodeString questionMark = L"?"; GadgetStaticTextSetText(staticTextLastUpdated, questionMark); GadgetStaticTextSetText(staticTextLadderWins, questionMark); GadgetStaticTextSetText(staticTextLadderLosses, questionMark); @@ -641,7 +641,7 @@ void WOLWelcomeMenuUpdate( WindowLayout * layout, void *userData) room.m_groupID = resp.groupRoom.id; room.m_maxWaiting = resp.groupRoom.maxWaiting; room.m_name = resp.groupRoomName.c_str(); - room.m_translatedName = UnicodeString(L"TEST"); + room.m_translatedName = L"TEST"; room.m_numGames = resp.groupRoom.numGames; room.m_numPlaying = resp.groupRoom.numPlaying; room.m_numWaiting = resp.groupRoom.numWaiting; @@ -874,7 +874,7 @@ WindowMsgHandledType WOLWelcomeMenuSystem( GameWindow *window, UnsignedInt msg, else { GameSpyCurrentGroupRoomID = 0; - GSMessageBoxOk(UnicodeString(L"Oops"), UnicodeString(L"Unable to join title room"), NULL); + GSMessageBoxOk(L"Oops", L"Unable to join title room", NULL); } */ } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp index 4064c0f6ffd..147c7368ba3 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp @@ -2205,7 +2205,7 @@ Int GadgetListBoxAddEntryText( GameWindow *listbox, if (!listbox) return -1; if (text.isEmpty()) - text = UnicodeString(L" "); + text = L" "; Int index; AddMessageStruct addInfo; addInfo.row = row; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp index 5596456e067..a0d01be715d 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp @@ -3790,17 +3790,17 @@ Bool GameWindowManager::initTestGUI( void ) 100, 100, &instData, &listData, NULL, TRUE ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Listbox text"), + GadgetListBoxAddEntryText( window, L"Listbox text", TheWindowManager->winMakeColor( 255, 255, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"More text"), + GadgetListBoxAddEntryText( window, L"More text", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Nothing"), + GadgetListBoxAddEntryText( window, L"Nothing", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Seasons"), + GadgetListBoxAddEntryText( window, L"Seasons", TheWindowManager->winMakeColor( 105, 205, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Misery"), + GadgetListBoxAddEntryText( window, L"Misery", TheWindowManager->winMakeColor( 235, 105, 255, 255 ), -1, 0 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Natural"), + GadgetListBoxAddEntryText( window, L"Natural", TheWindowManager->winMakeColor( 105, 205, 45, 255 ), -1, 0 ); window->winSetFont( TheFontLibrary->getFont( "Times New Roman", 12, FALSE ) ); @@ -3823,17 +3823,17 @@ Bool GameWindowManager::initTestGUI( void ) 100, 100, &instData, &listData, NULL, TRUE ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Listbox text"), + GadgetListBoxAddEntryText( window, L"Listbox text", TheWindowManager->winMakeColor( 255, 255, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"More text"), + GadgetListBoxAddEntryText( window, L"More text", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Nothing"), + GadgetListBoxAddEntryText( window, L"Nothing", TheWindowManager->winMakeColor( 105, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Seasons"), + GadgetListBoxAddEntryText( window, L"Seasons", TheWindowManager->winMakeColor( 105, 205, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Misery"), + GadgetListBoxAddEntryText( window, L"Misery", TheWindowManager->winMakeColor( 235, 105, 255, 255 ), -1, -1 ); - GadgetListBoxAddEntryText( window, UnicodeString(L"Natural"), + GadgetListBoxAddEntryText( window, L"Natural", TheWindowManager->winMakeColor( 105, 205, 45, 255 ), -1, -1 ); // make a vert slider diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp index c05cace94a2..68bf94481a0 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp @@ -403,7 +403,7 @@ void SinglePlayerLoadScreen::init( GameInfo *game ) m_percent = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( "SinglePlayerLoadScreen.wnd:Percent" )); DEBUG_ASSERTCRASH(m_percent, ("Can't initialize the m_percent for the single player loadscreen")); - GadgetStaticTextSetText(m_percent,UnicodeString(L"0%")); + GadgetStaticTextSetText(m_percent,L"0%"); m_percent->winHide(TRUE); m_objectiveWin = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( "SinglePlayerLoadScreen.wnd:ObjectivesWin" )); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp index 27fa57927b1..266aae0008f 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp @@ -1344,7 +1344,7 @@ void Mouse::setCursor( MouseCursor cursor ) &(cursorInfo->cursorTextColor), &(cursorInfo->cursorTextDropColor) ); else - setMouseText( UnicodeString( L"" ), NULL, NULL ); + setMouseText( L"", NULL, NULL ); } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp index 656bf74490f..8e2f0635b8f 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp @@ -89,7 +89,7 @@ void LanguageFilter::filterLine(UnicodeString &line) UnicodeString newLine(line); UnicodeString token(L""); - while (newLine.nextToken(&token, UnicodeString(L" ;,.!?:=\\/><`~()&^%#\n\t"))) { + while (newLine.nextToken(&token, L" ;,.!?:=\\/><`~()&^%#\n\t")) { wchar_t *pos = wcsstr(buf, token.str()); if (pos == NULL) { DEBUG_CRASH(("Couldn't find the token in its own string.")); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp index 2dcfe187fef..71ae73bd222 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp @@ -1284,7 +1284,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa if ( !TheGameLogic->isInMultiplayerGame() ) { m_HandOfGodSelectionMode = !m_HandOfGodSelectionMode; - TheInGameUI->message( UnicodeString( L"Meta Hand-Of-God Mode is %s" ), m_HandOfGodSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Meta Hand-Of-God Mode is %s", m_HandOfGodSelectionMode ? L"ON" : L"OFF" ); disp = DESTROY_MESSAGE; } break; @@ -1298,7 +1298,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa if ( !TheGameLogic->isInMultiplayerGame() ) { m_HandOfGodSelectionMode = !m_HandOfGodSelectionMode; - TheInGameUI->message( UnicodeString( L"Hand-Of-God Mode is %s" ), m_HandOfGodSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Hand-Of-God Mode is %s", m_HandOfGodSelectionMode ? L"ON" : L"OFF" ); disp = DESTROY_MESSAGE; } break; @@ -1312,7 +1312,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa if ( !TheGameLogic->isInMultiplayerGame() ) { TheHurtSelectionMode = !TheHurtSelectionMode; - TheInGameUI->message( UnicodeString( L"Hurt-Me Mode is %s" ), TheHurtSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Hurt-Me Mode is %s", TheHurtSelectionMode ? L"ON" : L"OFF" ); disp = DESTROY_MESSAGE; } break; @@ -1324,7 +1324,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa case GameMessage::MSG_META_DEMO_DEBUG_SELECTION: { TheDebugSelectionMode = !TheDebugSelectionMode; - TheInGameUI->message( UnicodeString( L"Debug-Selected-Item Mode is %s" ), TheDebugSelectionMode ? L"ON" : L"OFF" ); + TheInGameUI->message( L"Debug-Selected-Item Mode is %s", TheDebugSelectionMode ? L"ON" : L"OFF" ); #ifdef DEBUG_OBJECT_ID_EXISTS TheObjectIDToDebug = INVALID_ID; #endif diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp index 8e42cbc9f7d..0f9e52a888c 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp @@ -639,7 +639,7 @@ void OpenContain::removeFromContainViaIterator( ContainedItemsList::iterator it, /* #ifdef RTS_DEBUG - TheInGameUI->message( UnicodeString( L"'%S(%d)' no longer contains '%S(%d)'" ), + TheInGameUI->message( L"'%S(%d)' no longer contains '%S(%d)'", getObject()->getTemplate()->getName().str(), getObject()->getID(), itemToRemove->m_object->getTemplate()->getName().str(), diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp index a1d704c3bef..1781f3dd790 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp @@ -1514,7 +1514,7 @@ void GameLogic::startNewGame( Bool loadingSaveGame ) Dict d; d.setAsciiString(TheKey_playerName, "ReplayObserver"); d.setBool(TheKey_playerIsHuman, TRUE); - d.setUnicodeString(TheKey_playerDisplayName, UnicodeString(L"Observer")); + d.setUnicodeString(TheKey_playerDisplayName, L"Observer"); const PlayerTemplate* pt; pt = ThePlayerTemplateStore->findPlayerTemplate( TheNameKeyGenerator->nameToKey("FactionObserver") ); if (pt) diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 08ea00f6394..bcf853c1ad5 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -1704,7 +1704,7 @@ void W3DDisplay::draw( void ) if ( TheGameLogic->getFrame() > 0 && (TheGameLogic->getFrame() % interval) == 0 ) { TheStatDump.dumpStats( TRUE, TRUE ); - TheInGameUI->message( UnicodeString( L"-stats is running, at interval: %d." ), TheGlobalData->m_statsInterval ); + TheInGameUI->message( L"-stats is running, at interval: %d.", TheGlobalData->m_statsInterval ); } } #endif diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp index e221ed511a6..0c72dbf244a 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp @@ -324,7 +324,7 @@ static void loadText( char *filename, GameWindow *listboxText ) line.translate(buffer); line.trim(); if (line.isEmpty()) - line = UnicodeString(L" "); + line = L" "; GadgetListBoxAddEntryText(listboxText, line, color, -1, -1); } diff --git a/scripts/cpp/refactor_asciistring_unicodestring_instantiation.py b/scripts/cpp/refactor_asciistring_unicodestring_instantiation.py index b65ab95d2e5..9d72bc150b5 100644 --- a/scripts/cpp/refactor_asciistring_unicodestring_instantiation.py +++ b/scripts/cpp/refactor_asciistring_unicodestring_instantiation.py @@ -10,9 +10,9 @@ def fix_string(line: str, typename: str) -> str: # Build a regex that allows arbitrary whitespace - pattern = rf"""{typename}\s*\(\s*"([^"]*)"\s*\)""" + pattern = rf"""{typename}\s*\(\s*(L?)\s*"([^"]*)"\s*\)""" # Replace typename( "value" ) -> "value" - return re.sub(pattern, r'"\1"', line) + return re.sub(pattern, r'\1"\2"', line) def main(): @@ -40,7 +40,7 @@ def main(): with open(fileName, 'w', encoding="cp1252") as file: for line in lines: line = fix_string(line, 'AsciiString') - #line = fix_string(line, 'UnicodeString') + line = fix_string(line, 'UnicodeString') file.write(line) return