X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Feditor%2Fg_map.pas;h=a41406596015a5843a2330124acb8686feb0f42e;hb=71ee6bf06a4d2c6c3661b982ee3da4ce229e3f74;hp=b5bf888b52d165709e3444652fae2af64a21b345;hpb=212386359ea0af4e0a861f9bf92c45a1516ac87c;p=d2df-editor.git diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas index b5bf888..a414065 100644 --- a/src/editor/g_map.pas +++ b/src/editor/g_map.pas @@ -1,12 +1,12 @@ Unit g_map; -{$MODE Delphi} +{$INCLUDE ../shared/a_modes.inc} Interface Uses - LCLIntf, LCLType, LMessages, g_basic, e_graphics, MAPREADER, MAPSTRUCT, - MAPWRITER, e_log, MAPDEF; + LCLIntf, LCLType, g_basic, e_graphics, MAPREADER, MAPSTRUCT, + MAPWRITER, e_log, MAPDEF, utils; Type TMapObject = record @@ -194,6 +194,8 @@ var gAlphaEdge: Byte; gAlphaTriggerLine: Byte; gAlphaTriggerArea: Byte; + gAlphaMonsterRect: Byte; + gAlphaAreaRect: Byte; drEdge: Array[0..3] of Byte; gPanels: Array of TPanel; gItems: Array of TItem; @@ -219,7 +221,7 @@ function ObjectCollideLevel(fID: DWORD; ObjectType: Byte; dX, dY: Integer): Boo function ObjectCollide(ObjectType: Byte; ID: DWORD; fX, fY: Integer; fWidth, fHeight: Word): Boolean; function ObjectGetRect(ObjectType: Byte; ID: DWORD): TRectWH; procedure MoveObject(ObjectType: Byte; ID: DWORD; dX, dY: Integer); -procedure ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte); +function ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte): Boolean; function ObjectSelected(ObjectType: Byte; ID: DWORD): Boolean; function GetPanelName(PanelType: Word): String; @@ -240,12 +242,11 @@ procedure FreeData(); procedure ShiftMapObjects(dx, dy: Integer); -Implementation +implementation -Uses +uses BinEditor, g_textures, Dialogs, SysUtils, CONFIG, f_main, - Forms, Math, f_addresource_texture, WADEDITOR, - Masks, g_Language; + Forms, Math, f_addresource_texture, WADEDITOR, g_language, g_resources; const OLD_ITEM_MEDKIT_SMALL = 1; @@ -701,6 +702,7 @@ var begin Result := False; + PanelID := DWORD(-1); case ObjectType of OBJECT_PANEL: @@ -862,8 +864,9 @@ begin end; end; -procedure ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte); +function ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte): Boolean; begin + Result := True; case ObjectType of OBJECT_PANEL: with gPanels[ID] do @@ -873,6 +876,7 @@ begin else begin Width := 0; + Result := False; Exit; end; @@ -881,6 +885,7 @@ begin else begin Height := 0; + Result := False; Exit; end; @@ -901,6 +906,7 @@ begin else begin Width := 0; + Result := False; Exit; end; @@ -909,6 +915,7 @@ begin else begin Height := 0; + Result := False; Exit; end; @@ -1046,7 +1053,6 @@ end; function SaveMap(Res: String): Pointer; var - WAD: TWADEditor_1; MapWriter: TMapWriter_1; textures: TTexturesRec1Array; panels: TPanelsRec1Array; @@ -1064,18 +1070,16 @@ var Len: LongWord; begin - WAD := nil; - -// Открываем WAD, если надо: - if Res <> '' then - begin - WAD := TWADEditor_1.Create(); - g_ProcessResourceStr(Res, FileName, SectionName, ResName); - if not WAD.ReadFile(FileName) then - WAD.FreeWAD(); - - WAD.CreateImage(); - end; + textures := nil; + panels := nil; + items := nil; + areas := nil; + monsters := nil; + triggers := nil; + PanelTable := nil; + MonsterTable := nil; + Data := nil; + Len := 0; MapWriter := TMapWriter_1.Create(); @@ -1084,20 +1088,25 @@ begin begin ZeroMemory(@header, SizeOf(TMapHeaderRec_1)); - if gMapInfo.Name <> '' then - CopyMemory(@MapName[0], @gMapInfo.Name[1], Min(32, Length(gMapInfo.Name))); + s := utf2win(gMapInfo.Name); + if s <> '' then + CopyMemory(@MapName[0], @s[1], Min(32, Length(s))); - if gMapInfo.Description <> '' then - CopyMemory(@MapDescription[0], @gMapInfo.Description[1], Min(256, Length(gMapInfo.Description))); + s := utf2win(gMapInfo.Description); + if s <> '' then + CopyMemory(@MapDescription[0], @s[1], Min(256, Length(s))); - if gMapInfo.Author <> '' then - CopyMemory(@MapAuthor[0], @gMapInfo.Author[1], Min(32, Length(gMapInfo.Author))); + s := utf2win(gMapInfo.Author); + if s <> '' then + CopyMemory(@MapAuthor[0], @s[1], Min(32, Length(s))); - if gMapInfo.MusicName <> '' then - CopyMemory(@MusicName[0], @gMapInfo.MusicName[1], Min(64, Length(gMapInfo.MusicName))); + s := utf2win(gMapInfo.MusicName); + if s <> '' then + CopyMemory(@MusicName[0], @s[1], Min(64, Length(s))); - if gMapInfo.SkyName <> '' then - CopyMemory(@SkyName[0], @gMapInfo.SkyName[1], Min(64, Length(gMapInfo.SkyName))); + s := utf2win(gMapInfo.SkyName); + if s <> '' then + CopyMemory(@SkyName[0], @s[1], Min(64, Length(s))); Width := gMapInfo.Width; Height := gMapInfo.Height; @@ -1111,9 +1120,9 @@ begin for a := 0 to MainForm.lbTextureList.Items.Count-1 do begin SetLength(textures, Length(textures)+1); - s := MainForm.lbTextureList.Items[a]; + s := utf2win(MainForm.lbTextureList.Items[a]); CopyMemory(@textures[High(textures)].Resource[0], @s[1], Min(64, Length(s))); - if g_GetTextureFlagByName(s) = 1 then + if g_GetTextureFlagByName(MainForm.lbTextureList.Items[a]) = 1 then textures[High(textures)].Anim := 1 else textures[High(textures)].Anim := 0; @@ -1165,7 +1174,7 @@ begin // Номер текстуры в списке текстур: if gPanels[a].TextureID <> TEXTURE_SPECIAL_NONE then for b := 0 to High(textures) do - if gPanels[a].TextureName = textures[b].Resource then + if utf2win(gPanels[a].TextureName) = textures[b].Resource then begin TextureNum := b; Break; @@ -1328,18 +1337,17 @@ begin // Записываем в WAD, если надо: if Res <> '' then - begin - WAD.RemoveResource('', ResName); - WAD.AddResource(Data, Len, ResName, ''); - WAD.SaveTo(FileName); - - FreeMem(Data); - WAD.Free(); - - Result := nil; - end + begin + g_ProcessResourceStr(Res, FileName, SectionName, ResName); + g_AddResource(FileName, SectionName, ResName, Data, Len, a); + ASSERT(a = 0); + FreeMem(Data); + Result := nil + end else - Result := Data; + begin + Result := Data + end end; procedure AddTexture(res: String; Error: Boolean); @@ -1360,7 +1368,6 @@ end; function LoadMap(Res: String): Boolean; var - WAD: TWADEditor_1; MapReader: TMapReader_1; Header: TMapHeaderRec_1; textures: TTexturesRec1Array; @@ -1378,7 +1385,7 @@ var Data: Pointer; Width, Height, m: Word; FileName, SectionName, ResName, _fn: String; - TextureRes: String; + TextureRes, ustr: String; pData: Pointer; Len, FrameLen: Integer; Error: Boolean; @@ -1386,29 +1393,24 @@ var NW, NH: Word; begin Result := False; + pData := nil; + Len := 0; + Data := nil; + FrameLen := 0; + Width := 0; + Height := 0; + NoTextureID := 0; + NW := 0; + NH := 0; MainForm.pbLoad.Position := 0; MainForm.lLoad.Caption := _lc[I_LOAD_WAD]; Application.ProcessMessages(); -// Открываем WAD: - WAD := TWADEditor_1.Create(); +// Читаем ресурс карты g_ProcessResourceStr(Res, FileName, SectionName, ResName); - - if not WAD.ReadFile(FileName) then - begin - WAD.Free(); - Exit; - end; - -// Читаем ресурс карты: - if not WAD.GetResource('', ResName, pData, Len) then - begin - WAD.Free(); - Exit; - end; - - WAD.Free(); + g_ReadResource(FileName, SectionName, ResName, pData, Len); + if pData = nil then Exit; MapReader := TMapReader_1.Create(); @@ -1430,50 +1432,51 @@ begin begin MainForm.pbLoad.StepIt(); Application.ProcessMessages(); + ustr := win2utf(textures[a].Resource); - if IsSpecialTexture(textures[a].Resource) then + if IsSpecialTexture(ustr) then begin - AddTexture(textures[a].Resource, False); + AddTexture(ustr, False); Continue; end; - g_ProcessResourceStr(textures[a].Resource, @_fn, nil, nil); + g_ProcessResourceStr(ustr, @_fn, nil, nil); if _fn = '' then - TextureRes := FileName + textures[a].Resource + TextureRes := FileName + ustr else - TextureRes := EditorDir+'wads/'+textures[a].Resource; + TextureRes := EditorDir+'wads/'+ustr; Error := False; if not ByteBool(textures[a].Anim) then begin // Обычная текстура - if not g_CreateTextureWAD(textures[a].Resource, TextureRes) then + if not g_CreateTextureWAD(ustr, TextureRes) then begin e_WriteLog(Format('g_CreateTextureWAD() error, res=%s', - [textures[a].Resource]), MSG_WARNING); + [ustr]), MSG_WARNING); Error := True; end; - AddTexture(textures[a].Resource, Error); + AddTexture(ustr, Error); end else // Anim begin // Анимированная текстура if not GetFrame(TextureRes, Data, FrameLen, Width, Height) then begin // Кадры e_WriteLog(Format('GetFrame() error, res=%s', - [textures[a].Resource]), MSG_WARNING); + [ustr]), MSG_WARNING); Error := True; end; - if not g_CreateTextureMemorySize(Data, FrameLen, textures[a].Resource, 0, 0, Width, Height, 1) then + if not g_CreateTextureMemorySize(Data, FrameLen, ustr, 0, 0, Width, Height, 1) then begin // Сама текстура e_WriteLog(Format('g_CreateTextureMemorySize() error, res=%s', - [textures[a].Resource]), MSG_WARNING); + [ustr]), MSG_WARNING); Error := True; end; - AddTexture(textures[a].Resource, Error); + AddTexture(ustr, Error); end; end; end; @@ -1516,9 +1519,10 @@ begin if WordBool(panel.PanelType and m) and (not (ByteBool(panels[a].Flags and PANEL_FLAG_HIDE))) then begin - if not IsSpecialTexture(textures[panels[a].TextureNum].Resource) then + ustr := win2utf(textures[panels[a].TextureNum].Resource); + if not IsSpecialTexture(ustr) then begin // Текстура - if g_GetTexture(textures[panels[a].TextureNum].Resource, panel.TextureID) then + if g_GetTexture(ustr, panel.TextureID) then g_GetTextureSizeByID(panel.TextureID, panel.TextureWidth, panel.TextureHeight) else begin panel.TextureWidth := 1; @@ -1533,9 +1537,9 @@ begin end; end else // Спец. текстура - panel.TextureID := SpecialTextureID(textures[panels[a].TextureNum].Resource); + panel.TextureID := SpecialTextureID(ustr); - panel.TextureName := textures[panels[a].TextureNum].Resource; + panel.TextureName := ustr; end; // Жидкость без текстуры: @@ -1664,11 +1668,11 @@ begin with gMapInfo do begin MapName := ResName; - Name := Header.MapName; - Description := Header.MapDescription; - Author := Header.MapAuthor; - MusicName := Header.MusicName; - SkyName := Header.SkyName; + Name := win2utf(Header.MapName); + Description := win2utf(Header.MapDescription); + Author := win2utf(Header.MapAuthor); + MusicName := win2utf(Header.MusicName); + SkyName := win2utf(Header.SkyName); Height := Header.Height; Width := Header.Width; end; @@ -1689,9 +1693,9 @@ end; function LoadMapOld(_FileName: String): Boolean; const - TexturePrefix = 'Standart.wad:STDTEXTURES\'; - DefaultMusRes = 'Standart.wad:STDMUS\MUS1'; - DefaultSkyRes = 'Standart.wad:STDSKY\SKY0'; + TexturePrefix = 'standart.wad:STDTEXTURES\'; + DefaultMusRes = 'standart.wad:STDMUS\MUS1'; + DefaultSkyRes = 'standart.wad:STDSKY\SKY0'; var map: TConfig; @@ -1731,13 +1735,13 @@ begin Continue; // Нет такой текстуры - ищем в WAD карты: - if not g_CreateTextureWAD(s, EditorDir+'/wads/'+s) then + if not g_CreateTextureWAD(s, EditorDir+'wads/'+s) then begin s := ExtractFileName(_FileName); Delete(s, Length(s)-3, 4); - s := UpperCase(s) + '.WAD:TEXTURES\'+ UpperCase(map.ReadStr('Textures', 'TextureName'+IntToStr(a), '')); + 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, EditorDir+'wads/'+s) then Continue; end; @@ -1791,7 +1795,7 @@ begin begin s := ExtractFileName(_FileName); Delete(s, Length(s)-3, 4); - s := UpperCase(s) + '.WAD:TEXTURES\' + UpperCase(map.ReadStr(section, 'TextureName', '')); + s := UpperCase(s) + '.WAD:TEXTURES\' + UpperCase(win2utf(map.ReadStr(section, 'TextureName', ''))); if g_GetTexture(s, panel.TextureID) then begin @@ -1967,11 +1971,14 @@ procedure DrawPanels(fPanelType: Word); NoTextureID: DWORD; NW, NH: Word; begin + NoTextureID := 0; + NW := 0; + NH := 0; with gPanels[a] do begin case TextureID of TEXTURE_SPECIAL_NONE: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 64, 64, 64, 127); @@ -1985,7 +1992,7 @@ procedure DrawPanels(fPanelType: Word); end; TEXTURE_SPECIAL_WATER: - if PreviewMode then + if PreviewMode > 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 0, 0, 255, 0, B_FILTER) @@ -1995,7 +2002,7 @@ procedure DrawPanels(fPanelType: Word); 0, 0, 255, 127); TEXTURE_SPECIAL_ACID1: - if PreviewMode then + if PreviewMode > 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 0, 127, 0, 0, B_FILTER) @@ -2005,7 +2012,7 @@ procedure DrawPanels(fPanelType: Word); 0, 255, 0, 127); TEXTURE_SPECIAL_ACID2: - if PreviewMode then + if PreviewMode > 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 127, 0, 0, 0, B_FILTER) @@ -2040,27 +2047,27 @@ begin DrawTexture(a); PANEL_LIFTUP: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 128, 64, 0, 0); PANEL_LIFTDOWN: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 90, 154, 138, 0); PANEL_LIFTLEFT: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 200, 80, 4, 0); PANEL_LIFTRIGHT: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 252, 140, 56, 0); PANEL_BLOCKMON: - if not PreviewMode then + if PreviewMode = 0 then e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, 192, 0, 192, 0); @@ -2068,6 +2075,39 @@ begin end; end; +procedure DrawContours (fPanelType: Word); + var i, xx, yy, ww, hh: Integer; +begin + if gPanels <> nil then + for i := 0 to High(gPanels) do + if (gPanels[i].PanelType <> 0) and WordBool(gPanels[i].PanelType and fPanelType) then + begin + xx := gPanels[i].X + MapOffset.X; + yy := gPanels[i].Y + MapOffset.Y; + ww := gPanels[i].X + MapOffset.X + gPanels[i].Width - 1; + hh := gPanels[i].Y + MapOffset.Y + gPanels[i].Height - 1; + case gPanels[i].PanelType of + PANEL_NONE: ; + PANEL_WALL: e_DrawQuad(xx, yy, ww, hh, 208, 208, 208, 0); + PANEL_BACK: e_DrawQuad(xx, yy, ww, hh, 64, 64, 64, 0); + PANEL_FORE: e_DrawQuad(xx, yy, ww, hh, 128, 128, 128, 0); + PANEL_WATER: e_DrawQuad(xx, yy, ww, hh, 0, 0, 192, 0); + PANEL_ACID1: e_DrawQuad(xx, yy, ww, hh, 0, 176, 0, 0); + PANEL_ACID2: e_DrawQuad(xx, yy, ww, hh, 176, 0, 0, 0); + PANEL_STEP: e_DrawQuad(xx, yy, ww, hh, 128, 128, 128, 0); + PANEL_LIFTUP: e_DrawQuad(xx, yy, ww, hh, 116, 72, 36, 0); + PANEL_LIFTDOWN: e_DrawQuad(xx, yy, ww, hh, 116, 124, 96, 0); + PANEL_OPENDOOR: e_DrawQuad(xx, yy, ww, hh, 100, 220, 92, 0); + PANEL_CLOSEDOOR: e_DrawQuad(xx, yy, ww, hh, 212, 184, 64, 0); + PANEL_BLOCKMON: e_DrawQuad(xx, yy, ww, hh, 192, 0, 192, 0); + PANEL_LIFTLEFT: e_DrawQuad(xx, yy, ww, hh, 200, 80, 4, 0); + PANEL_LIFTRIGHT: e_DrawQuad(xx, yy, ww, hh, 252, 140, 56, 0); + else + assert(false) + end; + end; +end; + procedure DrawMap(); var a, w, h: Integer; @@ -2076,10 +2116,11 @@ var ww, hh: Word; sel: Boolean; r: TRectWH; - + mask: Word; begin + ID := 0; // В режиме Превью рисуем небо: - if PreviewMode then + if PreviewMode > 0 then begin w := Max(MainForm.RenderPanel.Width, MainForm.RenderPanel.Height); if MainForm.RenderPanel.Height > MainForm.RenderPanel.Width*3/4 then @@ -2093,21 +2134,21 @@ begin end; // Рисуем панели (если Превью или если включен слой): - if LayerEnabled[LAYER_BACK] or PreviewMode then + if LayerEnabled[LAYER_BACK] or (PreviewMode = 1) then DrawPanels(PANEL_BACK); - if PreviewMode then + if PreviewMode > 0 then DrawPanels(PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT) else if LayerEnabled[LAYER_WATER] then DrawPanels(PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT or PANEL_OPENDOOR or PANEL_CLOSEDOOR or PANEL_BLOCKMON); - if LayerEnabled[LAYER_WALLS] or PreviewMode then + if LayerEnabled[LAYER_WALLS] or (PreviewMode = 1) then DrawPanels(PANEL_WALL); - if LayerEnabled[LAYER_STEPS] or PreviewMode then + if LayerEnabled[LAYER_STEPS] or (PreviewMode = 1) then DrawPanels(PANEL_STEP); // Рисуем предметы: - if (LayerEnabled[LAYER_ITEMS] or PreviewMode) and + if (LayerEnabled[LAYER_ITEMS] or (PreviewMode = 1)) and (gItems <> nil) then for a := 0 to High(gItems) do if gItems[a].ItemType <> ITEM_NONE then @@ -2160,13 +2201,14 @@ begin end; // Рисуем монстров: - if (LayerEnabled[LAYER_MONSTERS] or PreviewMode) and + if (LayerEnabled[LAYER_MONSTERS] or (PreviewMode = 1)) and (gMonsters <> nil) then for a := 0 to High(gMonsters) do if gMonsters[a].MonsterType <> MONSTER_NONE then with MonsterSize[gMonsters[a].MonsterType] do begin ID := DWORD(-1); + sel := ObjectSelected(OBJECT_MONSTER, a); case gMonsters[a].MonsterType of 0: Continue; @@ -2221,26 +2263,28 @@ begin end; // Рамка: - if not PreviewMode then + if PreviewMode = 0 then begin e_DrawQuad(MapOffset.X+gMonsters[a].X, MapOffset.Y+gMonsters[a].Y, MapOffset.X+gMonsters[a].X+Width-1, MapOffset.Y+gMonsters[a].Y+Height-1, - 255, 255, 255); + 255, 255, 255, IfThen(sel, 0, gAlphaMonsterRect)); end; end; // Рисуем закрытые двери после монстров: - if PreviewMode then + if ((PreviewMode = 2) and LayerEnabled[LAYER_WATER]) + or (PreviewMode = 1) then DrawPanels(PANEL_CLOSEDOOR); // Рисуем области: - if (LayerEnabled[LAYER_AREAS] or PreviewMode) and + if (LayerEnabled[LAYER_AREAS] or (PreviewMode = 1)) and (gAreas <> nil) then for a := 0 to High(gAreas) do if gAreas[a].AreaType <> AREA_NONE then with AreaSize[gAreas[a].AreaType] do begin ID := DWORD(-1); + sel := ObjectSelected(OBJECT_AREA, a); case gAreas[a].AreaType of AREA_PLAYERPOINT1: g_GetTexture('AREA_PLAYERPOINT1', ID); @@ -2253,7 +2297,7 @@ begin AREA_BLUETEAMPOINT: g_GetTexture('AREA_BLUEPOINT', ID); end; - if (not PreviewMode) or + if (PreviewMode = 0) or (gAreas[a].AreaType = AREA_REDFLAG) or (gAreas[a].AreaType = AREA_BLUEFLAG) or (gAreas[a].AreaType = AREA_DOMFLAG) then @@ -2266,25 +2310,25 @@ begin 0, True, False); // Рамка: - if not PreviewMode then + if PreviewMode = 0 then begin e_DrawQuad(MapOffset.X+gAreas[a].X, MapOffset.Y+gAreas[a].Y, MapOffset.X+gAreas[a].X+Width-1, MapOffset.Y+gAreas[a].Y+Height-1, - 255, 255, 255); + 255, 255, 255, IfThen(sel, 0, gAlphaAreaRect)); e_DrawPoint(2, MapOffset.X+gAreas[a].X, MapOffset.Y+gAreas[a].Y, 255, 0, 0); end; end; // Рисуем жидкости и передний план после областей: - if LayerEnabled[LAYER_WATER] or PreviewMode then + if LayerEnabled[LAYER_WATER] or (PreviewMode = 1) then DrawPanels(PANEL_WATER or PANEL_ACID1 or PANEL_ACID2); - if LayerEnabled[LAYER_FOREGROUND] or PreviewMode then + if LayerEnabled[LAYER_FOREGROUND] or (PreviewMode = 1) then DrawPanels(PANEL_FORE); // Рисуем триггеры: if LayerEnabled[LAYER_TRIGGERS] and - (not PreviewMode) and (gTriggers <> nil) then + (PreviewMode = 0) and (gTriggers <> nil) then for a := 0 to High(gTriggers) do with gTriggers[a] do if TriggerType <> TRIGGER_NONE then @@ -2616,8 +2660,65 @@ begin end; end; +// Draw panel contours + mask := 0; + if ContourEnabled[LAYER_BACK] then + mask := mask or PANEL_BACK; + if ContourEnabled[LAYER_WALLS] then + mask := mask or PANEL_WALL; + if ContourEnabled[LAYER_FOREGROUND] then + mask := mask or PANEL_FORE; + if ContourEnabled[LAYER_STEPS] then + mask := mask or PANEL_STEP; + if ContourEnabled[LAYER_WATER] then + mask := mask or PANEL_WATER or PANEL_ACID1 or PANEL_ACID2 + or PANEL_OPENDOOR or PANEL_CLOSEDOOR or PANEL_BLOCKMON + or PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT; + if mask <> 0 then + DrawContours(mask); + if ContourEnabled[LAYER_ITEMS] and (gItems <> nil) then + for a := 0 to High(gItems) do + if gItems[a].ItemType <> ITEM_NONE then + e_DrawQuad( + MapOffset.X + gItems[a].X, + MapOffset.Y + gItems[a].Y, + MapOffset.X + gItems[a].X + ItemSize[gItems[a].ItemType, 0], + MapOffset.Y + gItems[a].Y + ItemSize[gItems[a].ItemType, 1], + 0, 255, 255 + ); + if ContourEnabled[LAYER_MONSTERS] and (gMonsters <> nil) then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> MONSTER_NONE then + e_DrawQuad( + MapOffset.X + gMonsters[a].X, + MapOffset.Y + gMonsters[a].Y, + MapOffset.X + gMonsters[a].X + MonsterSize[gMonsters[a].MonsterType].Width - 1, + MapOffset.Y + gMonsters[a].Y + MonsterSize[gMonsters[a].MonsterType].Height - 1, + 255, 0, 0 + ); + if ContourEnabled[LAYER_AREAS] and (gAreas <> nil) then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> AREA_NONE then + e_DrawQuad( + MapOffset.X + gAreas[a].X + AreaSize[gAreas[a].AreaType].X, + MapOffset.Y + gAreas[a].Y + AreaSize[gAreas[a].AreaType].Y, + MapOffset.X + gAreas[a].X + AreaSize[gAreas[a].AreaType].Width, + MapOffset.Y + gAreas[a].Y + AreaSize[gAreas[a].AreaType].Height, + 0, 255, 255 + ); + if ContourEnabled[LAYER_TRIGGERS] and (gTriggers <> nil) then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> TRIGGER_NONE then + e_DrawQuad( + MapOffset.X + gTriggers[a].X, + MapOffset.Y + gTriggers[a].Y, + MapOffset.X + gTriggers[a].X + gTriggers[a].Width, + MapOffset.Y + gTriggers[a].Y + gTriggers[a].Height, + 255, 255, 0 + ); + // Границы карты: - if not PreviewMode then + if PreviewMode = 0 then begin e_DrawFillQuad(-32+MapOffset.X, -32+MapOffset.Y, @@ -2722,79 +2823,79 @@ end; procedure LoadData(); begin - g_CreateTextureWAD('PREVIEW', EditorDir+'/data/Editor.wad:TEXTURES\CHECKERS'); - g_CreateTextureWAD('NOTEXTURE', EditorDir+'/data/Game.wad:TEXTURES\NOTEXTURE'); - - g_CreateTextureWADSize('AREA_REDFLAG', EditorDir+'/data/Game.wad:TEXTURES\FLAGRED', 0, 0, 64, 64); - g_CreateTextureWADSize('AREA_BLUEFLAG', EditorDir+'/data/Game.wad:TEXTURES\FLAGBLUE', 0, 0, 64, 64); - g_CreateTextureWADSize('AREA_DOMFLAG', EditorDir+'/data/Game.wad:TEXTURES\FLAGDOM', 0, 0, 64, 64); - - g_CreateTextureWADSize('MONSTER_DEMON', EditorDir+'/data/Game.wad:MTEXTURES\DEMON_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_IMP', EditorDir+'/data/Game.wad:MTEXTURES\IMP_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_ZOMBY', EditorDir+'/data/Game.wad:MTEXTURES\ZOMBY_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_SERG', EditorDir+'/data/Game.wad:MTEXTURES\SERG_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_CYBER', EditorDir+'/data/Game.wad:MTEXTURES\CYBER_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_CGUN', EditorDir+'/data/Game.wad:MTEXTURES\CGUN_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_BARON', EditorDir+'/data/Game.wad:MTEXTURES\BARON_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_KNIGHT', EditorDir+'/data/Game.wad:MTEXTURES\KNIGHT_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_CACO', EditorDir+'/data/Game.wad:MTEXTURES\CACO_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_SOUL', EditorDir+'/data/Game.wad:MTEXTURES\SOUL_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_PAIN', EditorDir+'/data/Game.wad:MTEXTURES\PAIN_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_SPIDER', EditorDir+'/data/Game.wad:MTEXTURES\SPIDER_SLEEP', 0, 0, 256, 128); - g_CreateTextureWADSize('MONSTER_BSP', EditorDir+'/data/Game.wad:MTEXTURES\BSP_SLEEP', 0, 0, 128, 64); - g_CreateTextureWADSize('MONSTER_MANCUB', EditorDir+'/data/Game.wad:MTEXTURES\MANCUB_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_SKEL', EditorDir+'/data/Game.wad:MTEXTURES\SKEL_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_VILE', EditorDir+'/data/Game.wad:MTEXTURES\VILE_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_FISH', EditorDir+'/data/Game.wad:MTEXTURES\FISH_SLEEP', 0, 0, 32, 32); - g_CreateTextureWADSize('MONSTER_BARREL', EditorDir+'/data/Game.wad:MTEXTURES\BARREL_SLEEP', 0, 0, 64, 64); - g_CreateTextureWADSize('MONSTER_ROBO', EditorDir+'/data/Game.wad:MTEXTURES\ROBO_SLEEP', 0, 0, 128, 128); - g_CreateTextureWADSize('MONSTER_MAN', EditorDir+'/data/Game.wad:MTEXTURES\MAN_SLEEP', 0, 0, 64, 64); - - g_CreateTextureWADSize('ITEM_BLUESPHERE', EditorDir+'/data/Game.wad:TEXTURES\SBLUE', 0, 0, 32, 32); - g_CreateTextureWADSize('ITEM_WHITESPHERE', EditorDir+'/data/Game.wad:TEXTURES\SWHITE', 0, 0, 32, 32); - g_CreateTextureWADSize('ITEM_ARMORGREEN', EditorDir+'/data/Game.wad:TEXTURES\ARMORGREEN', 0, 0, 32, 16); - g_CreateTextureWADSize('ITEM_ARMORBLUE', EditorDir+'/data/Game.wad:TEXTURES\ARMORBLUE', 0, 0, 32, 16); - g_CreateTextureWADSize('ITEM_INVUL', EditorDir+'/data/Game.wad:TEXTURES\INVUL', 0, 0, 32, 32); - g_CreateTextureWADSize('ITEM_BOTTLE', EditorDir+'/data/Game.wad:TEXTURES\BOTTLE', 0, 0, 16, 32); - g_CreateTextureWADSize('ITEM_HELMET', EditorDir+'/data/Game.wad:TEXTURES\HELMET', 0, 0, 16, 16); - g_CreateTextureWADSize('ITEM_INVIS', EditorDir+'/data/Game.wad:TEXTURES\INVIS', 0, 0, 32, 32); - g_CreateTextureWADSize('ITEM_WEAPON_FLAMETHROWER', EditorDir+'/data/Game.wad:TEXTURES\FLAMETHROWER', 0, 0, 64, 32); - g_CreateTextureWADSize('ITEM_AMMO_FUELCAN', EditorDir+'/data/Game.wad:TEXTURES\FUELCAN', 0, 0, 16, 32); - - g_CreateTextureWAD('ITEM_MEDKIT_SMALL', EditorDir+'/data/Game.wad:TEXTURES\MED1'); - g_CreateTextureWAD('ITEM_MEDKIT_LARGE', EditorDir+'/data/Game.wad:TEXTURES\MED2'); - g_CreateTextureWAD('ITEM_WEAPON_SAW', EditorDir+'/data/Game.wad:TEXTURES\SAW'); - g_CreateTextureWAD('ITEM_WEAPON_PISTOL', EditorDir+'/data/Game.wad:TEXTURES\PISTOL'); - g_CreateTextureWAD('ITEM_WEAPON_KASTET', EditorDir+'/data/Game.wad:TEXTURES\KASTET'); - g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN1', EditorDir+'/data/Game.wad:TEXTURES\SHOTGUN1'); - g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN2', EditorDir+'/data/Game.wad:TEXTURES\SHOTGUN2'); - g_CreateTextureWAD('ITEM_WEAPON_CHAINGUN', EditorDir+'/data/Game.wad:TEXTURES\MGUN'); - g_CreateTextureWAD('ITEM_WEAPON_ROCKETLAUNCHER', EditorDir+'/data/Game.wad:TEXTURES\RLAUNCHER'); - g_CreateTextureWAD('ITEM_WEAPON_PLASMA', EditorDir+'/data/Game.wad:TEXTURES\PGUN'); - g_CreateTextureWAD('ITEM_WEAPON_BFG', EditorDir+'/data/Game.wad:TEXTURES\BFG'); - g_CreateTextureWAD('ITEM_WEAPON_SUPERPULEMET', EditorDir+'/data/Game.wad:TEXTURES\SPULEMET'); - g_CreateTextureWAD('ITEM_AMMO_BULLETS', EditorDir+'/data/Game.wad:TEXTURES\CLIP'); - g_CreateTextureWAD('ITEM_AMMO_BULLETS_BOX', EditorDir+'/data/Game.wad:TEXTURES\AMMO'); - g_CreateTextureWAD('ITEM_AMMO_SHELLS', EditorDir+'/data/Game.wad:TEXTURES\SHELL1'); - g_CreateTextureWAD('ITEM_AMMO_SHELLS_BOX', EditorDir+'/data/Game.wad:TEXTURES\SHELL2'); - g_CreateTextureWAD('ITEM_AMMO_ROCKET', EditorDir+'/data/Game.wad:TEXTURES\ROCKET'); - g_CreateTextureWAD('ITEM_AMMO_ROCKET_BOX', EditorDir+'/data/Game.wad:TEXTURES\ROCKETS'); - g_CreateTextureWAD('ITEM_AMMO_CELL', EditorDir+'/data/Game.wad:TEXTURES\CELL'); - g_CreateTextureWAD('ITEM_AMMO_CELL_BIG', EditorDir+'/data/Game.wad:TEXTURES\CELL2'); - g_CreateTextureWAD('ITEM_AMMO_BACKPACK', EditorDir+'/data/Game.wad:TEXTURES\BPACK'); - g_CreateTextureWAD('ITEM_KEY_RED', EditorDir+'/data/Game.wad:TEXTURES\KEYR'); - g_CreateTextureWAD('ITEM_KEY_GREEN', EditorDir+'/data/Game.wad:TEXTURES\KEYG'); - g_CreateTextureWAD('ITEM_KEY_BLUE', EditorDir+'/data/Game.wad:TEXTURES\KEYB'); - g_CreateTextureWAD('ITEM_OXYGEN', EditorDir+'/data/Game.wad:TEXTURES\OXYGEN'); - g_CreateTextureWAD('ITEM_SUIT', EditorDir+'/data/Game.wad:TEXTURES\SUIT'); - g_CreateTextureWAD('ITEM_MEDKIT_BLACK', EditorDir+'/data/Game.wad:TEXTURES\BMED'); - g_CreateTextureWAD('ITEM_JETPACK', EditorDir+'/data/Game.wad:TEXTURES\JETPACK'); - - g_CreateTextureWAD('AREA_PLAYERPOINT1', EditorDir+'/data/Editor.wad:TEXTURES\P1POINT'); - g_CreateTextureWAD('AREA_PLAYERPOINT2', EditorDir+'/data/Editor.wad:TEXTURES\P2POINT'); - g_CreateTextureWAD('AREA_DMPOINT', EditorDir+'/data/Editor.wad:TEXTURES\DMPOINT'); - g_CreateTextureWAD('AREA_REDPOINT', EditorDir+'/data/Editor.wad:TEXTURES\REDPOINT'); - g_CreateTextureWAD('AREA_BLUEPOINT', EditorDir+'/data/Editor.wad:TEXTURES\BLUEPOINT'); + g_CreateTextureWAD('PREVIEW', EditorDir+'data/editor.wad:TEXTURES\CHECKERS'); + g_CreateTextureWAD('NOTEXTURE', EditorDir+'data/game.wad:TEXTURES\NOTEXTURE'); + + g_CreateTextureWADSize('AREA_REDFLAG', EditorDir+'data/game.wad:TEXTURES\FLAGRED', 0, 0, 64, 64); + g_CreateTextureWADSize('AREA_BLUEFLAG', EditorDir+'data/game.wad:TEXTURES\FLAGBLUE', 0, 0, 64, 64); + g_CreateTextureWADSize('AREA_DOMFLAG', EditorDir+'data/game.wad:TEXTURES\FLAGDOM', 0, 0, 64, 64); + + g_CreateTextureWADSize('MONSTER_DEMON', EditorDir+'data/game.wad:MTEXTURES\DEMON_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_IMP', EditorDir+'data/game.wad:MTEXTURES\IMP_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_ZOMBY', EditorDir+'data/game.wad:MTEXTURES\ZOMBY_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_SERG', EditorDir+'data/game.wad:MTEXTURES\SERG_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_CYBER', EditorDir+'data/game.wad:MTEXTURES\CYBER_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_CGUN', EditorDir+'data/game.wad:MTEXTURES\CGUN_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_BARON', EditorDir+'data/game.wad:MTEXTURES\BARON_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_KNIGHT', EditorDir+'data/game.wad:MTEXTURES\KNIGHT_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_CACO', EditorDir+'data/game.wad:MTEXTURES\CACO_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SOUL', EditorDir+'data/game.wad:MTEXTURES\SOUL_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_PAIN', EditorDir+'data/game.wad:MTEXTURES\PAIN_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SPIDER', EditorDir+'data/game.wad:MTEXTURES\SPIDER_SLEEP', 0, 0, 256, 128); + g_CreateTextureWADSize('MONSTER_BSP', EditorDir+'data/game.wad:MTEXTURES\BSP_SLEEP', 0, 0, 128, 64); + g_CreateTextureWADSize('MONSTER_MANCUB', EditorDir+'data/game.wad:MTEXTURES\MANCUB_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SKEL', EditorDir+'data/game.wad:MTEXTURES\SKEL_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_VILE', EditorDir+'data/game.wad:MTEXTURES\VILE_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_FISH', EditorDir+'data/game.wad:MTEXTURES\FISH_SLEEP', 0, 0, 32, 32); + g_CreateTextureWADSize('MONSTER_BARREL', EditorDir+'data/game.wad:MTEXTURES\BARREL_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_ROBO', EditorDir+'data/game.wad:MTEXTURES\ROBO_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_MAN', EditorDir+'data/game.wad:MTEXTURES\MAN_SLEEP', 0, 0, 64, 64); + + g_CreateTextureWADSize('ITEM_BLUESPHERE', EditorDir+'data/game.wad:TEXTURES\SBLUE', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_WHITESPHERE', EditorDir+'data/game.wad:TEXTURES\SWHITE', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_ARMORGREEN', EditorDir+'data/game.wad:TEXTURES\ARMORGREEN', 0, 0, 32, 16); + g_CreateTextureWADSize('ITEM_ARMORBLUE', EditorDir+'data/game.wad:TEXTURES\ARMORBLUE', 0, 0, 32, 16); + g_CreateTextureWADSize('ITEM_INVUL', EditorDir+'data/game.wad:TEXTURES\INVUL', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_BOTTLE', EditorDir+'data/game.wad:TEXTURES\BOTTLE', 0, 0, 16, 32); + g_CreateTextureWADSize('ITEM_HELMET', EditorDir+'data/game.wad:TEXTURES\HELMET', 0, 0, 16, 16); + g_CreateTextureWADSize('ITEM_JETPACK', EditorDir+'data/game.wad:TEXTURES\JETPACK', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_INVIS', EditorDir+'data/game.wad:TEXTURES\INVIS', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_WEAPON_FLAMETHROWER', EditorDir+'data/game.wad:TEXTURES\FLAMETHROWER', 0, 0, 64, 32); + g_CreateTextureWADSize('ITEM_AMMO_FUELCAN', EditorDir+'data/game.wad:TEXTURES\FUELCAN', 0, 0, 16, 32); + + g_CreateTextureWAD('ITEM_MEDKIT_SMALL', EditorDir+'data/game.wad:TEXTURES\MED1'); + g_CreateTextureWAD('ITEM_MEDKIT_LARGE', EditorDir+'data/game.wad:TEXTURES\MED2'); + g_CreateTextureWAD('ITEM_WEAPON_SAW', EditorDir+'data/game.wad:TEXTURES\SAW'); + g_CreateTextureWAD('ITEM_WEAPON_PISTOL', EditorDir+'data/game.wad:TEXTURES\PISTOL'); + g_CreateTextureWAD('ITEM_WEAPON_KASTET', EditorDir+'data/game.wad:TEXTURES\KASTET'); + g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN1', EditorDir+'data/game.wad:TEXTURES\SHOTGUN1'); + g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN2', EditorDir+'data/game.wad:TEXTURES\SHOTGUN2'); + g_CreateTextureWAD('ITEM_WEAPON_CHAINGUN', EditorDir+'data/game.wad:TEXTURES\MGUN'); + g_CreateTextureWAD('ITEM_WEAPON_ROCKETLAUNCHER', EditorDir+'data/game.wad:TEXTURES\RLAUNCHER'); + g_CreateTextureWAD('ITEM_WEAPON_PLASMA', EditorDir+'data/game.wad:TEXTURES\PGUN'); + g_CreateTextureWAD('ITEM_WEAPON_BFG', EditorDir+'data/game.wad:TEXTURES\BFG'); + g_CreateTextureWAD('ITEM_WEAPON_SUPERPULEMET', EditorDir+'data/game.wad:TEXTURES\SPULEMET'); + g_CreateTextureWAD('ITEM_AMMO_BULLETS', EditorDir+'data/game.wad:TEXTURES\CLIP'); + g_CreateTextureWAD('ITEM_AMMO_BULLETS_BOX', EditorDir+'data/game.wad:TEXTURES\AMMO'); + g_CreateTextureWAD('ITEM_AMMO_SHELLS', EditorDir+'data/game.wad:TEXTURES\SHELL1'); + g_CreateTextureWAD('ITEM_AMMO_SHELLS_BOX', EditorDir+'data/game.wad:TEXTURES\SHELL2'); + g_CreateTextureWAD('ITEM_AMMO_ROCKET', EditorDir+'data/game.wad:TEXTURES\ROCKET'); + g_CreateTextureWAD('ITEM_AMMO_ROCKET_BOX', EditorDir+'data/game.wad:TEXTURES\ROCKETS'); + g_CreateTextureWAD('ITEM_AMMO_CELL', EditorDir+'data/game.wad:TEXTURES\CELL'); + g_CreateTextureWAD('ITEM_AMMO_CELL_BIG', EditorDir+'data/game.wad:TEXTURES\CELL2'); + g_CreateTextureWAD('ITEM_AMMO_BACKPACK', EditorDir+'data/game.wad:TEXTURES\BPACK'); + g_CreateTextureWAD('ITEM_KEY_RED', EditorDir+'data/game.wad:TEXTURES\KEYR'); + g_CreateTextureWAD('ITEM_KEY_GREEN', EditorDir+'data/game.wad:TEXTURES\KEYG'); + g_CreateTextureWAD('ITEM_KEY_BLUE', EditorDir+'data/game.wad:TEXTURES\KEYB'); + g_CreateTextureWAD('ITEM_OXYGEN', EditorDir+'data/game.wad:TEXTURES\OXYGEN'); + g_CreateTextureWAD('ITEM_SUIT', EditorDir+'data/game.wad:TEXTURES\SUIT'); + g_CreateTextureWAD('ITEM_MEDKIT_BLACK', EditorDir+'data/game.wad:TEXTURES\BMED'); + + g_CreateTextureWAD('AREA_PLAYERPOINT1', EditorDir+'data/editor.wad:TEXTURES\P1POINT'); + g_CreateTextureWAD('AREA_PLAYERPOINT2', EditorDir+'data/editor.wad:TEXTURES\P2POINT'); + g_CreateTextureWAD('AREA_DMPOINT', EditorDir+'data/editor.wad:TEXTURES\DMPOINT'); + g_CreateTextureWAD('AREA_REDPOINT', EditorDir+'data/editor.wad:TEXTURES\REDPOINT'); + g_CreateTextureWAD('AREA_BLUEPOINT', EditorDir+'data/editor.wad:TEXTURES\BLUEPOINT'); end; procedure FreeData();