summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a63da3d)
raw | patch | inline | side by side (parent: a63da3d)
author | Stas'M <x86corez@gmail.com> | |
Sun, 20 May 2018 14:31:49 +0000 (17:31 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Sun, 20 May 2018 14:32:02 +0000 (17:32 +0300) |
http://doom2d.org/forum/viewtopic.php?f=12&t=2400
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 578d950a500a77af475424140529b87e717e5bba..5c1e8bd728a3c914abf27ae0e72c700150e3ab89 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
gAlphaTriggerArea := config.ReadInt('Editor', 'TriggerAlpha', ALPHA_AREA);
if gAlphaTriggerArea = 255 then
gAlphaTriggerArea := ALPHA_AREA;
+ gAlphaMonsterRect := config.ReadInt('Editor', 'MonsterRectAlpha', 0);
+ gAlphaAreaRect := config.ReadInt('Editor', 'AreaRectAlpha', 0);
if config.ReadInt('Editor', 'Scale', 0) = 1 then
Scale := 2
else
config.WriteInt('Editor', 'EdgeAlpha', gAlphaEdge);
config.WriteInt('Editor', 'LineAlpha', gAlphaTriggerLine);
config.WriteInt('Editor', 'TriggerAlpha', gAlphaTriggerArea);
+ config.WriteInt('Editor', 'MonsterRectAlpha', gAlphaMonsterRect);
+ config.WriteInt('Editor', 'AreaRectAlpha', gAlphaAreaRect);
for i := 0 to RecentCount-1 do
if i < RecentFiles.Count then
diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas
index 5a17e97276fc8f681fdcd8d57b7f2cf0e0632f6b..10b8c47ce0142e11dc148650f6d2c7d0c1ad0944 100644 (file)
--- a/src/editor/g_map.pas
+++ b/src/editor/g_map.pas
gAlphaEdge: Byte;
gAlphaTriggerLine: Byte;
gAlphaTriggerArea: Byte;
+ gAlphaMonsterRect: Byte;
+ gAlphaAreaRect: Byte;
drEdge: Array[0..3] of Byte;
gPanels: Array of TPanel;
gItems: Array of TItem;
with MonsterSize[gMonsters[a].MonsterType] do
begin
ID := DWORD(-1);
+ sel := ObjectSelected(OBJECT_MONSTER, a);
case gMonsters[a].MonsterType of
0: Continue;
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;
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);
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;