summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 462c24e)
raw | patch | inline | side by side (parent: 462c24e)
author | FGSFDSFGS <derp.primus@gmail.com> | |
Wed, 21 Dec 2016 02:12:38 +0000 (05:12 +0300) | ||
committer | FGSFDSFGS <derp.primus@gmail.com> | |
Wed, 21 Dec 2016 02:12:38 +0000 (05:12 +0300) |
src/editor/f_main.pas | patch | blob | history | |
src/editor/g_map.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 9167af7bd3a34d88085e7006fc671d0d9ac12ec7..a63b81e0b75abf83576ca7c4b60416b2253ef72b 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
var
x, y: Integer;
a, b: Integer;
- ID: DWORD;
+ ID, PID: DWORD;
Width, Height: Word;
Rect: TRectWH;
ObjCount: Word;
if not g_GetTexture(SelectedTexture(), ID) then
g_GetTexture('NOTEXTURE', ID);
g_GetTextureSizeByID(ID, Width, Height);
- e_DrawFillQuad(RenderPanel.Width-Width-2, RenderPanel.Height-Height-2,
- RenderPanel.Width-1, RenderPanel.Height-1,
- GetRValue(PreviewColor), GetGValue(PreviewColor), GetBValue(PreviewColor), 0);
- e_Draw(ID, RenderPanel.Width-Width-1, RenderPanel.Height-Height-1, 0, True, False);
+ if g_GetTexture('PREVIEW', PID) then
+ e_DrawFill(PID, RenderPanel.Width-Width, RenderPanel.Height-Height, Width div 16 + 1, Height div 16 + 1, 0, True, False);
+ e_Draw(ID, RenderPanel.Width-Width, RenderPanel.Height-Height, 0, True, False);
end;
// Подсказка при выборе точки Телепорта:
diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas
index a49b6f9edb7872fcd0d577db2ffad2f1bed88324..1be82b6cb7d05cc3ffdc4c9e2373ae81c4dc937d 100644 (file)
--- a/src/editor/g_map.pas
+++ b/src/editor/g_map.pas
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);