DEADSOFTWARE

Items: Add flamethrower and fuel canister
authorbinarymaster <x86corez@gmail.com>
Sat, 12 Aug 2017 16:18:10 +0000 (19:18 +0300)
committerbinarymaster <x86corez@gmail.com>
Sat, 12 Aug 2017 16:18:10 +0000 (19:18 +0300)
src/editor/f_main.pas
src/editor/g_language.pas
src/editor/g_map.pas
src/lib/vampimg/ImagingFormats.pas
src/shared/MAPDEF.pas

index 18a5696d9383a46c13361eef99112e5ae16fee06..645e4c1d365bfa0c4139dc1ba123aab2540b4ff4 100644 (file)
@@ -5556,6 +5556,8 @@ begin
       lbTypeSelect.Items.Add(ItemToStr(ITEM_HELMET));
       lbTypeSelect.Items.Add(ItemToStr(ITEM_JETPACK));
       lbTypeSelect.Items.Add(ItemToStr(ITEM_INVIS));
+      lbTypeSelect.Items.Add(ItemToStr(ITEM_WEAPON_FLAMETHROWER));
+      lbTypeSelect.Items.Add(ItemToStr(ITEM_AMMO_FUELCAN));
 
       b := StrToItem(Values[Key]);
       if b >= ITEM_BOTTLE then
index d8ee27f00c4b829c3086222d8bc208d2aba7b68c..405798e96f12086e981d26355fa78f9ad2a4fcde 100644 (file)
@@ -62,6 +62,7 @@ Type
     I_ARRAY_ITEM_PLASMA_RIFLE,
     I_ARRAY_ITEM_BFG,
     I_ARRAY_ITEM_SUPER_MINIGUN,
+    I_ARRAY_ITEM_FLAMETHROWER,
     I_ARRAY_ITEM_CLIP,
     I_ARRAY_ITEM_AMMO_BOX,
     I_ARRAY_ITEM_4_SHELLS,
@@ -70,6 +71,7 @@ Type
     I_ARRAY_ITEM_ROCKET_BOX,
     I_ARRAY_ITEM_CELL,
     I_ARRAY_ITEM_LARGE_CELL,
+    I_ARRAY_ITEM_FUELCAN,
     I_ARRAY_ITEM_BACKPACK,
     I_ARRAY_ITEM_KEY_RED,
     I_ARRAY_ITEM_KEY_GREEN,
@@ -737,6 +739,8 @@ Const
                                        'BFG9000'),
     ('ARRAY ITEM SUPER MINIGUN',       'Super Chaingun',
                                        'Суперпулемёт'),
+    ('ARRAY ITEM FLAMETHROWER',        'Flamethrower',
+                                       'Огнемёт'),
     ('ARRAY ITEM CLIP',                'Clip',
                                        'Патроны'),
     ('ARRAY ITEM AMMO BOX',            'Box of Bullets',
@@ -753,6 +757,8 @@ Const
                                        'Батарейка'),
     ('ARRAY ITEM LARGE CELL',          'Energy Cell Pack',
                                        'Батарея'),
+    ('ARRAY ITEM FUELCAN',             'Fuel Canister',
+                                       'Канистра'),
     ('ARRAY ITEM BACKPACK',            'Backpack',
                                        'Рюкзак'),
     ('ARRAY ITEM KEY RED',             'Red Key',
@@ -1832,6 +1838,7 @@ begin
   ItemNames[ITEM_WEAPON_PLASMA] := _lc[I_ARRAY_ITEM_PLASMA_RIFLE];
   ItemNames[ITEM_WEAPON_BFG] := _lc[I_ARRAY_ITEM_BFG];
   ItemNames[ITEM_WEAPON_SUPERPULEMET] := _lc[I_ARRAY_ITEM_SUPER_MINIGUN];
+  ItemNames[ITEM_WEAPON_FLAMETHROWER] := _lc[I_ARRAY_ITEM_FLAMETHROWER];
   ItemNames[ITEM_AMMO_BULLETS] := _lc[I_ARRAY_ITEM_CLIP];
   ItemNames[ITEM_AMMO_BULLETS_BOX] := _lc[I_ARRAY_ITEM_AMMO_BOX];
   ItemNames[ITEM_AMMO_SHELLS] := _lc[I_ARRAY_ITEM_4_SHELLS];
@@ -1840,6 +1847,7 @@ begin
   ItemNames[ITEM_AMMO_ROCKET_BOX] := _lc[I_ARRAY_ITEM_ROCKET_BOX];
   ItemNames[ITEM_AMMO_CELL] := _lc[I_ARRAY_ITEM_CELL];
   ItemNames[ITEM_AMMO_CELL_BIG] := _lc[I_ARRAY_ITEM_LARGE_CELL];
+  ItemNames[ITEM_AMMO_FUELCAN] := _lc[I_ARRAY_ITEM_FUELCAN];
   ItemNames[ITEM_AMMO_BACKPACK] := _lc[I_ARRAY_ITEM_BACKPACK];
   ItemNames[ITEM_KEY_RED] := _lc[I_ARRAY_ITEM_KEY_RED];
   ItemNames[ITEM_KEY_GREEN] := _lc[I_ARRAY_ITEM_KEY_GREEN];
@@ -1945,6 +1953,8 @@ begin
     lbItemList.Items.Add(ItemNames[ITEM_HELMET]);
     lbItemList.Items.Add(ItemNames[ITEM_JETPACK]);
     lbItemList.Items.Add(ItemNames[ITEM_INVIS]);
+    lbItemList.Items.Add(ItemNames[ITEM_WEAPON_FLAMETHROWER]);
+    lbItemList.Items.Add(ItemNames[ITEM_AMMO_FUELCAN]);
 
     lbMonsterList.Clear();
     for i := MONSTER_DEMON to MONSTER_MAN do
index 1be82b6cb7d05cc3ffdc4c9e2373ae81c4dc937d..a1e9babf68be070c4dc7b02cac1e2aa349a34a83 100644 (file)
@@ -131,7 +131,9 @@ const
      ((14), (18)), // BOTTLE
      ((16), (15)), // HELMET
      ((32), (24)), // JETPACK
-     ((25), (25))); // INVIS
+     ((25), (25)), // INVIS
+     ((53), (20)), // WEAPON_FLAMETHROWER
+     ((13), (20))); // AMMO_FUELCAN
 
   AreaSize: Array [AREA_PLAYERPOINT1..AREA_BLUETEAMPOINT] of TRectWH =
     ((X:15; Y:12; Width:34; Height:52), // PLAYERPOINT1
@@ -2149,6 +2151,8 @@ begin
             ITEM_HELMET: g_GetTexture('ITEM_HELMET', ID);
             ITEM_JETPACK: g_GetTexture('ITEM_JETPACK', ID);
             ITEM_INVIS: g_GetTexture('ITEM_INVIS', ID);
+            ITEM_WEAPON_FLAMETHROWER: g_GetTexture('ITEM_WEAPON_FLAMETHROWER', ID);
+            ITEM_AMMO_FUELCAN: g_GetTexture('ITEM_AMMO_FUELCAN', ID);
           end;
 
           if ID <> DWORD(-1) then
@@ -2538,6 +2542,8 @@ begin
                         ITEM_HELMET: g_GetTexture('ITEM_HELMET', ID);
                         ITEM_JETPACK: g_GetTexture('ITEM_JETPACK', ID);
                         ITEM_INVIS: g_GetTexture('ITEM_INVIS', ID);
+                        ITEM_WEAPON_FLAMETHROWER: g_GetTexture('ITEM_WEAPON_FLAMETHROWER', ID);
+                        ITEM_AMMO_FUELCAN: g_GetTexture('ITEM_AMMO_FUELCAN', ID);
                       end;
                       if ID <> DWORD(-1) then
                         e_Draw(ID, MapOffset.X+Data.ItemPos.X-(ItemSize[Data.ItemType][0] div 2),
@@ -2752,6 +2758,8 @@ begin
  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');
@@ -2862,6 +2870,8 @@ begin
  g_DeleteTexture('ITEM_MEDKIT_BLACK');
  g_DeleteTexture('ITEM_JETPACK');
  g_DeleteTexture('ITEM_INVIS');
+ g_DeleteTexture('ITEM_WEAPON_FLAMETHROWER');
+ g_DeleteTexture('ITEM_AMMO_FUELCAN');
 
  g_DeleteTexture('AREA_PLAYERPOINT1');
  g_DeleteTexture('AREA_PLAYERPOINT2');
index b42b4ac1478e14ab698480228e6e1b2a84b0f1f3..8326389994746f3518d30eb65d0f1f91029befd8 100644 (file)
@@ -4234,6 +4234,7 @@ end;
 
 function GetBCPixelsSize(Format: TImageFormat; Width, Height: LongInt): LongInt;
 begin
+  Result := 0;
   raise ENotImplemented.Create();
 end;
 
index 59fa0af273e1a01fe83ba89ee423e76bad13f4fe..fd0d58b9520601cfc62da436d36037f79d0efcd8 100644 (file)
@@ -78,8 +78,10 @@ const
   ITEM_HELMET                = 34;
   ITEM_JETPACK               = 35;
   ITEM_INVIS                 = 36;
+  ITEM_WEAPON_FLAMETHROWER   = 37;
+  ITEM_AMMO_FUELCAN          = 38;
 
-  ITEM_MAX                   = 36; // store the last item's id in here
+  ITEM_MAX                   = 38; // store the last item's id in here
                                    // use this in for loops
 
   ITEM_OPTION_ONLYDM = 1;