index 69b214e75e6a48b451335859dd9465950be05890..d67765e20d111ae91e253ee8350953e1a46ff8c4 100644 (file)
implementation
uses
- f_main, WADSTRUCT, g_language, utils, sfs;
+ f_main, WADSTRUCT, g_language, utils, sfs, g_options;
{$R *.lfm}
const
- STANDART_WAD = 'Standart.wad';
+ STANDART_WAD = 'standart.wad';
procedure TAddResourceForm.FormActivate(Sender: TObject);
var
FFullResourceName := '';
FResourceSelected := False;
- ChDir(EditorDir);
- 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);
until FindNext(SR) <> 0;
FindClose(SR);
-// "Standart.wad" в начало списка:
+// "standart.wad" в начало списка:
if cbWADList.Items.IndexOf(STANDART_WAD) > 0 then
begin
cbWADList.Items.Delete(cbWADList.Items.IndexOf(STANDART_WAD));
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;