]> icculus.org git repositories - btb/d2x.git/blob - include/oldsdl.h
OSX OGL fixes
[btb/d2x.git] / include / oldsdl.h
1 /*
2  * $Source: /cvs/cvsroot/d2x/include/oldsdl.h,v $
3  * $Revision: 1.2 $
4  * $Author: bradleyb $
5  * $Date: 2002-02-16 02:24:53 $
6  *
7  * Version-checking macros for SDL
8  *
9  */
10
11 #ifndef _OLDSDL_H
12 #define _OLDSDL_H
13
14 /* This macro turns the version numbers into a numeric value:
15    (1,2,3) -> (1203)
16    This assumes that there will never be more than 100 patchlevels
17 */
18 #ifndef SDL_VERSIONNUM
19 #define SDL_VERSIONNUM(X, Y, Z)                                         \
20         (X)*1000 + (Y)*100 + (Z)
21 #endif
22
23 /* This is the version number macro for the current SDL version */
24 #ifndef SDL_COMPILEDVERSION
25 #define SDL_COMPILEDVERSION \
26         SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
27 #endif
28
29 /* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
30 #define SDL_VERSION_ATLEAST(X, Y, Z) \
31         (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
32
33 #endif