refactor(cmd): add support for cmds + cleanup
This commit is contained in:
parent
1bb9add331
commit
cae0793e7f
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
uses: microsoft/setup-msbuild@v1.1.3
|
uses: microsoft/setup-msbuild@v1.1.3
|
||||||
|
|
||||||
- name: Generate project files
|
- name: Generate project files
|
||||||
run: tools/premake5 vs2022 --ci-build
|
run: tools/premake5 vs2022
|
||||||
|
|
||||||
- name: Set up problem matching
|
- name: Set up problem matching
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
@ -77,11 +77,6 @@ newoption {
|
|||||||
description = "Enable development builds of the client."
|
description = "Enable development builds of the client."
|
||||||
}
|
}
|
||||||
|
|
||||||
newoption {
|
|
||||||
trigger = "ci-build",
|
|
||||||
description = "Enable CI builds of the client."
|
|
||||||
}
|
|
||||||
|
|
||||||
newaction {
|
newaction {
|
||||||
trigger = "version",
|
trigger = "version",
|
||||||
description = "Returns the version string for the current commit of the source code.",
|
description = "Returns the version string for the current commit of the source code.",
|
||||||
@ -249,7 +244,7 @@ workspace "boiii"
|
|||||||
defines {"DEV_BUILD"}
|
defines {"DEV_BUILD"}
|
||||||
end
|
end
|
||||||
|
|
||||||
if _OPTIONS["ci-build"] then
|
if os.getenv("CI") then
|
||||||
defines {"CI"}
|
defines {"CI"}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -262,7 +257,7 @@ workspace "boiii"
|
|||||||
filter "configurations:Release"
|
filter "configurations:Release"
|
||||||
optimize "Size"
|
optimize "Size"
|
||||||
buildoptions {"/GL"}
|
buildoptions {"/GL"}
|
||||||
linkoptions { "/IGNORE:4702", "/LTCG" }
|
linkoptions {"/IGNORE:4702", "/LTCG"}
|
||||||
defines {"NDEBUG"}
|
defines {"NDEBUG"}
|
||||||
flags {"FatalCompileWarnings"}
|
flags {"FatalCompileWarnings"}
|
||||||
filter {}
|
filter {}
|
||||||
|
@ -77,7 +77,7 @@ namespace branding
|
|||||||
|
|
||||||
std::string str = "BOIII: " VERSION;
|
std::string str = "BOIII: " VERSION;
|
||||||
//str += "\n\n" + get_connectivity_info();
|
//str += "\n\n" + get_connectivity_info();
|
||||||
game::R_AddCmdDrawText(str.data(), 0x7FFFFFFF, font, static_cast<float>(x),
|
game::R_AddCmdDrawText(str.data(), std::numeric_limits<int>::max(), font, static_cast<float>(x),
|
||||||
y + static_cast<float>(font[2]) * scale,
|
y + static_cast<float>(font[2]) * scale,
|
||||||
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_NORMAL);
|
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_NORMAL);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "network.hpp"
|
|
||||||
#include "loader/component_loader.hpp"
|
#include "loader/component_loader.hpp"
|
||||||
|
|
||||||
#include "scheduler.hpp"
|
#include "scheduler.hpp"
|
||||||
@ -9,6 +8,8 @@
|
|||||||
#include <utils/string.hpp>
|
#include <utils/string.hpp>
|
||||||
#include <utils/finally.hpp>
|
#include <utils/finally.hpp>
|
||||||
|
|
||||||
|
#include "network.hpp"
|
||||||
|
|
||||||
namespace network
|
namespace network
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "game/game.hpp"
|
|
||||||
|
|
||||||
namespace network
|
namespace network
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "loader/component_loader.hpp"
|
#include "loader/component_loader.hpp"
|
||||||
|
#include "game/game.hpp"
|
||||||
|
#include "steam/steam.hpp"
|
||||||
|
|
||||||
#include "party.hpp"
|
#include "party.hpp"
|
||||||
#include "network.hpp"
|
#include "network.hpp"
|
||||||
#include "scheduler.hpp"
|
#include "scheduler.hpp"
|
||||||
#include "game/game.hpp"
|
|
||||||
#include "steam/steam.hpp"
|
|
||||||
|
|
||||||
#include <utils/hook.hpp>
|
#include <utils/hook.hpp>
|
||||||
#include <utils/string.hpp>
|
#include <utils/string.hpp>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <game/game.hpp>
|
|
||||||
#include <utils/info_string.hpp>
|
#include <utils/info_string.hpp>
|
||||||
|
|
||||||
namespace party
|
namespace party
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "game/game.hpp"
|
#include "game/game.hpp"
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <utils/hook.hpp>
|
#include <utils/hook.hpp>
|
||||||
#include <utils/concurrency.hpp>
|
#include <utils/concurrency.hpp>
|
||||||
#include <utils/thread.hpp>
|
#include <utils/thread.hpp>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "loader/component_loader.hpp"
|
#include "loader/component_loader.hpp"
|
||||||
|
|
||||||
#include "splash.hpp"
|
#include "splash.hpp"
|
||||||
#include "resource.hpp"
|
#include "resource.hpp"
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "loader/component_loader.hpp"
|
#include "loader/component_loader.hpp"
|
||||||
#include "steam_proxy.hpp"
|
|
||||||
#include "scheduler.hpp"
|
|
||||||
|
|
||||||
#include <utils/nt.hpp>
|
#include <utils/nt.hpp>
|
||||||
#include <utils/flags.hpp>
|
#include <utils/flags.hpp>
|
||||||
@ -12,6 +10,9 @@
|
|||||||
#include "steam/interface.hpp"
|
#include "steam/interface.hpp"
|
||||||
#include "steam/steam.hpp"
|
#include "steam/steam.hpp"
|
||||||
|
|
||||||
|
#include "steam_proxy.hpp"
|
||||||
|
#include "scheduler.hpp"
|
||||||
|
|
||||||
namespace steam_proxy
|
namespace steam_proxy
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <utils/nt.hpp>
|
|
||||||
|
|
||||||
namespace steam_proxy
|
namespace steam_proxy
|
||||||
{
|
{
|
||||||
|
@ -19,4 +19,11 @@ namespace game
|
|||||||
}();
|
}();
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CmdArgs* cmd_args_t::operator->() const
|
||||||
|
{
|
||||||
|
return Sys_GetTLS()->cmdArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_args_t cmd_args;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,13 @@ namespace game
|
|||||||
private:
|
private:
|
||||||
size_t address_;
|
size_t address_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct cmd_args_t
|
||||||
|
{
|
||||||
|
CmdArgs* operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern cmd_args_t cmd_args;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline size_t operator"" _g(const size_t val)
|
inline size_t operator"" _g(const size_t val)
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
|
|
||||||
namespace game
|
namespace game
|
||||||
{
|
{
|
||||||
#define Com_Error(code, fmt, ...) \
|
#define Com_Error(code, fmt, ...) Com_Error_(__FILE__, __LINE__, code, fmt, ##__VA_ARGS__)
|
||||||
Com_Error_(__FILE__, __LINE__, code, fmt, ##__VA_ARGS__)
|
|
||||||
|
|
||||||
// CL
|
// CL
|
||||||
WEAK symbol<void(int controllerIndex, XSESSION_INFO* hostInfo, const netadr_t* addr, int numPublicSlots,
|
WEAK symbol<void(int controllerIndex, XSESSION_INFO* hostInfo, const netadr_t* addr, int numPublicSlots,
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
#include <asmjit/x86/x86assembler.h>
|
#include <asmjit/x86/x86assembler.h>
|
||||||
|
|
||||||
#define RAPIDJSON_NOEXCEPT
|
#define RAPIDJSON_NOEXCEPT
|
||||||
#define RAPIDJSON_ASSERT(cond) if(cond); else throw std::runtime_error("rapidjson assert fail");
|
#define RAPIDJSON_ASSERT(cond) if (cond); else throw std::runtime_error("rapidjson assert fail");
|
||||||
|
|
||||||
#include <rapidjson/document.h>
|
#include <rapidjson/document.h>
|
||||||
#include <rapidjson/prettywriter.h>
|
#include <rapidjson/prettywriter.h>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "../steam.hpp"
|
#include "../steam.hpp"
|
||||||
#include "component/steam_proxy.hpp"
|
|
||||||
|
|
||||||
//#include <game/game.hpp>
|
#include <utils/nt.hpp>
|
||||||
|
|
||||||
|
#include "component/steam_proxy.hpp"
|
||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "../steam.hpp"
|
#include "../steam.hpp"
|
||||||
|
|
||||||
|
#include "game/game.hpp"
|
||||||
|
|
||||||
#include "component/party.hpp"
|
#include "component/party.hpp"
|
||||||
#include "component/network.hpp"
|
#include "component/network.hpp"
|
||||||
#include "utils/string.hpp"
|
|
||||||
|
#include <utils/string.hpp>
|
||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
#include "../steam.hpp"
|
#include "../steam.hpp"
|
||||||
|
|
||||||
|
#include <utils/nt.hpp>
|
||||||
|
|
||||||
#include "component/steam_proxy.hpp"
|
#include "component/steam_proxy.hpp"
|
||||||
|
|
||||||
namespace steam
|
namespace steam
|
||||||
|
Loading…
Reference in New Issue
Block a user