From b3106415bad8a65dd3f43b672a63dfa2f777a606 Mon Sep 17 00:00:00 2001 From: Rene Jochum Date: Mon, 25 Apr 2011 20:35:05 +0200 Subject: [PATCH] Replaces NETgameIsCorrectVersion with NETisCorrectVersion, removes NETgameIsCorrectVersion. --- lib/netplay/netplay.cpp | 5 ----- lib/netplay/netplay.h | 1 - src/multiint.cpp | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/netplay/netplay.cpp b/lib/netplay/netplay.cpp index 95f2e745a..5ecf1d6fe 100644 --- a/lib/netplay/netplay.cpp +++ b/lib/netplay/netplay.cpp @@ -180,11 +180,6 @@ bool NETisCorrectVersion(uint32_t game_version_major, uint32_t game_version_mino { return (NETCODE_VERSION_MAJOR == game_version_major && NETCODE_VERSION_MINOR == game_version_minor); } -bool NETgameIsCorrectVersion(GAMESTRUCT* check_game) -{ - return (NETCODE_VERSION_MAJOR == check_game->game_version_major && NETCODE_VERSION_MINOR == check_game->game_version_minor); -} - // Sets if the game is password protected or not void NETGameLocked( bool flag) { diff --git a/lib/netplay/netplay.h b/lib/netplay/netplay.h index 9ae883a97..0db13e953 100644 --- a/lib/netplay/netplay.h +++ b/lib/netplay/netplay.h @@ -350,7 +350,6 @@ extern void NETsetGamePassword(const char *password); extern void NETBroadcastPlayerInfo(uint32_t index); void NETBroadcastTwoPlayerInfo(uint32_t index1, uint32_t index2); extern bool NETisCorrectVersion(uint32_t game_version_major, uint32_t game_version_minor); -extern bool NETgameIsCorrectVersion(GAMESTRUCT* check_game); void NET_InitPlayer(int i, bool initPosition); extern void NET_InitPlayers(void); diff --git a/src/multiint.cpp b/src/multiint.cpp index fc4ee4d05..f23fce8c5 100644 --- a/src/multiint.cpp +++ b/src/multiint.cpp @@ -822,7 +822,7 @@ static void addGames(void) } } // display the correct tooltip message. - if (!NETgameIsCorrectVersion(&NetPlay.games[i])) + if (!NETisCorrectVersion(NetPlay.games[i].game_version_minor, NetPlay.games[i].game_version_major)) { sButInit.pTip = wrongVersionTip; } @@ -3615,7 +3615,7 @@ void displayRemoteGame(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGH // need some sort of closed thing here! iV_DrawImage(FrontImages,IMAGE_NOJOIN,x+18,y+11); } - else if (NETgameIsCorrectVersion(&NetPlay.games[i])) + else if (!NETisCorrectVersion(NetPlay.games[i].game_version_minor, NetPlay.games[i].game_version_major)) { if (NetPlay.games[gameNumber].desc.dwCurrentPlayers >= NetPlay.games[gameNumber].desc.dwMaxPlayers) {