DEADSOFTWARE

nuke g_respawn_items
[d2df-sdl.git] / src / game / g_options.pas
index 02889313813d3d9cbbba34e7db62f47efa24e6ac..23ddc36a259a6a5d04531e64b3ff5243253b8e5a 100644 (file)
@@ -35,14 +35,14 @@ procedure g_Options_Commands (p: SSArray);
 const DF_Default_Megawad_Start = 'megawads/DOOM2D.WAD:\MAP01';
 
 var
-  gScreenWidth: Word;
-  gScreenHeight: Word;
   gBPP: Integer;
   gFreq: Byte;
   gFullscreen: Boolean;
+  gWinSizeX, gWinSizeY: Integer;
   gWinMaximized: Boolean;
   gVSync: Boolean;
   glLegacyNPOT: Boolean;
+  glRenderToFBO: Boolean = True;
   gTextureFilter: Boolean;
   gNoSound: Boolean;
   gSoundLevel: Integer;
@@ -74,7 +74,6 @@ var
   gcMonsters: Boolean;
   gcBotsVS: String;
   gcDeathmatchKeys: Boolean = True;
-  gcRespawnItems: Boolean = True;
   gcSpawnInvul: Integer = 0;
   gnMap: String;
   gnGameMode: String;
@@ -88,7 +87,6 @@ var
   gnMonsters: Boolean;
   gnBotsVS: String;
   gnDeathmatchKeys: Boolean = True;
-  gnRespawnItems: Boolean = True;
   gnSpawnInvul: Integer = 0;
   gsSDLSampleRate: Integer;
   gsSDLBufferSize: Integer;
@@ -132,6 +130,8 @@ begin
   (* Display 0 = Primary display *)
   gScreenWidth := 640;
   gScreenHeight := 480;
+  gWinSizeX := 640;
+  gWinSizeY := 480;
   //gBPP := SDL_BITSPERPIXEL(dispaly.format);
   gBPP := 32;
   {$IFDEF ANDROID}
@@ -142,8 +142,8 @@ begin
   if SDL_GetDesktopDisplayMode(0, @display) = 0 then
   begin
   {$IFDEF ANDROID}
-    gScreenWidth := display.w;
-    gScreenHeight := display.h;
+    gWinSizeX := display.w;
+    gWinSizeY := display.h;
   {$ELSE}
     (* Window must be smaller than display *)
     closest.w := display.w;
@@ -165,8 +165,8 @@ begin
       SDL_GetClosestDisplayMode(0, @target, @closest);
       Dec(percentage);
     end;
-    gScreenWidth := closest.w;
-    gScreenHeight := closest.h;
+    gWinSizeX := closest.w;
+    gWinSizeY := closest.h;
     //gBPP := SDL_BITSPERPIXEL(closest.format); (* Resolution list didn't work for some reason *)
   {$ENDIF}
   end
@@ -179,29 +179,31 @@ begin
   gVSync := True;
   gTextureFilter := True;
   glLegacyNPOT := False;
-  gRC_Width := gScreenWidth;
-  gRC_Height := gScreenHeight;
+  gRC_Width := gWinSizeX;
+  gRC_Height := gWinSizeY;
   gRC_FullScreen := gFullScreen;
   gRC_Maximized := gWinMaximized;
-  e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gScreenWidth) + ' h = ' + IntToStr(gScreenHeight));
+  e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gWinSizeX) + ' h = ' + IntToStr(gWinSizeY));
   g_Console_ResetBinds;
 end;
 {$ELSE}
 procedure g_Options_SetDefaultVideo;
 begin
-  gScreenWidth := 640;
-  gScreenHeight := 480;
+  gWinSizeX := 640;
+  gWinSizeY := 480;
   gBPP := 32;
   gFullScreen := False;
   gWinMaximized := False;
   gVSync := True;
   gTextureFilter := True;
   glLegacyNPOT := False;
