summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b867d9)
raw | patch | inline | side by side (parent: 1b867d9)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Thu, 6 Feb 2020 20:15:05 +0000 (23:15 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Thu, 6 Feb 2020 20:15:05 +0000 (23:15 +0300) |
src/game/g_main.pas | patch | blob | history |
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 7a9785b6964cd331222219282a1f9b4310d4605f..6e393b262f29152ce225cb4698b108970389a58f 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
MapDownloadDirs: SSArray;
WadDownloadDirs: SSArray;
+ GameWADName: string = 'GAME';
+
implementation
uses
AddDir(MapDirs, e_CatPath(rodir, 'maps'));
AddDir(WadDirs, e_CatPath(rodir, 'wads'));
end;
+ '--game-wad':
+ begin
+ Inc(i);
+ GameWADName := ParamStr(i);
+ end;
end;
Inc(i)
end;
// prefer bin dir if it writable and contains game.wad
if forceBinDir = false then
begin
- if findDiskWad(binPath + 'data' + '/' + 'GAME') <> '' then
+ if findDiskWad(binPath + 'data' + '/' + GameWADName) <> '' then
if e_CanCreateFilesAt(binPath) then
forceBinDir := true
end;
PrintDirs('MapDownloadDirs', MapDownloadDirs);
PrintDirs('WadDownloadDirs', WadDownloadDirs);
- GameWAD := e_FindWad(DataDirs, 'GAME');
+ GameWAD := e_FindWad(DataDirs, GameWADName);
if GameWad = '' then
begin
- e_WriteLog('GAME.WAD not installed?', TMsgType.Fatal);
+ e_WriteLog('WAD ' + GameWADName + ' not found in data directories.', TMsgType.Fatal);
{$IF DEFINED(USE_SDL2) AND NOT DEFINED(HEADLESS)}
if forceBinDir = false then
- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, 'Doom 2D Forever', 'GAME.WAD not installed?', nil);
+ SDL_ShowSimpleMessageBox(
+ SDL_MESSAGEBOX_ERROR,
+ 'Doom 2D Forever',
+ PChar('WAD ' + GameWADName + ' not found in data directories.'),
+ nil
+ );
{$ENDIF}
e_DeinitLog;
Halt(1);