diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index c29bb4da0a1c1bb8032142f5c9ee42f77954770f..dea1ca3a37b144e754637d37282bc945e2089566 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gsSDLSampleRate: Integer;
gsSDLBufferSize: Integer;
gDefaultMegawadStart: AnsiString;
gsSDLSampleRate: Integer;
gsSDLBufferSize: Integer;
gDefaultMegawadStart: AnsiString;
- gBerserkAutoswitch: Boolean;
glNPOTOverride: Boolean = false;
(* Latched game settings *)
gsMap: String;
gsGameMode: String;
gsTimeLimit: Word;
glNPOTOverride: Boolean = false;
(* Latched game settings *)
gsMap: String;
gsGameMode: String;
gsTimeLimit: Word;
- gsGoalLimit: Word;
+ gsScoreLimit: Word;
gsMaxLives: Byte;
gsPlayers: Byte;
gsGameFlags: LongWord;
gsMaxLives: Byte;
gsPlayers: Byte;
gsGameFlags: LongWord;
gsItemRespawnTime: Word = 60;
gsWarmupTime: Word = 30;
gsItemRespawnTime: Word = 60;
gsWarmupTime: Word = 30;
+{$IFDEF HEADLESS}
+ e_NoGraphics: Boolean = True;
+{$ELSE}
+ e_NoGraphics: Boolean = False;
+{$ENDIF}
+ e_FastScreenshots: Boolean = true; // it's REALLY SLOW with `false`
+ g_dbg_scale: Single = 1.0;
+ r_pixel_scale: Single = 1.0;
+
+ gwin_has_stencil: Boolean = false;
+ gwin_k8_enable_light_experiments: Boolean = false;
+ g_dbg_aimline_on: Boolean = false;
+ g_dbg_input: Boolean = False;
+
+ var (* touch *)
+ g_touch_enabled: Boolean = False;
+ g_touch_size: Single = 1.0;
+ g_touch_offset: Single = 50.0;
+ g_touch_fire: Boolean = True;
+ g_touch_alt: Boolean = False;
+
+ {--- Read-only dirs ---}
+ GameWAD: string;
+ DataDirs: SSArray;
+ ModelDirs: SSArray;
+ MegawadDirs: SSArray;
+ MapDirs: SSArray;
+ WadDirs: SSArray;
+ AllMapDirs: SSArray; // Maps + Megawads
+
+ {--- Read-Write dirs ---}
+ LogFileName: string;
+ LogDirs: SSArray;
+ SaveDirs: SSArray;
+ CacheDirs: SSArray;
+ ConfigDirs: SSArray;
+ ScreenshotDirs: SSArray;
+ StatsDirs: SSArray;
+ MapDownloadDirs: SSArray;
+ WadDownloadDirs: SSArray;
+
+ GameWADName: string = 'GAME';
+
implementation
uses
implementation
uses
- {$INCLUDE ../nogl/noGLuses.inc}
{$IFDEF USE_SDL2}
SDL2,
{$ENDIF}
{$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, envvars, g_system;
+ e_log, e_input, g_console, g_sound, g_gfx, g_player, Math,
+ g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game,
+ g_items, wadreader, envvars;
var
machine: Integer;
var
machine: Integer;
gScreenHeight := 480;
gWinSizeX := 640;
gWinSizeY := 480;
gScreenHeight := 480;
gWinSizeX := 640;
gWinSizeY := 480;
- //gBPP := SDL_BITSPERPIXEL(dispaly.format);
+ //gBPP := SDL_BITSPERPIXEL(display.format);
gBPP := 32;
{$IFDEF ANDROID}
gFullScreen := True; (* rotation not allowed? *)
gBPP := 32;
{$IFDEF ANDROID}
gFullScreen := True; (* rotation not allowed? *)
wadoptFast := False;
e_FastScreenshots := True;
gDefaultMegawadStart := DF_Default_Megawad_Start;
wadoptFast := False;
e_FastScreenshots := True;
gDefaultMegawadStart := DF_Default_Megawad_Start;
- gBerserkAutoswitch := True;
g_dbg_scale := 1.0;
gSaveStats := False;
g_dbg_scale := 1.0;
gSaveStats := False;
gsMap := '';
gsGameMode := _lc[I_MENU_GAME_TYPE_DM];
gsTimeLimit := 0;
gsMap := '';
gsGameMode := _lc[I_MENU_GAME_TYPE_DM];
gsTimeLimit := 0;
- gsGoalLimit := 0;
+ gsScoreLimit := 0;
gsMaxLives := 0;
gsPlayers := 1;
gsSpawnInvul := 0;
gsItemRespawnTime := 60;
gsGameFlags := GAME_OPTION_ALLOWEXIT or GAME_OPTION_DMKEYS or
GAME_OPTION_BOTVSPLAYER or GAME_OPTION_BOTVSMONSTER or
gsMaxLives := 0;
gsPlayers := 1;
gsSpawnInvul := 0;
gsItemRespawnTime := 60;
gsGameFlags := GAME_OPTION_ALLOWEXIT or GAME_OPTION_DMKEYS or
GAME_OPTION_BOTVSPLAYER or GAME_OPTION_BOTVSMONSTER or
- GAME_OPTION_TEAMHITTRACE or GAME_OPTION_TEAMHITPROJECTILE;
+ GAME_OPTION_TEAMHITTRACE or GAME_OPTION_TEAMHITPROJECTILE or
+ GAME_OPTION_ALLOWDROPFLAG;
gsPlayers := 1;
gsPlayers := 1;
+ if not gGameOn then
+ g_Options_ApplyGameSettings;
+
(* section MasterServer *)
(* section MasterServer *)
- NetMasterList := 'mpms.doom2d.org:25665, deadsoftware.ru:25665';
+ NetMasterList := 'mpms.doom2d.org:25665, deadsoftware.ru:25665, terminalcorner.ru:25665';
g_Net_Slist_Set(NetMasterList);
(* section Server *)
g_Net_Slist_Set(NetMasterList);
(* section Server *)
if GameMode = GM_SINGLE then
GameMode := GM_COOP;
TimeLimit := gsTimeLimit;
if GameMode = GM_SINGLE then
GameMode := GM_COOP;
TimeLimit := gsTimeLimit;
- GoalLimit := gsGoalLimit;
+ ScoreLimit := gsScoreLimit;
MaxLives := gsMaxLives;
SpawnInvul := gsSpawnInvul;
ItemRespawnTime := gsItemRespawnTime;
MaxLives := gsMaxLives;
SpawnInvul := gsSpawnInvul;
ItemRespawnTime := gsItemRespawnTime;
conRegVar('r_texfilter', @gTextureFilter, '', '');
conRegVar('r_npot', @glNPOTOverride, '', '');
conRegVar('r_interp', @gLerpActors, '', 'interpolate actors');
conRegVar('r_texfilter', @gTextureFilter, '', '');
conRegVar('r_npot', @glNPOTOverride, '', '');
conRegVar('r_interp', @gLerpActors, '', 'interpolate actors');
+ conRegVar('r_scale', @g_dbg_scale, 0.01, 100.0, 'render scale', '', false);
+ conRegVar('r_resolution_scale', @r_pixel_scale, 0.01, 100.0, 'upscale factor', '', false);
(* Sound *)
conRegVar('s_nosound', @gNoSound, '', '');
(* Sound *)
conRegVar('s_nosound', @gNoSound, '', '');
conRegVar('g_save_stats', @gSaveStats, '', '');
conRegVar('g_screenshot_stats', @gScreenshotStats, '', '');
conRegVar('g_lastmap', @gsMap, '', '');
conRegVar('g_save_stats', @gSaveStats, '', '');
conRegVar('g_screenshot_stats', @gScreenshotStats, '', '');
conRegVar('g_lastmap', @gsMap, '', '');
+
+ conRegVar('d_input', @g_dbg_input, '', '');
+
+ (* touch *)
+ conRegVar('touch_enable', @g_touch_enabled, 'enable/disable virtual buttons', 'draw buttons');
+ conRegVar('touch_fire', @g_touch_fire, 'enable/disable fire when press virtual up/down', 'fire when press up/down');
+ conRegVar('touch_size', @g_touch_size, 0.1, 10, 'size of virtual buttons', 'button size');
+ conRegVar('touch_offset', @g_touch_offset, 0, 100, '', '');
+ conRegVar('touch_alt', @g_touch_alt, 'althernative virtual buttons layout', 'althernative layout');
end.
end.