Commits

Braden Obrzut committed 1e40a98

Cleaned up most of the remaining GCC warnings.

SVN r1459 (latestzdoom)

Comments (0)

Files changed (56)

src/announcer.cpp

 	{
 		if ( g_AnnouncerProfile[ulIdx] != NULL )
 		{
-			Printf( "%d. %s\n", ulIdx + 1, g_AnnouncerProfile[ulIdx]->szName );
+			Printf( "%d. %s\n", static_cast<unsigned int> (ulIdx + 1), g_AnnouncerProfile[ulIdx]->szName );
 			ulNumProfiles++;
 		}
 	}
 
-	Printf( "\n%d announcer profile(s) loaded.\n", ulNumProfiles );
+	Printf( "\n%d announcer profile(s) loaded.\n", static_cast<unsigned int> (ulNumProfiles) );
 }
 
 	if ( pNode )
 	{
-		Printf( "(%d, %d) (%s)\n", pNode->lXNodeIdx, pNode->lYNodeIdx, pNode->lDirection[1] == 0 ? "N" :
+		Printf( "(%d, %d) (%s)\n", static_cast<int> (pNode->lXNodeIdx), static_cast<int> (pNode->lYNodeIdx), pNode->lDirection[1] == 0 ? "N" :
 			pNode->lDirection[1] == 1 ? "NE" : 
 			pNode->lDirection[1] == 2 ? "E" : 
 			pNode->lDirection[1] == 3 ? "SE" : 
 			pNode->lDirection[1] == 6 ? "W" : 
 			pNode->lDirection[1] == 7 ? "NW" : "UNKNOWN"
 		);
-		Printf( "From start (g): %d\n", pNode->lCostFromStart[1] );
-		Printf( "From goal (h): %d\n", pNode->lTotalCost[1] - pNode->lCostFromStart[1] );
-		Printf( "Total (f): %d\n", pNode->lTotalCost[1] );
+		Printf( "From start (g): %d\n", static_cast<int> (pNode->lCostFromStart[1]) );
+		Printf( "From goal (h): %d\n", static_cast<int> (pNode->lTotalCost[1] - pNode->lCostFromStart[1]) );
+		Printf( "Total (f): %d\n", static_cast<int> (pNode->lTotalCost[1]) );
 	}
 }
 
 	PosGoal = ASTAR_GetPosition( pPath->pGoalNode );
 
 	return ( P_AproxDistance( PosNode.x - PosGoal.x, PosNode.y - PosGoal.y ));
-/*
+
 //	return (( abs( pPath->pGoalNode->lXNodeIdx - pNode->lXNodeIdx ) + ( abs( pPath->pGoalNode->lYNodeIdx - pNode->lYNodeIdx ))) * 64 );
 
 	LONG	lXDiff;
 	return ( (LONG)sqrt(((( pPath->pGoalNode->lXNodeIdx - pNode->lXNodeIdx ) * 64 ) ^ 2 ) + ((( pPath->pGoalNode->lYNodeIdx - pNode->lYNodeIdx ) * 64 ) ^ 2 )));
 
 //	return (( abs( pPath->pGoalNode->lXNodeIdx - pNode->lXNodeIdx ) + abs( pPath->pGoalNode->lYNodeIdx - pNode->lYNodeIdx )) * 15 );
-/*
+
 	return (( abs( pPath->pGoalNode->lXNodeIdx - pNode->lXNodeIdx ) * abs( pPath->pGoalNode->lXNodeIdx - pNode->lXNodeIdx )) + 
 			( abs( pPath->pGoalNode->lYNodeIdx - pNode->lYNodeIdx ) * abs( pPath->pGoalNode->lYNodeIdx - pNode->lYNodeIdx )));
 */
 
 	Out.Format( "Pathing cycles = %04.1f ms (%3d nodes pathed)", 
 		(double)g_PathingCycles * SecondsPerCycle * 1000,
-		g_lNumSearchedNodes
+		static_cast<int> (g_lNumSearchedNodes)
 		);
 
 	return ( Out );
 		if ( g_BrowserServerList[ulIdx].ulActiveState != AS_ACTIVE )
 			continue;
 
-		Printf( "\nServer #%d\n----------------\n", ulIdx );
+		Printf( "\nServer #%d\n----------------\n", static_cast<unsigned int> (ulIdx) );
 		Printf( "Name: %s\n", g_BrowserServerList[ulIdx].HostName.GetChars() );
 		Printf( "Address: %s\n", NETWORK_AddressToString( g_BrowserServerList[ulIdx].Address ));
 		Printf( "Gametype: %d\n", g_BrowserServerList[ulIdx].GameMode );
-		Printf( "Num PWADs: %d\n", g_BrowserServerList[ulIdx].lNumPWADs );
-		Printf( "Players: %d/%d\n", g_BrowserServerList[ulIdx].lNumPlayers, g_BrowserServerList[ulIdx].lMaxClients );
-		Printf( "Ping: %d\n", g_BrowserServerList[ulIdx].lPing );
+		Printf( "Num PWADs: %d\n", static_cast<int> (g_BrowserServerList[ulIdx].lNumPWADs) );
+		Printf( "Players: %d/%d\n", static_cast<int> (g_BrowserServerList[ulIdx].lNumPlayers), static_cast<int> (g_BrowserServerList[ulIdx].lMaxClients) );
+		Printf( "Ping: %d\n", static_cast<int> (g_BrowserServerList[ulIdx].lPing) );
 	}
 }
 					if ( strncmp( g_VoteCommand, "kick ", 5 ) == 0 )
 					{
 						g_VoteCommand = "kick_idx ";
-						g_VoteCommand.AppendFormat( "%d", g_ulKickVoteTargetPlayerIdx );
+						g_VoteCommand.AppendFormat( "%d", static_cast<unsigned int> (g_ulKickVoteTargetPlayerIdx) );
 					}
 
 					AddCommandString( (char *)g_VoteCommand.GetChars( ));
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 
 
 				lBotIndex = atoi( szIndex );
 				if (( lBotIndex < 0 ) || ( lBotIndex >= MAXPLAYERS ))
-					I_Error( "CAMPAIGN_ParseCampaignInfo: Invalid \"botteam\" index, %d!", lBotIndex );
+					I_Error( "CAMPAIGN_ParseCampaignInfo: Invalid \"botteam\" index, %d!", static_cast<int> (lBotIndex) );
 
 				strncpy( pInfo->BotSpawn[lBotIndex].szBotTeam, szValue, 7 );
 				pInfo->BotSpawn[lBotIndex].szBotTeam[7] = 0;
 
 				lBotIndex = atoi( szIndex );
 				if (( lBotIndex < 0 ) || ( lBotIndex >= MAXPLAYERS ))
-					I_Error( "CAMPAIGN_ParseCampaignInfo: Invalid \"bot\" index, %d!", lBotIndex );
+					I_Error( "CAMPAIGN_ParseCampaignInfo: Invalid \"bot\" index, %d!", static_cast<int> (lBotIndex) );
 
 				strncpy( pInfo->BotSpawn[lBotIndex].szBotName, szValue, 31 );
 				pInfo->BotSpawn[lBotIndex].szBotName[31] = 0;
 static	ULONG	g_ulChatMode;
 static	char	g_szChatBuffer[MAX_CHATBUFFER_LENGTH];
 static	LONG	g_lStringLength;
-static	char	*g_pszChatPrompt = "SAY: ";
+static	const char	*g_pszChatPrompt = "SAY: ";
 
 //*****************************************************************************
 //	CONSOLE VARIABLES
 // Debugging variables.
 static	LONG				g_lLastCmd;
 #ifdef _DEBUG
-static	char				*g_pszHeaderNames[NUM_SERVER_COMMANDS] =
+static	const char				*g_pszHeaderNames[NUM_SERVER_COMMANDS] =
 {
 	"SVC_HEADER",
 	"SVC_UNRELIABLEPACKET",
 				if ( g_lPacketSequence[lIdx2] == lIdx )
 				{
 					if ( debugfile )
-						fprintf( debugfile, "We have packet %d.\n", lIdx );
+						fprintf( debugfile, "We have packet %d.\n", static_cast<int> (lIdx) );
 
 					break;
 				}
 			if ( lIdx2 == 256 )
 			{
 				if ( debugfile )
-					fprintf( debugfile, "Missing packet %d.\n", lIdx );
+					fprintf( debugfile, "Missing packet %d.\n", static_cast<int> (lIdx) );
 
 				NETWORK_WriteLong( &g_LocalBuffer.ByteStream, lIdx );
 			}
 	if ( debugfile )
 	{
 		if ( bSequencedPacket )
-			fprintf( debugfile, "End parsing packet %d.\n", g_lLastParsedSequence + 1 );
+			fprintf( debugfile, "End parsing packet %d.\n", static_cast<int> (g_lLastParsedSequence + 1) );
 		else
 			fprintf( debugfile, "End parsing packet.\n" );
 	}
 				break;
 			default:
 
-				sprintf( szErrorString, "Unknown error code: %d!\n\nYour version may be different. Please check http://www.skulltag.com/ for updates.", ulErrorCode );
+				sprintf( szErrorString, "Unknown error code: %d!\n\nYour version may be different. Please check http://www.skulltag.com/ for updates.", static_cast<unsigned int> (ulErrorCode) );
 				break;
 			}
 
 	default:
 
 #ifdef _DEBUG
