summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2bd2bcb)
raw | patch | inline | side by side (parent: 2bd2bcb)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 May 2023 18:37:47 +0000 (21:37 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 May 2023 18:37:47 +0000 (21:37 +0300) |
diff --git a/src/editor/Editor.lpr b/src/editor/Editor.lpr
index 171c8564c25c7313e70c80e65dc5cd8d0ee7aa10..18f997c7c142c491e02c5f14ab87c1796c0abeba 100644 (file)
--- a/src/editor/Editor.lpr
+++ b/src/editor/Editor.lpr
Inc(i);
EditorWad := ParamStr(i);
end;
+ end
+ else if p = '--wads-dir' then
+ begin
+ if i + 1 <= ParamCount then
+ begin
+ Inc(i);
+ WadsDir := ParamStr(i);
+ end;
end;
Inc(i);
end;
CfgFileName := EditorDir + DirectorySeparator + 'Editor.cfg';
GameWad := EditorDir + DirectorySeparator + 'data' + DirectorySeparator + 'game.wad';
EditorWad := EditorDir + DirectorySeparator + 'data' + DirectorySeparator + 'editor.wad';
+ WadsDir := EditorDir + DirectorySeparator + 'wads';
CheckParamOptions;
InitLogs;
index 24c9f8327171b4d2e57bae1a2daf7a8aa1041fe3..d67765e20d111ae91e253ee8350953e1a46ff8c4 100644 (file)
FFullResourceName := '';
FResourceSelected := False;
- if FindFirst(EditorDir + 'wads/*.*', faAnyFile, SR) = 0 then
+ if FindFirst(WadsDir + DirectorySeparator + '*.*', faAnyFile, SR) = 0 then
repeat
if (SR.name <> '.') and (SR.name <> '..') then
cbWADList.Items.Add(SR.Name);
FileName, Section, sn, rn: String;
begin
if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then
- FileName := EditorDir + 'wads/' + cbWADList.Text (* Resource wad *)
+ FileName := WadsDir + DirectorySeparator + cbWADList.Text (* Resource wad *)
else
g_ProcessResourceStr(OpenedMap, FileName, sn, rn); (* Map wad *)
FileName, Section, SectionName, sn, rn: String;
begin
if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then
- FileName := EditorDir + 'wads/' + cbWADList.Text (* Resource wad *)
+ FileName := WadsDir + DirectorySeparator + cbWADList.Text (* Resource wad *)
else
g_ProcessResourceStr(OpenedMap, FileName, sn, rn); (* Map wad *)
g_ProcessResourceStr(OpenedMap, @fn, nil, nil);
if FileName <> '' then
- FFullResourceName := EditorDir + 'wads/' + FResourceName
+ FFullResourceName := WadsDir + DirectorySeparator + FResourceName
else
FFullResourceName := fn + FResourceName
end;
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index be9dee3915e746363fd9c91ff7fd9b22abb05ab5..e3c6288d2419f49a2b6d2f38fca31b5e1eec0da4 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
end
else
begin // Внешний WAD
- FileName := EditorDir+'wads/'+aWAD;
+ FileName := WadsDir + DirectorySeparator + aWAD;
ResourceName := aWAD+':'+SectionName+'\'+aTex;
end;
index fbfe4735001a57e21e74bfefbefb5bf5ccb47d80..1fce2c21b9f7678dc42dd4b8ad5e8f01bf421848 100644 (file)
--- a/src/editor/f_packmap.pas
+++ b/src/editor/f_packmap.pas
if filename = '' then
g_GetResourceSection(OpenedMap, filename, us, un)
else
- filename := EditorDir + 'wads/' + filename;
+ filename := WadsDir + DirectorySeparator + filename;
e_WriteLog('ProcessResource: "' + wad_to + '" "' + section_to + '" "' + filename + '" "' + section + '" "' + resource + '"', MSG_NOTIFY);
if resource = '' then Exit;
diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas
index d6e71a0f263f97e33b7ab55f01e57b98c6cf5010..3f3b58d2e734b3d82969b930a6e7730e73a6f418 100644 (file)
--- a/src/editor/g_map.pas
+++ b/src/editor/g_map.pas
fn := fn + Res;
end
else
- fn := EditorDir + 'wads/' + Res;
+ fn := WadsDir + DirectorySeparator + Res;
g_CreateTextureWAD(SKY_TEXTURE, fn);
end;
if _fn = '' then
TextureRes := FileName + ustr
else
- TextureRes := EditorDir+'wads/'+ustr;
+ TextureRes := WadsDir + DirectorySeparator + ustr;
Error := False;
Continue;
// Нет такой текстуры - ищем в WAD карты:
- if not g_CreateTextureWAD(s, EditorDir+'wads/'+s) then
+ if not g_CreateTextureWAD(s, WadsDir + DirectorySeparator + s) then
begin
s := ExtractFileName(_FileName);
Delete(s, Length(s)-3, 4);
s := UpperCase(s) + '.WAD:TEXTURES\'+ UpperCase(win2utf(map.ReadStr('Textures', 'TextureName'+IntToStr(a), '')));
- if not g_CreateTextureWAD(s, EditorDir+'wads/'+s) then
+ if not g_CreateTextureWAD(s, WadsDir + DirectorySeparator + s) then
Continue;
end;
index acb5de936c410a4802c44ff047869eac0f15255d..19141add46dce469cfd9cd29a377efae7012993f 100644 (file)
--- a/src/editor/g_options.pas
+++ b/src/editor/g_options.pas
CfgFileName: AnsiString;
GameWad: AnsiString;
EditorWad: AnsiString;
+ WadsDir: AnsiString;
implementation