iw5-mod/src/game/game.cpp

40 lines
681 B
C++
Raw Normal View History

2018-12-24 23:22:56 +01:00
#include <std_include.hpp>
#include "game.hpp"
namespace game
{
namespace native
{
Conbuf_AppendText_t Conbuf_AppendText;
2018-12-24 23:22:56 +01:00
Sys_ShowConsole_t Sys_ShowConsole;
}
2018-12-26 16:28:16 +01:00
launcher::mode mode = launcher::mode::none;
2018-12-24 23:22:56 +01:00
bool is_mp()
{
2018-12-26 16:28:16 +01:00
return mode == launcher::mode::multiplayer;
2018-12-24 23:22:56 +01:00
}
bool is_sp()
{
2018-12-26 16:28:16 +01:00
return mode == launcher::mode::singleplayer;
2018-12-24 23:22:56 +01:00
}
bool is_dedi()
{
2018-12-26 16:28:16 +01:00
return mode == launcher::mode::server;
2018-12-24 23:22:56 +01:00
}
void initialize(const launcher::mode _mode)
{
mode = _mode;
native::Conbuf_AppendText = native::Conbuf_AppendText_t(SELECT_VALUE(0x4C84E0, 0x5CF610, 0x53C790));
2018-12-24 23:22:56 +01:00
native::Sys_ShowConsole = native::Sys_ShowConsole_t(SELECT_VALUE(0x470AF0, 0x5CF590, 0));
}
}