-		sprintf( szString, "CLIENT_ParsePacket: Illegible server message: %d\nLast command: (%s)\n", lCommand, g_pszHeaderNames[g_lLastCmd] );
+		sprintf( szString, "CLIENT_ParsePacket: Illegible server message: %d\nLast command: (%s)\n", static_cast<int> (lCommand), g_pszHeaderNames[g_lLastCmd] );
 #else
 		sprintf( szString, "CLIENT_ParsePacket: Illegible server message: %d\nLast command: %d\n", lCommand, g_lLastCmd );
 #endif
 #ifdef _DEBUG
 void CLIENT_PrintCommand( LONG lCommand )
 {
-	char	*pszString;
+	const char	*pszString;
 
 	if ( lCommand < 0 )
 		return;
 
 //*****************************************************************************
 //
-void CLIENT_QuitNetworkGame( char *pszString )
+void CLIENT_QuitNetworkGame( const char *pszString )
 {
 	ULONG	ulIdx;
 
 
 	// Potentially print the name, position, and network ID of the thing spawning.
 	if ( cl_showspawnnames )
-		Printf( "Name: %s: (%d, %d, %d), %d\n", pszName, X >> FRACBITS, Y >> FRACBITS, Z >> FRACBITS, lNetID );
+		Printf( "Name: %s: (%d, %d, %d), %d\n", pszName, X >> FRACBITS, Y >> FRACBITS, Z >> FRACBITS, static_cast<int> (lNetID) );
 
 	// If there's already an actor with the network ID of the thing we're spawning, kill it!
 	pActor = CLIENT_FindThingByNetID( lNetID );
 
 	// Potentially print the name, position, and network ID of the thing spawning.
 	if ( cl_showspawnnames )
-		Printf( "Name: %s: (%d, %d, %d), %d\n", pszName, X >> FRACBITS, Y >> FRACBITS, Z >> FRACBITS, lNetID );
+		Printf( "Name: %s: (%d, %d, %d), %d\n", pszName, X >> FRACBITS, Y >> FRACBITS, Z >> FRACBITS, static_cast<int> (lNetID) );
 
 	// If there's already an actor with the network ID of the thing we're spawning, kill it!
 	pActor = CLIENT_FindThingByNetID( lNetID );
 		// [BB] It's necessary at all, because the server only informs a client about the cmd.ucmd.buttons
 		// value (containing the information if a player uses BT_ATTACK or BT_ALTATTACK) of the player
 		// who's eyes the client is spying through.
-		if ( ( CLIENTDEMO_IsPlaying( ) || ( ( GAMEMODE_GetFlags( GAMEMODE_GetCurrentMode( )) & GMF_COOPERATIVE ) && ulPlayer != consoleplayer ) )
+		if ( ( CLIENTDEMO_IsPlaying( ) || ( ( GAMEMODE_GetFlags( GAMEMODE_GetCurrentMode( )) & GMF_COOPERATIVE ) && static_cast<signed> (ulPlayer) != consoleplayer ) )
 				&& players[ulPlayer].ReadyWeapon )
 		{
 			if ( ulState == STATE_PLAYER_ATTACK )
 		break;
 	default:
 
-		Printf( "client_SetThingProperty: Unknown property, %d!\n", ulProperty );
+		Printf( "client_SetThingProperty: Unknown property, %d!\n", static_cast<unsigned int> (ulProperty) );
 		return;
 	}
 }
 		break;
 	default:
 
-		Printf( "client_SetThingSound: Unknown sound, %d!\n", ulSound );
+		Printf( "client_SetThingSound: Unknown sound, %d!\n", static_cast<unsigned int> (ulSound) );
 		return;
 	}
 }
 	if ( lPosition == MAXPLAYERS )
 		Printf( "Join queue full!\n" );
 	else
-		Printf( "Your position in line is: %d\n", lPosition + 1 );
+		Printf( "Your position in line is: %d\n", static_cast<int> (lPosition + 1) );
 
 	// Update the joinqueue module with our position in line.
 	JOINQUEUE_SetClientPositionInLine( lPosition );
 	if (( Type != DScroller::sc_floor ) && ( Type != DScroller::sc_ceiling ) &&
 		( Type != DScroller::sc_carry ) && ( Type != DScroller::sc_carry_ceiling ) && ( Type != DScroller::sc_side ) )
 	{
-		Printf( "client_DoScroller: Unknown type: %d!\n", (LONG)Type );
+		Printf( "client_DoScroller: Unknown type: %d!\n", static_cast<int> (Type) );
 		return;
 	}
 
 	if (( Type != DScroller::sc_floor ) && ( Type != DScroller::sc_ceiling ) &&
 		( Type != DScroller::sc_carry ) && ( Type != DScroller::sc_carry_ceiling ))
 	{
-		Printf( "client_SetScroller: Unknown type: %d!\n", (LONG)Type );
+		Printf( "client_SetScroller: Unknown type: %d!\n", static_cast<int> (Type) );
 		return;
 	}
 
 #ifdef _DEBUG
 void				CLIENT_PrintCommand( LONG lCommand );
 #endif
-void				CLIENT_QuitNetworkGame( char *pszError );
+void				CLIENT_QuitNetworkGame( const char *pszError );
 void				CLIENT_SendCmd( void );
 void				CLIENT_WaitForServer( void );
 
 			( pPlayer->ServerXYZ[1] != pPlayer->mo->y ) ||
 			( pPlayer->ServerXYZ[2] != pPlayer->mo->z ))
 		{
-			Printf( "(%d) WARNING! ServerXYZ does not match local origin after 1 tick!\n", g_ulGameTick );
+			Printf( "(%d) WARNING! ServerXYZ does not match local origin after 1 tick!\n", static_cast<unsigned int> (g_ulGameTick) );
 			Printf( "     X: %d, %d\n", pPlayer->ServerXYZ[0], pPlayer->mo->x );
 			Printf( "     Y: %d, %d\n", pPlayer->ServerXYZ[1], pPlayer->mo->y );
 			Printf( "     Z: %d, %d\n", pPlayer->ServerXYZ[2], pPlayer->mo->z );
 			( pPlayer->ServerXYZMom[1] != pPlayer->mo->momy ) ||
 			( pPlayer->ServerXYZMom[2] != pPlayer->mo->momz ))
 		{
-			Printf( "(%d) WARNING! ServerXYZMom does not match local origin after 1 tick!\n", g_ulGameTick );
+			Printf( "(%d) WARNING! ServerXYZMom does not match local origin after 1 tick!\n", static_cast<unsigned int> (g_ulGameTick) );
 			Printf( "     X: %d, %d\n", pPlayer->ServerXYZMom[0], pPlayer->mo->momx );
 			Printf( "     Y: %d, %d\n", pPlayer->ServerXYZMom[1], pPlayer->mo->momy );
 			Printf( "     Z: %d, %d\n", pPlayer->ServerXYZMom[2], pPlayer->mo->momz );
 			( SavedY == pPlayer->mo->y ) &&
 			( SavedZ == pPlayer->mo->z ))
 		{
-			Printf( "SUCCESSFULLY predicted %d ticks!\n", ulPredictionTicks );
+			Printf( "SUCCESSFULLY predicted %d ticks!\n", static_cast<unsigned int> (ulPredictionTicks) );
 		}
 		else
 		{
-			Printf( "FAILED to predict %d ticks.\n", ulPredictionTicks );
+			Printf( "FAILED to predict %d ticks.\n", static_cast<unsigned int> (ulPredictionTicks) );
 		}
 	}
 #endif

src/cl_statistics.cpp

 	FString	Out;
 
 	Out.Format( "In: %5d/%5d/%5d        Out: %5d/%5d/%5d", 
-		g_lBytesReceivedThisTick,
-		g_lBytesReceivedLastSecond,
-		g_lMaxBytesReceivedPerSecond,
-		g_lBytesSentThisTick,
-		g_lBytesSentLastSecond,
-		g_lMaxBytesSentPerSecond );
+		static_cast<int> (g_lBytesReceivedThisTick),
+		static_cast<int> (g_lBytesReceivedLastSecond),
+		static_cast<int> (g_lMaxBytesReceivedPerSecond),
+		static_cast<int> (g_lBytesSentThisTick),
+		static_cast<int> (g_lBytesSentLastSecond),
+		static_cast<int> (g_lMaxBytesSentPerSecond) );
 
 	return ( Out );
 }
 				0.15f,
 				0.35f );
 
