CheatMenuSA/src/pch.h

103 lines
2.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
2021-10-21 18:23:02 -04:00
#define BY_GAME(sa, vc, iii) sa
2021-08-01 21:41:48 -04:00
#elif GTAVC
2021-10-21 18:23:02 -04:00
#define BY_GAME(sa, vc, iii) vc
#elif GTA3
#define BY_GAME(sa, vc, iii) iii
2021-08-01 21:41:48 -04:00
#endif
2021-09-20 08:41:40 -04:00
#include <d3d9.h>
#include <d3d11.h>
#include <d3d11Shader.h>
#include <filesystem>
#include <fstream>
#include <functional>
#include <memory>
#include <iostream>
#include <sstream>
#include <vector>
#include <windows.h>
#include "plugin.h"
#include "CCamera.h"
#include "CClock.h"
#include "CCivilianPed.h"
#include "CGangs.h"
#include "CHud.h"
#include "CMenuManager.h"
#include "CModelInfo.h"
#include "RenderWare.h"
#include "CStats.h"
#include "CStreaming.h"
#include "CTheScripts.h"
#include "CTimer.h"
#include "CTimeCycle.h"
#include "CTrain.h"
#include "CWeather.h"
#include "CWorld.h"
#include "extensions/ScriptCommands.h"
#include "extensions/Screen.h"
#include "extensions/Paths.h"
2021-10-21 18:23:02 -04:00
#ifndef GTA3
#include "CBike.h"
#include "cHandlingDataMgr.h"
#include "CTheZones.h"
#endif
2021-09-20 08:41:40 -04:00
#ifdef GTASA
#include "CCheat.h"
#include "CClothes.h"
#include "CCutsceneMgr.h"
#include "CRadar.h"
#include "CShadows.h"
#include "eVehicleClass.h"
#include "CGangWars.h"
#endif
#include "../depend/fla/IDaccess.h"
#include "../depend/imgui/imgui.h"
#include "json.h"
#include "hotkeys.h"
#include "vKeys.h"
#include "resourcestore.h"
2020-12-02 16:19:16 -05:00
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-09-20 08:41:40 -04:00
enum eRenderer
2020-12-02 16:19:16 -05:00
{
Render_DirectX9,
Render_DirectX11,
2021-02-25 17:45:41 -05:00
Render_Unknown
2020-12-02 16:19:16 -05:00
};
2021-09-20 08:41:40 -04:00
static eRenderer gRenderer = Render_Unknown;
static std::ofstream gLog = std::ofstream("CheatMenu.log");
// why doesn't this work?
// inline CJson gConfig = CJson("config");
extern CJson gConfig;
2021-06-17 09:00:32 -04:00
2021-09-20 08:41:40 -04:00
// Fix function clashes
2021-08-01 21:41:48 -04:00
static void SetHelpMessage(const char *message, bool b1, bool b2, bool b3)
{
2021-10-21 18:23:02 -04:00
#if GTASA
2021-08-17 01:46:41 -04:00
CHud::SetHelpMessage(message, b1, b2, b3);
2021-10-21 18:23:02 -04:00
#elif GTAVC
CHud::SetHelpMessage(message, b1, b2);
#else // GTA3
2021-10-22 18:03:27 -04:00
const size_t cSize = strlen(message)+1;
wchar_t* wc = new wchar_t[cSize];
mbstowcs (wc, message, cSize);
CHud::SetHelpMessage((wchar_t*)wc, b1);
2021-08-17 01:46:41 -04:00
#endif
2021-08-01 21:41:48 -04:00
}