CheatMenuSA/src/pch.h

58 lines
1.2 KiB
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
#pragma warning(disable:4503 4244 4005)
2020-12-02 16:19:16 -05:00
#define INPUT_BUFFER_SIZE 64
#define SPAWN_PED_LIMIT 20
#define DISCORD_INVITE "https://discord.gg/ZzW7kmf"
#define GITHUB_LINK "https://github.com/user-grinch/Cheat-Menu"
2020-12-02 16:19:16 -05:00
2021-08-01 21:41:48 -04:00
#ifdef GTASA
#define BY_GAME(sa, vc) sa
#elif GTAVC
#define BY_GAME(sa, vc) vc
#endif
#include "header_includes.h"
2020-12-02 16:19:16 -05:00
// Globals
2021-06-18 12:49:11 -04:00
using CallbackTable = std::vector<std::pair<std::string, void(*)()>>;
2020-12-02 16:19:16 -05:00
using namespace plugin;
namespace fs = std::filesystem;
2020-12-02 16:19:16 -05:00
enum Renderer
{
Render_DirectX9,
Render_DirectX11,
2021-02-25 17:45:41 -05:00
Render_Unknown
2020-12-02 16:19:16 -05:00
};
struct Globals
{
2021-06-18 12:49:11 -04:00
inline static std::string m_HeaderId;
inline static ImVec2 m_fMenuSize = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
inline static ImVec2 m_fScreenSize = ImVec2(-1, -1);
inline static bool m_bShowMenu = false;
2021-06-18 12:49:11 -04:00
inline static bool m_bInit;
2021-03-02 14:18:37 -05:00
inline static Renderer renderer = Render_Unknown;
2021-06-18 12:49:11 -04:00
inline static void* device;
2020-12-02 16:19:16 -05:00
};
2021-03-10 16:10:59 -05:00
extern std::ofstream flog;
extern CJson config;
2021-03-02 14:18:37 -05:00
struct HotKeyData
{
2021-06-18 12:49:11 -04:00
int m_key1;
int m_key2;
bool m_bPressed;
2021-06-17 09:00:32 -04:00
};
2021-08-01 21:41:48 -04:00
// Common defines
static void SetHelpMessage(const char *message, bool b1, bool b2, bool b3)
{
#if GTAVC
CHud::SetHelpMessage(message, b1, b2);
#elif GTASA
CHud::SetHelpMessage(message, b1, b2, b3);
#endif
}