hedgewars/uScript.pas
changeset 8077 2ea5cde93abc
parent 8073 5a289ef40fdb
child 8096 453917e94e55
child 8145 6408c0ba4ba1
equal deleted inserted replaced
8076:5ee474476ae1 8077:2ea5cde93abc
  1978 ScriptCall('onScreenResize');
  1978 ScriptCall('onScreenResize');
  1979 end;
  1979 end;
  1980 
  1980 
  1981 // custom script loader via physfs, passed to lua_load
  1981 // custom script loader via physfs, passed to lua_load
  1982 const BUFSIZE = 1024;
  1982 const BUFSIZE = 1024;
  1983 {$IFDEF WIN32}
       
  1984     PhysfsLibName = 'libphysfs';
       
  1985 {$ELSE}
       
  1986     {$IFDEF DARWIN}
       
  1987     PhysfsLibName = 'physfs';
       
  1988     {$ELSE}
       
  1989     PhysfsLibName = 'physfs.a';
       
  1990     {$ENDIF}
       
  1991 {$ENDIF}
       
  1992 function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhysfsLibName;
       
  1993 procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhysfsLibName;
       
  1994 
       
  1995 
  1983 
  1996 procedure ScriptLoad(name : shortstring);
  1984 procedure ScriptLoad(name : shortstring);
  1997 var ret : LongInt;
  1985 var ret : LongInt;
  1998       s : shortstring;
  1986       s : shortstring;
  1999       f : PFSFile;
  1987       f : PFSFile;