-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnative-lib.cpp
More file actions
49 lines (39 loc) · 826 Bytes
/
native-lib.cpp
File metadata and controls
49 lines (39 loc) · 826 Bytes
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
#include <GLES2/gl2.h>
#include <jni.h>
#include <string>
#include <unistd.h>
#include <pthread.h>
#include <dlfcn.h>
#include <vector>
#include "Engine/Vector2.h"
#include "Engine/Vector3.h"
#include "Engine/Quaternion.h"
#include "Engine/Rect.h"
#include "Engine/Color.h"
#include "Etc/Logging.h"
#include "Etc/Obfuscate.h"
#include "Etc/Utils.h"
#include "Mod/Chams.h"
#include "Mod/Offsets.h"
#include "Mod/Hooks.h"
#include "Mod/Patch.h"
void *thread_main(void *)
{
do
{
sleep(5);
} while (!isLibraryLoaded(LibraryToLoad));
LOGDEBUG("INITIALIZED!");
offsets = new Offsets();
Functions();
Hooks();
Patches();
isChams();
return nullptr;
}
__attribute__((constructor))
void lib_main()
{
pthread_t ptid;
pthread_create(&ptid, nullptr, thread_main, nullptr);
}