DEADSOFTWARE

mixer: allow to use sdl 1.2 + sdl_mixer
[d2df-sdl.git] / src / lib / sdl / jedi-sdl.inc
1 {
2 $Id: jedi-sdl.inc,v 1.15 2007/05/29 21:30:48 savage Exp $
3 }
4 {******************************************************************************}
5 { }
6 { Borland Delphi SDL - Simple DirectMedia Layer }
7 { Global Conditional Definitions for JEDI-SDL cross-compilation }
8 { }
9 { }
10 { The initial developer of this Pascal code was : }
11 { Prof. Abimbola Olowofoyeku <http://www.bigfoot.com/~African_Chief/> }
12 { }
13 { Portions created by Prof. Abimbola Olowofoyeku are }
14 { Copyright (C) 2000 - 2100 Prof. Abimbola Olowofoyeku. }
15 { }
16 { }
17 { Contributor(s) }
18 { -------------- }
19 { Prof. Abimbola Olowofoyeku <http://www.bigfoot.com/~African_Chief/> }
20 { Dominqiue Louis <Dominique@SavageSoftware.com.au> }
21 { }
22 { Obtained through: }
23 { Joint Endeavour of Delphi Innovators ( Project JEDI ) }
24 { }
25 { You may retrieve the latest version of this file at the Project }
26 { JEDI home page, located at http://delphi-jedi.org }
27 { }
28 { The contents of this file are used with permission, subject to }
29 { the Mozilla Public License Version 1.1 (the "License"); you may }
30 { not use this file except in compliance with the License. You may }
31 { obtain a copy of the License at }
32 { http://www.mozilla.org/MPL/MPL-1.1.html }
33 { }
34 { Software distributed under the License is distributed on an }
35 { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
36 { implied. See the License for the specific language governing }
37 { rights and limitations under the License. }
38 { }
39 { Description }
40 { ----------- }
41 { This code has been copied from... }
42 { Global Conditional Definitions for Chief's UNZIP package }
43 { By Prof. Abimbola Olowofoyeku (The African Chief) }
44 { http://www.bigfoot.com/~African_Chief/ }
45 { }
46 { }
47 { Requires }
48 { -------- }
49 { The SDL Runtime libraris on Win32 : SDL.dll on Linux : libSDL.so }
50 { They are available from... }
51 { http://www.libsdl.org . }
52 { }
53 { Programming Notes }
54 { ----------------- }
55 { }
56 { }
57 { }
58 { }
59 { Revision History }
60 { ---------------- }
61 { 2003-04-03 DL - Initial addition }
62 { }
63 { 2003-04-07 DL - Added Macro ON derective for FPC and OpenGL and removed }
64 { WEAKPACKAGE derective. WEAKPACKAGE should be set when }
65 { appropriate. }
66 { }
67 { 2003-04-23 - DL : under instruction from Alexey Barkovoy I have added }
68 { better TMT Pascal support and under instruction }
69 { from Prof. Abimbola Olowofoyeku (The African Chief) }
70 { I have added better Gnu Pascal support }
71 { }
72 { 2004-01-19 - DL : Under instruction from Marco van de Voort, I have added }
73 { Better FPC support for FreeBSD. }
74 { }
75 (*
76 $Log: jedi-sdl.inc,v $
77 Revision 1.15 2007/05/29 21:30:48 savage
78 Changes as suggested by Almindor for 64bit compatibility.
80 Revision 1.14 2007/05/20 20:29:11 savage
81 Initial Changes to Handle 64 Bits
83 Revision 1.13 2007/01/21 15:51:45 savage
84 Added Delphi 2006 support
86 Revision 1.12 2006/11/19 18:41:01 savage
87 removed THREADING ON flag as it is no longer needed in latest versions of FPC.
89 Revision 1.11 2006/01/04 00:52:41 drellis
90 Updated to include defined for ENDIAN values, SDL_BYTEORDER should now be correctly defined depending onthe platform. Code taken from sdl_mixer
92 Revision 1.10 2005/05/22 18:42:31 savage
93 Changes as suggested by Michalis Kamburelis. Thanks again.
95 Revision 1.9 2004/12/23 23:42:17 savage
96 Applied Patches supplied by Michalis Kamburelis ( THANKS! ), for greater FreePascal compatability.
98 Revision 1.8 2004/10/20 22:43:04 savage
99 Ensure that UNSAFE type warning are off in D9 as well
101 Revision 1.7 2004/04/05 09:59:51 savage
102 Changes for FreePacal as suggested by Marco
104 Revision 1.6 2004/03/31 22:18:15 savage
105 Small comment for turning off warning under GnuPascal
107 Revision 1.5 2004/03/30 22:41:02 savage
108 Added extra commenting due to previous compiler directive
110 Revision 1.4 2004/03/30 22:08:33 savage
111 Added Kylix Define
113 Revision 1.3 2004/03/30 21:34:40 savage
114 {$H+} needed for FPC compatiblity
116 Revision 1.2 2004/02/14 00:23:39 savage
117 As UNIX is defined in jedi-sdl.inc this will be used to check linux compatability as well. Units have been changed to reflect this change.
119 *)
120 {******************************************************************************}
122 {.$define Debug} { uncomment for debugging }
124 {$IFNDEF FPC}
125 {$IFDEF __GPC__}
126 {$I-}
127 {$W-} // turn off GPC warnings
128 {$X+}
129 {$ELSE} {__GPC__}
130 {$IFDEF Debug}
131 {$F+,D+,Q-,L+,R+,I-,S+,Y+,A+}
132 {$ELSE}
133 {$F+,Q-,R-,S-,I-,A+}
134 {$ENDIF}
135 {$ENDIF} {__GPC__}
136 {$ELSE} {FPC}
137 //{$M+}
138 {$ENDIF} {FPC}
140 {$IFDEF LINUX}
141 {$DEFINE UNIX}
142 {$ENDIF}
144 {$IFDEF ver70}
145 {$IFDEF Windows}
146 {$DEFINE Win16}
147 {$ENDIF Windows}
148 {$IFDEF MSDOS}
149 {$DEFINE NO_EXPORTS}
150 {$ENDIF MSDOS}
151 {$IFDEF DPMI}
152 {$DEFINE BP_DPMI}
153 {$ENDIF}
154 {$DEFINE OS_16_BIT}
155 {$DEFINE __OS_DOS__}
156 {$ENDIF ver70}
158 {$IFDEF ver80}
159 {$DEFINE Delphi} {Delphi 1.x}
160 {$DEFINE Delphi16}
161 {$DEFINE Win16}
162 {$DEFINE OS_16_BIT}
163 {$DEFINE __OS_DOS__}
164 {$ENDIF ver80}
166 {$IFDEF ver90}
167 {$DEFINE Delphi} {Delphi 2.x}
168 {$DEFINE Delphi32}
169 {$DEFINE WIN32}
170 {$DEFINE WINDOWS}
171 {$ENDIF ver90}
173 {$IFDEF ver100}
174 {$DEFINE Delphi} {Delphi 3.x}
175 {$DEFINE Delphi32}
176 {$DEFINE WIN32}
177 {$DEFINE WINDOWS}
178 {$ENDIF ver100}
180 {$IFDEF ver93}
181 {$DEFINE Delphi} {C++ Builder 1.x}
182 {$DEFINE Delphi32}
183 {$DEFINE WINDOWS}
184 {$ENDIF ver93}
186 {$IFDEF ver110}
187 {$DEFINE Delphi} {C++ Builder 3.x}
188 {$DEFINE Delphi32}
189 {$DEFINE WINDOWS}
190 {$ENDIF ver110}
192 {$IFDEF ver120}
193 {$DEFINE Delphi} {Delphi 4.x}
194 {$DEFINE Delphi32}
195 {$DEFINE Delphi4UP}
196 {$DEFINE Has_Int64}
197 {$DEFINE WINDOWS}
198 {$ENDIF ver120}
200 {$IFDEF ver130}
201 {$DEFINE Delphi} {Delphi 5.x}
202 {$DEFINE Delphi32}
203 {$DEFINE Delphi4UP}
204 {$DEFINE Delphi5UP}
205 {$DEFINE Has_Int64}
206 {$DEFINE WINDOWS}
207 {$ENDIF ver130}
209 {$IFDEF ver140}
210 {$DEFINE Delphi} {Delphi 6.x}
211 {$DEFINE Delphi32}
212 {$DEFINE Delphi4UP}
213 {$DEFINE Delphi5UP}
214 {$DEFINE Delphi6UP}
215 {$DEFINE Has_Int64}
216 {$DEFINE HAS_TYPES}
217 {$ENDIF ver140}
219 {$IFDEF ver150}
220 {$DEFINE Delphi} {Delphi 7.x}
221 {$DEFINE Delphi32}
222 {$DEFINE Delphi4UP}
223 {$DEFINE Delphi5UP}
224 {$DEFINE Delphi6UP}
225 {$DEFINE Delphi7UP}
226 {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
227 {$DEFINE Has_Int64}
228 {$DEFINE HAS_TYPES}
229 {$ENDIF ver150}
231 {$IFDEF ver160}
232 {$DEFINE Delphi} {Delphi 8}
233 {$DEFINE Delphi32}
234 {$DEFINE Delphi4UP}
235 {$DEFINE Delphi5UP}
236 {$DEFINE Delphi6UP}
237 {$DEFINE Delphi7UP}
238 {$DEFINE Delphi8UP}
239 {$DEFINE Has_Int64}
240 {$DEFINE HAS_TYPES}
241 {$ENDIF ver160}
243 {$IFDEF ver170}
244 {$DEFINE Delphi} {Delphi 2005}
245 {$DEFINE Delphi32}
246 {$DEFINE Delphi4UP}
247 {$DEFINE Delphi5UP}
248 {$DEFINE Delphi6UP}
249 {$DEFINE Delphi7UP}
250 {$DEFINE Delphi8UP}
251 {$DEFINE Delphi9UP}
252 {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
253 {$DEFINE Has_Int64}
254 {$DEFINE HAS_TYPES}
255 {$ENDIF ver170}
257 {$IFDEF ver180}
258 {$DEFINE Delphi} {Delphi 2006}
259 {$DEFINE Delphi32}
260 {$DEFINE Delphi4UP}
261 {$DEFINE Delphi5UP}
262 {$DEFINE Delphi6UP}
263 {$DEFINE Delphi7UP}
264 {$DEFINE Delphi8UP}
265 {$DEFINE Delphi9UP}
266 {$DEFINE Delphi10UP}
267 {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
268 {$DEFINE Has_Int64}
269 {$DEFINE HAS_TYPES}
270 {$ENDIF ver180}
272 {$IFDEF ver185}
273 {$DEFINE Delphi} {Delphi 2007}
274 {$DEFINE Delphi32}
275 {$DEFINE Delphi4UP}
276 {$DEFINE Delphi5UP}
277 {$DEFINE Delphi6UP}
278 {$DEFINE Delphi7UP}
279 {$DEFINE Delphi8UP}
280 {$DEFINE Delphi9UP}
281 {$DEFINE Delphi10UP}
282 {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
283 {$DEFINE Has_Int64}
284 {$DEFINE HAS_TYPES}
285 {$ENDIF ver180}
287 {$IFDEF UNIX}
288 {$ifdef VER140} // Kylix 1 & 2
289 {$DEFINE KYLIX}
290 {$DEFINE KYLIX1UP}
291 {$DEFINE KYLIX2UP}
292 {$DEFINE HAS_TYPES}
293 {$endif}
295 {$ifdef VER150} // Kylix 3
296 {$DEFINE KYLIX}
297 {$DEFINE KYLIX1UP}
298 {$DEFINE KYLIX2UP}
299 {$DEFINE KYLIX3UP}
300 {$DEFINE HAS_TYPES}
301 {$endif}
302 {$ENDIF UNIX}
304 {$IFDEF VirtualPascal} { Virtual Pascal 2.x }
305 {$DEFINE Delphi} { Use Delphi Syntax }
306 {$DEFINE VP2}
307 {&Delphi+}
308 {$ENDIF VirtualPascal}
310 {$IFDEF Delphi}
311 {$DEFINE Windows}
312 {$DEFINE USE_STDCALL}
313 //{$ALIGN ON}
314 {$ENDIF Delphi}
316 {$IFDEF FPC}
317 {$MODE Delphi} { use Delphi compatibility mode }
318 {$H+}
319 {$PACKRECORDS C} // Added for record
320 {$MACRO ON} // Added For OpenGL
321 {$DEFINE Delphi}
322 {$DEFINE UseAT}
323 {$UNDEF USE_STDCALL}
324 {$DEFINE OS_BigMem}
325 {$DEFINE NO_EXPORTS}
326 {$DEFINE Has_Int64}
327 {$DEFINE NOCRT}
328 {$IFDEF UNIX}
329 {$DEFINE fpc_unix}
330 {$ELSE}
331 {$DEFINE __OS_DOS__}
332 {$ENDIF}
333 {$IFDEF WIN32}
334 {$DEFINE UseWin}
335 {$ENDIF}
336 {$DEFINE HAS_TYPES}
337 {$ENDIF FPC}
339 {$IFDEF Win16}
340 {$K+} {smart callbacks}
341 {$ENDIF Win16}
343 {$IFDEF OS2}
344 {$UNDEF Windows}
345 {$DEFINE UseWin}
346 {$DEFINE OS_BigMem}
347 {$ENDIF OS2}
349 {$IFDEF __GPC__}
350 {$UNDEF UseWin}
351 {$UNDEF USE_STDCALL}
352 {$DEFINE OS_BigMem}
353 {$DEFINE NO_EXPORTS}
354 {$DEFINE NOCRT}
355 {$DEFINE cdecl attribute(cdecl)}
356 {$ENDIF}
358 {$IFDEF __TMT__}
359 {$DEFINE OS_BigMem}
360 {$DEFINE NO_EXPORTS}
361 {$DEFINE __OS_DOS__}
362 {$DEFINE UseAT}
363 {$IFNDEF MSDOS}
364 {$DEFINE USE_STDCALL}
365 {$ENDIF}
367 {$IFDEF __WIN32__}
368 {$DEFINE Win32}
369 {$DEFINE UseWin}
370 {$DEFINE NOCRT}
371 {$DEFINE Win32}
372 {$IFNDEF __CON__}
373 {$DEFINE Windows}
374 {$ENDIF}
375 {$ENDIF}
377 {$A+} // Word alignment data
378 {$OA+} // Objects and structures align
379 {$ENDIF}
381 {$IFDEF Win32}
382 {$DEFINE OS_BigMem}
383 {$ELSE Win32}
384 {$IFDEF ver70}
385 {$DEFINE assembler}
386 {$ENDIF} { use 16-bit assembler! }
387 {$ENDIF Win32}
389 { ************************** dos/dos-like platforms **************}
390 {$IFDEF Windows}
391 {$DEFINE __OS_DOS__}
392 {$DEFINE UseWin}
393 {$DEFINE MSWINDOWS}
394 {$ENDIF Delphi}
396 {$IFDEF OS2}
397 {$DEFINE __OS_DOS__}
398 {$DEFINE Can_Use_DLL}
399 {$ENDIF Delphi}
401 {$IFDEF UseWin}
402 {$DEFINE Can_Use_DLL}
403 {$ENDIF}
405 {$IFDEF Win16}
406 {$DEFINE Can_Use_DLL}
407 {$ENDIF}
409 {$IFDEF BP_DPMI}
410 {$DEFINE Can_Use_DLL}
411 {$ENDIF}
413 {$IFDEF USE_STDCALL}
414 {$IFNDEF __TMT__}
415 {$DEFINE BY_NAME}
416 {$ENDIF}
417 {$ENDIF}
419 {$IFNDEF ver70}
420 {$UNDEF assembler}
421 {$ENDIF}
423 {*************** define LITTLE ENDIAN platforms ********************}
426 {$IFDEF Delphi}
427 {$DEFINE IA32}
428 {$ENDIF}
430 {$IFDEF KYLIX}
431 {$DEFINE IA32}
432 {$ENDIF}
434 {$IFDEF FPC}
435 {$IFDEF FPC_LITTLE_ENDIAN}
436 {$DEFINE IA32}
437 {$ENDIF}
438 {$ENDIF}