-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.h
More file actions
39 lines (31 loc) · 901 Bytes
/
main.h
File metadata and controls
39 lines (31 loc) · 901 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
#ifndef MAIN_H
#define MAIN_H
#include "../pinc.h"
#include "Include/Lua/lua.h"
#include "Include/Lua/lualib.h"
#include "Include/Lua/lauxlib.h"
#include <stdlib.h>
#include <math.h>
#ifdef _WIN32
#include <memoryapi.h>
#else
#include <sys/mman.h>
#endif
#define ALIGNMENT 0x1000
#define MAX_FUNCTIONS 0x40
#define STUB_SIZE 0x20
#define PLUGIN_VERSION_MAJOR 0
#define PLUGIN_VERSION_MINOR 7
typedef unsigned int long DWORD;
extern lua_State *LuaVM;
extern char *AllocMem;
extern int definedFunctions;
int Lua_TraceBack( lua_State* L );
int Plugin_Lua_pcall( lua_State* L, int nargs, int nret );
void Global_LuaHandler( char *funcName );
void Global_LuaHandler_Method( char *funcName, scr_entref_t entref );
void *aligned_malloc( int size, int ALIGN );
char *AllocStub( char *funcName );
char *AllocMethodStub( char *funcName );
DWORD SetCall(DWORD addr, void* destination);
#endif // MAIN_H