-
Notifications
You must be signed in to change notification settings - Fork 0
/
Common.h
63 lines (56 loc) · 1.35 KB
/
Common.h
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
/*********************************************************
*
* Multi Theft Auto: San Andreas - Deathmatch
*
* ml_base, External lua add-on module
*
* Copyright © 2003-2008 MTA. All Rights Reserved.
*
* Grand Theft Auto is © 2002-2003 Rockstar North
*
* THE FOLLOWING SOURCES ARE PART OF THE MULTI THEFT
* AUTO SOFTWARE DEVELOPMENT KIT AND ARE RELEASED AS
* OPEN SOURCE FILES. THESE FILES MAY BE USED AS LONG
* AS THE DEVELOPER AGREES TO THE LICENSE THAT IS
* PROVIDED WITH THIS PACKAGE.
*
*********************************************************/
extern "C"
{
#include "include/lua.h"
#include "include/lualib.h"
#include "include/lauxlib.h"
}
#ifdef WIN32
#define MTAEXPORT extern "C" __declspec(dllexport)
#else
#define MTAEXPORT extern "C"
#endif
#include <list>
#include <vector>
// Obviously i can't get us this so other includes will most likely be needed later on
using namespace std;
#ifndef __COMMON_H
#define __COMMON_H
// used in the function argument vector
#define MAX_ARGUMENTS 10
struct FunctionArguments
{
lua_State* luaVM;
unsigned char nArguments;
unsigned char Type[10];
void* Arguments[10];
};
namespace FunctionArgumentType
{
enum
{
TYPE_NUMBER = 1,
TYPE_STRING = 2,
TYPE_LIGHTUSERDATA = 3,
TYPE_BOOLEAN = 4,
TYPE_NIL = 5,
TYPE_TABLE = 6
};
}
#endif