diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 9fadc1beddc6e0c68f2e36ae6ecb39f3e0693985..7a9785b6964cd331222219282a1f9b4310d4605f 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
CacheDirs: SSArray;
ConfigDirs: SSArray;
ScreenshotDirs: SSArray;
+ StatsDirs: SSArray;
MapDownloadDirs: SSArray;
WadDownloadDirs: SSArray;
AddDir(MapDownloadDirs, e_CatPath(rwdir, 'maps/downloads'));
AddDir(WadDownloadDirs, e_CatPath(rwdir, 'wads/downloads'));
AddDir(ScreenshotDirs, e_CatPath(rwdir, 'screenshots'));
+ AddDir(StatsDirs, e_CatPath(rwdir, 'stats'));
(* RO *)
AddDir(DataDirs, e_CatPath(rwdir, 'data'));
AddDir(ModelDirs, e_CatPath(rwdir, 'data/models'));
AddDef(MapDownloadDirs, rwdirs, 'maps/downloads');
AddDef(WadDownloadDirs, rwdirs, 'wads/downloads');
AddDef(ScreenshotDirs, rwdirs, 'screenshots');
+ AddDef(StatsDirs, rwdirs, 'stats');
for i := 0 to High(MapDirs) do
AddDir(AllMapDirs, MapDirs[i]);
{$ENDIF}
end
end;
+
+ // HACK: ensure the screenshots folder also has a stats subfolder in it
+ rwdir := e_GetWriteableDir(ScreenshotDirs, false);
+ if rwdir <> '' then CreateDir(rwdir + '/stats');
end;
procedure InitPrep;
e_InitWritelnDriver();
e_WriteLog('Doom 2D: Forever version ' + GAME_VERSION + ' proto ' + IntToStr(NET_PROTOCOL_VER), TMsgType.Notify);
e_WriteLog('Build date: ' + GAME_BUILDDATE + ' ' + GAME_BUILDTIME, TMsgType.Notify);
+ e_WriteLog('Build hash: ' + g_GetBuildHash(), TMsgType.Notify);
+ e_WriteLog('Build by: ' + g_GetBuilderName(), TMsgType.Notify);
e_LogWritefln('Force bin dir: %s', [forceBinDir], TMsgType.Notify);
e_LogWritefln('BINARY PATH: [%s]', [binPath], TMsgType.Notify);
PrintDirs('CacheDirs', CacheDirs);
PrintDirs('ConfigDirs', ConfigDirs);
PrintDirs('ScreenshotDirs', ScreenshotDirs);
+ PrintDirs('StatsDirs', StatsDirs);
PrintDirs('MapDownloadDirs', MapDownloadDirs);
PrintDirs('WadDownloadDirs', WadDownloadDirs);
e_InitInput;
sys_Init;
+ g_Options_SetDefault;
+ g_Options_SetDefaultVideo;
s := CONFIG_FILENAME;
if e_FindResource(ConfigDirs, s) = true then
- begin
- g_Options_Read(s)
- end
- else
- begin
- g_Options_SetDefault;
- g_Options_SetDefaultVideo
- end;
- if sys_SetDisplayMode(gScreenWidth, gScreenHeight, gBPP, gFullScreen) = False then
+ g_Options_Read(s);
+ g_Console_SysInit;
+ if sys_SetDisplayMode(gRC_Width, gRC_Height, gBPP, gRC_FullScreen, gRC_Maximized) = False then
raise Exception.Create('Failed to set videomode on startup.');
- g_Console_SysInit;
e_WriteLog(gLanguage, TMsgType.Notify);
g_Language_Set(gLanguage);
if assigned(oglDeinitCB) then oglDeinitCB;
{$ENDIF}
+ g_Console_WriteGameConfig;
sys_Final;
end;