X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2Fa_modes.inc;h=494c574eab69d50a6adb65baeb4658d232ca47a6;hb=16342bee09fa001d05697571124e48a93cd35f2c;hp=733abb82e82d58ff9d11777541efe0924870758b;hpb=87c3a28dda4534eec3fde4ef06dc5f324b2c4b3b;p=d2df-sdl.git diff --git a/src/shared/a_modes.inc b/src/shared/a_modes.inc index 733abb8..494c574 100644 --- a/src/shared/a_modes.inc +++ b/src/shared/a_modes.inc @@ -26,6 +26,9 @@ {$MODESWITCH TYPEHELPERS+} // Allow the use of type helpers. {$MODESWITCH UNICODESTRINGS-} +{$IFDEF DARWIN} + {$MODESWITCH OBJECTIVEC1} +{$ENDIF} {$ASSERTIONS ON} {$BITPACKING OFF} @@ -92,6 +95,80 @@ {$UNDEF USE_SDL} {$UNDEF USE_SDL2} {$ENDIF} + {$DEFINE USE_GLSTUB} + {$IF DEFINED(USE_GLES1) OR DEFINED(USE_OPENGL)} + {$WARNING Render drivers not needed in headless mode. Force stub driver...} + {$UNDEF USE_GLES1} + {$UNDEF USE_OPENGL} + {$ENDIF} + {$IFDEF ENABLE_HOLMES} + {$WARNING Holmes in headless mode has no sense. Disabled.} + {$UNDEF ENABLE_HOLMES} + {$ENDIF} + {$IFDEF ENABLE_MENU} + {$WARNING Menu in headless mode has no sense. Disabled.} + {$UNDEF ENABLE_MENU} + {$DEFINE DISABLE_MENU} + {$ENDIF} + {$IFDEF ENABLE_TOUCH} + {$WARNING Touch screen in headless mode has no sense. Disabled.} + {$UNDEF ENABLE_TOUCH} + {$DEFINE DISABLE_TOUCH} + {$ENDIF} + {$IFDEF ENABLE_GFX} + {$WARNING GFX in headless mode has no sense. Disabled.} + {$UNDEF ENABLE_GFX} + {$DEFINE DISABLE_GFX} + {$ENDIF} + {$IFDEF ENABLE_GIBS} + {$WARNING Gibs in headless mode has no sense. Disabled.} + {$UNDEF ENABLE_GIBS} + {$DEFINE DISABLE_GIBS} + {$ENDIF} +{$ENDIF} + +{$IF DEFINED(ENABLE_MENU) AND DEFINED(DISABLE_MENU)} + {$ERROR Select ENABLE_MENU or DISABLE_MENU} +{$ELSEIF NOT DEFINED(ENABLE_MENU) AND NOT DEFINED(DISABLE_MENU)} + // defaut ENABLE/DISABLE menu + {$IFDEF HEADLESS} + {$DEFINE DISABLE_MENU} + {$ELSE} + {$DEFINE ENABLE_MENU} + {$ENDIF} +{$ENDIF} + +{$IF DEFINED(ENABLE_TOUCH) AND DEFINED(DISABLE_TOUCH)} + {$ERROR Select ENABLE_TOUCH or DISABLE_TOUCH} +{$ELSEIF NOT DEFINED(ENABLE_TOUCH) AND NOT DEFINED(DISABLE_TOUCH)} + // defaut ENABLE/DISABLE touch + {$IFDEF HEADLESS} + {$DEFINE DISABLE_TOUCH} + {$ELSE} + {$DEFINE ENABLE_TOUCH} + {$ENDIF} +{$ENDIF} + +{$IF DEFINED(ENABLE_GFX) AND DEFINED(DISABLE_GFX)} + {$ERROR Select ENABLE_GFX or DISABLE_GFX} +{$ELSEIF NOT DEFINED(ENABLE_GFX) AND NOT DEFINED(DISABLE_GFX)} + // default ENABLE/DISABLE gfx + {$IFDEF HEADLESS} + {$DEFINE DISABLE_GFX} + {$ELSE} + {$DEFINE ENABLE_GFX} + {$ENDIF} +{$ENDIF} + +{$IF DEFINED(ENABLE_GIBS) AND DEFINED(DISABLE_GIBS)} + {$ERROR Select ENABLE_GIBS or DISABLE_GIBS} +{$ELSEIF NOT DEFINED(ENABLE_GIBS) AND NOT DEFINED(DISABLE_GIBS)} + // default ENABLE/DISABLE gibs + {$IFDEF HEADLESS} + {$DEFINE DISABLE_GIBS} + {$ELSE} + {$DEFINE ENABLE_GIBS} + {$ENDIF} {$ENDIF} {$IF DEFINED(USE_SYSSTUB)} @@ -102,6 +179,9 @@ {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)} {$ERROR Only one system driver must be selected!} {$ENDIF} + {$IFDEF USE_SDLMIXER} + {$ERROR SDL_mixer not supported with SDL 1.2.x} + {$ENDIF} {$ELSEIF DEFINED(USE_SDL2)} {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)} {$ERROR Only one system driver must be selected!} @@ -128,17 +208,35 @@ {$ERROR Only one sound driver must be selected!} {$ENDIF} {$ELSE} - {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL} + {$IFDEF IN_TOOLS} + {$DEFINE USE_SOUNDSTUB} + {$ELSE} + {$ERROR Sound driver not selected. Use -dUSE_SOUNDSTUB or -dUSE_SDLMIXER or -dUSE_FMOD or -dUSE_OPENAL} + {$ENDIF} +{$ENDIF} + +{$IF DEFINED(USE_GLSTUB)} + {$IF DEFINED(USE_GLES1) OR DEFINED(USE_OPENGL)} + {$ERROR Only one render driver must be selected!} + {$ENDIF} +{$ELSEIF DEFINED(USE_GLES1)} + {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_OPENGL)} + {$ERROR Only one render driver must be selected!} + {$ENDIF} +{$ELSEIF DEFINED(USE_OPENGL)} + {$IF DEFINED(USE_GLSTUB) OR DEFINED(USE_GLES1)} + {$ERROR Only one render driver must be selected!} + {$ENDIF} +{$ELSE} + {$DEFINE USE_OPENGL} + {.$ERROR Render driver not selected. Use -dUSE_GLSTUB or -dUSE_GLES1 or -dUSE_OPENGL} {$ENDIF} {$IFDEF ENABLE_HOLMES} - {$IFDEF HEADLESS} - {$ERROR Holmes in HEADLESS mode has no sense} - {$ENDIF} {$IFNDEF USE_SDL2} {$ERROR Holmes supported only with SDL2} {$ENDIF} - {$IFDEF USE_GLES1} - {$ERROR Holmes not supported with GLES} + {$IFNDEF USE_OPENGL} + {$ERROR Holmes supported only with desktop OpenGL} {$ENDIF} {$ENDIF}