-			StatusBar->AttachMessage( pMsg, 'CLAG' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('C','L','A','G') );
 		}
 		// Draw a "CONNECTION INTERRUPTED" message if the client is lagging.
 		else if ( CLIENT_GetClientLagging( ) == true )
 				0.15f,
 				0.35f );
 
-			StatusBar->AttachMessage( pMsg, 'CLAG' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('C','L','A','G') );
 		}
 	}
 
 	{
 		char	filename[20];
 		if ( NETWORK_GetState( ) == NETSTATE_SERVER )
-			sprintf (filename,"debugserver.txt",consoleplayer);
+			sprintf (filename,"debugserver.txt");
 		else
 			sprintf (filename,"debug%i.txt",consoleplayer);
 		Printf ("debug output to: %s\n",filename);
 		}
 	}
 }
-*/
+*/

src/d_netinfo.cpp

 					 info->gender == GENDER_FEMALE ? "female" :
 						info->gender == GENDER_NEUTER ? "other" : "male",
 					 info->switchonpickup,
-					 info->lRailgunTrailColor,
-					 info->lHandicap,
+					 static_cast<int> (info->lRailgunTrailColor),
+					 static_cast<int> (info->lHandicap),
 					 (float)(info->MoveBob) / 65536.f,
 					 (float)(info->StillBob) / 65536.f,
 					 info->PlayerClass == -1 ? "Random" :
 				info->gender == GENDER_FEMALE ? "female" :
 					info->gender == GENDER_NEUTER ? "other" : "male",
 				info->switchonpickup,
-				info->lRailgunTrailColor,
-				info->lHandicap,
+				static_cast<int> (info->lRailgunTrailColor),
+				static_cast<int> (info->lHandicap),
 				(float)(info->MoveBob) / 65536.f,
 				(float)(info->StillBob) / 65536.f,
 				info->PlayerClass == -1 ? "Random" :
 		int i = atoi (argv[1]);
 		userinfo_t *ui = &players[i].userinfo;
 		Printf ("Name:        %s\n",		ui->netname);
-		Printf ("Team:        %s (%d)\n",	players[i].bOnTeam ? TEAM_GetName( players[i].ulTeam ) : "NONE", players[i].ulTeam );
+		Printf ("Team:        %s (%d)\n",	players[i].bOnTeam ? TEAM_GetName( players[i].ulTeam ) : "NONE", static_cast<unsigned int> (players[i].ulTeam) );
 		Printf ("Aimdist:     %d\n",		ui->aimdist);
 		Printf ("Color:       %06x\n",		ui->color);
 		Printf ("Skin:        %s (%d)\n",	skins[ui->skin].name, ui->skin);
 				ANNOUNCER_PlayEntry( cl_announcer, "One" );
 		}
 		break;
+	default: //Satisfy GCC
+		break;
 	}
 }
 
 			2.0f,
 			1.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// Display a little thing in the server window so servers can know when matches begin.
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 
 					3.0f,
 					2.0f );
 
-				StatusBar->AttachMessage( pMsg, 'CNTR' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 				screen->SetFont( SmallFont );
 			}
 			else
 			{
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 160.4f, 75.0f, 320, 200, CR_RED, 3.0f, 2.0f, "BigFont", false, 'CNTR' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 160.4f, 75.0f, 320, 200, CR_RED, 3.0f, 2.0f, "BigFont", false, MAKE_ID('C','N','T','R') );
 			}
 		}
 
 		// Zero out the countdown ticker.
 		DUEL_SetCountdownTicks( 0 );
 		break;
+	default: //Satisfy GCC
+		break;
 	}
 }
 

src/g_doom/a_doomflags.cpp

 					CR_WHITE,
 					3.0f,
 					0.25f );
-				StatusBar->AttachMessage( pMsg, 'CNTR' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 				screen->SetFont( SmallFont );
 			}
 			// If necessary, send it to clients.
 			else
 			{
 				SERVERCOMMANDS_SetPlayerPoints( ULONG( Owner->player - players ));
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, 'CNTR' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R') );
 			}
 
 			// [BC] Rivecoder's "scored by" message.
 					CR_BLUE,
 					3.0f,
 					0.5f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 			// If necessary, send it to clients.
 			else
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.5f, "SmallFont", false, 'SUBS' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.5f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 
 			// Take the flag away.
 			pInventory = Owner->FindInventory( this->GetClass( ));
 			CR_WHITE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// If necessary, send it to clients.
 	{
 		sprintf( szString, "\\cCYou have the flag!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
 
 		sprintf( szString, "\\cCWhite flag taken!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_WHITE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 	}
 
 	// [BC] Rivecoder's "held by" messages.
 				CR_BLUE,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 	}
 	// If necessary, send it to clients.
 	else
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
 }
 
 //===========================================================================
 			CR_WHITE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }
 			{
 				screen->SetFont( SmallFont );
 				pMsg = new DHUDMessageFadeOut( "", 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 			// If necessary, send it to clients.
 			else
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( "", 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, 'SUBS' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( "", 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 
 			// Create the "captured" message.
 			sprintf( szString, "\\cGRed team scores!" );
 					CR_RED,
 					3.0f,
 					0.5f );
-				StatusBar->AttachMessage( pMsg, 'CNTR' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 				screen->SetFont( SmallFont );
 			}
 			// If necessary, send it to clients.
 			else
 			{
 				SERVERCOMMANDS_SetPlayerPoints( ULONG( Owner->player - players ));
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.5f, "BigFont", false, 'CNTR' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.5f, "BigFont", false, MAKE_ID('C','N','T','R') );
 			}
 
 			// [RC] Create the "scored by" and "assisted by" message.
 					CR_RED,
 					3.0f,
 					0.5f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 			// If necessary, send it to clients.
 			else
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, 'SUBS' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 
 			
 			// If someone just recently returned the flag, award him with an "Assist!" medal.
 			CR_BLUE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// If necessary, send it to clients.
 	{
 		sprintf( szString, "\\cHYou have the blue flag!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
 
 		sprintf( szString, "\\cHBlue flag taken!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 	}
 
 	// [RC] Create the "held by" message for blue.
 					CR_BLUE,
 					3.0f,
 					0.25f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
 }
 
 //===========================================================================
 				CR_BLUE,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 	else
 	{
 				CR_BLUE,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 }
 
 			CR_BLUE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }
 			{
 				screen->SetFont( SmallFont );
 				pMsg = new DHUDMessageFadeOut( "",1.5f,TEAM_MESSAGE_Y_AXIS_SUB,0,0,CR_RED,3.0f,0.5f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 			// If necessary, send it to clients.
 			else
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( "", 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, 'SUBS' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( "", 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.5f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 
 
 			// Create the "captured" message.
 					CR_BLUE,
 					3.0f,
 					0.5f );
-				StatusBar->AttachMessage( pMsg, 'CNTR' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 				screen->SetFont( SmallFont );
 			}
 			// If necessary, send it to clients.
 			else
 			{
 				SERVERCOMMANDS_SetPlayerPoints( ULONG( Owner->player - players ));
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.5f, "BigFont", false, 'CNTR' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.5f, "BigFont", false, MAKE_ID('C','N','T','R') );
 			}
 			
 			// [RC] Create the "scored by" and "assisted by" message.
 					CR_BLUE,
 					3.0f,
 					0.5f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 			// If necessary, send it to clients.
 			else
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.5f, "SmallFont", false, 'SUBS' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.5f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 			
 
 			// If someone just recently returned the flag, award him with an "Assist!" medal.
 			CR_RED,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// If necessary, send it to clients.
 	{
 		sprintf( szString, "\\cGYou have the red flag!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
 
 		sprintf( szString, "\\cGRed flag taken!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 	}
 
 	// [RC] Create the "held by" message for red.
 					CR_RED,
 					3.0f,
 					0.25f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 }
 
 //===========================================================================
 				CR_RED,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 	else
 	{
 				CR_RED,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 
 }
 			CR_RED,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }
 			CR_BLUE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// If necessary, send it to clients.
 	{
 		sprintf( szString, "\\cHYou have the blue skull!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
 
 		sprintf( szString, "\\cHBlue skull taken!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_BLUE, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 	}
 
 	// [RC] Create the "held by" message for blue.
 					CR_BLUE,
 					3.0f,
 					0.25f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT  );
 }
 
 //===========================================================================
 				CR_BLUE,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_BLUE, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 	else
 	{
 				CR_RED,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 
 }
 			CR_BLUE,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }
 			CR_RED,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// If necessary, send it to clients.
 	{
 		sprintf( szString, "\\cGYou have the red skull!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_ONLYTHISCLIENT );
 
 		sprintf( szString, "\\cGRed skull taken!" );
 		V_ColorizeString( szString );
-		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, 'CNTR', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+		SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS, 0, 0, CR_RED, 3.0f, 0.25f, "BigFont", false, MAKE_ID('C','N','T','R'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 	}
 
 	// [RC] Create the "held by" message for red.
 					CR_RED,
 					3.0f,
 					0.25f );
-				StatusBar->AttachMessage( pMsg, 'SUBS' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 			}
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS', ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S'), ULONG( pToucher->player - players ), SVCF_SKIPTHISCLIENT );
 }
 
 //===========================================================================
 				CR_RED,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 	else
 	{
 				CR_RED,
 				3.0f,
 				0.25f );
-			StatusBar->AttachMessage( pMsg, 'SUBS' );
+			StatusBar->AttachMessage( pMsg, MAKE_ID('S','U','B','S') );
 		}
 		// If necessary, send it to clients.
 		else
-			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, 'SUBS' );
+			SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 1.5f, TEAM_MESSAGE_Y_AXIS_SUB, 0, 0, CR_RED, 3.0f, 0.25f, "SmallFont", false, MAKE_ID('S','U','B','S') );
 	}
 }
 
 			CR_RED,
 			3.0f,
 			0.25f );
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }

