228 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl; |
228 function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl; |
229 var i : integer; |
229 var i : integer; |
230 begin |
230 begin |
231 for i:= 1 to lua_gettop(L) do |
231 for i:= 1 to lua_gettop(L) do |
232 if (GameFlags and lua_tointeger(L, i)) = 0 then |
232 if (GameFlags and lua_tointeger(L, i)) = 0 then |
233 GameFlags := GameFlags + lua_tointeger(L, i); |
233 GameFlags := GameFlags + LongWord(lua_tointeger(L, i)); |
234 ScriptSetInteger('GameFlags', GameFlags); |
234 ScriptSetInteger('GameFlags', GameFlags); |
|
235 lc_enablegameflags:= 0; |
235 end; |
236 end; |
236 |
237 |
237 function lc_disablegameflags(L : Plua_State) : LongInt; Cdecl; |
238 function lc_disablegameflags(L : Plua_State) : LongInt; Cdecl; |
238 var i : integer; |
239 var i : integer; |
239 begin |
240 begin |
240 for i:= 1 to lua_gettop(L) do |
241 for i:= 1 to lua_gettop(L) do |
241 if (GameFlags and lua_tointeger(L, i)) <> 0 then |
242 if (GameFlags and lua_tointeger(L, i)) <> 0 then |
242 GameFlags := GameFlags - lua_tointeger(L, i); |
243 GameFlags := GameFlags - LongWord(lua_tointeger(L, i)); |
243 ScriptSetInteger('GameFlags', GameFlags); |
244 ScriptSetInteger('GameFlags', GameFlags); |
|
245 lc_disablegameflags:= 0; |
244 end; |
246 end; |
245 |
247 |
246 function lc_cleargameflags(L : Plua_State) : LongInt; Cdecl; |
248 function lc_cleargameflags(L : Plua_State) : LongInt; Cdecl; |
247 begin |
249 begin |
|
250 // Silence hint |
|
251 L:= L; |
248 GameFlags:= 0; |
252 GameFlags:= 0; |
249 ScriptSetInteger('GameFlags', GameFlags); |
253 ScriptSetInteger('GameFlags', GameFlags); |
|
254 lc_cleargameflags:= 0; |
250 end; |
255 end; |
251 |
256 |
252 function lc_addcaption(L : Plua_State) : LongInt; Cdecl; |
257 function lc_addcaption(L : Plua_State) : LongInt; Cdecl; |
253 begin |
258 begin |
254 if lua_gettop(L) = 1 then |
259 if lua_gettop(L) = 1 then |