2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2020-12-16 17:14:16 -05:00
|
|
|
#pragma warning(disable:4503 4244 4005)
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
#define INPUT_BUFFER_SIZE 64
|
|
|
|
#define SPAWN_PED_LIMIT 20
|
2020-12-21 15:24:07 -05:00
|
|
|
#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 <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"
|
2020-12-24 14:31:26 -05:00
|
|
|
#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"
|
2020-12-25 16:22:28 -05:00
|
|
|
#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"
|
2020-12-24 14:31:26 -05:00
|
|
|
#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"
|
2021-01-07 16:07:45 -05:00
|
|
|
#include "extensions/Paths.h"
|
2020-12-02 16:19:16 -05:00
|
|
|
|
2021-04-07 16:35:21 -04:00
|
|
|
#include "../Depend/fla/IDaccess.h"
|
|
|
|
#include "../Depend/imgui/imgui.h"
|
|
|
|
#include "../Depend/imgui/imgui_internal.h"
|
|
|
|
#include "../Depend/imgui/imgui_impl_dx9.h"
|
|
|
|
#include "../Depend/imgui/imgui_impl_dx11.h"
|
|
|
|
#include "../Depend/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"
|
|
|
|
|
|
|
|
// 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;
|
2021-01-05 01:29:26 -05:00
|
|
|
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);
|
2021-06-19 09:00:13 -04:00
|
|
|
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
|
|
|
|
2021-01-16 12:48:06 -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-07-17 03:51:02 -04:00
|
|
|
struct STextureStructure
|
|
|
|
{
|
|
|
|
std::string m_FileName;
|
|
|
|
std::string m_CategoryName;
|
|
|
|
RwTexture *m_pRwTexture = nullptr;
|
|
|
|
void* m_pTexture = nullptr;
|
|
|
|
};
|
|
|
|
|
2021-06-18 12:49:11 -04:00
|
|
|
struct SSearchData
|
2021-06-17 09:00:32 -04:00
|
|
|
{
|
2021-06-18 12:49:11 -04:00
|
|
|
CJson m_Json;
|
2021-07-17 03:51:02 -04:00
|
|
|
RwTexDictionary txd;
|
2021-06-18 12:49:11 -04:00
|
|
|
ImGuiTextFilter m_Filter = "";
|
2021-07-17 03:51:02 -04:00
|
|
|
std::vector<std::string> m_Categories = {"All"};
|
2021-06-18 12:49:11 -04:00
|
|
|
std::string m_Selected = "All";
|
|
|
|
std::vector<std::unique_ptr<STextureStructure>> m_ImagesList;
|
2021-06-17 09:00:32 -04:00
|
|
|
};
|