src/g_doom/a_doomweaps.cpp

 			SERVERCOMMANDS_SoundActor( actor, CHAN_WEAPON, "weapons/bfg10kcool", 1, ATTN_NORM );
 	}
 }
-*/
+*/

src/g_doom/doom_sbar.cpp

 				TAG_DONE );
 		}
 
-		sprintf( szString, "%d", ( CPlayer->cheats & CF_PROSPERITY ) ? ( deh.MaxSoulsphere + 50 ) : deh.StartHealth + CPlayer->lMaxHealthBonus );
+		sprintf( szString, "%d", static_cast<int> (( CPlayer->cheats & CF_PROSPERITY ) ? ( deh.MaxSoulsphere + 50 ) : deh.StartHealth + CPlayer->lMaxHealthBonus) );
 		if ( bScale )
 		{
 			screen->DrawText( CR_RED,
 	if (deathmatch || teamgame || invasion || (cooperative && ( NETWORK_GetState( ) != NETSTATE_SINGLE )))
 	{
 		if ( possession || teampossession )
-			sprintf( szString, "%d", CPlayer->lPointCount );
+			sprintf( szString, "%d", static_cast<int> (CPlayer->lPointCount) );
 		else if ( teamlms )
-			sprintf( szString, "" ); // Frags would be distracting and confusing with the 'x left' being wins.
+			szString[0] = 0; // Frags would be distracting and confusing with the 'x left' being wins.
 		else if ( lastmanstanding )
-			sprintf( szString, "%d", CPlayer->ulWins );
+			sprintf( szString, "%d", static_cast<unsigned int> (CPlayer->ulWins) );
 		else if ( deathmatch )
 			sprintf( szString, "%d", CPlayer->fragcount );
 		else if (teamgame)
-			sprintf( szString, "%d", CPlayer->lPointCount );
+			sprintf( szString, "%d", static_cast<int> (CPlayer->lPointCount) );
 		else if ( invasion || cooperative )
 			sprintf( szString, "%d", CPlayer->killcount );
 
 		LONG left = SCOREBOARD_GetLeftToLimit( );
 		if(left > 0)
-			sprintf( szString, "%s \\cb(%d left)", szString, left );
+			sprintf( szString, "%s \\cb(%d left)", szString, static_cast<int> (left) );
 		
 		V_ColorizeString( szString );
 
 				TAG_DONE );
 		}
 
-		sprintf( szString, "%d", TEAM_GetScore( TEAM_BLUE ));
+		sprintf( szString, "%d", static_cast<int> (TEAM_GetScore( TEAM_BLUE )));
 		if ( bScale )
 		{
 			screen->DrawText( CR_RED,
 				TAG_DONE );
 		}
 
-		sprintf( szString, "%d", TEAM_GetScore( TEAM_RED ));
+		sprintf( szString, "%d", static_cast<int> (TEAM_GetScore( TEAM_RED )));
 		if ( bScale )
 		{
 			screen->DrawText( CR_RED,
 		else
 			ulCurYPos = SCREENHEIGHT - 4 - ( TexMan["MEDIA0"]->GetHeight( ) + 4 ) - ( TexMan["ARM1A0"]->GetHeight( ) + 4 ) - 14;
 
-		sprintf( szString , "\\cG%d \\cb- \\ch%d", ulRedPoints, ulBluePoints);
+		sprintf( szString , "\\cG%d \\cb- \\ch%d", static_cast<unsigned int> (ulRedPoints), static_cast<unsigned int> (ulBluePoints));
 		V_ColorizeString( szString );
 		ulCurYPos -= ((ConFont->GetHeight( ) + 1) * 5);
 
 		else
 			ulCurYPos = SCREENHEIGHT - 4 - ( TexMan["MEDIA0"]->GetHeight( ) + 4 ) *2 - ( TexMan["ARM1A0"]->GetHeight( ) + 4 ) - 14;
 		
-		sprintf( szString, "spread: \\cC%s%d", SCOREBOARD_GetSpread( ) > 0 ? "+" : "", SCOREBOARD_GetSpread( ));
+		sprintf( szString, "spread: \\cC%s%d", SCOREBOARD_GetSpread( ) > 0 ? "+" : "", static_cast<int> (SCOREBOARD_GetSpread( )));
 		V_ColorizeString( szString );
 
 		if ( bScale )
 
 		if(!duel) { // [RC] Have spread, don't need rank. I mean, come on, there's only two players.
 			ulCurYPos += ConFont->GetHeight( ) + 4;
-			sprintf( szString, "rank: \\cC%d/%s%d", SCOREBOARD_GetRank( ) + 1, SCOREBOARD_IsTied( ) ? "\\cG" : "", SCOREBOARD_GetNumPlayers( ));
+			sprintf( szString, "rank: \\cC%d/%s%d", static_cast<unsigned int> (SCOREBOARD_GetRank( ) + 1), SCOREBOARD_IsTied( ) ? "\\cG" : "", static_cast<unsigned int> (SCOREBOARD_GetNumPlayers( )));
 			V_ColorizeString( szString );
 			if ( bScale )
 			{
 				ulCurYPos = SCREENHEIGHT - 4 - ( TexMan["MEDIA0"]->GetHeight( ) + 4 ) * 4 - ( TexMan["ARM1A0"]->GetHeight( ) + 4 ) - 14;
 			
 			// Wave
-			sprintf( szString, "Wave: %d \\cbof %d", INVASION_GetCurrentWave( ), (ULONG) wavelimit);
+			sprintf( szString, "Wave: %d \\cbof %d", static_cast<unsigned int> (INVASION_GetCurrentWave( )), static_cast<unsigned int> (wavelimit));
 			V_ColorizeString( szString );
 			if ( bScale )
 			{
 
 			// Arch-viles
 			if(INVASION_GetNumArchVilesLeft( ) > 0) {
-				sprintf( szString, "Arch-viles: %d", INVASION_GetNumArchVilesLeft( ));
+				sprintf( szString, "Arch-viles: %d", static_cast<unsigned int> (INVASION_GetNumArchVilesLeft( )));
 				V_ColorizeString( szString );
 				if ( bScale )
 				{
 
 					default:
 
-						Printf( "Unknown command from master server: %d\n", lCommand );
+						Printf( "Unknown command from master server: %d\n", static_cast<int> (lCommand) );
 						break;
 					}
 				}
 				if ( duel )
 				{
 					// If the player must win all duels, and lost this one, then he's DONE!
-					if (( DUEL_GetLoser( ) == consoleplayer ) && ( CAMPAIGN_InCampaign( )) && ( CAMPAIGN_GetCampaignInfo( level.mapname )->bMustWinAllDuels ))
+					if (( DUEL_GetLoser( ) == static_cast<unsigned> (consoleplayer) ) && ( CAMPAIGN_InCampaign( )) && ( CAMPAIGN_GetCampaignInfo( level.mapname )->bMustWinAllDuels ))
 					{
 						// Tell the player he loses!
 						Printf( "You lose!\n" );
 						DUEL_SetStartNextDuelOnLevelLoad( true );
 					}
 					// If we've reached the duel limit, exit the level.
-					else if (( duellimit > 0 ) && ( DUEL_GetNumDuels( ) >= duellimit ))
+					else if (( duellimit > 0 ) && ( static_cast<signed> (DUEL_GetNumDuels( )) >= duellimit ))
 					{
 						if ( NETWORK_GetState( ) == NETSTATE_SERVER )
 							SERVER_Printf( PRINT_HIGH, "Duellimit hit.\n" );
 								if (( playeringame[ulIdx] == false ) || ( PLAYER_IsTrueSpectator( &players[ulIdx] )))
 									continue;
 
-								if ( players[ulIdx].ulWins >= winlimit )
+								if ( static_cast<signed> (players[ulIdx].ulWins) >= winlimit )
 								{
 									bLimitHit = true;
 									break;
 				AActor						*pActor;
 				TThinkerIterator<AActor>	Iterator;
 				
-				while ( pActor = Iterator.Next( ))
+				while ( (pActor = Iterator.Next( )))
 				{
 					if ( pActor->target == pOldBody )
 						pActor->target = players[playernum].mo;
 				AActor						*pActor;
 				TThinkerIterator<AActor>	Iterator;
 				
-				while ( pActor = Iterator.Next( ))
+				while ( (pActor = Iterator.Next( )))
 				{
 					if ( pActor->target == pOldBody )
 						pActor->target = players[playernum].mo;
 			AActor						*pActor;
 			TThinkerIterator<AActor>	Iterator;
 			
-			while ( pActor = Iterator.Next( ))
+			while ( (pActor = Iterator.Next( )))
 			{
 				if ( pActor->target == pOldBody )
 					pActor->target = players[playernum].mo;
 
 			ulNumFlags = 0;
 			ulNumSkulls = 0;
-			while ( pActor = iterator.Next( ))
+			while ( (pActor = iterator.Next( )))
 			{
 				if ( pActor->IsKindOf( PClass::FindClass( "BlueSkull" )))
 					ulNumSkulls++;
 	// In a campaign, just use whatever dmflags are assigned.
 	if ( CAMPAIGN_InCampaign( ) == false )
 	{
-		if ( dmflags != ulFlags )
+		if ( static_cast<unsigned> (dmflags) != ulFlags )
 			dmflags = ulFlags;
-		if ( dmflags2 != ulFlags2 )
+		if ( static_cast<unsigned> (dmflags2) != ulFlags2 )
 			dmflags2 = ulFlags2;
 	}
 
 		{
 			TEAM_SetSimpleCTFMode( true );
 
-			while ( pActor = iterator.Next( ))
+			while ( (pActor = iterator.Next( )))
 			{
 				if ( pActor->IsKindOf( PClass::FindClass( "BlueFlag" )))
 				{
 		{
 			TEAM_SetSimpleSTMode( true );
 
-			while ( pActor = iterator.Next( ))
+			while ( (pActor = iterator.Next( )))
 			{
 				if ( pActor->IsKindOf( PClass::FindClass( "BlueSkull" )))
 				{
 	}
 
 	// [BB] Reset the polyobjs.
-	for ( ulIdx = 0; ulIdx <= po_NumPolyobjs; ulIdx++ )
+	for ( ulIdx = 0; ulIdx <= static_cast<unsigned> (po_NumPolyobjs); ulIdx++ )
 	{
 		FPolyObj *pPoly = GetPolyobjByIndex( ulIdx );
 		if ( pPoly == NULL )
 				SERVERCOMMANDS_SetSectorScale( ulIdx );
 		}
 
-		if (( sectors[ulIdx].SavedFloorAngle != sectors[ulIdx].GetAngle(sector_t::floor) ) ||
-			( sectors[ulIdx].SavedCeilingAngle != sectors[ulIdx].GetAngle(sector_t::ceiling) ))
+		if (( sectors[ulIdx].SavedFloorAngle != static_cast<signed> (sectors[ulIdx].GetAngle(sector_t::floor)) ) ||
+			( sectors[ulIdx].SavedCeilingAngle != static_cast<signed> (sectors[ulIdx].GetAngle(sector_t::ceiling)) ))
 		{
 			sectors[ulIdx].SetAngle(sector_t::floor, sectors[ulIdx].SavedFloorAngle);
 			sectors[ulIdx].SetAngle(sector_t::ceiling, sectors[ulIdx].SavedCeilingAngle);

src/g_shared/a_pickups.cpp

 
 bool AInventory::ShouldRespawn ()
 {
-	// [BB] Force respawning �f items with the IF_FORCERESPAWNINSURVIVAL flag in survival.
+	// [BB] Force respawning �f items with the IF_FORCERESPAWNINSURVIVAL flag in survival.
 	if ( survival && (ItemFlags & IF_FORCERESPAWNINSURVIVAL) ) return true;
 
 	if ((ItemFlags & IF_BIGPOWERUP) && !(dmflags & DF_RESPAWN_SUPER)) return false;

src/g_shared/shared_sbar.cpp

 			2.f,
 			0.35f );
 
-		AttachMessage( pMsg, 'PNAM' );
+		AttachMessage( pMsg, MAKE_ID('P','N','A','M') );
 	}
 }
 

src/g_strife/a_strifeitems.cpp

 				continue;
 
 			// [CW] Send this message to the activator.
-			if ( ulIdx == dropper->target->player - players )
+			if ( ulIdx == static_cast<unsigned> (dropper->target->player - players) )
 			{
 				SERVER_PrintfPlayer( PRINT_HIGH, ulIdx, "You Fool!  You've set off the alarm.\n" );
 				continue;
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 }
 			}
 		}
 		if (minat1<0)
-			I_FatalError("minatl: %f",minat1);
+			I_FatalError("minatl: %d",minat1);
 		if (minat2<0)
-			I_FatalError("minat2: %f",minat2);
+			I_FatalError("minat2: %d",minat2);
 		
 		tmp= (huffnode_s *)M_Malloc(sizeof(huffnode_t));
 		
 			// Pause for five seconds for the failed sequence.
 			GAME_SetEndLevelDelay( 5 * TICRATE );
 		}
+	default:
+		break;	
 	}
 }
 
 			2.0f,
 			1.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// Display a little thing in the server window so servers can know when waves begin.
 		screen->SetFont( BigFont );
 
 		if ( (LONG)g_ulCurrentWave == wavelimit )
-			sprintf( szString, "VICTORY!", g_ulCurrentWave );
+			sprintf( szString, "VICTORY!" );
 		else
-			sprintf( szString, "WAVE %d COMPLETE!", g_ulCurrentWave );
+			sprintf( szString, "WAVE %d COMPLETE!", static_cast<unsigned int> (g_ulCurrentWave) );
 		V_ColorizeString( szString );
 
 		// Display "VICTORY!"/"WAVE %d COMPLETE!" HUD message.
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 
 	case IS_MISSIONFAILED:
 		GAMEMODE_DisplayStandardMessage ( "MISSION FAILED!" );
 		break;
+	default:
+		break;
 	}
 
 	// Tell clients about the state change.

src/joinqueue.cpp

 	return;
 
 	// Nothing to do if there's nobody waiting in the queue.
-	if ( g_lJoinQueue[0].ulPlayer == -1 )
+	if ( static_cast<signed> (g_lJoinQueue[0].ulPlayer) == -1 )
 		return;
 
 	// Try to find the next person in line.
 	while ( 1 )
 	{
 		// Found end of list.
-		if (( g_lJoinQueue[ulIdx].ulPlayer == -1 ) || ( ulIdx == MAXPLAYERS ))
+		if (( static_cast<signed> (g_lJoinQueue[ulIdx].ulPlayer) == -1 ) || ( ulIdx == MAXPLAYERS ))
 			break;
 
 		// Found a player waiting in line. They will now join the game!
 	for ( ulIdx = 0; ulIdx < MAXPLAYERS; ulIdx++ )
 	{
 		// Hit the end of the list.
-		if ( g_lJoinQueue[ulIdx].ulPlayer == -1 )
+		if ( static_cast<signed> (g_lJoinQueue[ulIdx].ulPlayer) == -1 )
 			continue;
 
 		// This player was in line. Bump everyone in line after him up one position.
 	ULONG	ulIdx2;
 
 	// Nothing to do if there's nobody waiting in the queue.
-	if ( g_lJoinQueue[0].ulPlayer == -1 )
+	if ( static_cast<signed> (g_lJoinQueue[0].ulPlayer) == -1 )
 		return;
 
 	// Don't allow joining during LMS or team LMS games.
 	{
 		// Found end of list.
 		if (( ulIdx == MAXPLAYERS ) ||
-			( g_lJoinQueue[ulIdx].ulPlayer == -1 ) ||
+			( static_cast<signed> (g_lJoinQueue[ulIdx].ulPlayer) == -1 ) ||
 			( lNumSlots == 0 ))
 		{
 			break;
 			return ( ulIdx );
 
 		// Found an empty slot.
-		if ( g_lJoinQueue[ulIdx].ulPlayer == -1 )
+		if ( static_cast<signed> (g_lJoinQueue[ulIdx].ulPlayer) == -1 )
 		{
 			g_lJoinQueue[ulIdx].ulPlayer	= JoinSlot.ulPlayer;
 			g_lJoinQueue[ulIdx].ulTeam		= JoinSlot.ulTeam;

src/lastmanstanding.cpp

 			}
 		}
 		break;
+	default:
+		break;
 	}
 }
 
 			2.0f,
 			1.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 	}
 	// Display a little thing in the server window so servers can know when matches begin.
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'CNTR' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 		screen->SetFont( SmallFont );
 
 		szString[0] = 0;
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'FRAG' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('F','R','A','G') );
 
 		pMsg = new DHUDMessageFadeOut( szString,
 			0.0f,
 			3.0f,
 			2.0f );
 
-		StatusBar->AttachMessage( pMsg, 'PLAC' );
+		StatusBar->AttachMessage( pMsg, MAKE_ID('P','L','A','C') );
 	}
 
 	// Award a victory or perfect medal to the winner.
 					3.0f,
 					2.0f );
 
-				StatusBar->AttachMessage( pMsg, 'CNTR' );
+				StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
 				screen->SetFont( SmallFont );
 			}
 			else
 			{
-				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 160.4f, 75.0f, 320, 200, CR_RED, 3.0f, 2.0f, "BigFont", false, 'CNTR' );
+				SERVERCOMMANDS_PrintHUDMessageFadeOut( szString, 160.4f, 75.0f, 320, 200, CR_RED, 3.0f, 2.0f, "BigFont", false, MAKE_ID('C','N','T','R') );
 			}
 		}
 
 			JOINQUEUE_PopQueue( -1 );
 		}
 		break;
+	default:
+		break;
 	}
 
 	// Since some players might have respawned, update the server console window.

src/m_options.cpp

 
 static menuitem_t CallVoteItems[] =
 {
-	{ discrete,	"Command",				&menu_votecommand,		{8.0}, {0.0},	{0.0}, VoteCommandVals },
-	{ string,	"Parameter(s)",			&menu_voteparameters,	{0.0}, {0.0},	{0.0}, NULL },
+	{ discrete,	"Command",				{&menu_votecommand},	{8.0}, {0.0},	{0.0}, {VoteCommandVals} },
+	{ string,	"Parameter(s)",			{&menu_voteparameters},	{0.0}, {0.0},	{0.0}, {NULL} },
 	{ redtext,	" ",					{NULL},					{0.0}, {0.0},	{0.0}, {NULL} },
 	{ more,		"Send vote",			{NULL},					{0.0}, {0.0},	{0.0}, {(value_t *)M_SendVote} },
 };
 	{ redtext,	" ",					{NULL},					{0.0}, {0.0},	{0.0}, {NULL} },
 	{ more,		"Spectate",				{NULL},					{0.0}, {0.0},	{0.0}, {(value_t *)M_Spectate} },
 	{ more,		"Call a vote",			{NULL},					{0.0}, {0.0},	{0.0}, {(value_t *)M_CallVote} },
-	{ more,		"Switch teams",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_ChangeTeam} },
+	{ more,		"Switch teams",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_ChangeTeam} },
 	{ redtext,	" ",					{NULL},					{0.0}, {0.0},	{0.0}, {NULL} },
 	{ discrete, "Allow skins",			{&cl_skins},			{3.0}, {0.0},	{0.0}, {AllowSkinVals} },
 	{ discrete, "Allow taunts",			{&cl_taunts},			{2.0}, {0.0},	{0.0}, {OnOff} },
 //	{ discrete, "Allow medals",			{&cl_medals},			{2.0}, {0.0},	{0.0}, {OnOff} },
 //	{ discrete, "Allow icons",			{&cl_icons},			{2.0}, {0.0},	{0.0}, {OnOff} },
-	{ discrete,	"Identify players",		&cl_identifytarget,		2.0, 0.0, 0.0, OnOff },
-	{ discrete,	"Start as spectator",	&cl_startasspectator,	{2.0}, {0.0},	{0.0}, {YesNo} },
+	{ discrete,	"Identify players",		{&cl_identifytarget},	{2.0}, {0.0}, {0.0}, {OnOff} },
+	{ discrete,	"Start as spectator",	{&cl_startasspectator},	{2.0}, {0.0},	{0.0}, {YesNo} },
 	{ redtext,	" ",					{NULL},					{0.0}, {0.0},	{0.0}, {NULL} },
-	{ string,	"Server password",		&cl_password,				{0.0}, {0.0},	{0.0}, {NULL} },
-	{ string,	"Join password",		&cl_joinpassword,		{0.0}, {0.0},	{0.0}, {NULL} },
-	{ discrete, "Reset frags at join",	&cl_dontrestorefrags,	2.0, 0.0, 0.0, YesNo },
+	{ string,	"Server password",		{&cl_password},				{0.0}, {0.0},	{0.0}, {NULL} },
+	{ string,	"Join password",		{&cl_joinpassword},		{0.0}, {0.0},	{0.0}, {NULL} },
+	{ discrete, "Reset frags at join",	{&cl_dontrestorefrags},	{2.0}, {0.0},	{0.0}, {YesNo} },
 };
 
 menu_t MultiplayerMenu = {
 	char	szString[256];
 
 	lNumServers = M_CalcLastSortedIndex( );
-	sprintf( szString, "Currently showing %d servers", lNumServers );
+	sprintf( szString, "Currently showing %d servers", static_cast<int> (lNumServers) );
 	screen->DrawText( CR_WHITE, 160 - ( SmallFont->StringWidth( szString ) / 2 ), 190, szString, DTA_Clean, true, TAG_DONE );
 }
 
 
 		// If the server uses a PWAD, make sure we have it loaded. If not, ask the user
 		// if he'd like to join the server anyway.
