This repository was archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathGooseGooseDuckHack.cpp
More file actions
112 lines (90 loc) · 2.73 KB
/
Copy pathGooseGooseDuckHack.cpp
File metadata and controls
112 lines (90 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#pragma once
//Windows
#include<Windows.h>
#include<list>
#include<thread>
#include <stdlib.h>
#include <tchar.h>
#include"Client.h"
#include"utils.hpp"
//Struct
#include"Struct/UserSettings.hpp"
#include"Struct/HackSettings.hpp"
//Updaters
#include"./Class/DataUpdater.hpp"
#include"./Class/HotkeyUpdater.hpp"
#include"./Class/GameProcessUpdater.hpp"
#include"./Class/BytesPatchUpdater.hpp"
#include"./Class/Game/PlayerController.h"
#include<dwmapi.h>
#include<d3d11.h>
//ImGui
#include<imgui.h>
#include<imgui_impl_dx11.h>
#include<imgui_impl_win32.h>
//UI
#include "./UI/UI.h"
#include "Class/HttpDataUpdater.h"
#include "Memory/CodeCave/CodeCave.h"
#include "Class/DebugConsole.h"
#include "antiAC.hpp"
#ifndef DEVELOP
AntiAC antiAC;
#endif
Hack hack;
HackSettings hackSettings;
//初始化辅助设置类
//settings
Client g_client;
//全局变量保存用户配置
UserSettings userSettings;
Utils utils;
//初始化RPM工具类
//Init RPM classes
Memory memory;
//初始化更新类线程
//Init updaters
//TODO: 处理NULL
HotkeyUpdater hotkeyUpdater(&hackSettings);
DataUpdater dataUpdater(&g_client);
BytesPatchUpdater bytesUpdater;
MemoryUpdater memoryUpdater(&g_client, &hackSettings);
HttpDataUpdater httpDataUpdater;
std::vector<Updater*> updaters;
CodeCave codeCave;
DebugConsole debugConsole;
INT APIENTRY WinMain(HINSTANCE instance, HINSTANCE, PSTR, INT cmd_show) {
{
//修改设置
//Edit hacksettings
hackSettings.guiSettings.b_disableFogOfWar = false;
}
hack.setClient(&g_client);
//存放所有Updater
updaters.push_back(&hotkeyUpdater);
updaters.push_back(&dataUpdater);
updaters.push_back(&bytesUpdater);
updaters.push_back(&memoryUpdater);
updaters.push_back(&httpDataUpdater);
#ifndef DEVELOP
std::thread antiACThread(&AntiAC::check_loop, &antiAC);
#endif
//监听热键
//Listen to keyboard
std::thread hackSettingsUpdaterThread(&HotkeyUpdater::hackSettingsUpdater, &hotkeyUpdater);
//启动游戏内存数据更新线程
//Game data updater
std::thread playerControllerUpdaterThread(&DataUpdater::playerControllerUpdater, &dataUpdater);
std::thread lobbySceneHandlerUpdaterThread(&DataUpdater::lobbySceneHandlerUpdater, &dataUpdater);
//启动字节补丁线程
//Game process finder
std::thread bytesPatchUpdaterThread(&BytesPatchUpdater::bytesPatchUpdater, &bytesUpdater);
//启动游戏进程查找线程
//Game process finder
std::thread gameProcessUpdaterThread(&MemoryUpdater::gameProcessUpdater, &memoryUpdater);
//启动http客户端更新线程
std::thread httpDataUpdaterThread(&HttpDataUpdater::httpDataUpdaterThread, &httpDataUpdater);
//GUI循环
//GUI loop
UI::Render( instance, cmd_show);
}