Skip to content

Commit

Permalink
xrGameSpy, GameSpy: added to linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 6, 2018
1 parent 42496ef commit 4885545
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/OpenXRay/luabind-deboostified.git
[submodule "Externals/GameSpy"]
path = Externals/GameSpy
url = https://github.com/nitrocaster/GameSpy.git
url = https://github.com/OpenXRay/GameSpy.git
[submodule "Externals/AGS_SDK"]
path = Externals/AGS_SDK
url = https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK.git
Expand Down
1 change: 1 addition & 0 deletions Externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include(luajit.cmake)
add_subdirectory(luabind)
xr_install_file(luabind)
add_subdirectory(cximage)
add_subdirectory(GameSpy)
#add_subdirectory(lzo)
#add_subdirectory(NVTT)
add_subdirectory(OPCODE)
Expand Down
2 changes: 1 addition & 1 deletion Externals/GameSpy
Submodule GameSpy updated 1 files
+36 −0 CMakeLists.txt
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_subdirectory(xrCDB)
add_subdirectory(xrCore)
add_subdirectory(xrEngine)
add_subdirectory(xrGame)
add_subdirectory(xrGameSpy)
add_subdirectory(xrNetServer)
add_subdirectory(xrParticles)
add_subdirectory(xrPhysics)
Expand Down
3 changes: 1 addition & 2 deletions src/xrGame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./static_cast_checked_test.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./best_scores_store.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stats_submitter.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ai/monsters/rats/ai_rat_fsm.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.cpp")
Expand Down Expand Up @@ -117,5 +116,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "
cotire(${PROJECT_NAME})

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PROJECT_NAME} xrCore xrEngine xrMiscMath luabind xrAPI xrAICore xrUICore xrSound xrScriptEngine cximage ${LUA_LIBRARIES} pugixml xrCDB xrPhysics xrNetServer ${SDL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} xrCore xrEngine xrMiscMath luabind xrAPI xrAICore xrUICore xrSound xrScriptEngine cximage xrGameSpy ${LUA_LIBRARIES} pugixml xrCDB xrPhysics xrNetServer ${SDL_LIBRARIES})
xr_install(${PROJECT_NAME})
5 changes: 4 additions & 1 deletion src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ CMainMenu::CMainMenu()
{
g_btnHint = new CUIButtonHint();
g_statHint = new CUIButtonHint();
#ifdef WINDOWS
m_pGameSpyFull = new CGameSpy_Full();
#ifdef WINDOWS

for (u32 i = 0; i < u32(ErrMax); i++)
{
Expand All @@ -136,9 +136,12 @@ CMainMenu::CMainMenu()
m_pMB_ErrDlgs[DownloadMPMap]->AddCallbackStr(
"button_yes", MESSAGE_BOX_YES_CLICKED, CUIWndCallback::void_function(this, &CMainMenu::OnDownloadMPMap));

#endif

m_account_mngr = new gamespy_gp::account_manager(m_pGameSpyFull->GetGameSpyGP());
m_login_mngr = new gamespy_gp::login_manager(m_pGameSpyFull);
m_profile_store = new gamespy_profile::profile_store(m_pGameSpyFull);
#ifdef WINDOWS
m_stats_submitter = new gamespy_profile::stats_submitter(m_pGameSpyFull);
m_atlas_submit_queue = new atlas_submit_queue(m_stats_submitter);
#endif
Expand Down
20 changes: 12 additions & 8 deletions src/xrGame/MainMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ struct Patch_Dawnload_Progress
shared_str Status;
shared_str FileName;

bool GetInProgress() { return IsInProgress; };
float GetProgress() { return Progress; };
LPCSTR GetStatus() { return Status.c_str(); };
LPCSTR GetFlieName() { return FileName.c_str(); };
bool GetInProgress() { return IsInProgress; }
float GetProgress() { return Progress; }
LPCSTR GetStatus() { return Status.c_str(); }
LPCSTR GetFlieName() { return FileName.c_str(); }
};

class CMainMenu : public IMainMenu,
Expand Down Expand Up @@ -71,11 +71,14 @@ class CMainMenu : public IMainMenu,
void ReadTextureInfo();

xr_vector<CUIWindow*> m_pp_draw_wnds;
#ifdef WINDOWS

CGameSpy_Full* m_pGameSpyFull;
gamespy_gp::account_manager* m_account_mngr;
gamespy_gp::login_manager* m_login_mngr;
gamespy_profile::profile_store* m_profile_store;

#ifdef WINDOWS

gamespy_profile::stats_submitter* m_stats_submitter;
atlas_submit_queue* m_atlas_submit_queue;
#endif
Expand Down Expand Up @@ -109,11 +112,12 @@ class CMainMenu : public IMainMenu,
Patch_Dawnload_Progress m_sPDProgress;
Patch_Dawnload_Progress* GetPatchProgress() { return &m_sPDProgress; }
void CancelDownload();
gamespy_gp::account_manager* GetAccountMngr() { return m_account_mngr; }
gamespy_gp::login_manager* GetLoginMngr() { return m_login_mngr; }
gamespy_profile::profile_store* GetProfileStore() { return m_profile_store; }

#ifdef WINDOWS
CGameSpy_Full* GetGS() { return m_pGameSpyFull; };
gamespy_gp::account_manager* GetAccountMngr() { return m_account_mngr; };
gamespy_gp::login_manager* GetLoginMngr() { return m_login_mngr; };
gamespy_profile::profile_store* GetProfileStore() { return m_profile_store; };
gamespy_profile::stats_submitter* GetStatsSubmitter() { return m_stats_submitter; };
atlas_submit_queue* GetSubmitQueue() { return m_atlas_submit_queue; };
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UI.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CUI : public CDialogHolder

CUIGameCustom* UIGame() { return pUIGame; }
void ShowGameIndicators(bool b);
bool GameIndicatorsShown() { return m_bShowGameIndicators; };
bool GameIndicatorsShown() { return m_bShowGameIndicators; }
void ShowCrosshair(bool b);
bool CrosshairShown();

Expand Down
2 changes: 0 additions & 2 deletions src/xrGame/ui_export_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ ICF static void UIRegistratorScriptExport(lua_State* luaState)
.def("GetCDKey", &CMainMenu::GetCDKeyFromRegistry)
.def("GetPlayerName", &CMainMenu::GetPlayerName)
.def("GetDemoInfo", &CMainMenu::GetDemoInfo)
#ifdef WINDOWS
.def("GetLoginMngr", &CMainMenu::GetLoginMngr)
.def("GetAccountMngr", &CMainMenu::GetAccountMngr)
.def("GetProfileStore", &CMainMenu::GetProfileStore)
#endif
];
module(luaState, "main_menu")
[
Expand Down
2 changes: 1 addition & 1 deletion src/xrGameSpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "
cotire(${PROJECT_NAME})

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath ${SDL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath GameSpy ${SDL_LIBRARIES})
xr_install(${PROJECT_NAME})
14 changes: 7 additions & 7 deletions src/xrGameSpy/GameSpy_Full.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class XRGAMESPY_API CGameSpy_Full
CGameSpy_Full();
~CGameSpy_Full();

CGameSpy_Available* GetGameSpyAvailable() const { return m_pGSA; };
CGameSpy_Patching* GetGameSpyPatching() const { return m_pGS_Patching; };
CGameSpy_HTTP* GetGameSpyHTTP() const { return m_pGS_HTTP; };
CGameSpy_Browser* GetGameSpyBrowser() const { return m_pGS_SB; };
CGameSpy_GP* GetGameSpyGP() const { return m_pGS_GP; };
CGameSpy_SAKE* GetGameSpySAKE() const { return m_pGS_SAKE; };
CGameSpy_ATLAS* GetGameSpyATLAS() const { return m_pGS_ATLAS; };
CGameSpy_Available* GetGameSpyAvailable() const { return m_pGSA; }
CGameSpy_Patching* GetGameSpyPatching() const { return m_pGS_Patching; }
CGameSpy_HTTP* GetGameSpyHTTP() const { return m_pGS_HTTP; }
CGameSpy_Browser* GetGameSpyBrowser() const { return m_pGS_SB; }
CGameSpy_GP* GetGameSpyGP() const { return m_pGS_GP; }
CGameSpy_SAKE* GetGameSpySAKE() const { return m_pGS_SAKE; }
CGameSpy_ATLAS* GetGameSpyATLAS() const { return m_pGS_ATLAS; }
GSUpdateStatus Update();
void CoreThink(u32 millisecondsTimeout);

Expand Down

0 comments on commit 4885545

Please sign in to comment.