X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2FItems.pas;h=9f35b1bfa037dd911e58c0722026549999d7185c;hp=9ebb84e18ab21ec96a5fe75aa2663e2d421ffcdf;hb=4983aa70fea163453968255c36b0689cfb412463;hpb=4d7cf2ab1e10d9926d03afb5a3f883bcf5312469 diff --git a/src/Items.pas b/src/Items.pas index 9ebb84e..9f35b1b 100644 --- a/src/Items.pas +++ b/src/Items.pas @@ -108,7 +108,7 @@ interface painting5 = 99; painting6 = 100; painting7 = 101; - reservedBlockItem1 = 102; + giftChest = 102; vines = 103; sign = 104; redstoneTorch = 105; @@ -128,15 +128,15 @@ interface glassPlane = 119; farmland = 120; cake = 121; - reservedBlockItem2 = 122; - reservedBlockItem3 = 123; - reservedBlockItem4 = 124; - reservedBlockItem5 = 125; - reservedBlockItem6 = 126; + wheatBlock = 122; + melonStem = 123; + pumpkinStem = 124; + burningFurnace = 125; + reservedBlockItem = 126; stick = 127; dandelionYellow = 128; roseRed = 129; - superSpecialUnneededTool = 130; + reservedToolItem1 = 130; pickaxe1 = 131; pickaxe2 = 132; pickaxe3 = 133; @@ -158,14 +158,14 @@ interface sword3 = 149; sword4 = 150; sword5 = 151; - fishingRod = 152; + rod = 152; lighter = 153; hoe1 = 154; hoe2 = 155; hoe3 = 156; hoe4 = 157; hoe5 = 158; - reservedToolItem = 159; + reservedToolItem2 = 159; coal = 160; redstone = 161; diamond = 162; @@ -251,12 +251,9 @@ interface function GetOrdinary(i : integer) : integer; - procedure DrawSmall(id, x, y : integer); - procedure Draw(id, sum, x, y : integer; drawIndicator : boolean); - implementation - uses Vars, Func; + uses Vars, Func, Tools; const lastItem = 222; @@ -340,37 +337,6 @@ implementation countOrdItems := countOrdItems + 1; end; - procedure DrawSmall(id, x, y : integer); - begin - if GetTextureSource(id) = 0 then DrawImage(Vars.tex8[itex[id]], x, y) - else if GetTextureSource(id) = 1 then DrawImage(Vars.item8[itex[id]], x, y) - end; - - procedure Draw(id, sum, x, y : integer; drawIndicator : boolean); - const - maxLength = 15; - maxHeight = 14; - redLength = 3; - var - class, len : integer; - begin - if sum <= 0 then exit; - - if GetTextureSource(id) = 0 then DrawImage(Vars.tex[itex[id]], x, y) - else if GetTextureSource(id) = 1 then DrawImage(Vars.item[itex[id]], x, y) - - if drawIndicator and (sum > 1) then begin - class := GetIndicatorType(id); - if class = numeric then begin - Func.DrawFontText('' + sum, x, y + 8) - end else if class = line then begin - len := sum * maxLength / imax[id]; - if len <= redLength then SetColor(255, 0, 0) else SetColor(0, 255, 0); - DrawLine(x, y + maxHeight, x + len, y + maxHeight); - end; - end; - end; - initialization InitItem(none, block, 0, 0, 0, 0, noindicator, false); InitItem(dirt, block, 1, 64, 1, 0, numeric, true); @@ -474,7 +440,7 @@ initialization InitItem(painting5, block, 110, 1, 99, 0, numeric, true); InitItem(painting6, block, 111, 1, 100, 0, numeric, true); InitItem(painting7, block, 112, 1, 101, 0, numeric, true); - InitItem(reservedBlockItem1, block, 0, 0, 0, 0, noindicator, false); + InitItem(giftChest, block, 113, 64, 102, 0, numeric, true); InitItem(vines, block, 114, 64, 103, 0, numeric, true); InitItem(sign, block, 98, 16, 104, 1, numeric, true); InitItem(redstoneTorch, block, 116, 64, 105, 0, numeric, true); @@ -494,44 +460,44 @@ initialization InitItem(glassPlane, block, 128, 64, 119, 0, numeric, true); InitItem(farmland, block, 136, 64, 120, 0, numeric, true); InitItem(cake, block, 137, 64, 121, 0, numeric, true); - InitItem(reservedBlockItem2, block, 0, 0, 0, 0, noindicator, false); - InitItem(reservedBlockItem3, block, 0, 0, 0, 0, noindicator, false); - InitItem(reservedBlockItem4, block, 0, 0, 0, 0, noindicator, false); - InitItem(reservedBlockItem5, block, 0, 0, 0, 0, noindicator, false); - InitItem(reservedBlockItem6, block, 0, 0, 0, 0, noindicator, false); + InitItem(wheatBlock, block, 142, 64, 122, 0, numeric, true); + InitItem(melonStem, block, 143, 64, 123, 0, numeric, true); + InitItem(pumpkinStem, block, 143, 64, 124, 0, numeric, true); + InitItem(burningFurnace, block, 134, 64, 125, 0, numeric, true); + InitItem(reservedBlockItem, block, 0, 0, 0, 0, noindicator, false); InitItem(stick, orditem, 0, 64, 0, 1, numeric, true); InitItem(dandelionYellow, orditem, 8, 64, 0, 1, numeric, true); InitItem(roseRed, orditem, 9, 64, 0, 1, numeric, true); - InitItem(superSpecialUnneededTool, tool, 0, 0, 0, 1, line, false); - InitItem(pickaxe1, tool, 48, 60, 1, 1, line, false); - InitItem(pickaxe2, tool, 49, 132, 2, 1, line, false); - InitItem(pickaxe3, tool, 50, 251, 3, 1, line, false); - InitItem(pickaxe4, tool, 51, 1562, 4, 1, line, false); - InitItem(pickaxe5, tool, 52, 33, 5, 1, line, false); - InitItem(shovel1, tool, 32, 60, 6, 1, line, false); - InitItem(shovel2, tool, 33, 132, 7, 1, line, false); - InitItem(shovel3, tool, 34, 251, 8, 1, line, false); - InitItem(shovel4, tool, 35, 1562, 9, 1, line, false); - InitItem(shovel5, tool, 36, 33, 10, 1, line, false); - InitItem(axe1, tool, 64, 60, 11, 1, line, false); - InitItem(axe2, tool, 65, 132, 12, 1, line, false); - InitItem(axe3, tool, 66, 251, 13, 1, line, false); - InitItem(axe4, tool, 67, 1562, 14, 1, line, false); - InitItem(axe5, tool, 68, 33, 15, 1, line, false); - InitItem(shears, tool, 10, 239, 16, 1, line, false); - InitItem(sword1, tool, 16, 60, 17, 1, line, false); - InitItem(sword2, tool, 17, 132, 18, 1, line, false); - InitItem(sword3, tool, 18, 251, 19, 1, line, false); - InitItem(sword4, tool, 19, 1562, 20, 1, line, false); - InitItem(sword5, tool, 20, 33, 21, 1, line, false); - InitItem(fishingRod, tool, 101, 65, 22, 1, line, false); - InitItem(lighter, tool, 106, 65, 23, 1, line, false); - InitItem(hoe1, tool, 80, 60, 24, 1, line, false); - InitItem(hoe2, tool, 81, 132, 25, 1, line, false); - InitItem(hoe3, tool, 82, 251, 26, 1, line, false); - InitItem(hoe4, tool, 83, 1562, 27, 1, line, false); - InitItem(hoe5, tool, 84, 33, 28, 1, line, false); - InitItem(reservedToolItem, block, 0, 0, 0, 0, noindicator, false); + InitItem(reservedToolItem1, tool, 0, 0, 0, 1, line, false); + InitItem(pickaxe1, tool, 48, 60, Tools.pickaxe1, 1, line, false); + InitItem(pickaxe2, tool, 49, 132, Tools.pickaxe2, 1, line, false); + InitItem(pickaxe3, tool, 50, 251, Tools.pickaxe3, 1, line, false); + InitItem(pickaxe4, tool, 51, 1562, Tools.pickaxe4, 1, line, false); + InitItem(pickaxe5, tool, 52, 33, Tools.pickaxe5, 1, line, false); + InitItem(shovel1, tool, 32, 60, Tools.shovel1, 1, line, false); + InitItem(shovel2, tool, 33, 132, Tools.shovel3, 1, line, false); + InitItem(shovel3, tool, 34, 251, Tools.shovel2, 1, line, false); + InitItem(shovel4, tool, 35, 1562, Tools.shovel4, 1, line, false); + InitItem(shovel5, tool, 36, 33, Tools.shovel5, 1, line, false); + InitItem(axe1, tool, 64, 60, Tools.axe1, 1, line, false); + InitItem(axe2, tool, 65, 132, Tools.axe2, 1, line, false); + InitItem(axe3, tool, 66, 251, Tools.axe3, 1, line, false); + InitItem(axe4, tool, 67, 1562, Tools.axe4, 1, line, false); + InitItem(axe5, tool, 68, 33, Tools.axe5, 1, line, false); + InitItem(shears, tool, 10, 239, Tools.shears, 1, line, false); + InitItem(sword1, tool, 16, 60, Tools.sword1, 1, line, false); + InitItem(sword2, tool, 17, 132, Tools.sword2, 1, line, false); + InitItem(sword3, tool, 18, 251, Tools.sword3, 1, line, false); + InitItem(sword4, tool, 19, 1562, Tools.sword4, 1, line, false); + InitItem(sword5, tool, 20, 33, Tools.sword5, 1, line, false); + InitItem(rod, tool, 101, 65, Tools.rod1, 1, line, false); + InitItem(lighter, tool, 106, 65, Tools.lighter1, 1, line, false); + InitItem(hoe1, tool, 80, 60, Tools.hoe1, 1, line, false); + InitItem(hoe2, tool, 81, 132, Tools.hoe2, 1, line, false); + InitItem(hoe3, tool, 82, 251, Tools.hoe3, 1, line, false); + InitItem(hoe4, tool, 83, 1562, Tools.hoe4, 1, line, false); + InitItem(hoe5, tool, 84, 33, Tools.hoe5, 1, line, false); + InitItem(reservedToolItem2, block, 0, 0, 0, 0, noindicator, false); InitItem(coal, orditem, 2, 64, 0, 1, numeric, true); InitItem(redstone, orditem, 7, 64, 0, 1, numeric, true); InitItem(diamond, orditem, 6, 64, 0, 1, numeric, true); @@ -721,7 +687,7 @@ initialization InitOrdItem(sword3); InitOrdItem(sword4); InitOrdItem(sword5); - InitOrdItem(fishingRod); + InitOrdItem(rod); InitOrdItem(lighter); InitOrdItem(hoe1); InitOrdItem(hoe2);