112 LuaError('Lua: Wrong number of parameters passed to bnot!'); |
112 LuaError('Lua: Wrong number of parameters passed to bnot!'); |
113 lua_pushnil(L); |
113 lua_pushnil(L); |
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; |
|
118 |
|
119 function lc_setinputmask(L : Plua_State) : LongInt; Cdecl; |
|
120 var gear : PGear; |
|
121 begin |
|
122 if lua_gettop(L) <> 1 then |
|
123 LuaError('Lua: Wrong number of parameters passed to SetInputMask!') |
|
124 else InputMask:= lua_tointeger(L, 1); |
|
125 lc_setinputmask:= 0 |
117 end; |
126 end; |
118 |
127 |
119 function lc_writelntoconsole(L : Plua_State) : LongInt; Cdecl; |
128 function lc_writelntoconsole(L : Plua_State) : LongInt; Cdecl; |
120 begin |
129 begin |
121 if lua_gettop(L) = 1 then |
130 if lua_gettop(L) = 1 then |
1415 |
1424 |
1416 // register functions |
1425 // register functions |
1417 lua_register(luaState, 'band', @lc_band); |
1426 lua_register(luaState, 'band', @lc_band); |
1418 lua_register(luaState, 'bor', @lc_bor); |
1427 lua_register(luaState, 'bor', @lc_bor); |
1419 lua_register(luaState, 'bnot', @lc_bnot); |
1428 lua_register(luaState, 'bnot', @lc_bnot); |
|
1429 lua_register(luaState, 'SetInputMask', @lc_setinputmask); |
1420 lua_register(luaState, 'AddGear', @lc_addgear); |
1430 lua_register(luaState, 'AddGear', @lc_addgear); |
1421 lua_register(luaState, 'DeleteGear', @lc_deletegear); |
1431 lua_register(luaState, 'DeleteGear', @lc_deletegear); |
1422 lua_register(luaState, 'AddVisualGear', @lc_addvisualgear); |
1432 lua_register(luaState, 'AddVisualGear', @lc_addvisualgear); |
1423 lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear); |
1433 lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear); |
1424 lua_register(luaState, 'GetVisualGearValues', @lc_getvisualgearvalues); |
1434 lua_register(luaState, 'GetVisualGearValues', @lc_getvisualgearvalues); |