iw5-mod/src/game/game.hpp

32 lines
716 B
C++
Raw Normal View History

2018-12-24 17:22:56 -05:00
#pragma once
#include "structs.hpp"
2018-12-24 17:22:56 -05:00
#include "launcher/launcher.hpp"
#define SELECT_VALUE(sp, mp, dedi) (game::is_sp() ? (sp) : (game::is_mp() ? (mp) : (dedi)))
namespace game
{
namespace native
{
2018-12-28 06:50:34 -05:00
typedef void (*Cmd_AddCommand_t)(const char* cmdName, void(*function)(), cmd_function_t* allocedCmd);
extern Cmd_AddCommand_t Cmd_AddCommand;
typedef void (*Conbuf_AppendText_t)(const char* message);
extern Conbuf_AppendText_t Conbuf_AppendText;
typedef void (*Sys_ShowConsole_t)();
2018-12-24 17:22:56 -05:00
extern Sys_ShowConsole_t Sys_ShowConsole;
2018-12-28 06:50:34 -05:00
extern int* cmd_args;
extern int* cmd_argc;
extern const char*** cmd_argv;
2018-12-24 17:22:56 -05:00
}
2018-12-24 17:22:56 -05:00
bool is_mp();
bool is_sp();
bool is_dedi();
void initialize(launcher::mode mode);
}