Skip to content

Commit 320e6f1

Browse files
committed
#15 add ability to change master server
1 parent 7b9a71d commit 320e6f1

120 files changed

Lines changed: 4285 additions & 440 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ set(CPR_ENABLE_CURL_HTTP_ONLY OFF)
3535
set(CPR_ENABLE_SSL ON)
3636

3737
# external dependencies
38-
add_subdirectory(dep/data_encoding)
3938
add_subdirectory(dep/cpr)
39+
add_subdirectory(dep/easyloggingpp)
4040

4141
# NextClient sub-projects
4242
add_subdirectory(dep/NclNitroApi)
43+
add_subdirectory(nextclient/packages)
4344
add_subdirectory(nextclient/launcher)
4445
add_subdirectory(nextclient/engine_mini)
4546
add_subdirectory(nextclient/filesystem_proxy)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"MasterServer"
2+
{
3+
"Selected" "1"
4+
"CacheServers" "false"
5+
"Servers"
6+
{
7+
"Steam"
8+
{
9+
"address" "hl1master.steampowered.com:27011"
10+
"site" ""
11+
"region" "0x03" // see region codes here https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol#Region_codes
12+
}
13+
"Tsarvar"
14+
{
15+
"address" "ms.tsarvar.com:27010"
16+
"site" "https://tsarvar.com/"
17+
"region" "0xFF"
18+
}
19+
}
20+
}

dep/easyloggingpp/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
project(easyloggingpp)
3+
4+
add_library(${PROJECT_NAME} INTERFACE)
5+
add_library(easyloggingpp::easyloggingpp ALIAS ${PROJECT_NAME})
6+
7+
target_include_directories(${PROJECT_NAME} INTERFACE
8+
${CMAKE_CURRENT_SOURCE_DIR}/src
9+
)
10+
11+
target_sources(${PROJECT_NAME} INTERFACE
12+
${CMAKE_CURRENT_SOURCE_DIR}/src/easylogging++.cc
13+
)
File renamed without changes.
File renamed without changes.

nextclient/client_mini/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
109109
LOG_TAG="game"
110110
USE_OPTICK=$<BOOL:${USE_PROFILER}>
111111
_HAS_STATIC_RTTI=0 #disable rtti things in stl
112+
#easyloggingpp options
113+
ELPP_WINSOCK2
112114
)
113115

114116
if (WIN32)
@@ -119,6 +121,7 @@ if (WIN32)
119121
WINVER=0x0600
120122
NOMINMAX
121123
_UNICODE
124+
WIN32_LEAN_AND_MEAN
122125
)
123126
endif()
124127

nextclient/engine_mini/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
7171
nitro_api::nitro_api
7272
NextClient::gameui
7373
NextClient::filesystem_proxy
74+
data_encoding::data_encoding
75+
data_types::data_types
76+
TaskCoro::TaskCoro
77+
SafeResult::SafeResult
78+
easyloggingpp::easyloggingpp
7479
cpr::cpr
7580
optic::optic
7681
OpenSSL::SSL
@@ -109,6 +114,10 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
109114
USE_OPTICK=$<BOOL:${USE_PROFILER}>
110115
_HAS_STATIC_RTTI=0 #disable rtti things in stl
111116
BREADCRUMBS_TAG="[${PROJECT_NAME}]"
117+
#easyloggingpp options
118+
ELPP_WINSOCK2
119+
ELPP_NO_DEFAULT_LOG_FILE
120+
ELPP_DEFAULT_LOGGER="engine_mini"
112121
)
113122

114123
if (WIN32)
@@ -119,6 +128,7 @@ if (WIN32)
119128
WINVER=0x0600
120129
NOMINMAX
121130
_UNICODE
131+
WIN32_LEAN_AND_MEAN
122132
)
123133
endif()
124134

nextclient/engine_mini/include/next_engine_mini/NextClientVersion.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,18 @@ struct NextClientVersion
55
int major{};
66
int minor{};
77
int patch{};
8+
char prerelease[128]{};
89
};
10+
11+
inline std::string BuildNextClientVersionString(const NextClientVersion& version)
12+
{
13+
std::stringstream ss;
14+
ss << version.major << "." << version.minor << "." << version.patch;
15+
16+
if (version.prerelease[0] != '\0')
17+
{
18+
ss << "-" << version.prerelease;
19+
}
20+
21+
return ss.str();
22+
}

nextclient/engine_mini/include/next_engine_mini/engine_mini.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace nitroapi
1515
}
1616
#endif
1717

18+
class ISteamMatchmakingServers;
19+
1820
class EngineMiniInterface : public IBaseInterface
1921
{
2022
public:
@@ -28,7 +30,9 @@ class EngineMiniInterface : public IBaseInterface
2830

2931
virtual bool AddCmdLogger(CommandLoggerInterface* logger) = 0;
3032
virtual bool RemoveCmdLogger(CommandLoggerInterface* logger) = 0;
33+
34+
virtual ISteamMatchmakingServers* GetSteamMatchmakingServers() = 0;
3135
};
3236

33-
#define ENGINE_MINI_INTERFACE_VERSION "EngineMini005"
37+
#define ENGINE_MINI_INTERFACE_VERSION "EngineMini006"
3438

0 commit comments

Comments
 (0)