equal
deleted
inserted
replaced
1 unit uPhysFSLayer; |
1 unit uPhysFSLayer; |
2 |
2 |
3 interface |
3 interface |
4 uses SDLh, LuaPas; |
4 uses SDLh, LuaPas; |
5 |
|
6 {$INCLUDE "config.inc"} |
|
7 |
5 |
8 const PhysfsLibName = {$IFDEF PHYSFS_INTERNAL}'libhwphysfs'{$ELSE}'libphysfs'{$ENDIF}; |
6 const PhysfsLibName = {$IFDEF PHYSFS_INTERNAL}'libhwphysfs'{$ELSE}'libphysfs'{$ENDIF}; |
9 const PhyslayerLibName = 'libphyslayer'; |
7 const PhyslayerLibName = 'libphyslayer'; |
10 |
8 |
11 {$IFNDEF WIN32} |
9 {$IFNDEF WIN32} |
36 procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName; |
34 procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName; |
37 procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName; |
35 procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName; |
38 {$ENDIF} |
36 {$ENDIF} |
39 |
37 |
40 implementation |
38 implementation |
41 uses uUtils, uVariables, sysutils; |
39 uses uConsts, uUtils, uVariables, sysutils; |
42 |
40 |
43 {$IFNDEF PAS2C} |
41 {$IFNDEF PAS2C} |
44 function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external PhysfsLibName; |
42 function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external PhysfsLibName; |
45 function PHYSFS_deinit() : LongInt; cdecl; external PhysfsLibName; |
43 function PHYSFS_deinit() : LongInt; cdecl; external PhysfsLibName; |
46 function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName; |
44 function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName; |