CheatMenuSA/src/pch.h

126 lines
2.7 KiB
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
2021-10-25 10:03:27 -04: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
#define DISCORD_INVITE "https://discord.gg/ZzW7kmf"
#define GITHUB_LINK "https://github.com/user-grinch/Cheat-Menu"
2021-11-05 05:59:11 -04:00
#define IMGUI_DEFINE_MATH_OPERATORS
2022-02-11 01:38:14 -05:00
#define _GTA_
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-10-25 10:03:27 -04:00
#include <d3d9.h>
2021-09-20 08:41:40 -04:00
#include <d3d11.h>
#include <d3d11Shader.h>
#include <filesystem>
#include <fstream>
#include <functional>
2021-10-24 18:08:00 -04:00
#include <memory>
2021-10-25 10:03:27 -04:00
#include <iostream>
2021-09-20 08:41:40 -04:00
#include <sstream>
#include <vector>
#include <windows.h>
2021-10-25 10:03:27 -04:00
#include <plugin.h>
#include <CCamera.h>
2021-10-24 18:08:00 -04:00
#include <CClock.h>
2021-10-25 10:03:27 -04:00
#include <CCivilianPed.h>
#include <CGangs.h>
#include <CHud.h>
#include <CMenuManager.h>
#include <CModelInfo.h>
2021-10-25 10:03:27 -04:00
#include <RenderWare.h>
#include <CStats.h>
#include <CStreaming.h>
#include <CTheScripts.h>
2021-10-24 18:08:00 -04:00
#include <CTimer.h>
2021-10-25 10:03:27 -04:00
#include <CTimeCycle.h>
#include <CTrain.h>
#include <CWeather.h>
#include <CWorld.h>
2021-10-24 18:08:00 -04:00
#include <extensions/ScriptCommands.h>
2021-10-25 10:03:27 -04:00
#include <extensions/Screen.h>
#include <extensions/Paths.h>
2021-09-20 08:41:40 -04:00
2021-10-21 18:23:02 -04:00
#ifndef GTA3
#include <CBike.h>
2021-10-25 10:03:27 -04:00
#include <cHandlingDataMgr.h>
2021-10-21 18:23:02 -04:00
#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>
2021-10-25 10:03:27 -04:00
#include <CGangWars.h>
2021-10-26 08:08:26 -04:00
#include <CZoneInfo.h>
2021-10-30 16:30:28 -04:00
#include <CTheZones.h>
2021-09-20 08:41:40 -04:00
#endif
#include "../depend/fla/IDaccess.h"
#include "../depend/imgui/imgui.h"
2021-10-24 18:08:00 -04:00
#include "json.h"
2021-10-25 10:03:27 -04:00
#include "hotkeys.h"
#include "vkeys.h"
2021-10-25 10:03:27 -04:00
#include "resourcestore.h"
2021-11-05 05:59:11 -04:00
#include "fontmgr.h"
2022-02-11 01:38:14 -05:00
#include "locale.h"
2020-12-02 16:19:16 -05:00
2022-05-17 06:51:59 -04:00
#define TEXT(x) Locale::GetText(x).c_str()
#define TEXT_S(x) Locale::GetText(x)
2022-02-11 16:35:08 -05:00
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
{
2022-01-07 03:18:00 -05:00
Render_DirectX9,
Render_DirectX11,
Render_Unknown
2020-12-02 16:19:16 -05:00
};
2022-02-11 01:38:14 -05:00
extern eRenderer gRenderer;
extern std::ofstream gLog;
2021-09-20 08:41:40 -04:00
extern CJson gConfig;
2021-06-17 09:00:32 -04:00
2021-09-20 08:41:40 -04:00
// Fix function clashes
2022-02-11 16:35:08 -05:00
static void SetHelpMessage(const char *message, bool b1 = false, bool b2 = false, bool b3 = false)
2021-08-01 21:41:48 -04:00
{
2021-10-21 18:23:02 -04:00
#if GTASA
2022-01-07 03:18:00 -05:00
CHud::SetHelpMessage(message, b1, b2, b3);
2021-10-21 18:23:02 -04:00
#elif GTAVC
2022-01-07 03:18:00 -05:00
CHud::SetHelpMessage(message, b1, b2);
#else
const size_t size = strlen(message)+1;
2021-11-03 13:52:46 -04:00
wchar_t* wc = new wchar_t[size];
mbstowcs(wc, message, size);
2022-01-07 03:18:00 -05:00
CHud::SetHelpMessage(wc, b1);
delete wc;
2021-08-17 01:46:41 -04:00
#endif
}
extern Hotkey aimSkinChanger;
extern Hotkey freeCam;
2022-06-05 17:18:41 -04:00
extern Hotkey freeCamForward;
extern Hotkey freeCamBackward;
extern Hotkey freeCamLeft;
extern Hotkey freeCamRight;
extern Hotkey commandWindow;
extern Hotkey fixVeh;
extern Hotkey flipVeh;
extern Hotkey godMode;
extern Hotkey menuOpen;
extern Hotkey quickSceenShot;
extern Hotkey quickTeleport;
extern Hotkey vehEngine;
extern Hotkey vehInstantStart;
extern Hotkey vehInstantStop;