aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib/FreeImage
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/lib/FreeImage')
-rwxr-xr-xGame/Code/lib/FreeImage/FreeBitmap.pas8
-rwxr-xr-xGame/Code/lib/FreeImage/FreeImage.pas22
2 files changed, 26 insertions, 4 deletions
diff --git a/Game/Code/lib/FreeImage/FreeBitmap.pas b/Game/Code/lib/FreeImage/FreeBitmap.pas
index 47be822e..26a7f243 100755
--- a/Game/Code/lib/FreeImage/FreeBitmap.pas
+++ b/Game/Code/lib/FreeImage/FreeBitmap.pas
@@ -1,8 +1,5 @@
unit FreeBitmap;
-{$I switches.inc}
-
-
// ==========================================================
//
// Delphi wrapper for FreeImage 3
@@ -34,6 +31,11 @@ unit FreeBitmap;
//
// ==========================================================
+{$IFDEF FPC}
+ {$MODE Delphi}
+ {$H+} // use AnsiString
+{$ENDIF}
+
interface
uses
diff --git a/Game/Code/lib/FreeImage/FreeImage.pas b/Game/Code/lib/FreeImage/FreeImage.pas
index a1c0e7de..c33d1bc8 100755
--- a/Game/Code/lib/FreeImage/FreeImage.pas
+++ b/Game/Code/lib/FreeImage/FreeImage.pas
@@ -32,10 +32,30 @@ interface
uses Windows;
-{$MINENUMSIZE 4} // Make sure enums are stored as an integer to be compatible with C/C++
+{$IFDEF FPC}
+ {$MODE DELPHI}
+ {$PACKENUM 4} (* use 4-byte enums *)
+ {$PACKRECORDS C} (* C/C++-compatible record packing *)
+{$ELSE}
+ {$MINENUMSIZE 4} (* use 4-byte enums *)
+{$ENDIF}
+
+{$IFDEF MSWINDOWS}
+ {$DEFINE DLL_STDCALL}
+{$ELSE}
+ {$DEFINE DLL_CDECL}
+{$ENDIF}
const
+{$IFDEF MSWINDOWS}
+ FIDLL = 'freeimage.dll';
+{$ENDIF}
+{$IFDEF LINUX}
+ FIDLL = 'libfreeimage.so';
+{$ENDIF}
+{$IFDEF DARWIN}
FIDLL = 'libfreeimage.dylib';
+{$ENDIF}
// --------------------------------------------------------------------------
// Bitmap types -------------------------------------------------------------