-		for ( ulIdx = 0; ulIdx < BROWSER_GetNumPWADs( g_lSelectedServer ); ulIdx++ )
+		for ( ulIdx = 0; ulIdx < static_cast<unsigned> (BROWSER_GetNumPWADs( g_lSelectedServer )); ulIdx++ )
 		{
 			strcat( szWadList, BROWSER_GetPWADName( g_lSelectedServer, ulIdx ));
 
-			if ( ulIdx + 1 < BROWSER_GetNumPWADs( g_lSelectedServer ))
+			if ( ulIdx + 1 < static_cast<unsigned> (BROWSER_GetNumPWADs( g_lSelectedServer )))
 			{
 				char	szSpace[1];
 
 
 	ulCurYPos += ulTextHeight;
 
-	sprintf( szString, "PWADs: \\cc%d", BROWSER_GetNumPWADs( g_lSelectedServer ));
+	sprintf( szString, "PWADs: \\cc%d", static_cast<int> (BROWSER_GetNumPWADs( g_lSelectedServer )));
 	V_ColorizeString( szString );
 	screen->DrawText( CR_UNTRANSLATED, 16, ulCurYPos, szString, DTA_Clean, true, TAG_DONE );
 
 	ulCurYPos += ulTextHeight;
 
-	for ( ulIdx = 0; ulIdx < MIN( (int)BROWSER_GetNumPWADs( g_lSelectedServer ), 4 ); ulIdx++ )
+	for ( ulIdx = 0; ulIdx < static_cast<unsigned> (MIN( (int)BROWSER_GetNumPWADs( g_lSelectedServer ), 4 )); ulIdx++ )
 	{
 		sprintf( szString, "\\cc%s", BROWSER_GetPWADName( g_lSelectedServer, ulIdx ));
 		V_ColorizeString( szString );
 
 	ulCurYPos += ulTextHeight;
 
-	sprintf( szString, "Players: \\cc%d/%d", BROWSER_GetNumPlayers( g_lSelectedServer ), BROWSER_GetMaxClients( g_lSelectedServer ));
+	sprintf( szString, "Players: \\cc%d/%d", static_cast<int> (BROWSER_GetNumPlayers( g_lSelectedServer )), static_cast<int> (BROWSER_GetMaxClients( g_lSelectedServer )));
 	V_ColorizeString( szString );
 	screen->DrawText( CR_UNTRANSLATED, 16, ulCurYPos, szString, DTA_Clean, true, TAG_DONE );
 
 
 		ulCurYPos += ( ulTextHeight * 2 );
 
-		for ( ulIdx = 0; ulIdx < MIN( (int)BROWSER_GetNumPlayers( g_lSelectedServer ), 4 ); ulIdx++ )
+		for ( ulIdx = 0; static_cast<signed> (ulIdx) < MIN( (int)BROWSER_GetNumPlayers( g_lSelectedServer ), 4 ); ulIdx++ )
 		{
 			sprintf( szString, "%s", BROWSER_GetPlayerName( g_lSelectedServer, ulIdx ));
 			V_ColorizeString( szString );
 			screen->DrawText( CR_GRAY, 32, ulCurYPos, szString, DTA_Clean, true, TAG_DONE );
 
-			sprintf( szString, "%d", BROWSER_GetPlayerFragcount( g_lSelectedServer, ulIdx ));
+			sprintf( szString, "%d", static_cast<int> (BROWSER_GetPlayerFragcount( g_lSelectedServer, ulIdx )));
 			V_ColorizeString( szString );
 			screen->DrawText( CR_GRAY, 192, ulCurYPos, szString, DTA_Clean, true, TAG_DONE );
 
-			sprintf( szString, "%d", BROWSER_GetPlayerPing( g_lSelectedServer, ulIdx ));
+			sprintf( szString, "%d", static_cast<int> (BROWSER_GetPlayerPing( g_lSelectedServer, ulIdx )));
 			V_ColorizeString( szString );
 			screen->DrawText( CR_GRAY, 256, ulCurYPos, szString, DTA_Clean, true, TAG_DONE );
 
 {
 	// Clear the menus, and send the changeteam command.
 	M_ClearMenus( );
-	AddCommandString( "changeteam" );
+	static char changeteam[] = "changeteam";
+	AddCommandString( changeteam );
 }
 
 
 }
 
 static menuitem_t WeaponSetupItems[] = {
-	{ discrete,	"Switch on pickup",			&switchonpickup,		3.0, 0.0, 0.0, SwitchOnPickupVals  },
-	{ discrete,	"Allow switch with no ammo",&cl_noammoswitch,		2.0, 0.0, 0.0, YesNo  },
-	{ discrete,	"Cycle with original order",&cl_useoriginalweaponorder,2.0, 0.0, 0.0, YesNo  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
+	{ discrete,	"Switch on pickup",			{&switchonpickup},		{3.0}, {0.0}, {0.0}, {SwitchOnPickupVals}  },
+	{ discrete,	"Allow switch with no ammo",{&cl_noammoswitch},		{2.0}, {0.0}, {0.0}, {YesNo}  },
+	{ discrete,	"Cycle with original order",{&cl_useoriginalweaponorder},{2.0}, {0.0}, {0.0}, {YesNo}  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
 //	{ redtext,	"WEAPON PREFERENCES",		NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ weaponslot,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ weaponslot,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
 };
 
 menu_t WeaponSetupMenu = {
 
 	// Populate the weapon setup menu with the current weapon preferences.
 	ulSlotStart = 1;
-	for ( ulIdx = 0; ulIdx < CurrentMenu->numitems; ulIdx++ )
+	for ( ulIdx = 0; ulIdx < static_cast<unsigned> (CurrentMenu->numitems); ulIdx++ )
 	{
 		pItem = CurrentMenu->items + ulIdx;
 		if ( pItem->type == weaponslot )
 			pszString = NULL;//GetWeaponPrefNameByRank( ulSlotStart );
 			if ( pszString )
 			{
-				sprintf( g_szWeaponPrefStringBuffer[ulIdx], "Slot %d: \\cc%s", ulSlotStart, pszString );
+				sprintf( g_szWeaponPrefStringBuffer[ulIdx], "Slot %d: \\cc%s", static_cast<unsigned int> (ulSlotStart), pszString );
 				V_ColorizeString( g_szWeaponPrefStringBuffer[ulIdx] );
 				pItem->label = g_szWeaponPrefStringBuffer[ulIdx];
 			}
 			else
 			{
-				sprintf( g_szWeaponPrefStringBuffer[ulIdx], "" );
+				g_szWeaponPrefStringBuffer[ulIdx][0] = 0;
 				V_ColorizeString( g_szWeaponPrefStringBuffer[ulIdx] );
 				pItem->label = g_szWeaponPrefStringBuffer[ulIdx];
 			}
 CVAR( Int, menu_modifier, 0, CVAR_ARCHIVE );
 
 static menuitem_t SkirmishItems[] = {
-	{ levelslot,"Level",					&menu_level,			0.0, 0.0, 0.0, NULL  },
-	{ discrete,	"Game mode",				&menu_gamemode,			15.0, 0.0, 0.0, GameModeVals },
-	{ discrete, "Modifier",					&menu_modifier,			3.0, 0.0, 0.0, ModifierVals },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ number,	"Timelimit",				&menu_timelimit,		0.0, 100.0, 1.0, NULL  },
-	{ number,	"Fraglimit",				&menu_fraglimit,		0.0, 100.0, 5.0, NULL  },
-	{ number,	"Pointlimit",				&menu_pointlimit,		0.0, 100.0, 1.0, NULL  },
-	{ number,	"Duellimit",				&menu_duellimit,		0.0, 100.0, 1.0, NULL  },
-	{ number,	"Winlimit",					&menu_winlimit,			0.0, 100.0, 1.0, NULL  },
-	{ number,	"Wavelimit",				&menu_wavelimit,		0.0, 10.0, 1.0, NULL  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ discrete,	"Skill",					&menu_skill,			5.0, 0.0, 0.0, GameskillVals },
-	{ discrete,	"Botskill",					&menu_botskill,			5.0, 0.0, 0.0, BotskillVals },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ more,		"Bot setup",				NULL,					0.0, 0.0, 0.0, (value_t *)M_BotSetup },
-	{ more,		"Gameplay options",			NULL,					0.0, 0.0, 0.0, {(value_t *)SkirmishGameplayOptions} },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ more,		"Start game!",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_StartSkirmishGame} },
+	{ levelslot,"Level",					{&menu_level},			{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ discrete,	"Game mode",				{&menu_gamemode},		{15.0}, {0.0}, {0.0}, {GameModeVals} },
+	{ discrete, "Modifier",					{&menu_modifier},		{3.0}, {0.0}, {0.0}, {ModifierVals} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ number,	"Timelimit",				{&menu_timelimit},		{0.0}, {100.0}, {1.0}, {NULL}  },
+	{ number,	"Fraglimit",				{&menu_fraglimit},		{0.0}, {100.0}, {5.0}, {NULL}  },
+	{ number,	"Pointlimit",				{&menu_pointlimit},		{0.0}, {100.0}, {1.0}, {NULL}  },
+	{ number,	"Duellimit",				{&menu_duellimit},		{0.0}, {100.0}, {1.0}, {NULL}  },
+	{ number,	"Winlimit",					{&menu_winlimit},		{0.0}, {100.0}, {1.0}, {NULL}  },
+	{ number,	"Wavelimit",				{&menu_wavelimit},		{0.0}, {10.0}, {1.0}, {NULL}  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ discrete,	"Skill",					{&menu_skill},			{5.0}, {0.0}, {0.0}, {GameskillVals} },
+	{ discrete,	"Botskill",					{&menu_botskill},		{5.0}, {0.0}, {0.0}, {BotskillVals} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ more,		"Bot setup",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_BotSetup} },
+	{ more,		"Gameplay options",			{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)SkirmishGameplayOptions} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ more,		"Start game!",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_StartSkirmishGame} },
 };
 
 menu_t SkirmishMenu = {
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_teambotspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_teambotspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_botspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_botspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_teambotspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_teambotspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
 				V_ColorizeString( szBuffer );
 				V_RemoveColorCodes( szBuffer );
 				if ( ulIdx < 5 )
-					BOTSPAWN_AddToTable( szBuffer, "red" );
+				{
+					static char red[] = "red";
+					BOTSPAWN_AddToTable( szBuffer, red );
+				}
 				else
-					BOTSPAWN_AddToTable( szBuffer, "blue" );
+				{
+					static char blue[] = "blue";
+					BOTSPAWN_AddToTable( szBuffer, blue );
+				}
 			}
 		}
 
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_botspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_botspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
  *=======================================*/
 
 static menuitem_t BotSetupItems[] = {
-	{ discrete,	"Botskill",					&menu_botskill,			5.0, 0.0, 1.0, BotskillVals },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ botslot,	"Slot 1:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 2:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 3:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 4:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 5:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 6:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 7:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 8:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 9:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 10:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 11:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 12:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 13:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 14:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 15:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 16:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ more,		"Clear list",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_ClearBotSlotList} },
-	{ more,		"Start game!",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_StartSkirmishGame} },
+	{ discrete,	"Botskill",					{&menu_botskill},		{5.0}, {0.0}, {1.0}, {BotskillVals} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ botslot,	"Slot 1:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 2:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 3:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 4:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 5:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 6:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 7:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 8:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 9:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 10:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 11:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 12:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 13:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 14:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 15:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 16:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ more,		"Clear list",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_ClearBotSlotList} },
+	{ more,		"Start game!",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_StartSkirmishGame} },
 };
 
 menu_t BotSetupMenu = {
  *=======================================*/
 
 static menuitem_t TeamBotSetupItems[] = {
-	{ discrete,	"Botskill",					&menu_botskill,			5.0, 0.0, 1.0, BotskillVals },
-	{ discrete,	"Player team",				&menu_team,				2.0, 0.0, 1.0, TeamVals },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	"Red Team",					NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ botslot,	"Slot 1:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 2:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 3:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 4:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 5:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	"Blue Team",				NULL,					0.0, 0.0, 0.0, NULL  },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ botslot,	"Slot 1:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 2:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 3:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 4:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ botslot,	"Slot 5:",					NULL,					0.0, 0.0, 0.0, NULL },
-	{ redtext,	" ",						NULL,					0.0, 0.0, 0.0, NULL  },
-	{ more,		"Clear list",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_ClearBotSlotList} },
-	{ more,		"Start game!",				NULL,					0.0, 0.0, 0.0, {(value_t *)M_StartSkirmishGame} },
+	{ discrete,	"Botskill",					{&menu_botskill},		{5.0}, {0.0}, {1.0}, {BotskillVals} },
+	{ discrete,	"Player team",				{&menu_team},			{2.0}, {0.0}, {1.0}, {TeamVals} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ redtext,	"Red Team",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ botslot,	"Slot 1:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 2:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 3:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 4:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 5:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ redtext,	"Blue Team",				{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ botslot,	"Slot 1:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 2:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 3:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 4:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ botslot,	"Slot 5:",					{NULL},					{0.0}, {0.0}, {0.0}, {NULL} },
+	{ redtext,	" ",						{NULL},					{0.0}, {0.0}, {0.0}, {NULL}  },
+	{ more,		"Clear list",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_ClearBotSlotList} },
+	{ more,		"Start game!",				{NULL},					{0.0}, {0.0}, {0.0}, {(value_t *)M_StartSkirmishGame} },
 };
 
 menu_t TeamBotSetupMenu = {
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_teambotspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_teambotspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
 	{
 		for ( ulIdx = 0; ulIdx < 16; ulIdx++ )
 		{
-			sprintf( szCVarName, "menu_botspawn%d", ulIdx );
+			sprintf( szCVarName, "menu_botspawn%d", static_cast<unsigned int> (ulIdx) );
 			pVar = FindCVar( szCVarName, NULL );
 
 			Val = pVar->GetGenericRep( CVAR_Int );
 
 static void AutoSelectTeam( void )
 {
-	AddCommandString( "team autoselect" );
+	static char autoselect[] = "team autoselect";
+	AddCommandString( autoselect );
 	M_ClearMenus( );
 }
 
 static void ShowHelp( void )
 {
 	M_ClearMenus( );
-	AddCommandString( "menu_help" );
+	static char menu_help[] = "menu_help";
+	AddCommandString( menu_help );
 }
 
 static void JoinRed( void )
 
 static void JoinRandom( void )
 {
-	AddCommandString( "team random" );
+	static char team_random[] = "team random";
+	AddCommandString( team_random );
 	M_ClearMenus( );
 }
 
 	if( PlayerClasses.Size() > 1 && gameinfo.gametype != GAME_Hexen )
 	{
 		M_ClearMenus( );
-		AddCommandString( "menu_class" );
+		static char menu_class[] = "menu_class";
+		AddCommandString( menu_class );
 	}
 	else
 	{
-		AddCommandString( "join" );
+		static char join[] = "join";
+		AddCommandString( join );
 		M_ClearMenus( );
 	}
 }
 void	TextScalingMenuDrawer( void );
 
 static menuitem_t TextScalingMenuItems[] = {
-	{ discrete,	"Enable text scaling",	&con_scaletext,			2.0,	0.0,	0.0,	OnOff },
-	{ txslider,	"Text size scalar",		&menu_textsizescalar,	0.0,	0.0,	1.0,	NULL },
-	{ mnnumber,	"Virtual width",		&con_virtualwidth,		0.0,	0.0,	0.0,	NULL },
-	{ mnnumber,	"Virtual height",		&con_virtualheight,		0.0,	0.0,	0.0,	NULL },
-	{ redtext,	" ",					NULL,					0.0,	0.0,	0.0,	NULL },
-	{ redtext,	" ",					NULL,					0.0,	0.0,	0.0,	NULL },
-	{ whitetext,"SAMPLE TEXT",			NULL,					0.0,	0.0,	0.0,	NULL },
+	{ discrete,	"Enable text scaling",	{&con_scaletext},		{2.0},	{0.0},	{0.0},	{OnOff} },
+	{ txslider,	"Text size scalar",		{&menu_textsizescalar},	{0.0},	{0.0},	{1.0},	{NULL} },
+	{ mnnumber,	"Virtual width",		{&con_virtualwidth},	{0.0},	{0.0},	{0.0},	{NULL} },
+	{ mnnumber,	"Virtual height",		{&con_virtualheight},	{0.0},	{0.0},	{0.0},	{NULL} },
+	{ redtext,	" ",					{NULL},					{0.0},	{0.0},	{0.0},	{NULL} },
+	{ redtext,	" ",					{NULL},					{0.0},	{0.0},	{0.0},	{NULL} },
+	{ whitetext,"SAMPLE TEXT",			{NULL},					{0.0},	{0.0},	{0.0},	{NULL} },
 };
 
 menu_t TextScalingMenu =
 				{
 					char	szString[16];
 				
-					sprintf( szString, "%d", item->a.cvar->GetGenericRep( CVAR_Int ));
+					sprintf( szString, "%d", item->a.cvar->GetGenericRep( CVAR_Int ).Int);
 					screen->DrawText( CR_GREY, x, y, szString, DTA_Clean, true, TAG_DONE );
 				}
 				break;
 
 					if ( wadlevelinfos.Size( ) > 0 )
 					{
-						if ( *item->a.intcvar >= wadlevelinfos.Size( ))
+						if ( *item->a.intcvar >= static_cast<signed> (wadlevelinfos.Size( )))
 							*item->a.intcvar = 0;
 
 						sprintf( szMapName, "%s - %s", wadlevelinfos[*item->a.intcvar].mapname, G_MaybeLookupLevelName( &wadlevelinfos[*item->a.intcvar] ));
 				{
 					char	szString[16];
 				
-					sprintf( szString, "%d", item->a.cvar->GetGenericRep( CVAR_Int ));
+					sprintf( szString, "%d", item->a.cvar->GetGenericRep( CVAR_Int ).Int);
 					screen->DrawText( CR_GREY, x, y, szString, DTA_Clean, true, TAG_DONE );
 				}
 				break;
 					lColor = CR_GRAY;
 
 				// Draw ping.
-				sprintf( szString, "%d", BROWSER_GetPing( lServer ));
+				sprintf( szString, "%d", static_cast<int> (BROWSER_GetPing( lServer )));
 				screen->DrawText( lColor, 16, y, szString, DTA_Clean, true, TAG_DONE );
 
 				// Draw name.
 				screen->DrawText( lColor, 224, y, szString, DTA_Clean, true, TAG_DONE );
 
 				// Draw players.
-				sprintf( szString, "%d/%d", BROWSER_GetNumPlayers( lServer ), BROWSER_GetMaxClients( lServer ));
+				sprintf( szString, "%d/%d", static_cast<int> (BROWSER_GetNumPlayers( lServer )), static_cast<int> (BROWSER_GetMaxClients( lServer )));
 				screen->DrawText( lColor, 272, y, szString, DTA_Clean, true, TAG_DONE );
 
 				screen->SetFont( ConFont );
 					lAnnouncerIdx = *(item->a.intcvar);
 
 					lAnnouncerIdx++;
-					if ( lAnnouncerIdx >= ANNOUNCER_GetNumProfiles( ))
+					if ( lAnnouncerIdx >= static_cast<signed> (ANNOUNCER_GetNumProfiles( )))
 						lAnnouncerIdx = -1;
 
 					*(item->a.intcvar) = lAnnouncerIdx;
 					sLevelIdx = *(item->a.intcvar);
 
 					sLevelIdx++;
-					if ( sLevelIdx >= wadlevelinfos.Size( ))
+					if ( sLevelIdx >= static_cast<signed> (wadlevelinfos.Size( )))
 						sLevelIdx = 0;
 
 					*(item->a.intcvar) = sLevelIdx;
 			ULONG	ulRankOn;
 
 			ulRankOn = 0;
-			for ( ulIdx = 0; ulIdx < CurrentMenu->numitems; ulIdx++ )
+			for ( ulIdx = 0; static_cast<signed> (ulIdx) < CurrentMenu->numitems; ulIdx++ )
 			{
 				if (( CurrentMenu->items + ulIdx )->type == weaponslot )
 					ulRankOn++;
 
-				if ( ulIdx == CurrentItem )
+				if ( static_cast<signed> (ulIdx) == CurrentItem )
 					break;
 			}
 
-			if (( ulRankOn != 0 ) && ( ulIdx != CurrentMenu->numitems ))
+			if (( ulRankOn != 0 ) && ( static_cast<signed> (ulIdx) != CurrentMenu->numitems ))
 			{
 				const char	*pszString;
 				
 			ULONG	ulRankOn;
 
 			ulRankOn = 0;
-			for ( ulIdx = 0; ulIdx < CurrentMenu->numitems; ulIdx++ )
+			for ( ulIdx = 0; static_cast<signed> (ulIdx) < CurrentMenu->numitems; ulIdx++ )
 			{
 				if (( CurrentMenu->items + ulIdx )->type == weaponslot )
 					ulRankOn++;
 
-				if ( ulIdx == CurrentItem )
+				if ( static_cast<signed> (ulIdx) == CurrentItem )
 					break;
 			}
 
-			if (( ulRankOn != 0 ) && ( ulIdx != CurrentMenu->numitems ))
+			if (( ulRankOn != 0 ) && ( static_cast<signed> (ulIdx) != CurrentMenu->numitems ))
 			{
 				const char	*pszString;
 				
 	// [BB] Moved crosshair selection to the HUD menu.
 	HUDMenuItems[CROSSHAIR_INDEX].b.numvalues = float(Crosshairs.Size());
 	HUDMenuItems[CROSSHAIR_INDEX].e.valuestrings = &Crosshairs[0];
-}
+}

src/maprotation.cpp

 				 ( g_ulCurMapInList == ulLastMap ));
 	}
 	else
-		g_ulCurMapInList = ( ++g_ulCurMapInList % MAPROTATION_GetNumEntries( ));
+	{