114 end |
114 end |
115 else lua_pushinteger(L, not lua_tointeger(L, 1)); |
115 else lua_pushinteger(L, not lua_tointeger(L, 1)); |
116 lc_bnot := 1; |
116 lc_bnot := 1; |
117 end; |
117 end; |
118 |
118 |
|
119 function lc_getinputmask(L : Plua_State) : LongInt; Cdecl; |
|
120 begin |
|
121 if lua_gettop(L) <> 0 then |
|
122 LuaError('Lua: Wrong number of parameters passed to GetInputMask!') |
|
123 else lua_pushinteger(L, InputMask); |
|
124 lc_getinputmask:= 1 |
|
125 end; |
|
126 |
119 function lc_setinputmask(L : Plua_State) : LongInt; Cdecl; |
127 function lc_setinputmask(L : Plua_State) : LongInt; Cdecl; |
120 var gear : PGear; |
|
121 begin |
128 begin |
122 if lua_gettop(L) <> 1 then |
129 if lua_gettop(L) <> 1 then |
123 LuaError('Lua: Wrong number of parameters passed to SetInputMask!') |
130 LuaError('Lua: Wrong number of parameters passed to SetInputMask!') |
124 else InputMask:= lua_tointeger(L, 1); |
131 else InputMask:= lua_tointeger(L, 1); |
125 lc_setinputmask:= 0 |
132 lc_setinputmask:= 0 |
1424 |
1431 |
1425 // register functions |
1432 // register functions |
1426 lua_register(luaState, 'band', @lc_band); |
1433 lua_register(luaState, 'band', @lc_band); |
1427 lua_register(luaState, 'bor', @lc_bor); |
1434 lua_register(luaState, 'bor', @lc_bor); |
1428 lua_register(luaState, 'bnot', @lc_bnot); |
1435 lua_register(luaState, 'bnot', @lc_bnot); |
|
1436 lua_register(luaState, 'GetInputMask', @lc_getinputmask); |
1429 lua_register(luaState, 'SetInputMask', @lc_setinputmask); |
1437 lua_register(luaState, 'SetInputMask', @lc_setinputmask); |
1430 lua_register(luaState, 'AddGear', @lc_addgear); |
1438 lua_register(luaState, 'AddGear', @lc_addgear); |
1431 lua_register(luaState, 'DeleteGear', @lc_deletegear); |
1439 lua_register(luaState, 'DeleteGear', @lc_deletegear); |
1432 lua_register(luaState, 'AddVisualGear', @lc_addvisualgear); |
1440 lua_register(luaState, 'AddVisualGear', @lc_addvisualgear); |
1433 lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear); |
1441 lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear); |