CheatMenuSA/src/pch.h

107 lines
2.4 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 STB_IMAGE_IMPLEMENTATION
#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
#include <d3d9.h>
#include <d3d11.h>
#include <d3d11Shader.h>
#include <D3dx9tex.h>
#include <D3DX11tex.h>
#include <filesystem>
#include <fstream>
#include <functional>
#include <memory>
2021-03-10 16:10:59 -05:00
#include <iostream>
2020-12-02 16:19:16 -05:00
#include <sstream>
#include <vector>
#include <windows.h>
#include "plugin.h"
#include "CBike.h"
2020-12-02 16:19:16 -05:00
#include "CCamera.h"
#include "CCheat.h"
#include "CClothes.h"
#include "CClock.h"
#include "CCivilianPed.h"
#include "CCutsceneMgr.h"
#include "CGangs.h"
#include "CGangWars.h"
#include "cHandlingDataMgr.h"
#include "CHud.h"
#include "CMenuManager.h"
#include "CModelInfo.h"
#include "CRadar.h"
#include "RenderWare.h"
#include "CShadows.h"
2020-12-02 16:19:16 -05:00
#include "CStats.h"
#include "CStreaming.h"
#include "CTheScripts.h"
#include "CTheZones.h"
#include "CTimer.h"
#include "CTimeCycle.h"
#include "CTrain.h"
2020-12-02 16:19:16 -05:00
#include "CWeather.h"
#include "CWorld.h"
#include "extensions/ScriptCommands.h"
#include "extensions/Screen.h"
#include "eVehicleClass.h"
#include "extensions/Paths.h"
2020-12-02 16:19:16 -05:00
2021-03-16 03:12:59 -04:00
#include "../deps/fla/IDaccess.h"
#include "../deps/imgui/imgui.h"
#include "../deps/imgui/imgui_internal.h"
#include "../deps/imgui/imgui_impl_dx9.h"
#include "../deps/imgui/imgui_impl_dx11.h"
#include "../deps/imgui/imgui_impl_win32.h"
2020-12-02 16:19:16 -05:00
2021-03-02 14:18:37 -05:00
#include "MoreEvents.h"
2020-12-02 16:19:16 -05:00
#include "Json.h"
#include "VKeys.h"
2021-02-27 15:40:51 -05:00
#include "VehExtender.h"
2020-12-02 16:19:16 -05:00
// Globals
2021-02-25 17:45:41 -05:00
typedef std::vector<std::pair<std::string, void(*)()>> CallbackTable;
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-03-02 14:18:37 -05:00
inline static std::string header_id = "";
inline static ImVec2 menu_size = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
inline static ImVec2 screen_size = ImVec2(-1, -1);
inline static bool show_menu = false;
inline static bool init_done = false;
inline static bool game_init = false;
2021-03-16 03:12:59 -04:00
inline static bool menu_closing = false;
2021-03-02 14:18:37 -05:00
inline static Renderer renderer = Render_Unknown;
inline static void* device = nullptr;
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
2020-12-02 16:19:16 -05:00
struct TextureStructure
{
std::string file_name;
std::string category_name;
2021-02-24 16:54:45 -05:00
void* texture = nullptr;
2020-12-02 16:19:16 -05:00
};
struct HotKeyData
{
int key1;
int key2;
2021-01-28 13:57:37 -05:00
bool is_down = false;
2021-03-02 14:18:37 -05:00
};