DEADSOFTWARE

Net: improving anti-autism measures by travi$
[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 {$IFDEF USE_SDLMIXER}
119 {$ERROR SDL_mixer not supported with SDL 1.2.x}
120 {$ENDIF}
121 {$ELSEIF DEFINED(USE_SDL2)}
122 {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)}
123 {$ERROR Only one system driver must be selected!}
124 {$ENDIF}
125 {$ELSE}
126 {$DEFINE USE_SDL2}
127 {.$ERROR System driver not selected. Use -dUSE_SYSSTUB or -dUSE_SDL or -dUSE_SDL2}
128 {$ENDIF}
130 {$IF DEFINED(USE_SOUNDSTUB)}
131 {$IF DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
132 {$ERROR Only one sound driver must be selected!}
133 {$ENDIF}
134 {$ELSEIF DEFINED(USE_SDLMIXER)}
135 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_FMOD) OR DEFINED(USE_OPENAL)}
136 {$ERROR Only one sound driver must be selected!}
137 {$ENDIF}
138 {$ELSEIF DEFINED(USE_FMOD)}
139 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_OPENAL)}
140 {$ERROR Only one sound driver must be selected!}
141 {$ENDIF}
142 {$ELSEIF DEFINED(USE_OPENAL)}
143 {$IF DEFINED(USE_SOUNDSTUB) OR DEFINED(USE_SDLMIXER) OR DEFINED(USE_FMOD)}
144 {$ERROR Only one sound driver must be selected!}
145 {$ENDIF}
146 {$ELSE}
147 {$IFDEF IN_TOOLS}
148 {$DEFINE USE_SOUNDSTUB}
149 {$ELSE}
150 {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL}
151 {$ENDIF}
152 {$ENDIF}
154 {$IF DEFINED(USE_GLSTUB)}
155 {$IF DEFINED(USE_GLES1) OR DEFINED(USE_OPENGL)}
156 {$ERROR Only one render driver must be selected!}
157 {$ENDIF}
158 {$ELSEIF DEFINED(USE_GLES1)}
159 {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_OPENGL)}
160 {$ERROR Only one render driver must be selected!}
161 {$ENDIF}
162 {$ELSEIF DEFINED(USE_OPENGL)}
163 {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_GLES1)}
164 {$ERROR Only one render driver must be selected!}
165 {$ENDIF}
166 {$ELSE}
167 {$DEFINE USE_OPENGL}
168 {.$ERROR Render driver not selected. Use -dUSE_GLSTUB or -dUSE_GLES1 or -dUSE_OPENGL}
169 {$ENDIF}
171 {$IFDEF ENABLE_HOLMES}
172 {$IFNDEF USE_SDL2}
173 {$ERROR Holmes supported only with SDL2}
174 {$ENDIF}
175 {$IFNDEF USE_OPENGL}
176 {$ERROR Holmes supported only with desktop OpenGL}
177 {$ENDIF}
178 {$ENDIF}