equal
deleted
inserted
replaced
440 lc_setweapon:= 0; |
440 lc_setweapon:= 0; |
441 end; |
441 end; |
442 |
442 |
443 // enable/disable cinematic effects |
443 // enable/disable cinematic effects |
444 function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl; |
444 function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl; |
445 var at: LongInt; |
|
446 const |
445 const |
447 call = 'SetCinematicMode'; |
446 call = 'SetCinematicMode'; |
448 params = 'enable'; |
447 params = 'enable'; |
449 begin |
448 begin |
450 if (CheckLuaParamCount(L, 1, call, params)) then |
449 if (CheckLuaParamCount(L, 1, call, params)) then |
3109 spr: TSprite; |
3108 spr: TSprite; |
3110 mg : TMapGen; |
3109 mg : TMapGen; |
3111 begin |
3110 begin |
3112 // initialize lua |
3111 // initialize lua |
3113 luaState:= lua_open; |
3112 luaState:= lua_open; |
3114 TryDo(luaState <> nil, 'lua_open failed', true); |
3113 if checkFails(luaState <> nil, 'lua_open failed', true) then exit; |
3115 |
3114 |
3116 // open internal libraries |
3115 // open internal libraries |
3117 luaopen_base(luaState); |
3116 luaopen_base(luaState); |
3118 luaopen_string(luaState); |
3117 luaopen_string(luaState); |
3119 luaopen_math(luaState); |
3118 luaopen_math(luaState); |