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
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/Common/CRCDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()!!!"));
}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/Common/System/UnicodeString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Source/GameNetwork/ConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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");
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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())
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Source/GameNetwork/LANAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}
}
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}*/
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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();
}
Expand All @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);*/

}

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"");
}
}

Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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]));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
}
Expand Down
Loading
Loading