Subversion Repositories pspware

Rev

Rev 345 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 345 Rev 350
Line 2... Line 2...
2
#define __LUAMODULE_H
2
#define __LUAMODULE_H
3
3
4
#include <stdlib.h>
4
#include <stdlib.h>
5
#include <tdefs.h>
5
#include <tdefs.h>
6
6
7
extern "C" {
-
 
8
#include "lua.h"
7
#include "lua.h"
9
#include "lualib.h"
8
#include "lualib.h"
10
#include "lauxlib.h"
9
#include "lauxlib.h"
11
extern void luaC_collectgarbage (lua_State *L);
10
extern void luaC_collectgarbage (lua_State *L);
12
}
-
 
13
11
14
#define MAX(a, b) ((a) > (b) ? (a) : (b))
12
#define MAX(a, b) ((a) > (b) ? (a) : (b))
15
#define CLAMP(val, min, max) ((val)>(max)?(max):((val)<(min)?(min):(val)))
13
#define CLAMP(val, min, max) ((val)>(max)?(max):((val)<(min)?(min):(val)))
16
14
17
#define UserdataStubs(HANDLE, DATATYPE) \
15
#define UserdataStubs(HANDLE, DATATYPE) \
Line 49... Line 47...
49
        luaL_getmetatable(L, #HANDLE); \
47
        luaL_getmetatable(L, #HANDLE); \
50
        lua_setmetatable(L, -2); \
48
        lua_setmetatable(L, -2); \
51
        return 1; \
49
        return 1; \
52
}
50
}
53
51
54
extern int runScript(const char* script, bool isStringBuffer);
-
 
55
extern void luaC_collectgarbage (lua_State *L);
-
 
56
-
 
57
extern void stackDump (lua_State *L);
-
 
58
-
 
59
52
60
#endif
53
#endif
61
54