2022-06-02 04:14:44 -04:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-10 05:26:19 -04:00
|
|
|
#include "structs.hpp"
|
2022-06-02 04:14:44 -04:00
|
|
|
|
|
|
|
namespace game
|
|
|
|
{
|
2022-08-10 05:26:19 -04:00
|
|
|
#define Com_Error(code, fmt, ...) \
|
|
|
|
Com_Error_(__FILE__, __LINE__, code, fmt, ##__VA_ARGS__)
|
|
|
|
|
2022-06-02 07:49:43 -04:00
|
|
|
int Conbuf_CleanText(const char* source, char* target);
|
2022-10-28 16:16:14 -04:00
|
|
|
game::eModes Com_SessionMode_GetMode();
|
2022-06-02 07:49:43 -04:00
|
|
|
|
2022-06-02 04:14:44 -04:00
|
|
|
template <typename T>
|
|
|
|
class symbol
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
symbol(const size_t address)
|
|
|
|
: address_(reinterpret_cast<T*>(address))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
T* get() const
|
|
|
|
{
|
2022-07-10 05:14:53 -04:00
|
|
|
return address_;
|
2022-06-02 04:14:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
operator T* () const
|
|
|
|
{
|
|
|
|
return this->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
T* operator->() const
|
|
|
|
{
|
|
|
|
return this->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
T* address_;
|
|
|
|
};
|
|
|
|
|
2022-08-10 05:26:19 -04:00
|
|
|
// Global game definitions
|
|
|
|
constexpr auto CMD_MAX_NESTING = 8;
|
2022-06-02 04:14:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#include "symbols.hpp"
|