summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9115be0)
raw | patch | inline | side by side (parent: 9115be0)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 10 Sep 2017 15:51:59 +0000 (18:51 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 10 Sep 2017 15:51:59 +0000 (18:51 +0300) |
21 files changed:
libs/Lib_items_store.class | patch | blob | history | |
libs/Lib_items_store.java | patch | blob | history | |
make.sh | patch | blob | history | |
src/Blocks.mpsrc | [new file with mode: 0644] | patch | blob |
src/CAVE.mpsrc | patch | blob | history | |
src/Items.pas | [new file with mode: 0644] | patch | blob |
src/Mobs.pas | patch | blob | history | |
src/Particles.pas | [moved from src/Particles.mpsrc with 100% similarity] | patch | blob | history |
src/Player.mpsrc | patch | blob | history | |
src/cellui.mpsrc | patch | blob | history | |
src/console.pas | patch | blob | history | |
src/craft.mpsrc | patch | blob | history | |
src/drop.mpsrc | patch | blob | history | |
src/func.mpsrc | patch | blob | history | |
src/furnace.mpsrc | patch | blob | history | |
src/inv.mpsrc | patch | blob | history | |
src/invui.mpsrc | patch | blob | history | |
src/items.mpsrc | [deleted file] | patch | blob | history |
src/items_logic.mpsrc | patch | blob | history | |
src/vars.mpsrc | patch | blob | history | |
src/worldgen.mpsrc | patch | blob | history |
index c6958aa63c19e8e1249dc8850fe83108a44a9055..161cba0801033b50306a6d2980814672cce4dc0c 100644 (file)
Binary files a/libs/Lib_items_store.class and b/libs/Lib_items_store.class differ
Binary files a/libs/Lib_items_store.class and b/libs/Lib_items_store.class differ
index 01e2720487ef629745e621962c596a78b1e52d6a..ed2190b480c5a4b592a11c8e60ec9998604c97f1 100644 (file)
item_tex = new byte[len];\r
item_max = new int[len];\r
item_info = new byte[len];\r
- item_flags = new byte[len];\r
+ item_flags = new byte[len];\r
} catch(Exception e) {e.printStackTrace();}\r
}\r
\r
item_flags[id] = (byte) flags;\r
} catch(Exception e) {e.printStackTrace();}\r
}\r
-\r
- public static int getitemtype(int id)\r
- {\r
- try {\r
- return (int) item_type[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
- }\r
-\r
- public static int getitemtex(int id)\r
- {\r
- try {\r
- return (int) item_tex[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
- }\r
-\r
+/*\r
public static int getitemmax(int id)\r
{\r
try{\r
return item_max[id];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
- }\r
-\r
- public static int getiteminfo(int id)\r
- {\r
- try {\r
- return (int) item_info[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
- }\r
- \r
- public static int getitemflags(int id)\r
- {\r
- try {\r
- return (int) item_flags[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
+*/\r
\r
/*Blocks*/\r
\r
{\r
try {\r
return (int) block_tex[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblockhp(int id)\r
{\r
try {\r
return block_hp[id];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblockcoll(int id)\r
{\r
try {\r
return (int) block_coll[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblocktool(int id)\r
{\r
try {\r
return (int) block_tool[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblocklvl(int id)\r
{\r
try {\r
return (int) block_lvl[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblockflags(int id)\r
{\r
try {\r
return (int) block_flags[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblocktr(int id)\r
{\r
try {\r
return (int) block_tr[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int getblockli(int id)\r
{\r
try {\r
return (int) block_li[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
/*Craft*/\r
- public static void reset_crafts(int len)\r
+ public static void resetcrafts(int len)\r
{\r
try {\r
craftIN_item = new byte[4][len];\r
} catch(Exception e) {e.printStackTrace();}\r
}\r
\r
- public static void set_craft(int id, int item0, int sum0, int item1, int sum1, int item2, int sum2, int item3, int sum3, int outitem, int outsum, int flag)\r
+ public static void setcraft(int id, int item0, int sum0, int item1, int sum1, int item2, int sum2, int item3, int sum3, int outitem, int outsum, int flag)\r
{\r
try {\r
craftIN_item[0][id] = (byte) item0;\r
} catch(Exception e) {e.printStackTrace();}\r
}\r
\r
- public static void set_craftin_item(int id, int num, int item)\r
+ public static void setcraftin(int id, int num, int item, int sum)\r
+ {\r
+ try {\r
+ craftIN_item[num][id] = (byte) item;\r
+ craftIN_sum[num][id] = (byte) sum;\r
+ } catch(Exception e) {}\r
+ }\r
+\r
+ public static void setcraftout(int id, int item, int sum, int flag)\r
+ {\r
+ try {\r
+ craftOUT_item[id] = (byte) item;\r
+ craftOUT_sum[id] = (byte) item;\r
+ craftOUT_flag[id] = (byte) flag;\r
+ } catch(Exception e) {}\r
+ }\r
+\r
+ public static void setcraftinitem(int id, int num, int item)\r
{\r
try {\r
craftIN_item[num][id] = (byte) item;\r
- } catch(Exception e) {/*e.printStackTrace();*/}\r
+ } catch(Exception e) {}\r
}\r
\r
- public static void set_craftin_sum(int id, int num, int sum)\r
+ public static void setcraftinsum(int id, int num, int sum)\r
{\r
try {\r
craftIN_sum[num][id] = (byte) sum;\r
- } catch(Exception e) {/*e.printStackTrace();*/}\r
+ } catch(Exception e) {}\r
}\r
\r
- public static void set_craftout_item(int id, int item)\r
+ public static void setcraftoutitem(int id, int item)\r
{\r
try {\r
craftOUT_item[id] = (byte) item;\r
- } catch(Exception e) {/*e.printStackTrace();*/}\r
+ } catch(Exception e) {}\r
}\r
\r
- public static void set_craftout_sum(int id, int sum)\r
+ public static void setcraftoutsum(int id, int sum)\r
{\r
try {\r
craftOUT_sum[id] = sum;\r
- } catch(Exception e) {/*e.printStackTrace();*/}\r
+ } catch(Exception e) {}\r
}\r
\r
- public static void set_craftout_flag(int id, int flag)\r
+ public static void setcraftoutflag(int id, int flag)\r
{\r
try {\r
craftOUT_flag[id] = (byte) flag;\r
- } catch(Exception e) {/*e.printStackTrace();*/}\r
+ } catch(Exception e) {}\r
}\r
\r
- public static int get_craftin_item(int id, int num)\r
+ public static int getcraftinitem(int id, int num)\r
{\r
try {\r
return craftIN_item[num][id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
- public static int get_craftin_sum(int id, int num)\r
+ public static int getcraftinsum(int id, int num)\r
{\r
try {\r
return craftIN_sum[num][id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
- public static int get_craftout_item(int id)\r
+ public static int getcraftoutitem(int id)\r
{\r
try {\r
return craftOUT_item[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
- public static int get_craftout_sum(int id)\r
+ public static int getcraftoutsum(int id)\r
{\r
try {\r
return craftOUT_sum[id];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
- public static int get_craftout_flag(int id)\r
+ public static int getcraftoutflag(int id)\r
{\r
try {\r
return craftOUT_flag[id] & 0xFF;\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0xFF;}\r
+ } catch(Exception e) { return 0xFF;}\r
}\r
\r
/*Tools*/\r
{\r
try {\r
return tool_type[item_info[id]];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int gettoollvl(int id)\r
{\r
try {\r
return tool_lvl[item_info[id]];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int gettoolspeed(int id)\r
{\r
try {\r
return tool_speed[item_info[id]];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
public static int gettooldamg(int id)\r
{\r
try {\r
return tool_damg[item_info[id]];\r
- } catch(Exception e) {/*e.printStackTrace();*/ return 0;}\r
+ } catch(Exception e) { return 0;}\r
}\r
\r
- }
\ No newline at end of file
+ }\r
index 06809a44fabd4fbe7223e2da7cca0ce61a99f291..084157f87231f484c5c76f89fd3b659f10231b1c 100755 (executable)
--- a/make.sh
+++ b/make.sh
MPS=/usr/share/midletpascal/stubs
# MPL=/usr/share/midletpascal/libs
MPL=libs
+LIBDIR=/usr/share/java/microemulator/lib
OBJ=classes
LIB=libs
find "$1" -name '*.class' -printf " -C $1 %f"
}
+makelibs() {
+ javac -Xlint:-options -d $LIB \
+ -classpath `find $LIBDIR -type f -name '*.jar' -printf '%p:'` \
+ -source 1.3 -target 1.1 `find libs -type f -name '*.java'`
+}
+
rm -rf $OBJ
mkdir -p $OBJ
+echo "===> Make libs"
+makelibs
+
echo "===> Generate symbols"
for I in $SOURCES
MIDlet-Icon: $ICO
Created-By: $VEN
!
+
+#proguard -injars libs -outjars classes \
+# `find $LIBDIR -type f -name '*.jar' -printf '-libraryjars %p '`
+# -dontoptimize -dontshrink -microedition -dontobfuscate \
+# -overloadaggressively -repackageclasses '' -allowaccessmodification \
+# -keep public class FW extends javax.microedition.midlet.MIDlet
diff --git a/src/Blocks.mpsrc b/src/Blocks.mpsrc
--- /dev/null
+++ b/src/Blocks.mpsrc
@@ -0,0 +1,28 @@
+unit Blocks;\r
+\r
+interface\r
+\r
+ function IsTransporent(id : integer) : boolean;\r
+ function IsForeground(id : integer) : boolean;\r
+ function IsOverlapped(id : integer) : boolean;\r
+\r
+implementation\r
+\r
+ uses items_store;\r
+\r
+ function IsTransporent(id : integer) : boolean;\r
+ begin\r
+ result := (items_store.GetBlockFlags(id) and 1) <> 0;\r
+ end;\r
+\r
+ function IsForeground(id : integer) : boolean;\r
+ begin\r
+ result := (getBlockFlags(id) and 2) <> 0;\r
+ end;\r
+\r
+ function IsOverlapped(id : integer) : boolean;\r
+ begin\r
+ result := (getBlockFlags(id) and 4) <> 0;\r
+ end;\r
+\r
+end.\r
diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc
index 0d305849e358ef1108de30fb24a68376cf90e8e9..830a6abac54eaeb688b7640322757eff3c4e9781 100644 (file)
--- a/src/CAVE.mpsrc
+++ b/src/CAVE.mpsrc
program CAVE;\r
\r
uses\r
+ Items,\r
sign,\r
jsr75i,\r
drop,\r
memory,\r
worldgen,\r
canvas,\r
- items,\r
safeload,\r
mobs,\r
console,\r
chest,\r
inv,\r
items_store,\r
- video;\r
+ video,\r
+ Blocks;\r
\r
const\r
version_map = 9;\r
float := no;\r
compas := no;\r
for ix := 0 to 7 do\r
- clock[ix] := no;\r
+ Vars.clock[ix] := no;\r
\r
for ix := 0 to maxBlockTex do\r
begin\r
compas:=ld_tex('compass.png',path,'gui/');\r
im:=ld_tex('clock.png',path,'gui/');\r
for ix:=0 to 7 do \r
- clock[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0);\r
+ Vars.clock[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0);\r
if load_back_tex then\r
begin\r
im:=ld_tex('back.png',path,'');\r
item:=inv.getItem(invcur);\r
sum:=inv.getSum(invcur);\r
block:=getMap(x, y);\r
- sblock:=getItemInfo(item);\r
+ sblock := Items.GetData(item);\r
\r
- if getItemType(item)=ITEM_TYPE_BLOCK then\r
- if inv.isNull(invcur)=false then\r
- if getBlockSet(block)=true then\r
+ if (Items.GetType(item) = Items.block) and (Inv.IsNull(invcur) = false) then\r
+ if Blocks.IsOverlapped(block) then\r
// if (coll_xy(x, y)=false) or (getBlockColl(item)=0) then\r
begin\r
if set_block_code(sblock, x, y)=false then\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if ifosad then if (getBackMap(ix)>=iy) and (osadki=true) and getBlockTrans(getmap(ix,iy)) then\r
- begin\r
- if getBiomMap(ix)=0 then drawimage(osad[0,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- else\r
- if getBiomMap(ix)=2 then drawimage(osad[1,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- else\r
- if getBiomMap(ix)=3 then drawimage(osad[0,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- end;\r
- if drw_back then\r
- if getBlockTrans(getmap(ix,iy)) then\r
- draw_back(ix,iy);\r
-\r
- if getBlockFore(getmap(ix,iy))=false then\r
- draw_block(ix,iy);\r
+ if ifosad and osadki and (getBackMap(ix) >= iy) and Blocks.IsTransporent(getmap(ix, iy)) then begin\r
+ if getBiomMap(ix) = 0 then drawimage(osad[0, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\r
+ else if getBiomMap(ix) = 2 then drawimage(osad[1, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\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
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 getBlockFore(getmap(ix, iy)) then\r
- draw_block(ix, iy);\r
+ if Blocks.IsForeground(getmap(ix, iy)) then draw_block(ix, iy);\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
- drawItem(inv.getItem(ix), inv.getSum(ix), (ix*16)+tmp_ax+ix*2+4, 1, true);\r
+ Items.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
else\r
if (block>0) then\r
begin\r
- if (getItemType(item)=ITEM_TYPE_TOOL) and (getBlockTool(block)=getToolType(item)) then\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 ((getItemType(item)=ITEM_TYPE_TOOL) and (getBlockTool(block)=getToolType(item)) and (getToolLvl(item)>=getBlockLvl(block))) or (getBlockLvl(block)<=0) then\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
\r
- if getItemType(item)=ITEM_TYPE_TOOL then\r
+ if Items.GetType(item) = Items.tool then\r
begin\r
inv.setSum(inv.getSum(invcur)-1, invcur);\r
inv.fixNull(invcur);\r
h:=player.getH;\r
item:=inv.getItem(invslot);\r
\r
- if getItemType(item)=1 then\r
+ if Items.GetType(item) = Items.tool then\r
damg:=getToolDamg(item);\r
else\r
damg:=1;\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
hp_time:=getrelativetimems;\r
air_time:=getrelativetimems;\r
portal_time:=getrelativetimems;\r
+\r
+ PrintItemTable;\r
+\r
repeat\r
proc_fps;\r
keyhandler;\r
diff --git a/src/Items.pas b/src/Items.pas
--- /dev/null
+++ b/src/Items.pas
@@ -0,0 +1,794 @@
+unit Items;
+
+interface
+
+ (* https://minecraft.gamepedia.com/Item *)
+ (* https://minecraft.gamepedia.com/index.php?title=Block&oldid=470025 *)
+
+ const (* Item id *)
+ none = 0;
+ dirt = 1;
+ grass = 2;
+ stone = 3;
+ oakWoodPlanks = 4;
+ cobblestone = 5;
+ bedrock = 6;
+ sand = 7;
+ gravel = 8;
+ oakWood = 9;
+ obsidian = 10;
+ bookshelf = 11;
+ mossStone = 12;
+ blockOfIron = 13;
+ blockOfGold = 14;
+ blockOfDiamond = 15;
+ goldOre = 16;
+ ironOre = 17;
+ coalOre = 18;
+ diamondOre = 19;
+ redstoneOre = 20;
+ oakLeaves = 21;
+ redFlower = 22;
+ yellowFlower = 23;
+ redMooshroom = 24;
+ brownMooshroom = 25;
+ torch = 26;
+ tnt = 27;
+ chest = 28;
+ craftingTable = 29;
+ cactus = 30;
+ glass = 31;
+ wool1 = 32;
+ wool2 = 33;
+ wool3 = 34;
+ wool4 = 35;
+ wool5 = 36;
+ wool6 = 37;
+ wool7 = 38;
+ wool8 = 39;
+ wool9 = 40;
+ wool10 = 41;
+ wool11 = 42;
+ wool12 = 43;
+ wool13 = 44;
+ wool14 = 45;
+ wool15 = 46;
+ wool16 = 47;
+ snow = 48;
+ ladder = 49;
+ water = 50;
+ lava = 51;
+ oakSapling = 52;
+ sponge = 53;
+ lapisLazuliOre = 54;
+ lapisLazuliBlock = 55;
+ sandstone = 56;
+ tallGrass = 57;
+ deadBush = 58;
+ cobweb = 59;
+ bricks = 60;
+ snowBlock = 61;
+ ice = 62;
+ snowLayer = 63;
+ clayBlock = 64;
+ sugarCane = 65;
+ pumpkin = 66;
+ jackLantern = 67;
+ stoneBricks = 68;
+ mossyStoneBricks = 69;
+ crackedStoneBricks = 70;
+ chiseledStokeBricks = 71;
+ ironBras = 72;
+ melonBlock = 73;
+ mycelium = 74;
+ backgroundOakWood = 75;
+ spawner = 76;
+ bed1 = 77;
+ bed2 = 78;
+ openWoodenDoor1 = 79;
+ openWoodenDoor2 = 80;
+ closedWoodenDoor1 = 81;
+ closedWoodenDoor2 = 82;
+ birchWood = 83;
+ backgroundBirchWood = 84;
+ spruceWood = 85;
+ backgroundSpruceWood = 86;
+ spruceLeaves = 87;
+ redMushroomBlock1 = 88;
+ redMushroomBlock2 = 89;
+ brownMushroomBlock1 = 90;
+ brownMushroomBlock2 = 91;
+ oakFence = 92;
+ backgroundOakFence = 93;
+ backgroundOakWoodPlanks = 94;
+ painting1 = 95;
+ painting2 = 96;
+ painting3 = 97;
+ painting4 = 98;
+ painting5 = 99;
+ painting6 = 100;
+ painting7 = 101;
+ reservedBlockItem1 = 102;
+ vines = 103;
+ sign = 104;
+ redstoneTorch = 105;
+ furnace = 106;
+ closedWoodenTrapdoor = 107;
+ openWoodenTrapdoor = 108;
+ netherrack = 109;
+ netherPortal = 110;
+ glowstone = 111;
+ birchLeaves = 112;
+ soulSand = 113;
+ birchSapling = 114;
+ spruceSapling = 115;
+ redstoneLampOff = 116;
+ redstoneLampOn = 117;
+ backgroundObsidian = 118;
+ glassPlane = 119;
+ farmland = 120;
+ cake = 121;
+ reservedBlockItem2 = 122;
+ reservedBlockItem3 = 123;
+ reservedBlockItem4 = 124;
+ reservedBlockItem5 = 125;
+ reservedBlockItem6 = 126;
+ stick = 127;
+ dandelionYellow = 128;
+ roseRed = 129;
+ superSpecialUnneededTool = 130;
+ pickaxe1 = 131;
+ pickaxe2 = 132;
+ pickaxe3 = 133;
+ pickaxe4 = 134;
+ pickaxe5 = 135;
+ shovel1 = 136;
+ shovel2 = 137;
+ shovel3 = 138;
+ shovel4 = 139;
+ shovel5 = 140;
+ axe1 = 141;
+ axe2 = 142;
+ axe3 = 143;
+ axe4 = 144;
+ axe5 = 145;
+ shears = 146;
+ sword1 = 147;
+ sword2 = 148;
+ sword3 = 149;
+ sword4 = 150;
+ sword5 = 151;
+ fishingRod = 152;
+ lighter = 153;
+ hoe1 = 154;
+ hoe2 = 155;
+ hoe3 = 156;
+ hoe4 = 157;
+ hoe5 = 158;
+ reservedToolItem = 159;
+ coal = 160;
+ redstone = 161;
+ diamond = 162;
+ brick = 163;
+ ironIngot = 164;
+ goldIngot = 165;
+ lapisLazuli = 166;
+ strand = 167;
+ snowball = 168;
+ clay = 169;
+ book = 170;
+ bucket = 171;
+ waterBucket = 172;
+ lavaBucket = 173;
+ milkBucket = 174;
+ paper = 175;
+ melon = 176;
+ egg = 177;
+ door = 178;
+ bed = 179;
+ spawnEggZombie = 180;
+ spawnEggSheep = 181;
+ spawnEggPig = 182;
+ gunpowder = 183;
+ bowl = 184;
+ mushroomStew = 185;
+ map = 186;
+ painting = 187;
+ rawPorkchop = 188;
+ cookedPorkchop = 189;
+ rottenFlesh = 190;
+ camera1 = 191;
+ camera2 = 192;
+ camera3 = 193;
+ goldNugget = 194;
+ sugar = 195;
+ spiderEye = 196;
+ feather = 197;
+ leather = 198;
+ rawBeef = 199;
+ steak = 200;
+ apple = 201;
+ goldenApple = 202;
+ rawChicken = 203;
+ cookedChicken = 204;
+ spawnEggChicken = 205;
+ spawnEggCreeper = 206;
+ flint = 207;
+ spawnEggCow = 208;
+ spawnEggMooshroom = 209;
+ rawFish = 210;
+ cookedFish = 211;
+ spawnEggPigman = 212;
+ spawnEggSpider = 213;
+ glowstoneDust = 214;
+ clock = 215;
+ compass = 216;
+ seeds = 217;
+ wheat = 218;
+ bread = 219;
+ boneMeal = 220;
+ melonSeeds = 221;
+ pumpkinSeeds = 222;
+
+ const (* Item class *)
+ block = 0;
+ tool = 1;
+ reserved = 2;
+ orditem = 3;
+
+ const (* Indicator class *)
+ noindicator = 0;
+ numeric = 1;
+ line = 2;
+
+ function GetType(id : integer) : integer;
+ function GetMaximum(id : integer) : integer;
+ function GetData(id : integer) : integer;
+ function GetTexture(id : integer) : integer;
+ function GetTextureSource(id : integer) : integer;
+ function GetIndicatorType(id : integer) : integer;
+ function IsDividable(id : integer) : boolean;
+
+ function GetOrdinary(i : integer) : integer;
+
+ procedure DrawSmall(id, x, y : integer);
+ procedure Draw(id, sum, x, y : integer; drawIndicator : boolean);
+
+implementation
+
+ uses Vars, Func;
+
+ const
+ lastItem = 222;
+ lastOrdItem = 194;
+
+ var
+ itype, itex, imax, idata, iflags : array [0..lastItem] of integer;
+ countOrdItems : integer;
+ ordItems : array [0..lastOrdItem] of integer;
+
+ (* Bits
+ xxxx xxxx | xxxx xxxx | xxxx xxxx | xxxx xxxx
+ ^^^^
+ |||+-- texture source
+ |++--- indicator
+ +----- dividable
+ *)
+
+ function GetType(id : integer) : integer;
+ begin
+ result := itype[id];
+ end;
+
+ function GetMaximum(id : integer) : integer;
+ begin
+ result := imax[id];
+ end;
+
+ function GetData(id : integer) : integer;
+ begin
+ result := idata[id];
+ end;
+
+ function GetTexture(id : integer) : integer;
+ begin
+ result := itex[id];
+ end;
+
+ function GetTextureSource(id : integer) : integer;
+ begin
+ result := iflags[id] and 1;
+ end;
+
+ function GetIndicatorType(id : integer) : integer;
+ begin
+ result := (iflags[id] >> 1) and 3;
+ end;
+
+ function IsDividable(id : integer) : boolean;
+ begin
+ result := ((iflags[id] >> 3) and 1) <> 0;
+ end;
+
+ procedure InitItem(id, typ, tex, max, data, texsource, indicator : integer; dividable : boolean);
+ begin
+ Assert((id >= 0) and (id <= lastItem));
+ Assert((typ >= 0) and (typ <= 3));
+ Assert((tex >= 0) and (tex <= 255));
+ Assert((max >= 0) and (max <= 65535));
+ Assert((texsource >= 0) and (texsource <= 1));
+ Assert((indicator >= 0) and (indicator <= 2));
+ itype[id] := typ;
+ itex[id] := tex;
+ imax[id] := max;
+ idata[id] := data;
+ if dividable then iflags[id] := (1 << 3);
+ iflags[id] := iflags[id] or (indicator << 1);
+ iflags[id] := iflags[id] or (texsource << 0);
+ end;
+
+ function GetOrdinary(i : integer) : integer;
+ begin
+ GetOrdinary := none;
+ if (i >= 0) and (i <= lastOrdItem) then GetOrdinary := ordItems[i]
+ end;
+
+ procedure InitOrdItem(id : integer);
+ begin
+ Assert(countOrdItems <= lastOrdItem);
+ ordItems[countOrdItems] := id;
+ 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);
+ InitItem(grass, block, 2, 64, 2, 0, numeric, true);
+ InitItem(stone, block, 3, 64, 3, 0, numeric, true);
+ InitItem(oakWoodPlanks, block, 4, 64, 4, 0, numeric, true);
+ InitItem(cobblestone, block, 5, 64, 5, 0, numeric, true);
+ InitItem(bedrock, block, 6, 64, 6, 0, numeric, true);
+ InitItem(sand, block, 7, 64, 7, 0, numeric, true);
+ InitItem(gravel, block, 8, 64, 8, 0, numeric, true);
+ InitItem(oakWood, block, 9, 64, 9, 0, numeric, true);
+ InitItem(obsidian, block, 10, 64, 10, 0, numeric, true);
+ InitItem(bookshelf, block, 11, 64, 11, 0, numeric, true);
+ InitItem(mossStone, block, 12, 64, 12, 0, numeric, true);
+ InitItem(blockOfIron, block, 13, 64, 13, 0, numeric, true);
+ InitItem(blockOfGold, block, 14, 64, 14, 0, numeric, true);
+ InitItem(blockOfDiamond, block, 15, 64, 15, 0, numeric, true);
+ InitItem(goldOre, block, 16, 64, 16, 0, numeric, true);
+ InitItem(ironOre, block, 17, 64, 17, 0, numeric, true);
+ InitItem(coalOre, block, 18, 64, 18, 0, numeric, true);
+ InitItem(diamondOre, block, 19, 64, 19, 0, numeric, true);
+ InitItem(redstoneOre, block, 20, 64, 20, 0, numeric, true);
+ InitItem(oakLeaves, block, 21, 64, 21, 0, numeric, true);
+ InitItem(redFlower, block, 22, 64, 22, 0, numeric, true);
+ InitItem(yellowFlower, block, 23, 64, 23, 0, numeric, true);
+ InitItem(redMooshroom, block, 24, 64, 24, 0, numeric, true);
+ InitItem(brownMooshroom, block, 25, 64, 25, 0, numeric, true);
+ InitItem(torch, block, 26, 64, 26, 0, numeric, true);
+ InitItem(tnt, block, 27, 64, 27, 0, numeric, true);
+ InitItem(chest, block, 28, 64, 28, 0, numeric, true);
+ InitItem(craftingTable, block, 29, 64, 29, 0, numeric, true);
+ InitItem(cactus, block, 30, 64, 30, 0, numeric, true);
+ InitItem(glass, block, 31, 64, 31, 0, numeric, true);
+ InitItem(wool1, block, 32, 64, 32, 0, numeric, true);
+ InitItem(wool2, block, 33, 64, 33, 0, numeric, true);
+ InitItem(wool3, block, 34, 64, 34, 0, numeric, true);
+ InitItem(wool4, block, 35, 64, 35, 0, numeric, true);
+ InitItem(wool5, block, 36, 64, 36, 0, numeric, true);
+ InitItem(wool6, block, 37, 64, 37, 0, numeric, true);
+ InitItem(wool7, block, 38, 64, 38, 0, numeric, true);
+ InitItem(wool8, block, 39, 64, 39, 0, numeric, true);
+ InitItem(wool9, block, 40, 64, 40, 0, numeric, true);
+ InitItem(wool10, block, 41, 64, 41, 0, numeric, true);
+ InitItem(wool11, block, 42, 64, 42, 0, numeric, true);
+ InitItem(wool12, block, 43, 64, 43, 0, numeric, true);
+ InitItem(wool13, block, 44, 64, 44, 0, numeric, true);
+ InitItem(wool14, block, 45, 64, 45, 0, numeric, true);
+ InitItem(wool15, block, 46, 64, 46, 0, numeric, true);
+ InitItem(wool16, block, 47, 64, 47, 0, numeric, true);
+ InitItem(snow, block, 48, 64, 48, 0, numeric, true);
+ InitItem(ladder, block, 49, 64, 49, 0, numeric, true);
+ InitItem(water, block, 50, 64, 50, 0, numeric, true);
+ InitItem(lava, block, 51, 64, 51, 0, numeric, true);
+ InitItem(oakSapling, block, 60, 64, 52, 0, numeric, true);
+ InitItem(sponge, block, 61, 64, 53, 0, numeric, true);
+ InitItem(lapisLazuliOre, block, 62, 64, 54, 0, numeric, true);
+ InitItem(lapisLazuliBlock, block, 63, 64, 55, 0, numeric, true);
+ InitItem(sandstone, block, 64, 64, 56, 0, numeric, true);
+ InitItem(tallGrass, block, 65, 64, 57, 0, numeric, true);
+ InitItem(deadBush, block, 66, 64, 58, 0, numeric, true);
+ InitItem(cobweb, block, 67, 64, 59, 0, numeric, true);
+ InitItem(bricks, block, 68, 64, 60, 0, numeric, true);
+ InitItem(snowBlock, block, 69, 64, 61, 0, numeric, true);
+ InitItem(ice, block, 70, 64, 62, 0, numeric, true);
+ InitItem(snowLayer, block, 71, 64, 63, 0, numeric, true);
+ InitItem(clayBlock, block, 72, 64, 64, 0, numeric, true);
+ InitItem(sugarCane, block, 116, 64, 65, 1, numeric, true);
+ InitItem(pumpkin, block, 74, 64, 66, 0, numeric, true);
+ InitItem(jackLantern, block, 75, 64, 67, 0, numeric, true);
+ InitItem(stoneBricks, block, 76, 64, 68, 0, numeric, true);
+ InitItem(mossyStoneBricks, block, 77, 64, 69, 0, numeric, true);
+ InitItem(crackedStoneBricks, block, 78, 64, 70, 0, numeric, true);
+ InitItem(chiseledStokeBricks, block, 79, 64, 71, 0, numeric, true);
+ InitItem(ironBras, block, 80, 64, 72, 0, numeric, true);
+ InitItem(melonBlock, block, 81, 64, 73, 0, numeric, true);
+ InitItem(mycelium, block, 82, 64, 74, 0, numeric, true);
+ InitItem(backgroundOakWood, block, 98, 64, 75, 0, numeric, true);
+ InitItem(spawner, block, 83, 64, 76, 0, numeric, true);
+ InitItem(bed1, block, 84, 64, 77, 0, numeric, true);
+ InitItem(bed2, block, 85, 64, 78, 0, numeric, true);
+ InitItem(openWoodenDoor1, block, 86, 64, 79, 0, numeric, true);
+ InitItem(openWoodenDoor2, block, 102, 64, 80, 0, numeric, true);
+ InitItem(closedWoodenDoor1, block, 88, 64, 81, 0, numeric, true);
+ InitItem(closedWoodenDoor2, block, 104, 64, 82, 0, numeric, true);
+ InitItem(birchWood, block, 90, 64, 83, 0, numeric, true);
+ InitItem(backgroundBirchWood, block, 99, 64, 84, 0, numeric, true);
+ InitItem(spruceWood, block, 91, 64, 85, 0, numeric, true);
+ InitItem(backgroundSpruceWood, block, 100, 64, 86, 0, numeric, true);
+ InitItem(spruceLeaves, block, 92, 64, 87, 0, numeric, true);
+ InitItem(redMushroomBlock1, block, 93, 64, 88, 0, numeric, true);
+ InitItem(redMushroomBlock2, block, 95, 64, 89, 0, numeric, true);
+ InitItem(brownMushroomBlock1, block, 94, 64, 90, 0, numeric, true);
+ InitItem(brownMushroomBlock2, block, 95, 64, 91, 0, numeric, true);
+ InitItem(oakFence, block, 96, 64, 92, 0, numeric, true);
+ InitItem(backgroundOakFence, block, 101, 64, 93, 0, numeric, true);
+ InitItem(backgroundOakWoodPlanks, block, 97, 64, 94, 0, numeric, true);
+ InitItem(painting1, block, 106, 1, 95, 0, numeric, true);
+ InitItem(painting2, block, 107, 1, 96, 0, numeric, true);
+ InitItem(painting3, block, 108, 1, 97, 0, numeric, true);
+ InitItem(painting4, block, 109, 1, 98, 0, numeric, true);
+ 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(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);
+ InitItem(furnace, block, 117, 64, 106, 0, numeric, true);
+ InitItem(closedWoodenTrapdoor, block, 118, 64, 107, 0, numeric, true);
+ InitItem(openWoodenTrapdoor, block, 119, 64, 108, 0, numeric, true);
+ InitItem(netherrack, block, 120, 64, 109, 0, numeric, true);
+ InitItem(netherPortal, block, 129, 64, 110, 0, numeric, true);
+ InitItem(glowstone, block, 121, 64, 111, 0, numeric, true);
+ InitItem(birchLeaves, block, 135, 64, 112, 0, numeric, true);
+ InitItem(soulSand, block, 122, 64, 113, 0, numeric, true);
+ InitItem(birchSapling, block, 123, 64, 114, 0, numeric, true);
+ InitItem(spruceSapling, block, 124, 64, 115, 0, numeric, true);
+ InitItem(redstoneLampOff, block, 125, 64, 116, 0, numeric, true);
+ InitItem(redstoneLampOn, block, 126, 64, 117, 0, numeric, true);
+ InitItem(backgroundObsidian, block, 127, 64, 118, 0, numeric, true);
+ 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(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(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);
+ InitItem(brick, orditem, 3, 64, 0, 1, numeric, true);
+ InitItem(ironIngot, orditem, 4, 64, 0, 1, numeric, true);
+ InitItem(goldIngot, orditem, 5, 64, 0, 1, numeric, true);
+ InitItem(lapisLazuli, orditem, 11, 64, 0, 1, numeric, true);
+ InitItem(strand, orditem, 12, 64, 0, 1, numeric, true);
+ InitItem(snowball, orditem, 13, 16, 0, 1, numeric, true);
+ InitItem(clay, orditem, 14, 64, 0, 1, numeric, true);
+ InitItem(book, orditem, 15, 64, 0, 1, numeric, true);
+ InitItem(bucket, orditem, 21, 1, 0, 1, numeric, true);
+ InitItem(waterBucket, orditem, 22, 1, 0, 1, numeric, true);
+ InitItem(lavaBucket, orditem, 23, 1, 0, 1, numeric, true);
+ InitItem(milkBucket, orditem, 24, 1, 0, 1, numeric, true);
+ InitItem(paper, orditem, 25, 64, 0, 1, numeric, true);
+ InitItem(melon, orditem, 26, 64, 0, 1, numeric, true);
+ InitItem(egg, orditem, 27, 64, 0, 1, numeric, true);
+ InitItem(door, orditem, 28, 64, 0, 1, numeric, true);
+ InitItem(bed, orditem, 30, 64, 0, 1, numeric, true);
+ InitItem(spawnEggZombie, orditem, 37, 64, 0, 1, numeric, true);
+ InitItem(spawnEggSheep, orditem, 38, 64, 0, 1, numeric, true);
+ InitItem(spawnEggPig, orditem, 39, 64, 0, 1, numeric, true);
+ InitItem(gunpowder, orditem, 31, 64, 0, 1, numeric, true);
+ InitItem(bowl, orditem, 40, 64, 0, 1, numeric, true);
+ InitItem(mushroomStew, orditem, 41, 64, 0, 1, numeric, true);
+ InitItem(map, orditem, 53, 1, 0, 1, numeric, true);
+ InitItem(painting, orditem, 54, 64, 0, 1, numeric, true);
+ InitItem(rawPorkchop, orditem, 55, 64, 0, 1, numeric, true);
+ InitItem(cookedPorkchop, orditem, 56, 64, 0, 1, numeric, true);
+ InitItem(rottenFlesh, orditem, 57, 64, 0, 1, numeric, true);
+ InitItem(camera1, orditem, 69, 1, 0, 1, numeric, true);
+ InitItem(camera2, orditem, 70, 1, 0, 1, numeric, true);
+ InitItem(camera3, orditem, 71, 1, 0, 1, numeric, true);
+ InitItem(goldNugget, orditem, 42, 64, 0, 1, numeric, true);
+ InitItem(sugar, orditem, 58, 64, 0, 1, numeric, true);
+ InitItem(spiderEye, orditem, 74, 64, 0, 1, numeric, true);
+ InitItem(feather, orditem, 85, 64, 0, 1, numeric, true);
+ InitItem(leather, orditem, 86, 64, 0, 1, numeric, true);
+ InitItem(rawBeef, orditem, 87, 64, 0, 1, numeric, true);
+ InitItem(steak, orditem, 88, 64, 0, 1, numeric, true);
+ InitItem(apple, orditem, 89, 64, 0, 1, numeric, true);
+ InitItem(goldenApple, orditem, 90, 64, 0, 1, numeric, true);
+ InitItem(rawChicken, orditem, 72, 64, 0, 1, numeric, true);
+ InitItem(cookedChicken, orditem, 73, 64, 0, 1, numeric, true);
+ InitItem(spawnEggChicken, orditem, 96, 64, 0, 1, numeric, true);
+ InitItem(spawnEggCreeper, orditem, 97, 64, 0, 1, numeric, true);
+ InitItem(flint, orditem, 1, 64, 0, 1, numeric, true);
+ InitItem(spawnEggCow, orditem, 99, 64, 0, 1, numeric, true);
+ InitItem(spawnEggMooshroom, orditem, 100, 64, 0, 1, numeric, true);
+ InitItem(rawFish, orditem, 102, 64, 0, 1, numeric, true);
+ InitItem(cookedFish, orditem, 103, 64, 0, 1, numeric, true);
+ InitItem(spawnEggPigman, orditem, 104, 64, 0, 1, numeric, true);
+ InitItem(spawnEggSpider, orditem, 105, 64, 0, 1, numeric, true);
+ InitItem(glowstoneDust, orditem, 107, 64, 0, 1, numeric, true);
+ InitItem(clock, orditem, 109, 1, 0, 1, numeric, true);
+ InitItem(compass, orditem, 108, 1, 0, 1, numeric, true);
+ InitItem(seeds, orditem, 110, 64, 0, 1, numeric, true);
+ InitItem(wheat, orditem, 111, 64, 0, 1, numeric, true);
+ InitItem(bread, orditem, 112, 64, 0, 1, numeric, true);
+ InitItem(boneMeal, orditem, 113, 64, 0, 1, numeric, true);
+ InitItem(melonSeeds, orditem, 114, 64, 0, 1, numeric, true);
+ InitItem(pumpkinSeeds, orditem, 115, 64, 0, 1, numeric, true);
+
+ InitOrdItem(dirt);
+ InitOrdItem(grass);
+ InitOrdItem(stone);
+ InitOrdItem(oakWoodPlanks);
+ InitOrdItem(cobblestone);
+ InitOrdItem(bedrock);
+ InitOrdItem(sand);
+ InitOrdItem(gravel);
+ InitOrdItem(oakWood);
+ InitOrdItem(obsidian);
+ InitOrdItem(bookshelf);
+ InitOrdItem(mossStone);
+ InitOrdItem(blockOfIron);
+ InitOrdItem(blockOfGold);
+ InitOrdItem(blockOfDiamond);
+ InitOrdItem(goldOre);
+ InitOrdItem(ironOre);
+ InitOrdItem(coalOre);
+ InitOrdItem(diamondOre);
+ InitOrdItem(redstoneOre);
+ InitOrdItem(oakLeaves);
+ InitOrdItem(redFlower);
+ InitOrdItem(yellowFlower);
+ InitOrdItem(redMooshroom);
+ InitOrdItem(brownMooshroom);
+ InitOrdItem(torch);
+ InitOrdItem(tnt);
+ InitOrdItem(chest);
+ InitOrdItem(craftingTable);
+ InitOrdItem(cactus);
+ InitOrdItem(glass);
+ InitOrdItem(wool1);
+ InitOrdItem(wool2);
+ InitOrdItem(wool3);
+ InitOrdItem(wool4);
+ InitOrdItem(wool5);
+ InitOrdItem(wool6);
+ InitOrdItem(wool7);
+ InitOrdItem(wool8);
+ InitOrdItem(wool9);
+ InitOrdItem(wool10);
+ InitOrdItem(wool11);
+ InitOrdItem(wool12);
+ InitOrdItem(wool13);
+ InitOrdItem(wool14);
+ InitOrdItem(wool15);
+ InitOrdItem(wool16);
+ InitOrdItem(snow);
+ InitOrdItem(ladder);
+ InitOrdItem(water);
+ InitOrdItem(lava);
+ InitOrdItem(oakSapling);
+ InitOrdItem(sponge);
+ InitOrdItem(lapisLazuliOre);
+ InitOrdItem(lapisLazuliBlock);
+ InitOrdItem(sandstone);
+ InitOrdItem(tallGrass);
+ InitOrdItem(deadBush);
+ InitOrdItem(cobweb);
+ InitOrdItem(snowBlock);
+ InitOrdItem(ice);
+ InitOrdItem(clayBlock);
+ InitOrdItem(sugarCane);
+ InitOrdItem(pumpkin);
+ InitOrdItem(jackLantern);
+ InitOrdItem(stoneBricks);
+ InitOrdItem(mossyStoneBricks);
+ InitOrdItem(crackedStoneBricks);
+ InitOrdItem(chiseledStokeBricks);
+ InitOrdItem(ironBras);
+ InitOrdItem(melonBlock);
+ InitOrdItem(mycelium);
+ InitOrdItem(backgroundOakWood);
+ InitOrdItem(spawner);
+ InitOrdItem(birchWood);
+ InitOrdItem(backgroundBirchWood);
+ InitOrdItem(spruceWood);
+ InitOrdItem(backgroundSpruceWood);
+ InitOrdItem(spruceLeaves);
+ InitOrdItem(redMushroomBlock1);
+ InitOrdItem(redMushroomBlock2);
+ InitOrdItem(brownMushroomBlock1);
+ InitOrdItem(brownMushroomBlock2);
+ InitOrdItem(oakFence);
+ InitOrdItem(backgroundOakFence);
+ InitOrdItem(backgroundOakWoodPlanks);
+ InitOrdItem(vines);
+ InitOrdItem(sign);
+ InitOrdItem(redstoneTorch);
+ InitOrdItem(furnace);
+ InitOrdItem(openWoodenTrapdoor);
+ InitOrdItem(netherrack);
+ InitOrdItem(glowstone);
+ InitOrdItem(birchLeaves);
+ InitOrdItem(soulSand);
+ InitOrdItem(birchSapling);
+ InitOrdItem(spruceSapling);
+ InitOrdItem(redstoneLampOff);
+ InitOrdItem(backgroundObsidian);
+ InitOrdItem(glassPlane);
+ InitOrdItem(cake);
+ InitOrdItem(stick);
+ InitOrdItem(dandelionYellow);
+ InitOrdItem(roseRed);
+ InitOrdItem(pickaxe1);
+ InitOrdItem(pickaxe2);
+ InitOrdItem(pickaxe3);
+ InitOrdItem(pickaxe4);
+ InitOrdItem(pickaxe5);
+ InitOrdItem(shovel1);
+ InitOrdItem(shovel2);
+ InitOrdItem(shovel3);
+ InitOrdItem(shovel4);
+ InitOrdItem(shovel5);
+ InitOrdItem(axe1);
+ InitOrdItem(axe2);
+ InitOrdItem(axe3);
+ InitOrdItem(axe4);
+ InitOrdItem(axe5);
+ InitOrdItem(shears);
+ InitOrdItem(sword1);
+ InitOrdItem(sword2);
+ InitOrdItem(sword3);
+ InitOrdItem(sword4);
+ InitOrdItem(sword5);
+ InitOrdItem(fishingRod);
+ InitOrdItem(lighter);
+ InitOrdItem(hoe1);
+ InitOrdItem(hoe2);
+ InitOrdItem(hoe3);
+ InitOrdItem(hoe4);
+ InitOrdItem(hoe5);
+ InitOrdItem(coal);
+ InitOrdItem(redstone);
+ InitOrdItem(diamond);
+ InitOrdItem(brick);
+ InitOrdItem(ironIngot);
+ InitOrdItem(goldIngot);
+ InitOrdItem(lapisLazuli);
+ InitOrdItem(strand);
+ InitOrdItem(snowball);
+ InitOrdItem(clay);
+ InitOrdItem(book);
+ InitOrdItem(bucket);
+ InitOrdItem(waterBucket);
+ InitOrdItem(lavaBucket);
+ InitOrdItem(milkBucket);
+ InitOrdItem(paper);
+ InitOrdItem(melon);
+ InitOrdItem(egg);
+ InitOrdItem(door);
+ InitOrdItem(bed);
+ InitOrdItem(spawnEggZombie);
+ InitOrdItem(spawnEggSheep);
+ InitOrdItem(spawnEggPig);
+ InitOrdItem(gunpowder);
+ InitOrdItem(bowl);
+ InitOrdItem(mushroomStew);
+ InitOrdItem(map);
+ InitOrdItem(painting);
+ InitOrdItem(rawPorkchop);
+ InitOrdItem(cookedPorkchop);
+ InitOrdItem(rottenFlesh);
+ InitOrdItem(camera1);
+ InitOrdItem(camera2);
+ InitOrdItem(camera3);
+ InitOrdItem(goldNugget);
+ InitOrdItem(sugar);
+ InitOrdItem(spiderEye);
+ InitOrdItem(feather);
+ InitOrdItem(leather);
+ InitOrdItem(rawBeef);
+ InitOrdItem(steak);
+ InitOrdItem(apple);
+ InitOrdItem(goldenApple);
+ InitOrdItem(rawChicken);
+ InitOrdItem(cookedChicken);
+ InitOrdItem(spawnEggChicken);
+ InitOrdItem(spawnEggCreeper);
+ InitOrdItem(flint);
+ InitOrdItem(spawnEggCow);
+ InitOrdItem(spawnEggMooshroom);
+ InitOrdItem(rawFish);
+ InitOrdItem(cookedFish);
+ InitOrdItem(spawnEggPigman);
+ InitOrdItem(spawnEggSpider);
+ InitOrdItem(glowstoneDust);
+ InitOrdItem(clock);
+ InitOrdItem(compass);
+ InitOrdItem(seeds);
+ InitOrdItem(wheat);
+ InitOrdItem(bread);
+ InitOrdItem(boneMeal);
+ InitOrdItem(melonSeeds);
+ InitOrdItem(pumpkinSeeds);
+end.
diff --git a/src/Mobs.pas b/src/Mobs.pas
index 519cf9cd0a6f698634bbf94fecb90aaa142d86c5..252f22f31154ddfd89048f3d98c658c06979fbb9 100644 (file)
--- a/src/Mobs.pas
+++ b/src/Mobs.pas
\r
implementation\r
\r
- uses phy, player, canvas, jsr75i, func, drop, items;\r
+ uses phy, player, canvas, jsr75i, func, drop;\r
\r
const\r
lastType = 1;\r
lastMob = 31;\r
lastZombyFrame = 11;\r
\r
+ rottenMeat = 190;\r
+\r
var\r
mtype, mx, my, mvx, mvy, mpos, mhp, ma, mb, mc : array [0..lastMob] of integer;\r
mjump : array [0..lastMob] of boolean;\r
x := mx[i] + GetW(i) / 2;\r
y := my[i] + GetH(i) / 2;\r
if mtype[i] = zomby then begin\r
- Drop.Create(Items.rottenMeat, x, y, Random(3));\r
+ Drop.Create(rottenMeat, x, y, Random(3));\r
end;\r
mtype[i] := none;\r
end;\r
diff --git a/src/Particles.mpsrc b/src/Particles.pas
diff --git a/src/Player.mpsrc b/src/Player.mpsrc
index b41c8e3b7ff82cfcc4eda09aa5e8cbb6f7f2895b..947adf9cbd706749e7dd07d8b950b446f7087312 100644 (file)
--- a/src/Player.mpsrc
+++ b/src/Player.mpsrc
\r
implementation\r
\r
- uses func, phy, vars, Canvas, drop, items, jsr75i, inv;\r
+ uses func, phy, vars, Canvas, drop, jsr75i, inv, Items;\r
\r
const\r
PLAYER_W=8;\r
DrawImage(playerBody[posi], x - camx, y - camy);\r
DrawImage(playerLegs[posi, animLegs], x - 2 - camx, y + 20 - camy);\r
\r
- if animHand = 0 then DrawSmallItem(Inv.GetItem(invslot), x - camx, y + 14 - camy);\r
- else if posi = POSI_RIGHT then DrawSmallItem(Inv.GetItem(invslot), x + 10 - camx, y + 5 - camy + animHand);\r
- else if posi = POSI_LEFT then DrawSmallItem(Inv.GetItem(invslot), x - 10 - camx, y + 5 - camy + animHand);\r
+ if animHand = 0 then Items.DrawSmall(Inv.GetItem(invslot), x - camx, y + 14 - camy);\r
+ else if posi = POSI_RIGHT then Items.DrawSmall(Inv.GetItem(invslot), x + 10 - camx, y + 5 - camy + animHand);\r
+ else if posi = POSI_LEFT then Items.DrawSmall(Inv.GetItem(invslot), x - 10 - camx, y + 5 - camy + animHand);\r
\r
if (animHand = 0) or (posi = POSI_RIGHT) then DrawImage(playerHand[posi, animHand], x + 2 - camx, y + 8 - camy);\r
else DrawImage(playerHand[posi, animHand], x - 6 - camx, y + 8 - camy);\r
diff --git a/src/cellui.mpsrc b/src/cellui.mpsrc
index 070ea0e18fe99cf453b5fced1e72305e9d8e0304..3b14c3fa68d232e188ccf0ca5323daa5c1d5ac12 100644 (file)
--- a/src/cellui.mpsrc
+++ b/src/cellui.mpsrc
function FindCurrentWindowsType:boolean;\r
\r
implementation\r
- uses vars, Canvas, items, console, furnace, chest, inv, func, items_store;\r
+ uses vars, Canvas, console, furnace, chest, inv, func, items_store, Items;\r
var\r
layer:integer;\r
last_cell: array [0..CONST_MAX_LAYERS] of integer;\r
getItemIdx:=inv.getItem(id);\r
else\r
if _type=CELL_TYPE_CREWATIVE_INV then\r
- getItemIdx:=getItemList(id);\r
+ getItemIdx:=Items.GetOrdinary(id);\r
else\r
if _type=CELL_TYPE_CHEST then\r
getItemIdx:=chest.getItem(id, data);\r
getSumIdx:=inv.getSum(id);\r
else\r
if _type=CELL_TYPE_CREWATIVE_INV then\r
- getSumIdx:=getItemMax(getItemList(id));\r
+ getSumIdx:=Items.GetMaximum(Items.GetOrdinary(id));\r
else\r
if _type=CELL_TYPE_CHEST then\r
getSumIdx:=chest.getSum(id, data);\r
for j:=0 to CONST_MAX_CELLS do\r
if inv_type[i, j]<>CELL_TYPE_NULL then\r
begin\r
- drawItem(getItemIdx(j, i), getSumIdx(j, i), x+inv_x[i, j], y+inv_y[i, j], getCellFlagIndicator(i, j));\r
+ Items.Draw(getItemIdx(j, i), getSumIdx(j, i), x+inv_x[i, j], y+inv_y[i, j], getCellFlagIndicator(i, j));\r
end;\r
end;\r
\r
diff --git a/src/console.pas b/src/console.pas
index c6c2f69dd056e7db6d8f3cdbcb8f94be8a5093d2..3d227f8bc503cc84e8a558b833dc2f4da3a12d60 100644 (file)
--- a/src/console.pas
+++ b/src/console.pas
keyboard,\r
vars,\r
maps,\r
- items,\r
canvas,\r
mobs,\r
worldgen,\r
decodeInt(tmp2));\r
end;\r
else\r
- if com='SET_MAX_ITEM_LIST' then\r
- setMaxItemList(decodeInt(nextWord));\r
- else\r
- if com='SET_ITEM_LIST' then\r
- setItemList(decodeInt(nextWord),\r
- decodeInt(nextWord));\r
- else\r
if com='BIND_KEY' then\r
begin\r
tmp:=nextWord;\r
diff --git a/src/craft.mpsrc b/src/craft.mpsrc
index db148dd4bd0a959c7fe4fd96a279ebc5b91a69fa..f60d988b0acfce9a0c2b9fc3ee592da56bb17a7f 100644 (file)
--- a/src/craft.mpsrc
+++ b/src/craft.mpsrc
function canCreateCraft(id, mode:integer):boolean;\r
\r
implementation\r
- uses vars, items, func, player, inv, items_store;\r
+\r
+ uses vars, func, player, inv, items_store;\r
\r
procedure createCraft(id, mode:integer);\r
var\r
diff --git a/src/drop.mpsrc b/src/drop.mpsrc
index e6f95cd28668e8be4d4b7d97c42b270d9eb61608..3738c1203edcb140b779403ea72b7e3b604c70d6 100644 (file)
--- a/src/drop.mpsrc
+++ b/src/drop.mpsrc
procedure loadData;\r
\r
implementation\r
- uses phy, jsr75i, vars, items_store, items, func;\r
+ uses phy, jsr75i, vars, items_store, func, Items;\r
const\r
MAX_DROP=255;\r
DROP_W=8;\r
end;\r
end;\r
\r
- procedure draw(camx, camy:integer);\r
- var\r
- i:integer;\r
- begin\r
- if drw_drp then\r
- for i:=0 to 255 do\r
- if isNull(i)=false then\r
- drawSmallItem(drop_item[i], drop_x[i]-camx, drop_y[i]-camy);\r
- end;\r
+ procedure draw(camx, camy : integer);\r
+ var\r
+ i : integer;\r
+ begin\r
+ if not drw_drp then exit;\r
+ for i:=0 to 255 do if IsNull(i) = false then begin\r
+ Items.DrawSmall(drop_item[i], drop_x[i] - camx, drop_y[i] - camy);\r
+ end;\r
+ end;\r
\r
procedure reflux;\r
var\r
diff --git a/src/func.mpsrc b/src/func.mpsrc
index 5089d0cc60be5a4b483fb3aba90da7b744cd566f..bce8640e1089e1289ecb8bfd20d74d4e988f5501 100644 (file)
--- a/src/func.mpsrc
+++ b/src/func.mpsrc
function get_spawn_x:integer;//Возвращает блок по X где должен появиться игрок\r
function get_spawn_y:integer;//Возвращает блок по Y где должен появиться игрок\r
procedure draw_block(xx,yy:integer);\r
+(*\r
procedure drawSmallItem(item, x, y:integer);\r
procedure drawItem(item, sum, x, y:integer; indicator:boolean;);\r
+*)\r
procedure LoadDrawFont(s:string);\r
procedure DrawFontTextSpec(str:string; x, y, color:integer; spec:boolean;);\r
procedure DrawFontText(str:string; x, y:integer);\r
function readstr:string;\r
\r
implementation\r
- uses canvas,imgcolor,jsr75i, vars, safeload, items,maps, items_store;\r
+ uses canvas, imgcolor, jsr75i, vars, safeload, Blocks, maps, items_store;\r
\r
//Загрузка текстуры с автоматическим выбором источника\r
function ld_tex(name, path, folder : String) : Image;\r
if getmap(get_spawn_x,iy)<>0 then begin get_spawn_y:=(iy-2); break; end;\r
end;\r
\r
+(*\r
procedure drawSmallItem(item, x, y:integer);\r
begin\r
if getItemTexType(item)=0 then\r
if getItemTexType(item)=1 then\r
drawimage(item8[getItemTex(item)], x, y);\r
end;\r
+*)\r
\r
procedure draw_block(xx,yy:integer);\r
begin\r
end; else\r
if (getmap(xx,yy)=92) or (getmap(xx,yy)=93) then\r
begin\r
- if (getBlockSet(getmap(xx-1,yy))=false) and (getBlockSet(getmap(xx+1,yy))=true) then setclip((xx*16)-camx,(yy*16)-camy,10,16); else\r
- if (getBlockSet(getmap(xx+1,yy))=false) and (getBlockSet(getmap(xx-1,yy))=true) then setclip((xx*16)-camx+6,(yy*16)-camy,10,16); else\r
- if (getBlockSet(getmap(xx+1,yy))=true) and (getBlockSet(getmap(xx-1,yy))=true) then setclip((xx*16)-camx+6,(yy*16)-camy,4,16);\r
+ if (Blocks.IsOverlapped(getmap(xx - 1, yy)) = false) and (Blocks.IsOverlapped(getmap(xx + 1, yy)) = true) then setclip((xx*16)-camx,(yy*16)-camy,10,16); else\r
+ if (Blocks.IsOverlapped(getmap(xx + 1, yy)) = false) and (Blocks.IsOverlapped(getmap(xx - 1, yy)) = true) then setclip((xx*16)-camx+6,(yy*16)-camy,10,16); else\r
+ if (Blocks.IsOverlapped(getmap(xx + 1, yy)) = true) and (Blocks.IsOverlapped(getmap(xx - 1, yy)) = true) then setclip((xx*16)-camx+6,(yy*16)-camy,4,16);\r
drawimage(tex[getBlockTex(getmap(xx,yy))],(xx*16)-camx,(yy*16)-camy);\r
setclip(0,0,getwidth,getheight);\r
end; else\r
drawimage(tex[getBlockTex(getmap(xx,yy))],(xx*16)-camx,(yy*16)-camy);\r
end;\r
\r
+(*\r
procedure drawItem(item, sum, x, y:integer; indicator:boolean;);\r
var\r
pa_xo,ugol:integer;\r
drawfonttext(''+sum, x, y+8);\r
end;\r
end;\r
-\r
+*)\r
\r
//Загрузка шрифта из файла под именем s\r
procedure LoadDrawFont(s:string);\r
diff --git a/src/furnace.mpsrc b/src/furnace.mpsrc
index 7b37737a908d16f9bdad203f2c6b188b8459d6d3..1cf918517708833839b6c11d2f63fa30883dbf84 100644 (file)
--- a/src/furnace.mpsrc
+++ b/src/furnace.mpsrc
procedure ResetData;\r
\r
implementation\r
- uses maps, drop, items_store, items, jsr75i, func;\r
+ uses maps, drop, items_store, jsr75i, func, Items;\r
\r
var\r
furnace_b: array [0..MAX_FURNACE] of boolean;\r
sumOUT:=GetFurSum(FURNACE_OUT, i);\r
recipeOUT:=GetReceptOut(itemIN);\r
\r
- if (itemIN<>0) and (recipeOUT<>FURNACE_ERROR) then\r
- if (itemOUT=0) or ((itemOUT=recipeOUT) and (sumOUT<getItemMax(itemOUT))) then\r
- canUpdate:=true;\r
+ if (itemIN <> 0) and (recipeOUT <> FURNACE_ERROR) then\r
+ if (itemOUT = 0) or ((itemOUT = recipeOUT) and (sumOUT < Items.GetMaximum(itemOUT))) then\r
+ canUpdate := true;\r
end;\r
\r
function furnaceBurn(i:integer):boolean;\r
item:=GetFurItem(FURNACE_FUEL, i);\r
sum:=GetFurSum(FURNACE_FUEL, i);\r
\r
- if getItemDiv(item) then\r
+ if Items.IsDividable(item) then\r
begin\r
sum:=sum-1;\r
if sum<0 then\r
sumOUT:=GetFurSum(FURNACE_OUT, i);\r
recipeOUT:=GetReceptOut(itemIN);\r
\r
- if getItemDiv(itemIN) then\r
+ if Items.IsDividable(itemIN) then\r
begin\r
sumIN:=sumIN-1;\r
if sumIN<0 then\r
diff --git a/src/inv.mpsrc b/src/inv.mpsrc
index 76ba270e824156e836d105be310f221b2610447f..740b8ee2e11d30b10947988ef16a0f3d0142688c 100644 (file)
--- a/src/inv.mpsrc
+++ b/src/inv.mpsrc
procedure loadData;\r
\r
implementation\r
- uses items_store, vars, jsr75i, items, func;\r
+ uses items_store, vars, jsr75i, func, Items;\r
var\r
inv_item: array [0..INV_SIZE] of integer;\r
inv_sum: array [0..INV_SIZE] of integer;\r
//Добавить предмет в инвентарь, возващает количество не полученых предметов.\r
function giveItem(ityp, isum:integer):integer;\r
var\r
- i, item, sum:integer;\r
+ i, item, sum, max:integer;\r
begin\r
//Ищем такой же предмет только если он имеет возможность делиться\r
- if getItemDiv(ityp) then\r
+ if Items.IsDividable(ityp) then\r
for i:=0 to INV_SIZE do\r
begin\r
- item:=getItem(i);\r
- sum:=getSum(i);\r
+ item :=getItem(i);\r
+ sum :=getSum(i);\r
+ max := Items.GetMaximum(ityp);\r
\r
if (item=ityp) and (isNull(i)=false) then\r
- if isum<getItemMax(ityp) then\r
+ if isum < max then\r
begin\r
sum:=sum+isum;\r
isum:=0;\r
\r
- if sum>getItemMax(ityp) then\r
+ if sum > max then\r
begin\r
- isum:=sum-getItemMax(ityp);\r
- sum:=sum-isum;\r
+ isum := sum - max;\r
+ sum := sum - isum;\r
end;\r
\r
setSum(sum, i);\r
begin\r
sum:=isum;\r
isum:=0;\r
+ max := Items.GetMaximum(ityp);\r
\r
- if sum>getItemMax(ityp) then\r
+ if sum > max then\r
begin\r
- isum:=sum-getItemMax(ityp);\r
- sum:=sum-isum;\r
+ isum := sum - max;\r
+ sum := sum - isum;\r
end;\r
\r
setItem(ityp, i);\r
diff --git a/src/invui.mpsrc b/src/invui.mpsrc
index 3b642f53e2aa8df8c132dec823717e04168c8d06..0fbac2e77077f4db39fe48f972ad7c4340fc6a11 100644 (file)
--- a/src/invui.mpsrc
+++ b/src/invui.mpsrc
function WindowKeyHanler:boolean;\r
\r
implementation\r
- uses vars, CellUI, console, Canvas, items, utils, craft, furnace, func, items_store, player, keyboard;\r
+ uses vars, CellUI, console, Canvas, utils, craft, furnace, func, items_store, player, keyboard, Items;\r
const\r
WINDOW_PLAYER_INV=1;\r
WINDOW_DIV_ITEMS=2;\r
for i:=0 to 1 do\r
for j:=0 to 1 do\r
begin\r
- drawItem(getCraftInItem(craftid, id), getCraftInSum(craftid, id), x+52+j*18, y+17+i*18, true);\r
+ Items.Draw(getCraftInItem(craftid, id), getCraftInSum(craftid, id), x+52+j*18, y+17+i*18, true);\r
id:=id+1;\r
end;\r
\r
- drawItem(getCraftOutItem(craftid), getCraftOutSum(craftid), x+108, y+27, true);\r
+ Items.Draw(getCraftOutItem(craftid), getCraftOutSum(craftid), x+108, y+27, true);\r
\r
i:=calcScrollBar(52, getImageHeight(fcScrollImg), MAX_FASTCRAFT_OFFSET, getOffset(0));\r
drawimage(fcScrollImg, x+156, y+66+i);\r
sum1:=GetWindowInfo(WINDOW_INFO_DIV_SUM1);\r
sum2:=GetWindowInfo(WINDOW_INFO_DIV_SUM2);\r
\r
- drawItem(item, (sum1-sum2), x+8, y+8, true);\r
- drawItem(item, sum2, x+64, y+8, true);\r
+ Items.Draw(item, (sum1-sum2), x+8, y+8, true);\r
+ Items.Draw(item, sum2, x+64, y+8, true);\r
\r
i:=calcScrollBar(72, getImageWidth(DivScrollImg), sum1, sum2);\r
\r
fresult:=true;\r
\r
if (tmp_item1=tmp_item2) and (Idx1<>Idx2) then\r
- if tmp_sum2<getItemMax(tmp_item2) then\r
+ if tmp_sum2 < Items.GetMaximum(tmp_item2) then\r
begin\r
tmp_sum2:=tmp_sum2+tmp_sum1;\r
tmp_sum1:=0;\r
\r
- if tmp_sum2>getItemMax(tmp_item2) then\r
+ if tmp_sum2 > GetMaximum(tmp_item2) then\r
begin\r
- tmp_sum1:=tmp_sum2-getItemMax(tmp_item2);\r
- tmp_sum2:=tmp_sum2-tmp_sum1;\r
+ tmp_sum1 := tmp_sum2 - Items.GetMaximum(tmp_item2);\r
+ tmp_sum2 := tmp_sum2 - tmp_sum1;\r
end;\r
\r
if tmp_sum1<=0 then\r
\r
function CanDivItem:boolean;\r
begin\r
- if getItemDiv(getItem(GetCurIndex(GetCur))) then\r
+ if Items.IsDividable(getItem(GetCurIndex(GetCur))) then\r
if (GetCur=CUR_SELECT1) and (getSum(GetCurIndex(GetCur))>0) then\r
CanDivItem:=true;\r
end;\r
begin\r
if GetTimer(T_KEY_DROPITEM)>TIMER_OK then\r
begin\r
- if getItemDiv(item) then\r
+ if Items.IsDividable(item) then\r
begin\r
player.dropItem(item, 1);\r
decItem(curidx);\r
diff --git a/src/items.mpsrc b/src/items.mpsrc
--- a/src/items.mpsrc
+++ /dev/null
@@ -1,101 +0,0 @@
-unit items;\r
-\r
-interface\r
- const\r
- ITEM_TYPE_BLOCK=0;\r
- ITEM_TYPE_TOOL=1;\r
-\r
- ITEM_FLAG_IND1=1;\r
- ITEM_FLAG_IND2=2;\r
- ITEM_FLAG_DIV=4;\r
- ITEM_FLAG_TEX=8;\r
-\r
- rottenMeat = 190;\r
-\r
- var\r
- compas:image;\r
- clock:array[0..7] of image;\r
- none0:image;\r
- clock_stage:integer;\r
-\r
- function getBlockTrans(id:integer;):boolean;\r
- function getBlockFore(id:integer;):boolean;\r
- function getBlockSet(id:integer;):boolean;\r
-\r
- function getItemIndNum(id:integer):boolean;\r
- function getItemIndLine(id:integer):boolean;\r
- function getItemDiv(id:integer):boolean;\r
- function getItemTexType(id:integer):integer;\r
-\r
- procedure setMaxItemList(i:integer);\r
- procedure setItemList(item, i:integer);\r
- function getItemList(i:integer):integer;\r
-\r
-implementation\r
- uses items_store;\r
- const\r
- BLOCK_FLAG_Trans=1;\r
- BLOCK_FLAG_FORE=2;\r
- BLOCK_FLAG_SET=4;\r
-\r
- var\r
- itemListSize:integer;\r
- itemList: array [0..0] of integer;\r
-\r
- function getBlockTrans(id:integer;):boolean;\r
- begin\r
- getBlockTrans:=(getBlockFlags(id) and BLOCK_FLAG_Trans)>0;\r
- end;\r
-\r
- function getBlockFore(id:integer;):boolean;\r
- begin\r
- getBlockFore:=(getBlockFlags(id) and BLOCK_FLAG_FORE)>0;\r
- end;\r
-\r
- function getBlockSet(id:integer;):boolean;\r
- begin\r
- getBlockSet:=(getBlockFlags(id) and BLOCK_FLAG_SET)>0;\r
- end;\r
-\r
- function getItemIndNum(id:integer):boolean;\r
- begin\r
- getItemIndNum:=(getItemFlags(id) and ITEM_FLAG_IND1)>0;\r
- end;\r
-\r
- function getItemIndLine(id:integer):boolean;\r
- begin\r
- getItemIndLine:=(getItemFlags(id) and ITEM_FLAG_IND2)>0;\r
- end;\r
-\r
- function getItemDiv(id:integer):boolean;\r
- begin\r
- getItemDiv:=(getItemFlags(id) and ITEM_FLAG_DIV)>0;\r
- end;\r
-\r
- function getItemTexType(id:integer):integer;\r
- begin\r
- getItemTexType:=(getItemFlags(id) and ITEM_FLAG_TEX)>>3;\r
- end;\r
-\r
- procedure setMaxItemList(i:integer);\r
- begin\r
- itemListSize:=i;\r
- i:=i+1;\r
- bytecode\r
- iload 0;\r
- newarray 10;\r
- putstatic field 'items', 'itemlist', '[I';\r
- end;\r
- end;\r
-\r
- procedure setItemList(i, item:integer);\r
- begin\r
- itemList[i]:=item;\r
- end;\r
-\r
- function getItemList(i:integer):integer;\r
- begin\r
- if (i>=0) and (i<=itemListSize) then\r
- getItemList:=itemList[i];\r
- end;\r
-end.\r
diff --git a/src/items_logic.mpsrc b/src/items_logic.mpsrc
index a3d41c04f757880049a1db63f27694ee9ad375bb..84db3342d06b6dc5d9bee8e6a00abe704949010b 100644 (file)
--- a/src/items_logic.mpsrc
+++ b/src/items_logic.mpsrc
procedure updateBlock(x, y:integer);\r
\r
implementation\r
- uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign;\r
+\r
+ uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, chest, inv, player, items_store, particles, worldgen, phy, sign, Blocks;\r
\r
procedure usebonemeal(block:integer);\r
var\r
setMap(thenby, x, y+1);\r
else\r
//Если нижний блок можно уничтожить, то ставим туда копию\r
- if getBlockSet(blockYp1) then\r
+ if Blocks.IsOverlapped(blockYp1) then\r
begin\r
destroy_block_0(blockYp1, x, y+1);\r
setMap(block, x, y+1);\r
if blockXm1=ifbx then\r
setMap(thenbx, x-1, y);\r
else\r
- if getBlockSet(blockXm1) then\r
+ if Blocks.IsOverlapped(blockXm1) then\r
begin\r
destroy_block_1(blockXm1, x-1, y);\r
setMap(block, x-1, y);\r
if blockXp1=ifbx then\r
setMap(thenbx, x+1, y);\r
else\r
- if getBlockSet(blockXp1) then\r
+ if Blocks.IsOverlapped(blockXp1) then\r
begin\r
destroy_block_1(blockXp1, x+1, y);\r
setMap(block, x+1, y);\r
if block=2 then\r
begin\r
//Трава разрастается при условии что освещение выше чем 3\r
- if (getBlockSet(getMap(x, y-1))=false) or (light=0) then\r
+ if (light = 0) or (Blocks.IsOverlapped(getMap(x, y - 1)) = false) then\r
setMap(1, x, y);\r
else\r
if light>3 then\r
else\r
if block=7 then\r
begin\r
- if getBlockSet(getMap(x, y+1)) then\r
+ if Blocks.IsOverlapped(getMap(x, y+1)) then\r
begin\r
setMap(0, x, y);\r
setMap(7, x, y+1);\r
else\r
if block=8 then\r
begin\r
- if getBlockSet(getMap(x, y+1)) then\r
+ if Blocks.IsOverlapped(getMap(x, y+1)) then\r
begin\r
setMap(0, x, y);\r
setMap(8, x, y+1);\r
else\r
if block=74 then\r
begin\r
- if getBlockSet(getMap(x, y-1))=false then\r
+ if Blocks.IsOverlapped(getMap(x, y-1))=false then\r
setMap(1, x, y);\r
else\r
if light>3 then\r
diff --git a/src/vars.mpsrc b/src/vars.mpsrc
index 5ac6cb8ae722a3f726926b53f6869ac4a923694b..e7db3e379d12da1b8882db80041b64f60a09ad6d 100644 (file)
--- a/src/vars.mpsrc
+++ b/src/vars.mpsrc
font:array [0..127] of image;\r
none4:image;\r
\r
+ compas:image;\r
+ clock:array[0..7] of image;\r
+ none5:image;\r
+ clock_stage:integer;\r
+\r
procedure initBlockTex(i:integer);\r
procedure initItemTex(i:integer);\r
\r
diff --git a/src/worldgen.mpsrc b/src/worldgen.mpsrc
index d49159a2428d1f9293956bc1a2aefd0c86cab6a3..e9e7a0618bd60cf31207f7de75c59255a0b7e903 100644 (file)
--- a/src/worldgen.mpsrc
+++ b/src/worldgen.mpsrc
\r
\r
implementation\r
-uses maps,randoms,vars,items,func, player, chest, items_store;\r
+\r
+ uses maps, randoms, vars, func, player, chest, items_store, Items, Blocks;\r
\r
function rnd_min:integer;\r
begin\r
l:=rnd(26);\r
if rnd(75)=rnd(75) then\r
begin\r
- chest.setItem(133 ,l, id);\r
- chest.setSum(getItemMax(133), l, id);\r
+ chest.setItem(Items.pickaxe3 ,l, id);\r
+ chest.setSum(Items.GetMaximum(Items.pickaxe3), l, id);\r
end; else\r
if rnd(25)=rnd(25) then\r
begin\r