DEADSOFTWARE

implement SDL1.2 system driver
[d2df-sdl.git] / src / game / g_options.pas
index a5486509c00bf029c02e98fa80e7750db0cd2f58..ac80a1b1f786cd8d11f7356510ca1c743b344b6a 100644 (file)
@@ -2,8 +2,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -97,9 +96,12 @@ implementation
 
 uses
   {$INCLUDE ../nogl/noGLuses.inc}
+  {$IFDEF USE_SDL2}
+    SDL2,
+  {$ENDIF}
   e_log, e_input, g_console, g_window, g_sound, g_gfx, g_player, Math,
   g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game, g_main, e_texture,
-  g_items, wadreader, e_graphics, g_touch, SDL2, envvars;
+  g_items, wadreader, e_graphics, g_touch, envvars;
 
   var
     machine: Integer;
@@ -116,6 +118,7 @@ uses
       Result := Copy(Result, 1, 10) + ' ' + IntToStr(n)
   end;
 
+{$IFDEF USE_SDL2}
 procedure g_Options_SetDefaultVideo;
 var
   target, closest, display: TSDL_DisplayMode;
@@ -166,6 +169,24 @@ begin
   e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gScreenWidth) + ' h = ' + IntToStr(gScreenHeight));
   g_Console_ResetBinds;
 end;
+{$ELSE}
+procedure g_Options_SetDefaultVideo;
+begin
+  {$WARNING stub}
+  gScreenWidth := 640;
+  gScreenHeight := 480;
+  gBPP := 32;
+  gFullScreen := False;
+  gWinRealPosX := 0;
+  gWinRealPosY := 0;
+  gWinMaximized := False;
+  gVSync := True;
+  gTextureFilter := True;
+  glLegacyNPOT := False;
+  e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gScreenWidth) + ' h = ' + IntToStr(gScreenHeight));
+  g_Console_ResetBinds;
+end;
+{$ENDIF}
 
 procedure g_Options_SetDefault();
 var
@@ -227,7 +248,6 @@ begin
   gShowMessages := True;
   gRevertPlayers := False;
   gChatBubble := 4;
-  gPlayerIndicator := True;
   gSFSDebug := False;
   gSFSFastMode := False;
   e_FastScreenshots := True;
@@ -420,7 +440,6 @@ begin
   ReadBoolean(gShowMessages, 'Messages');
   ReadBoolean(gRevertPlayers, 'RevertPlayers');
   ReadInteger(gChatBubble, 'ChatBubble', 0, 4);
-  ReadBoolean(gPlayerIndicator, 'PlayerIndicator');
   ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug;
   ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode;
   ReadBoolean(e_FastScreenshots, 'FastScreenshots');
@@ -594,7 +613,6 @@ begin
   config.WriteBool('Game', 'Messages', gShowMessages);
   config.WriteBool('Game', 'RevertPlayers', gRevertPlayers);
   config.WriteInt('Game', 'ChatBubble', gChatBubble);
-  config.WriteBool('Game', 'PlayerIndicator', gPlayerIndicator);
   config.WriteBool('Game', 'SFSDebug', gSFSDebug);
   config.WriteBool('Game', 'SFSFastMode', gSFSFastMode);
   config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots);