diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc
index 830a6abac54eaeb688b7640322757eff3c4e9781..df0d606ea05dda1b5cd380d4d7de9ccf4e9e909e 100644 (file)
--- a/src/CAVE.mpsrc
+++ b/src/CAVE.mpsrc
program CAVE;\r
\r
uses\r
- Items,\r
sign,\r
jsr75i,\r
drop,\r
inv,\r
items_store,\r
video,\r
- Blocks;\r
+ Blocks,\r
+ BlocksLogic,\r
+ Items,\r
+ ItemsLogic,\r
+ Tools;\r
\r
const\r
version_map = 9;\r
fillrect(0,0,getWidth,getHeight);\r
dead:=loadimage('/dl');\r
drawimage(dead,(getWidth/2)-(getimagewidth(dead)/2),(getHeight/2)-(getimageheight(dead)/2));\r
- drawfonttext(#119+#119+#119+#46+#100+#101+#97+#100+#115+#111+#102+#116+#119+#97+#114+#101+#46+#114+#117,getWidth/2-80,(getHeight/2)+(getimageheight(dead)/2));\r
+ drawfonttext('www.deadsoftware.ru',getWidth/2-80,(getHeight/2)+(getimageheight(dead)/2));\r
drawfonttext('Loading...',(getWidth/2)-(40),getHeight-8);\r
drawVideo;\r
delay(500);\r
setclip(0,32,getWidth,(getHeight/16-4)*16);\r
\r
drw_txt('Developers:',cur,0,1);\r
- drw_txt(#68+#101+#97+#68+#68+#111+#111+#77+#69+#82+' - Programmer',cur,1,0);//dead\r
- drw_txt(#102+#114+#101+#100+#45+#98+#111+#121+' - Programmer',cur,2,0);//fred-boy\r
- drw_txt(#65+#110+#100+#114+#101+#121+#53+#57+' - Programmer',cur,3,0);//andrey59\r
- drw_txt(#89+#117+#82+#97+#78+#110+#78+#122+#90+#90+' - Artist',cur,4,0);//yura\r
- drw_txt(#83+#97+#115+#104+#97+#71+' - Artist and idea generator',cur,5,0);//sasha\r
- drw_txt(#66+#97+#74+#108+#101+#72+#84+#105+#72+' - Artist and tester',cur,6,0);//valentin\r
- drw_txt(#65+#103+#114+#101+#115+#115+#111+#82+' - Tester',cur,7,0);//agressor\r
- drw_txt(#118+#111+#108+#121+#97+#95+#110+#97+#115+#116+#97+#110+#101+' - Tester',cur,8,0);//volya\r
- drw_txt(#97+#98+#97+#100+#111+#110+' - Tester',cur,9,0);//abadon\r
- drw_txt(#77+#111+#110+#111+#103+#114+#111+#109+' - Tester',cur,10,0);//monogrom\r
- drw_txt(#75+#97+#108+#116+#101+#114+' - Tester',cur,11,0);//kalter\r
+ drw_txt('DeaDDooMER - Programmer',cur,1,0);\r
+ drw_txt('fred-boy - Programmer',cur,2,0);\r
+ drw_txt('Andrey59 - Programmer',cur,3,0);\r
+ drw_txt('YuRaNnNzZZ - Artist',cur,4,0);\r
+ drw_txt('SashaG - Artist and idea generator',cur,5,0);\r
+ drw_txt('BaJleHTiH - Artist and tester',cur,6,0);\r
+ drw_txt('AgressoR - Tester',cur,7,0);\r
+ drw_txt('volya - Tester',cur,8,0);\r
+ drw_txt('abadon - Tester',cur,9,0);\r
+ drw_txt('Monogrom - Tester',cur,10,0);\r
+ drw_txt('Kalter - Tester',cur,11,0);\r
\r
drw_txt('Thanks:',cur,12,1);\r
drw_txt('Piligrim and 0vZ - Lib_jsr75i',cur,13,0);\r
drw_txt('aleshka - Lib_jpeg',cur,17,0);\r
drw_txt('Roman_V - Lib_safeload',cur,18,0);\r
\r
- drw_txt('Site: '+#104+#116+#116+#112+#58+#47+#47+#100+#101+#97+#100+#115+#111+#102+#116+#119+#97+#114+#101+#46+#114+#117,cur,21,0);\r
- drw_txt(#68+#101+#97+#68+#83+#111+#102+#116+#87+#97+#114+#101+' 2012-'+getyear(getcurrenttime),cur,22,0);\r
+ drw_txt('Site: www.deadsoftware.ru',cur,21,0);\r
+ drw_txt('DeaDSoftWare 2012-2014',cur,22,0);\r
\r
drw_txt('Hello! :D',cur,100,1);\r
\r
else if getBiomMap(ix) = 3 then drawimage(osad[0, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\r
end;\r
if drw_back and Blocks.IsTransporent(getmap(ix, iy)) then draw_back(ix, iy);\r
- if Blocks.IsForeground(getmap(ix,iy)) = false then draw_block(ix,iy);\r
+ if Blocks.IsForeground(getmap(ix,iy)) = false then BlocksLogic.Draw(ix, iy, camx, camy);\r
end;\r
{===================[drop]===================}\r
Drop.Draw(camx, camy);\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if Blocks.IsForeground(getmap(ix, iy)) then draw_block(ix, iy);\r
+ if Blocks.IsForeground(getmap(ix, iy)) then BlocksLogic.Draw(ix, iy, camx, camy);\r
\r
setcolor(0, 0, 0);\r
if light_type = 1 then\r
drawimage(gui[1],tmp_ax,0);\r
for ix:=0 to 8 do\r
begin\r
- Items.Draw(inv.getItem(ix), inv.getSum(ix), (ix*16)+tmp_ax+ix*2+4, 1, true);\r
+ ItemsLogic.Draw(inv.getItem(ix), inv.getSum(ix), (ix*16)+tmp_ax+ix*2+4, 1, true);\r
end;\r
drawimage(gui[17],(invslot*16)+tmp_ax+invslot*2+2,0);\r
\r
toolind:=0;\r
end;\r
\r
-procedure usetools(invcur, x, y:integer);\r
- var\r
- item, sum, block:integer;\r
- begin\r
- block:=getmap(x, y);\r
- item:=inv.getItem(invcur);\r
- sum:=inv.getSum(invcur);\r
-\r
- if gamemode=1 then\r
- destroy_block_cr(block, x, y);\r
- else\r
- if (block>0) then\r
- begin\r
- if (Items.GetType(item) = Items.tool) and (getBlockTool(block)=getToolType(item)) then\r
- toolus:=toolus+getToolSpeed(item);\r
- else\r
- toolus:=toolus+1;\r
-\r
- if toolus>=getBlockHP(block) then\r
- begin\r
- if ((Items.GetType(item) = Items.tool) and (getBlockTool(block)=getToolType(item)) and (getToolLvl(item)>=getBlockLvl(block))) or (getBlockLvl(block)<=0) then\r
- begin\r
- setMap(0, x, y);\r
- destroy_block_1(block, x, y);\r
- setMapInfo(0, x, y);\r
- end;\r
- else\r
- begin\r
- setMap(0, x, y);\r
- destroy_block_0(block, x, y);\r
- setMapInfo(0, x, y);\r
- end;\r
-\r
- if Items.GetType(item) = Items.tool then\r
- begin\r
- inv.setSum(inv.getSum(invcur)-1, invcur);\r
- inv.fixNull(invcur);\r
- end;\r
-\r
- toolus:=0;\r
- toolind:=0;\r
- end;\r
- end;\r
+ procedure usetools(invcur, x, y : integer);\r
+ var\r
+ item, sum, block, tool : integer;\r
+ begin\r
+ block := GetMap(x, y);\r
+ item := Inv.GetItem(invcur);\r
+ sum := Inv.GetSum(invcur);\r
+ tool := Items.GetData(item);\r
+\r
+ if gamemode = 1 then begin\r
+ destroy_block_cr(block, x, y);\r
+ end else if block <> 0 then begin\r
+ if (Items.GetType(item) = Items.tool) and (Blocks.GetTool(block) = Tools.GetType(tool)) then begin\r
+ toolus := toolus + Tools.GetSpeed(tool);\r
+ end else begin\r
+ toolus := toolus + 1;\r
+ end;\r
\r
- if (toolus>0) and (toolus<=getBlockHP(block)) then\r
- toolind:=((toolus*100) div getBlockHP(block)) div 10;\r
- end;\r
+ if toolus >= Blocks.GetResistant(block) then begin\r
+ Debug('usetools: tool = ' + tool);\r
+ if ((Items.GetType(item) = Items.tool) and (Blocks.GetTool(block) = Tools.GetType(tool)) and (Tools.GetLevel(tool) >= Blocks.GetLevel(block))) or (Blocks.GetLevel(block) <= 0) then begin\r
+ SetMap(0, x, y);\r
+ destroy_block_1(block, x, y);\r
+ SetMapInfo(0, x, y);\r
+ end else begin\r
+ SetMap(0, x, y);\r
+ destroy_block_0(block, x, y);\r
+ SetMapInfo(0, x, y);\r
+ end;\r
\r
-function rt_useweap:boolean;\r
- var\r
- x, y, w, h, i, damg:integer;\r
- item:integer;\r
- begin\r
- x:=player.getX;\r
- y:=player.getY;\r
- w:=player.getW;\r
- h:=player.getH;\r
- item:=inv.getItem(invslot);\r
+ if Items.GetType(item) = Items.tool then begin\r
+ Inv.SetSum(Inv.GetSum(invcur) - 1, invcur);\r
+ Inv.FixNull(invcur);\r
+ end;\r
\r
- if Items.GetType(item) = Items.tool then\r
- damg:=getToolDamg(item);\r
- else\r
- damg:=1;\r
+ toolus:=0;\r
+ toolind:=0;\r
+ end;\r
+ end;\r
\r
- if posi=0 then\r
- i:=Mobs.findAndHit(damg, x-TILE_SIZE, y, TILE_SIZE+(w/2), h, -2, -3);\r
- else\r
- i:=Mobs.findAndHit(damg, x+(w/2), y, TILE_SIZE+(w/2), h, 2, -3);\r
+ if (toolus > 0) and (toolus <= Blocks.GetResistant(block)) then begin\r
+ toolind := ((toolus * 100) div Blocks.GetResistant(block)) div 10;\r
+ end;\r
+ end;\r
\r
- if i<>-1 then\r
- begin\r
- inv.setSum(inv.getSum(invslot)-1, invslot);\r
- inv.fixNull(invslot);\r
- rt_useweap:=true;\r
- end;\r
- end;\r
+ function rt_useweap:boolean;\r
+ var\r
+ item : integer;\r
+ x, y, w, h, i, damg : integer;\r
+ begin\r
+ x := Player.GetX;\r
+ y := Player.GetY;\r
+ w := Player.GetW;\r
+ h := Player.GetH;\r
+ item := Inv.GetItem(invslot);\r
+ if Items.GetType(item) = Items.tool then damg := Tools.GetDamage(item) else damg := 1;\r
+\r
+ if posi=0 then i := Mobs.FindAndHit(damg, x - TILE_SIZE, y, TILE_SIZE + (w / 2), h, -2, -3);\r
+ else i := Mobs.FindAndHit(damg, x + (w / 2), y, TILE_SIZE + (w / 2), h, 2, -3);\r
+\r
+ if i >= 0 then begin\r
+ Inv.SetSum(Inv.GetSum(invslot) - 1, invslot);\r
+ Inv.FixNull(invslot);\r
+ rt_useweap := true;\r
+ end;\r
+ end;\r
\r
procedure rt_usetools;\r
var\r
begin\r
setmaplight(ss,ix,iy);\r
if ss=0 then break;\r
- ss:=ss-getBlockTr(getmap(ix,iy));\r
+ ss := ss - Blocks.GetLightAbsorbtion(getmap(ix, iy));\r
if ss<0 then ss:=0;\r
end;\r
for iy:=iy+1 to 127 do\r
\r
if clock_stage<>game_time div 75000 then begin clock_stage:=clock_stage+1; if clock_stage>7 then clock_stage:=0; end;\r
\r
- if x<0 then x:=0;\r
- if x+8>4094 then x:=4086;\r
- if getBlockColl(getmap(x div 16, y div 16))>0 then hp:=hp-1;\r
+ if x < 0 then x := 0;\r
+ else if x + 8 > 4094 then x := 4086;\r
+ if Blocks.IsSolid(getmap(x div 16, y div 16)) then hp := hp - 1;\r
+\r
if random(4096)=random(4096) then begin osadki:=not osadki; end;\r
osadki_ani:=osadki_ani+1;\r
if osadki_ani>7 then osadki_ani:=0;\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if light_type=0 then setmaplight(15,ix,iy);\r
- else\r
- if light_type>0 then if getBlockLi(getmap(ix,iy))>0 then calc_light(getBlockLi(getmap(ix,iy)),ix,iy);\r
+ if light_type = 0 then begin\r
+ SetMapLight(15, ix, iy);\r
+ end else if (light_type > 0) and (Blocks.GetLightEmission(getmap(ix, iy)) > 0) then begin\r
+ calc_light(Blocks.GetLightEmission(GetMap(ix, iy)), ix, iy);\r
+ end;\r
end;\r
\r
minx:=(camx/16)-((getwidth/2)/16);\r
drawImage(light[i], getWidth - 16, 16 * i);\r
end;\r
\r
- function ItemToString(id : integer) : string;\r
- var\r
- name : string;\r
- begin\r
- if id = Items.none then name := 'none'\r
- else if id = Items.dirt then name := 'dirt'\r
- else if id = Items.grass then name := 'grass'\r
- else if id = Items.stone then name := 'stone'\r
- else if id = Items.oakWoodPlanks then name := 'oakWoodPlanks'\r
- else if id = Items.cobblestone then name := 'cobblestone'\r
- else if id = Items.bedrock then name := 'bedrock'\r
- else if id = Items.sand then name := 'sand'\r
- else if id = Items.gravel then name := 'gravel'\r
- else if id = Items.oakWood then name := 'oakWood'\r
- else if id = Items.obsidian then name := 'obsidian'\r
- else if id = Items.bookshelf then name := 'bookshelf'\r
- else if id = Items.mossStone then name := 'mossStone'\r
- else if id = Items.blockOfIron then name := 'blockOfIron'\r
- else if id = Items.blockOfGold then name := 'blockOfGold'\r
- else if id = Items.blockOfDiamond then name := 'blockOfDiamond'\r
- else if id = Items.goldOre then name := 'goldOre'\r
- else if id = Items.ironOre then name := 'ironOre'\r
- else if id = Items.coalOre then name := 'coalOre'\r
- else if id = Items.diamondOre then name := 'diamondOre'\r
- else if id = Items.redstoneOre then name := 'redstoneOre'\r
- else if id = Items.oakLeaves then name := 'oakLeaves'\r
- else if id = Items.redFlower then name := 'redFlower'\r
- else if id = Items.yellowFlower then name := 'yellowFlower'\r
- else if id = Items.redMooshroom then name := 'redMooshroom'\r
- else if id = Items.brownMooshroom then name := 'brownMooshroom'\r
- else if id = Items.torch then name := 'torch'\r
- else if id = Items.tnt then name := 'tnt'\r
- else if id = Items.chest then name := 'chest'\r
- else if id = Items.craftingTable then name := 'craftingTable'\r
- else if id = Items.cactus then name := 'cactus'\r
- else if id = Items.glass then name := 'glass'\r
- else if id = Items.wool1 then name := 'wool1'\r
- else if id = Items.wool2 then name := 'wool2'\r
- else if id = Items.wool3 then name := 'wool3'\r
- else if id = Items.wool4 then name := 'wool4'\r
- else if id = Items.wool5 then name := 'wool5'\r
- else if id = Items.wool6 then name := 'wool6'\r
- else if id = Items.wool7 then name := 'wool7'\r
- else if id = Items.wool8 then name := 'wool8'\r
- else if id = Items.wool9 then name := 'wool9'\r
- else if id = Items.wool10 then name := 'wool10'\r
- else if id = Items.wool11 then name := 'wool11'\r
- else if id = Items.wool12 then name := 'wool12'\r
- else if id = Items.wool13 then name := 'wool13'\r
- else if id = Items.wool14 then name := 'wool14'\r
- else if id = Items.wool15 then name := 'wool15'\r
- else if id = Items.wool16 then name := 'wool16'\r
- else if id = Items.snow then name := 'snow'\r
- else if id = Items.ladder then name := 'ladder'\r
- else if id = Items.water then name := 'water'\r
- else if id = Items.lava then name := 'lava'\r
- else if id = Items.oakSapling then name := 'oakSapling'\r
- else if id = Items.sponge then name := 'sponge'\r
- else if id = Items.lapisLazuliOre then name := 'lapisLazuliOre'\r
- else if id = Items.lapisLazuliBlock then name := 'lapisLazuliBlock'\r
- else if id = Items.sandstone then name := 'sandstone'\r
- else if id = Items.tallGrass then name := 'tallGrass'\r
- else if id = Items.deadBush then name := 'deadBush'\r
- else if id = Items.cobweb then name := 'cobweb'\r
- else if id = Items.bricks then name := 'bricks'\r
- else if id = Items.snowBlock then name := 'snowBlock'\r
- else if id = Items.ice then name := 'ice'\r
- else if id = Items.snowLayer then name := 'snowLayer'\r
- else if id = Items.clayBlock then name := 'clayBlock'\r
- else if id = Items.sugarCane then name := 'sugarCane'\r
- else if id = Items.pumpkin then name := 'pumpkin'\r
- else if id = Items.jackLantern then name := 'jackLantern'\r
- else if id = Items.stoneBricks then name := 'stoneBricks'\r
- else if id = Items.mossyStoneBricks then name := 'mossyStoneBricks'\r
- else if id = Items.crackedStoneBricks then name := 'crackedStoneBricks'\r
- else if id = Items.chiseledStokeBricks then name := 'chiseledStokeBricks'\r
- else if id = Items.ironBras then name := 'ironBras'\r
- else if id = Items.melonBlock then name := 'melonBlock'\r
- else if id = Items.mycelium then name := 'mycelium'\r
- else if id = Items.backgroundOakWood then name := 'backgroundOakWood'\r
- else if id = Items.spawner then name := 'spawner'\r
- else if id = Items.bed1 then name := 'bed1'\r
- else if id = Items.bed2 then name := 'bed2'\r
- else if id = Items.openWoodenDoor1 then name := 'openWoodenDoor1'\r
- else if id = Items.openWoodenDoor2 then name := 'openWoodenDoor2'\r
- else if id = Items.closedWoodenDoor1 then name := 'closedWoodenDoor1'\r
- else if id = Items.closedWoodenDoor2 then name := 'closedWoodenDoor2'\r
- else if id = Items.birchWood then name := 'birchWood'\r
- else if id = Items.backgroundBirchWood then name := 'backgroundBirchWood'\r
- else if id = Items.spruceWood then name := 'spruceWood'\r
- else if id = Items.backgroundSpruceWood then name := 'backgroundSpruceWood'\r
- else if id = Items.spruceLeaves then name := 'spruceLeaves'\r
- else if id = Items.redMushroomBlock1 then name := 'redMushroomBlock1'\r
- else if id = Items.redMushroomBlock2 then name := 'redMushroomBlock2'\r
- else if id = Items.brownMushroomBlock1 then name := 'brownMushroomBlock1'\r
- else if id = Items.brownMushroomBlock2 then name := 'brownMushroomBlock2'\r
- else if id = Items.oakFence then name := 'oakFence'\r
- else if id = Items.backgroundOakFence then name := 'backgroundOakFence'\r
- else if id = Items.backgroundOakWoodPlanks then name := 'backgroundOakWoodPlanks'\r
- else if id = Items.painting1 then name := 'painting1'\r
- else if id = Items.painting2 then name := 'painting2'\r
- else if id = Items.painting3 then name := 'painting3'\r
- else if id = Items.painting4 then name := 'painting4'\r
- else if id = Items.painting5 then name := 'painting5'\r
- else if id = Items.painting6 then name := 'painting6'\r
- else if id = Items.painting7 then name := 'painting7'\r
- else if id = Items.reservedBlockItem1 then name := 'reservedBlockItem1'\r
- else if id = Items.vines then name := 'vines'\r
- else if id = Items.sign then name := 'sign'\r
- else if id = Items.redstoneTorch then name := 'redstoneTorch'\r
- else if id = Items.furnace then name := 'furnace'\r
- else if id = Items.closedWoodenTrapdoor then name := 'closedWoodenTrapdoor'\r
- else if id = Items.openWoodenTrapdoor then name := 'openWoodenTrapdoor'\r
- else if id = Items.netherrack then name := 'netherrack'\r
- else if id = Items.netherPortal then name := 'netherPortal'\r
- else if id = Items.glowstone then name := 'glowstone'\r
- else if id = Items.birchLeaves then name := 'birchLeaves'\r
- else if id = Items.soulSand then name := 'soulSand'\r
- else if id = Items.birchSapling then name := 'birchSapling'\r
- else if id = Items.spruceSapling then name := 'spruceSapling'\r
- else if id = Items.redstoneLampOff then name := 'redstoneLampOff'\r
- else if id = Items.redstoneLampOn then name := 'redstoneLampOn'\r
- else if id = Items.backgroundObsidian then name := 'backgroundObsidian'\r
- else if id = Items.glassPlane then name := 'glassPlane'\r
- else if id = Items.farmland then name := 'farmland'\r
- else if id = Items.cake then name := 'cake'\r
- else if id = Items.reservedBlockItem2 then name := 'reservedBlockItem2'\r
- else if id = Items.reservedBlockItem3 then name := 'reservedBlockItem3'\r
- else if id = Items.reservedBlockItem4 then name := 'reservedBlockItem4'\r
- else if id = Items.reservedBlockItem5 then name := 'reservedBlockItem5'\r
- else if id = Items.reservedBlockItem6 then name := 'reservedBlockItem6'\r
- else if id = Items.stick then name := 'stick'\r
- else if id = Items.dandelionYellow then name := 'dandelionYellow'\r
- else if id = Items.roseRed then name := 'roseRed'\r
- else if id = Items.superSpecialUnneededTool then name := 'superSpecialUnneededTool'\r
- else if id = Items.pickaxe1 then name := 'pickaxe1'\r
- else if id = Items.pickaxe2 then name := 'pickaxe2'\r
- else if id = Items.pickaxe3 then name := 'pickaxe3'\r
- else if id = Items.pickaxe4 then name := 'pickaxe4'\r
- else if id = Items.pickaxe5 then name := 'pickaxe5'\r
- else if id = Items.shovel1 then name := 'shovel1'\r
- else if id = Items.shovel2 then name := 'shovel2'\r
- else if id = Items.shovel3 then name := 'shovel3'\r
- else if id = Items.shovel4 then name := 'shovel4'\r
- else if id = Items.shovel5 then name := 'shovel5'\r
- else if id = Items.axe1 then name := 'axe1'\r
- else if id = Items.axe2 then name := 'axe2'\r
- else if id = Items.axe3 then name := 'axe3'\r
- else if id = Items.axe4 then name := 'axe4'\r
- else if id = Items.axe5 then name := 'axe5'\r
- else if id = Items.shears then name := 'shears'\r
- else if id = Items.sword1 then name := 'sword1'\r
- else if id = Items.sword2 then name := 'sword2'\r
- else if id = Items.sword3 then name := 'sword3'\r
- else if id = Items.sword4 then name := 'sword4'\r
- else if id = Items.sword5 then name := 'sword5'\r
- else if id = Items.fishingRod then name := 'fishingRod'\r
- else if id = Items.lighter then name := 'lighter'\r
- else if id = Items.hoe1 then name := 'hoe1'\r
- else if id = Items.hoe2 then name := 'hoe2'\r
- else if id = Items.hoe3 then name := 'hoe3'\r
- else if id = Items.hoe4 then name := 'hoe4'\r
- else if id = Items.hoe5 then name := 'hoe5'\r
- else if id = Items.reservedToolItem then name := 'reservedToolItem'\r
- else if id = Items.coal then name := 'coal'\r
- else if id = Items.redstone then name := 'redstone'\r
- else if id = Items.diamond then name := 'diamond'\r
- else if id = Items.brick then name := 'brick'\r
- else if id = Items.ironIngot then name := 'ironIngot'\r
- else if id = Items.goldIngot then name := 'goldIngot'\r
- else if id = Items.lapisLazuli then name := 'lapisLazuli'\r
- else if id = Items.strand then name := 'strand'\r
- else if id = Items.snowball then name := 'snowball'\r
- else if id = Items.clay then name := 'clay'\r
- else if id = Items.book then name := 'book'\r
- else if id = Items.bucket then name := 'bucket'\r
- else if id = Items.waterBucket then name := 'waterBucket'\r
- else if id = Items.lavaBucket then name := 'lavaBucket'\r
- else if id = Items.milkBucket then name := 'milkBucket'\r
- else if id = Items.paper then name := 'paper'\r
- else if id = Items.melon then name := 'melon'\r
- else if id = Items.egg then name := 'egg'\r
- else if id = Items.door then name := 'door'\r
- else if id = Items.bed then name := 'bed'\r
- else if id = Items.spawnEggZombie then name := 'spawnEggZombie'\r
- else if id = Items.spawnEggSheep then name := 'spawnEggSheep'\r
- else if id = Items.spawnEggPig then name := 'spawnEggPig'\r
- else if id = Items.gunpowder then name := 'gunpowder'\r
- else if id = Items.bowl then name := 'bowl'\r
- else if id = Items.mushroomStew then name := 'mushroomStew'\r
- else if id = Items.map then name := 'map'\r
- else if id = Items.painting then name := 'painting'\r
- else if id = Items.rawPorkchop then name := 'rawPorkchop'\r
- else if id = Items.cookedPorkchop then name := 'cookedPorkchop'\r
- else if id = Items.rottenFlesh then name := 'rottenFlesh'\r
- else if id = Items.camera1 then name := 'camera1'\r
- else if id = Items.camera2 then name := 'camera2'\r
- else if id = Items.camera3 then name := 'camera3'\r
- else if id = Items.goldNugget then name := 'goldNugget'\r
- else if id = Items.sugar then name := 'sugar'\r
- else if id = Items.spiderEye then name := 'spiderEye'\r
- else if id = Items.feather then name := 'feather'\r
- else if id = Items.leather then name := 'leather'\r
- else if id = Items.rawBeef then name := 'rawBeef'\r
- else if id = Items.steak then name := 'steak'\r
- else if id = Items.apple then name := 'apple'\r
- else if id = Items.goldenApple then name := 'goldenApple'\r
- else if id = Items.rawChicken then name := 'rawChicken'\r
- else if id = Items.cookedChicken then name := 'cookedChicken'\r
- else if id = Items.spawnEggChicken then name := 'spawnEggChicken'\r
- else if id = Items.spawnEggCreeper then name := 'spawnEggCreeper'\r
- else if id = Items.flint then name := 'flint'\r
- else if id = Items.spawnEggCow then name := 'spawnEggCow'\r
- else if id = Items.spawnEggMooshroom then name := 'spawnEggMooshroom'\r
- else if id = Items.rawFish then name := 'rawFish'\r
- else if id = Items.cookedFish then name := 'cookedFish'\r
- else if id = Items.spawnEggPigman then name := 'spawnEggPigman'\r
- else if id = Items.spawnEggSpider then name := 'spawnEggSpider'\r
- else if id = Items.glowstoneDust then name := 'glowstoneDust'\r
- else if id = Items.clock then name := 'clock'\r
- else if id = Items.compass then name := 'compass'\r
- else if id = Items.seeds then name := 'seeds'\r
- else if id = Items.wheat then name := 'wheat'\r
- else if id = Items.bread then name := 'bread'\r
- else if id = Items.boneMeal then name := 'boneMeal'\r
- else if id = Items.melonSeeds then name := 'melonSeeds'\r
- else if id = Items.pumpkinSeeds then name := 'pumpkinSeeds'\r
- else name := '' + id;\r
- result := name;\r
- end;\r
-\r
- procedure PrintItem(id, typ, tex, max, info, texsource, indicator : integer; dividable : boolean);\r
- var\r
- name, tname, indname : string;\r
- begin\r
- name := ItemToString(id);\r
-\r
- if typ = Items.block then tname := 'block'\r
- else if typ = Items.tool then tname := 'tool'\r
- else if typ = Items.reserved then tname := 'reserved'\r
- else if typ = Items.orditem then tname := 'orditem'\r
- else tname := '' + typ;\r
-\r
- if indicator = Items.noindicator then indname := 'noindicator'\r
- else if indicator = Items.numeric then indname := 'numeric'\r
- else if indicator = Items.line then indname := 'line'\r
- else indname := '' + indicator;\r
-\r
- Debug(' InitItem(' + name + ', ' + tname + ', ' + tex + ', ' + max + ', ' + info + ', ' + texsource + ', ' + indname + ', ' + dividable + ');');\r
- end;\r
-\r
- procedure PrintItemTable;\r
- var\r
- id : integer;\r
- begin\r
- for id := 0 to 222 do begin\r
- PrintItem(\r
- id,\r
- Items.GetType(id),\r
- Items.GetTexture(id),\r
- Items.GetMaximum(id),\r
- Items.GetData(id),\r
- Items.GetTextureSource(id),\r
- Items.GetIndicatorType(id),\r
- Items.IsDividable(id)\r
- );\r
- end;\r
-\r
- for id := 0 to 194 do begin\r
- Debug(' InitOrdItem(' + ItemToString(Items.GetOrdinary(id)) + ');');\r
- end;\r
- end;\r
-\r
begin\r
qt_start;\r
hung_time:=getrelativetimems;\r
air_time:=getrelativetimems;\r
portal_time:=getrelativetimems;\r
\r
- PrintItemTable;\r
-\r
repeat\r
proc_fps;\r
keyhandler;\r