r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
Common.hpp
Go to the documentation of this file.
1///
2/// @file Common.hpp
3/// @brief This file contains common definitions and constants
4/// @namespace srv
5///
6
7#pragma once
8
9#include <filesystem>
10
11#ifdef _WIN32
12#define PLUGINS_EXTENSION ".dll"
13#elif __linux__
14#define PLUGINS_EXTENSION ".so"
15#elif __APPLE__
16#define PLUGINS_EXTENSION ".dylib"
17#endif
18
19namespace srv
20{
21 namespace Config::Network
22 {
23 inline constexpr auto DEFAULT_NETWORK_HOST = "0.0.0.0";
24 inline constexpr auto DEFAULT_NETWORK_PORT = 2560;
25 inline constexpr auto DEFAULT_MAX_CLIENT = 4;
26 } // namespace Config::Network
27 namespace Game
28 {
29 inline constexpr auto DEFAULT_TICK_RATE = 60;
30 inline constexpr auto DEFAULT_UPDATE_INTERVAL = 1 / 20.F;
31 } // namespace Game
32 namespace Path::Plugin
33 {
35 std::filesystem::path(PLUGINS_DIR) / ("network_asio_server" + std::string(PLUGINS_EXTENSION));
36 }
37} // namespace srv
#define PLUGINS_EXTENSION
GameSolo scene.
constexpr auto DEFAULT_NETWORK_PORT
Definition Common.hpp:24
constexpr auto DEFAULT_NETWORK_HOST
Definition Common.hpp:23
constexpr auto DEFAULT_MAX_CLIENT
Definition Common.hpp:25
constexpr auto DEFAULT_TICK_RATE
Definition Common.hpp:29
constexpr auto DEFAULT_UPDATE_INTERVAL
Definition Common.hpp:30
auto PLUGINS_NETWORK_ASIO_SERVER
Definition Common.hpp:34