From: binarymaster Date: Sat, 12 Aug 2017 16:18:10 +0000 (+0300) Subject: Items: Add flamethrower and fuel canister X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=1fb1b203de2d204939df9112dda1f72760c956ee;p=d2df-editor.git Items: Add flamethrower and fuel canister --- diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index 18a5696..645e4c1 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -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 diff --git a/src/editor/g_language.pas b/src/editor/g_language.pas index d8ee27f..405798e 100644 --- a/src/editor/g_language.pas +++ b/src/editor/g_language.pas @@ -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 diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas index 1be82b6..a1e9bab 100644 --- a/src/editor/g_map.pas +++ b/src/editor/g_map.pas @@ -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'); diff --git a/src/lib/vampimg/ImagingFormats.pas b/src/lib/vampimg/ImagingFormats.pas index b42b4ac..8326389 100644 --- a/src/lib/vampimg/ImagingFormats.pas +++ b/src/lib/vampimg/ImagingFormats.pas @@ -4234,6 +4234,7 @@ end; function GetBCPixelsSize(Format: TImageFormat; Width, Height: LongInt): LongInt; begin + Result := 0; raise ENotImplemented.Create(); end; diff --git a/src/shared/MAPDEF.pas b/src/shared/MAPDEF.pas index 59fa0af..fd0d58b 100644 --- a/src/shared/MAPDEF.pas +++ b/src/shared/MAPDEF.pas @@ -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;