DEADSOFTWARE

mixer: allow to use sdl 1.2 + sdl_mixer
[d2df-sdl.git] / src / shared / a_modes.inc
1 // compiler options, common for all game modules
2 {$MODE OBJFPC}
4 {$MODESWITCH ADVANCEDRECORDS+}
5 {$MODESWITCH ALLOWINLINE+}
6 {$MODESWITCH ANSISTRINGS+} // Allow use of ansistrings.
7 {$MODESWITCH AUTODEREF+} // Automatic (silent) dereferencing of typed pointers.
8 {$MODESWITCH CLASS+}
9 {$MODESWITCH CLASSICPROCVARS+} // Use classical procedural variables.
10 {$MODESWITCH DEFAULTPARAMETERS+} // Allow use of default parameter values.
11 {$MODESWITCH DUPLICATELOCALS-} // Allow local variables in class methods to have the same names as properties of the class.
12 {$MODESWITCH EXCEPTIONS+}
13 {$MODESWITCH HINTDIRECTIVE+} // Support the hint directives (deprecated, platform etc.)
14 {$MODESWITCH INITFINAL+} // Allow use of Initialization and Finalization
15 {.$MODESWITCH ISOUNARYMINUS-} // Unary minus as required by ISO pascal.
16 {$MODESWITCH MACPROCVARS-} // Use mac-style procedural variables.
17 {$MODESWITCH NESTEDCOMMENTS-}
18 {$MODESWITCH NESTEDPROCVARS+}
19 {$MODESWITCH OBJPAS+}
20 {$MODESWITCH OUT+} // Allow use of the out parameter type.
21 {$MODESWITCH PCHARTOSTRING+}
22 {$MODESWITCH POINTERTOPROCVAR+} // Allow silent conversion of pointers to procedural variables.
23 {$MODESWITCH PROPERTIES+}
24 {$MODESWITCH REPEATFORWARD+} // Implementation and Forward declaration must match completely.
25 {$MODESWITCH RESULT+}
26 {$MODESWITCH TYPEHELPERS+} // Allow the use of type helpers.
27 {$MODESWITCH UNICODESTRINGS-}
29 {$IFDEF DARWIN}
30 {$MODESWITCH OBJECTIVEC1}
31 {$ENDIF}
33 {$ASSERTIONS ON}
34 {$BITPACKING OFF}
35 {$BOOLEVAL OFF}
36 {$COPERATORS ON}
37 {$EXTENDEDSYNTAX ON}
38 {$IFDEF CPU386}
39 {$FPUTYPE SSE}
40 {$ENDIF}
41 {$GOTO ON}
42 {$IEEEERRORS OFF}
43 {$INLINE ON}
44 {$LONGSTRINGS ON}
45 {$MACRO OFF}
46 {$OBJECTCHECKS OFF}
47 {$OVERFLOWCHECKS OFF}
48 {$POINTERMATH ON}
49 {$RANGECHECKS OFF}
50 {$SAFEFPUEXCEPTIONS OFF}
51 {$SCOPEDENUMS ON} // this may be changed later
52 {$SMARTLINK ON}
53 {$TYPEDADDRESS ON}
54 {$TYPEINFO ON}
55 {$VARSTRINGCHECKS OFF}
57 {$S-} // disable stack checking
58 {$MMX-} // get lost, mmx
60 {$IF DEFINED(D2F_DEBUG)}
61 {$STACKFRAMES ON}
62 {$HINTS OFF}
63 {$ELSE}
64 {$STACKFRAMES OFF}
65 {$HINTS OFF}
66 {$DEFINE D2F_MORE_OPTIM}
67 {$ENDIF}
68 {$WARNINGS ON}
69 {$NOTES ON}
71 {$IF DEFINED(D2F_DEBUG_OPTIM) or DEFINED(D2F_MORE_OPTIM)}
72 {$OPTIMIZATION DEADVALUES}
73 {$OPTIMIZATION CONSTPROP}
74 {$OPTIMIZATION DEADSTORE}
75 {$ENDIF}
77 {$IFDEF WIN32}
78 {$IFNDEF MSWINDOWS}
79 {$DEFINE MSWINDOWS}
80 {$ENDIF}
81 {$ENDIF}
83 {$IFDEF MSWINDOWS}
84 {$IFNDEF WINDOWS}
85 {$DEFINE WINDOWS}
86 {$ENDIF WINDOWS}
87 {$ENDIF}
89 (* --------- Build options check --------- *)
91 {$IFDEF HEADLESS}
92 {$DEFINE USE_SYSSTUB}
93 {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
94 {$WARNING System drivers not supported in headless mode. Force stub driver...}
95 {$UNDEF USE_SDL}
96 {$UNDEF USE_SDL2}
97 {$ENDIF}
98 {$DEFINE USE_GLSTUB}
99 {$IF DEFINED(USE_GLES1) OR DEFINED(USE_OPENGL)}
100 {$WARNING Render drivers not needed in headless mode. Force stub driver...}
101 {$UNDEF USE_GLES1}
102 {$UNDEF USE_OPENGL}
103 {$ENDIF}
104 {$IFDEF ENABLE_HOLMES}
105 {$WARNING Holmes in headless mode has no sense. Disabled.}
106 {$UNDEF ENABLE_HOLMES}
107 {$ENDIF}
108 {$ENDIF}
110 {$IF DEFINED(USE_SYSSTUB)}
111 {$IF DEFINED(USE_SDL) OR DEFINED(USE_SDL2)}
112 {$ERROR Only one system driver must be selected!}
113 {$ENDIF}
114 {$ELSEIF DEFINED(USE_SDL)}
115 {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)}
116 {$ERROR Only one system driver must be selected!}
117 {$ENDIF}
118 {$ELSEIF DEFINED(USE_SDL2)}
119 {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)}
120 {$ERROR Only one system driver must be selected!}
121 {$ENDIF}
122 {$ELSE}
123 {$DEFINE USE_SDL2}
124 {.$ERROR System driver not selected. Use -dUSE_SYSSTUB or -dUSE_SDL or -dUSE_SDL2}
125 {$ENDIF}
127 {$IF DEFINED(USE_SOUNDSTUB)}
128 {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
129 {$ERROR Only one sound driver must be selected!}
130 {$ENDIF}
131 {$ELSEIF DEFINED(USE_SDLMIXER)}
132 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
133 {$ERROR Only one sound driver must be selected!}
134 {$ENDIF}
135 {$ELSEIF DEFINED(USE_FMOD)}
136 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_OPENAL)}
137 {$ERROR Only one sound driver must be selected!}
138 {$ENDIF}
139 {$ELSEIF DEFINED(USE_OPENAL)}
140 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD)}
141 {$ERROR Only one sound driver must be selected!}
142 {$ENDIF}
143 {$ELSE}
144 {$IFDEF IN_TOOLS}
145 {$DEFINE USE_SOUNDSTUB}
146 {$ELSE}
147 {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL}
148 {$ENDIF}
149 {$ENDIF}
151 {$IF DEFINED(USE_GLSTUB)}
152 {$IF DEFINED(USE_GLES1) OR DEFINED(USE_OPENGL)}
153 {$ERROR Only one render driver must be selected!}
154 {$ENDIF}
155 {$ELSEIF DEFINED(USE_GLES1)}
156 {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_OPENGL)}
157 {$ERROR Only one render driver must be selected!}
158 {$ENDIF}
159 {$ELSEIF DEFINED(USE_OPENGL)}
160 {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_GLES1)}
161 {$ERROR Only one render driver must be selected!}
162 {$ENDIF}
163 {$ELSE}
164 {$DEFINE USE_OPENGL}
165 {.$ERROR Render driver not selected. Use -dUSE_GLSTUB or -dUSE_GLES1 or -dUSE_OPENGL}
166 {$ENDIF}
168 {$IFDEF ENABLE_HOLMES}
169 {$IFNDEF USE_SDL2}
170 {$ERROR Holmes supported only with SDL2}
171 {$ENDIF}
172 {$IFNDEF USE_OPENGL}
173 {$ERROR Holmes supported only with desktop OpenGL}
174 {$ENDIF}
175 {$ENDIF}