Skip to content

Commit

Permalink
Move GameSpy wrappers to xrGameSpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 27, 2016
1 parent 56b8834 commit 4391c9f
Show file tree
Hide file tree
Showing 93 changed files with 1,205 additions and 3,400 deletions.
26 changes: 0 additions & 26 deletions src/xrGame/GamePersistent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,32 +219,6 @@ LPCSTR GameTypeToString(EGameIDs gt, bool bShort)
}
}

EGameIDs ParseStringToGameType(LPCSTR str)
{
if (!xr_strcmp(str, "single"))
return eGameIDSingle;
else
if (!xr_strcmp(str, "deathmatch") || !xr_strcmp(str, "dm"))
return eGameIDDeathmatch;
else
if (!xr_strcmp(str, "teamdeathmatch") || !xr_strcmp(str, "tdm"))
return eGameIDTeamDeathmatch;
else
if (!xr_strcmp(str, "artefacthunt") || !xr_strcmp(str, "ah"))
return eGameIDArtefactHunt;
else
if (!xr_strcmp(str, "capturetheartefact") || !xr_strcmp(str, "cta"))
return eGameIDCaptureTheArtefact;
else
if (!xr_strcmp(str, "dominationzone"))
return eGameIDDominationZone;
else
if (!xr_strcmp(str, "teamdominationzone"))
return eGameIDTeamDominationZone;
else
return eGameIDNoGame; //EGameIDs
}

void CGamePersistent::UpdateGameType ()
{
__super::UpdateGameType ();
Expand Down
10 changes: 6 additions & 4 deletions src/xrGame/Level_GameSpy_Funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include "Level.h"
#include "xrMessages.h"
#include "xrEngine/x_ray.h"
#include "GameSpy/GameSpy_GCD_Client.h"


#include "xrGameSpy/GameSpy_GCD_Client.h"
#include "xrEngine/IGame_Persistent.h"
#include "ui/UICDkey.h"

void CLevel::OnGameSpyChallenge (NET_Packet* P)
{
#ifndef MASTER_GOLD
Expand All @@ -19,7 +19,9 @@ void CLevel::OnGameSpyChallenge (NET_Packet* P)
//--------------------------------------------------------------------
string128 ResponseStr="";
CGameSpy_GCD_Client GCD;
GCD.CreateRespond(ResponseStr, ChallengeStr, Reauth);
string512 cdkey = "";
GetCDKey_FromRegistry(cdkey);
GCD.CreateRespond(cdkey, ResponseStr, ChallengeStr, Reauth);
//--------- Send Respond ---------------------------------------------
NET_Packet newP;

Expand Down
20 changes: 7 additions & 13 deletions src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#include <dinput.h>
#include "ui\UIBtnHint.h"
#include "UICursor.h"
#include "gamespy/GameSpy_Full.h"
#include "gamespy/GameSpy_HTTP.h"
#include "gamespy/GameSpy_Available.h"
#include "gamespy/GameSpy_Browser.h"
#include "xrGameSpy/GameSpy_Full.h"
#include "xrGameSpy/GameSpy_HTTP.h"
#include "xrGameSpy/GameSpy_Available.h"
#include "xrGameSpy/GameSpy_Browser.h"
#include "xrGameSpy/xrGameSpy.h"
#include "CdkeyDecode/cdkeydecode.h"
#include "string_table.h"
#include "xrCore/os_clipboard.h"
Expand Down Expand Up @@ -759,7 +760,7 @@ bool CMainMenu::IsCDKeyIsValid()
int GameID = 0;
for (int i=0; i<4; i++)
{
m_pGameSpyFull->GetGameSpyHTTP()->xrGS_GetGameID(&GameID, i);
GetGameID(&GameID, i);
if (VerifyClientCheck(CDKey, unsigned short (GameID)) == 1)
return true;
};
Expand Down Expand Up @@ -795,14 +796,7 @@ void CMainMenu::OnConnectToMasterServerOkClicked(CUIWindow*, void*)
LPCSTR CMainMenu::GetGSVer()
{
static string256 buff;
if(m_pGameSpyFull)
{
xr_strcpy(buff, m_pGameSpyFull->GetGameVersion());
}else
{
buff[0] = 0;
}

xr_strcpy(buff, GetGameVersion());
return buff;
}

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/account_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "stdafx.h"
#include "account_manager.h"
#include "gamespy/GameSpy_GP.h"
#include "xrGameSpy/GameSpy_GP.h"

#include "MainMenu.h" //for accesssing to login_manager, if there's deleting profile
#include "login_manager.h" //for deleting profile (verifying) and deleting profile class instance
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/account_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "Common/Noncopyable.hpp"
#include "mixed_delegate.h"
#include "GameSpy/GameSpy_FuncDefs.h"
#include "xrGameSpy/GameSpy_FuncDefs.h"

#include "queued_async_method.h"

Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/account_manager_console.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "stdafx.h"
#include "account_manager_console.h"
#include "gamespy/GameSpy_Full.h"
#include "gamespy/GameSpy_GP.h"
#include "gamespy/GameSpy_SAKE.h"
#include "xrGameSpy/GameSpy_Full.h"
#include "xrGameSpy/GameSpy_GP.h"
#include "xrGameSpy/GameSpy_SAKE.h"
#include "account_manager.h"
#include "login_manager.h"
#include "profile_store.h"
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/awards_store.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdafx.h"
#include "awards_store.h"
#include "GameSpy/GameSpy_Full.h"
#include "GameSpy/GAmeSpy_SAKE.h"
#include "xrGameSpy/GameSpy_Full.h"
#include "xrGameSpy/GAmeSpy_SAKE.h"

namespace gamespy_profile
{
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/best_scores_store.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdafx.h"
#include "best_scores_store.h"
#include "GameSpy/GameSpy_Full.h"
#include "GameSpy/GAmeSpy_SAKE.h"
#include "xrGameSpy/GameSpy_Full.h"
#include "xrGameSpy/GameSpy_SAKE.h"

namespace gamespy_profile
{
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/console_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include "character_hit_animations_params.h"
#include "inventory_upgrade_manager.h"

#include "GameSpy/GameSpy_Full.h"
#include "GameSpy/GameSpy_Patching.h"
#include "xrGameSpy/GameSpy_Full.h"
#include "xrGameSpy/GameSpy_Patching.h"

#include "ai_debug_variables.h"
#include "xrPhysics/console_vars.h"
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/console_commands_mp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "xrGameSpy/xrGameSpy_MainDefs.h"
#include "DemoPlay_Control.h"
#include "account_manager_console.h"
#include "gamespy/GameSpy_GP.h"
#include "xrGameSpy/GameSpy_GP.h"

EGameIDs ParseStringToGameType (LPCSTR str);
LPCSTR GameTypeToString (EGameIDs gt, bool bShort);
Expand Down
141 changes: 0 additions & 141 deletions src/xrGame/gamespy/GameSpy_ATLAS.h

This file was deleted.

69 changes: 0 additions & 69 deletions src/xrGame/gamespy/GameSpy_Available.cpp

This file was deleted.

Loading

0 comments on commit 4391c9f

Please sign in to comment.