-  gRC_Width := gScreenWidth;
-  gRC_Height := gScreenHeight;
+  gScreenWidth := gWinSizeX;
+  gScreenHeight := gWinSizeY;
+  gRC_Width := gWinSizeX;
+  gRC_Height := gWinSizeY;
   gRC_FullScreen := gFullScreen;
   gRC_Maximized := gWinMaximized;
-  e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gScreenWidth) + ' h = ' + IntToStr(gScreenHeight));
+  e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gWinSizeX) + ' h = ' + IntToStr(gWinSizeY));
   g_Console_ResetBinds;
 end;
 {$ENDIF}
@@ -290,7 +292,6 @@ begin
   gcMonsters := False;
   gcBotsVS := 'Everybody';
   gcDeathmatchKeys := True;
-  gcRespawnItems := True;
   gcSpawnInvul := 0;
 
   (* section GameplayNetwork *)
@@ -306,7 +307,6 @@ begin
   gnMonsters := False;
   gnBotsVS := 'Everybody';
   gnDeathmatchKeys := True;
-  gnRespawnItems := True;
   gnSpawnInvul := 0;
 
   (* section MasterServer *)
@@ -423,7 +423,6 @@ begin
   ReadBoolean(gcMonsters, 'Monsters');
   ReadString(gcBotsVS, 'BotsVS');
   ReadBoolean(gcDeathmatchKeys, 'DeathmatchKeys');
-  ReadBoolean(gcRespawnItems, 'RespawnItems');
   ReadInteger(gcSpawnInvul, 'SpawnInvul');
 
   with gGameSettings do
@@ -454,8 +453,6 @@ begin
       Options := Options or GAME_OPTION_BOTVSMONSTER;
     if gcDeathmatchKeys then
       Options := Options or GAME_OPTION_DMKEYS;
-    if gcRespawnItems then
-      Options := Options or GAME_OPTION_RESPAWNITEMS;
   end;
 
   section := 'GameplayNetwork';
@@ -471,7 +468,6 @@ begin
   ReadBoolean(gnMonsters, 'Monsters');
   ReadString(gnBotsVS, 'BotsVS');
   ReadBoolean(gnDeathmatchKeys, 'DeathmatchKeys');
-  ReadBoolean(gnRespawnItems, 'RespawnItems');
   ReadInteger(gnSpawnInvul, 'SpawnInvul');
 
   section := 'MasterServer';
@@ -544,7 +540,6 @@ begin
   config.WriteBool('GameplayCustom', 'Monsters', gcMonsters);
   config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS);
   config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys);
-  config.WriteBool('GameplayCustom', 'RespawnItems', gcRespawnItems);
   config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul);
 
   config.WriteStr ('GameplayNetwork', 'Map', gnMap);
@@ -559,7 +554,6 @@ begin
   config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters);
   config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS);
   config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys);
-  config.WriteBool('GameplayNetwork', 'RespawnItems', gnRespawnItems);
   config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul);
 
   config.WriteStr('MasterServer', 'IP', NetSlistIP);
@@ -608,7 +602,6 @@ begin
   config.WriteBool('GameplayCustom', 'Monsters', gcMonsters);
   config.WriteStr ('GameplayCustom', 'BotsVS', gcBotsVS);
   config.WriteBool('GameplayCustom', 'DeathmatchKeys', gcDeathmatchKeys);
-  config.WriteBool('GameplayCustom', 'RespawnItems', gcRespawnItems);
   config.WriteInt ('GameplayCustom', 'SpawnInvul', gcSpawnInvul);
 
   config.SaveFile(FileName);
@@ -635,7 +628,6 @@ begin
   config.WriteBool('GameplayNetwork', 'Monsters', gnMonsters);
   config.WriteStr ('GameplayNetwork', 'BotsVS', gnBotsVS);
   config.WriteBool('GameplayNetwork', 'DeathmatchKeys', gnDeathmatchKeys);
-  config.WriteBool('GameplayNetwork', 'RespawnItems', gnRespawnItems);
   config.WriteInt ('GameplayNetwork', 'SpawnInvul', gnSpawnInvul);
 
   config.SaveFile(FileName);