index 7703ab231a1324ae5b4db1c0600a6079b6a59c58..103d9b031f3165cb39920cd042a8f4d56c5dcf3f 100644 (file)
implementation
uses
- f_main, WADSTRUCT, g_language, utils, sfs;
+ f_main, WADSTRUCT, g_language, utils, sfs, g_options;
{$R *.lfm}
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);
// WAD карты:
if OpenedMap <> '' then
- cbWADList.Items.Add(_lc[I_WAD_SPECIAL_MAP]);
+ cbWADList.Items.Add(MsgWadSpecialMap);
end;
procedure TAddResourceForm.bOKClick(Sender: TObject);
begin
if FResourceName = '' then
begin
- MessageBox(0, PChar(_lc[I_MSG_CHOOSE_RES]),
- PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
+ Application.MessageBox(PChar(MsgMsgChooseRes),
+ PChar(MsgMsgError), MB_OK + MB_ICONERROR);
Exit;
end;
i: Integer;
FileName, Section, sn, rn: String;
begin
- if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then
- FileName := EditorDir + 'wads/' + cbWADList.Text (* Resource wad *)
+ if cbWADList.Text <> MsgWadSpecialMap then
+ FileName := WadsDir + DirectorySeparator + cbWADList.Text (* Resource wad *)
else
g_ProcessResourceStr(OpenedMap, FileName, sn, rn); (* Map wad *)
i: Integer;
FileName, Section, SectionName, sn, rn: String;
begin
- if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then
- FileName := EditorDir + 'wads/' + cbWADList.Text (* Resource wad *)
+ if cbWADList.Text <> MsgWadSpecialMap then
+ 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;