This repository has been archived by the owner on Jun 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SDK.h
151 lines (143 loc) · 4.3 KB
/
SDK.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : SDK.h
*
***************************************************************/
#pragma once
#include "Squirrel.h"
#include "Interfaces/CCoreInterface.h"
#ifdef _WIN32
#define EXPORT extern "C" __declspec( dllexport )
#else
#define EXPORT extern "C"
#endif
#define INVALID_ENTITY_ID 0xFFFF
typedef void (* Log_t)( const char * szFormat, ... );
#define Log Squirrel.LogPrintf
void RegisterFunction( HSQUIRRELVM vm, const char * szFunctionName, SQFUNCTION pfnFunction );
struct SquirrelInterface_t
{
sq_open_t sqopen;
sq_newthread_t sqnewthread;
sq_seterrorhandler_t sqseterrorhandler;
sq_close_t sqclose;
sq_setforeignptr_t sqsetforeignptr;
sq_getforeignptr_t sqgetforeignptr;
sq_setprintfunc_t sqsetprintfunc;
sq_getprintfunc_t sqgetprintfunc;
sq_geterrorfunc_t sqgeterrorfunc;
sq_suspendvm_t sqsuspendvm;
sq_wakeupvm_t sqwakeupvm;
sq_getvmstate_t sqgetvmstate;
sq_compile_t sqcompile;
sq_compilebuffer_t sqcompilebuffer;
sq_enabledebuginfo_t sqenabledebuginfo;
sq_notifyallexceptions_t sqnotifyallexceptions;
sq_setcompilererrorhandler_t sqsetcompilererrorhandler;
sq_push_t sqpush;
sq_pop_t sqpop;
sq_poptop_t sqpoptop;
sq_remove_t sqremove;
sq_gettop_t sqgettop;
sq_settop_t sqsettop;
sq_reservestack_t sqreservestack;
sq_cmp_t sqcmp;
sq_move_t sqmove;
sq_newuserdata_t sqnewuserdata;
sq_newtable_t sqnewtable;
sq_newarray_t sqnewarray;
sq_newclosure_t sqnewclosure;
sq_setparamscheck_t sqsetparamscheck;
sq_bindenv_t sqbindenv;
sq_pushstring_t sqpushstring;
sq_pushfloat_t sqpushfloat;
sq_pushinteger_t sqpushinteger;
sq_pushbool_t sqpushbool;
sq_pushuserpointer_t sqpushuserpointer;
sq_pushnull_t sqpushnull;
sq_gettype_t sqgettype;
sq_getsize_t sqgetsize;
sq_getbase_t sqgetbase;
sq_instanceof_t sqinstanceof;
sq_tostring_t sqtostring;
sq_tobool_t sqtobool;
sq_getstring_t sqgetstring;
sq_getinteger_t sqgetinteger;
sq_getfloat_t sqgetfloat;
sq_getbool_t sqgetbool;
sq_getthread_t sqgetthread;
sq_getuserpointer_t sqgetuserpointer;
sq_getuserdata_t sqgetuserdata;
sq_settypetag_t sqsettypetag;
sq_gettypetag_t sqgettypetag;
sq_setreleasehook_t sqsetreleasehook;
sq_getscratchpad_t sqgetscratchpad;
sq_getfunctioninfo_t sqgetfunctioninfo;
sq_getclosureinfo_t sqgetclosureinfo;
sq_setnativeclosurename_t sqsetnativeclosurename;
sq_setinstanceup_t sqsetinstanceup;
sq_getinstanceup_t sqgetinstanceup;
sq_setclassudsize_t sqsetclassudsize;
sq_newclass_t sqnewclass;
sq_createinstance_t sqcreateinstance;
sq_setattributes_t sqsetattributes;
sq_getattributes_t sqgetattributes;
sq_getclass_t sqgetclass;
sq_weakref_t sqweakref;
sq_getdefaultdelegate_t sqgetdefaultdelegate;
sq_pushroottable_t sqpushroottable;
sq_pushregistrytable_t sqpushregistrytable;
sq_pushconsttable_t sqpushconsttable;
sq_setroottable_t sqsetroottable;
sq_setconsttable_t sqsetconsttable;
sq_newslot_t sqnewslot;
sq_deleteslot_t sqdeleteslot;
sq_set_t sqset;
sq_get_t sqget;
sq_rawget_t sqrawget;
sq_rawset_t sqrawset;
sq_rawdeleteslot_t sqrawdeleteslot;
sq_arrayappend_t sqarrayappend;
sq_arraypop_t sqarraypop;
sq_arrayresize_t sqarrayresize;
sq_arrayreverse_t sqarrayreverse;
sq_arrayremove_t sqarrayremove;
sq_arrayinsert_t sqarrayinsert;
sq_setdelegate_t sqsetdelegate;
sq_getdelegate_t sqgetdelegate;
sq_clone_t sqclone;
sq_setfreevariable_t sqsetfreevariable;
sq_next_t sqnext;
sq_getweakrefval_t sqgetweakrefval;
sq_clear_t sqclear;
sq_call_t sqcall;
sq_resume_t sqresume;
sq_getlocal_t sqgetlocal;
sq_getfreevariable_t sqgetfreevariable;
sq_throwerror_t sqthrowerror;
sq_reseterror_t sqreseterror;
sq_getlasterror_t sqgetlasterror;
sq_getstackobj_t sqgetstackobj;
sq_pushobject_t sqpushobject;
sq_addref_t sqaddref;
sq_release_t sqrelease;
sq_resetobject_t sqresetobject;
sq_objtostring_t sqobjtostring;
sq_objtobool_t sqobjtobool;
sq_objtointeger_t sqobjtointeger;
sq_objtofloat_t sqobjtofloat;
sq_getobjtypetag_t sqgetobjtypetag;
sq_collectgarbage_t sqcollectgarbage;
sq_writeclosure_t sqwriteclosure;
sq_readclosure_t sqreadclosure;
sq_malloc_t sqmalloc;
sq_realloc_t sqrealloc;
sq_free_t sqfree;
sq_stackinfos_t sqstackinfos;
sq_setdebughook_t sqsetdebughook;
Log_t LogPrintf;
};
extern SquirrelInterface_t Squirrel;
extern CCoreInterface * pCore;