DEADSOFTWARE

Map: Jetpack have animated texture now
[d2df-editor.git] / src / editor / g_map.pas
index 5a17e97276fc8f681fdcd8d57b7f2cf0e0632f6b..008c1a49ae09f0740e6c03f38beed5fbcbbe2f79 100644 (file)
@@ -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;
@@ -2198,6 +2200,7 @@ begin
         with MonsterSize[gMonsters[a].MonsterType] do
         begin
           ID := DWORD(-1);
+          sel := ObjectSelected(OBJECT_MONSTER, a);
 
           case gMonsters[a].MonsterType of
             0: Continue;
@@ -2256,7 +2259,7 @@ begin
           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;
 
@@ -2273,6 +2276,7 @@ begin
         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);
@@ -2302,7 +2306,7 @@ begin
           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;
@@ -2789,6 +2793,7 @@ begin
  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);
@@ -2820,7 +2825,6 @@ begin
  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');