diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 070939d11262449427ddd618720d851addd242b1..6f539485d00ed36df55dfb941d84f23b3b93ee36 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
else
SectionName := aSection;
+ if aWAD = '' then
+ aWAD := _lc[I_WAD_SPECIAL_MAP];
+
if aWAD = _lc[I_WAD_SPECIAL_MAP] then
begin // Файл карты
g_ProcessResourceStr(OpenedMap, @fn, nil, nil);
begin // Аним. текстура
GetFrame(FullResourceName, Data, FrameLen, Width, Height);
- if g_CreateTextureMemorySize(Data, FrameLen, ResourceName, 0, 0, Width, Height, 1) then
- a := MainForm.lbTextureList.Items.Add(ResourceName);
+ if not g_CreateTextureMemorySize(Data, FrameLen, ResourceName, 0, 0, Width, Height, 1) then
+ ok := False;
+ a := MainForm.lbTextureList.Items.Add(ResourceName);
end
else // Обычная текстура
begin
- if g_CreateTextureWAD(ResourceName, FullResourceName) then
- a := MainForm.lbTextureList.Items.Add(ResourceName);
+ if not g_CreateTextureWAD(ResourceName, FullResourceName) then
+ ok := False;
+ a := MainForm.lbTextureList.Items.Add(ResourceName);
end;
+ if (not ok) and (slInvalidTextures.IndexOf(ResourceName) = -1) then
+ begin
+ slInvalidTextures.Add(ResourceName);
+ ok := True;
+ end;
if (a > -1) and (not silent) then
SelectTexture(a);
end;
CopyBuffer: TCopyRecArray;
res: Boolean;
swad, ssec, sres: String;
+ NoTextureID: DWORD;
begin
CopyBuffer := nil;
+ NoTextureID := 0;
StringToCopyBuffer(ClipBoard.AsText, CopyBuffer);
g_GetTextureSizeByName(Panel^.TextureName,
Panel^.TextureWidth, Panel^.TextureHeight)
else
- Panel^.TextureName := '';
+ if g_GetTexture('NOTEXTURE', NoTextureID) then
+ begin
+ Panel^.TextureID := TEXTURE_SPECIAL_NOTEXTURE;
+ g_GetTextureSizeByID(NoTextureID, Panel^.TextureWidth, Panel^.TextureHeight);
+ end;
end
else // Спец.текстура:
begin