]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapnode.h
added simple skybox
[minetest.git] / src / mapnode.h
index 0762599c8f9760fcfa81c9c75ae3a849f9e62354..ef1ec8ae3f3819df4dcfba83372118740c1a3bcd 100644 (file)
@@ -27,8 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "exceptions.h"
 #include "serialization.h"
 #include "tile.h"
-#include "iirrlichtwrapper.h"
-#include "nodemetadata.h"
 
 /*
        Initializes all kind of stuff in here.
@@ -95,8 +93,12 @@ void init_content_inventory_texture_paths();
 #define CONTENT_COALSTONE 11
 #define CONTENT_WOOD 12
 #define CONTENT_SAND 13
-#define CONTENT_FURNACE 14
-#define CONTENT_SIGN_WALL 15
+#define CONTENT_SIGN_WALL 14
+#define CONTENT_CHEST 15
+#define CONTENT_FURNACE 16
+//#define CONTENT_WORKBENCH 17
+#define CONTENT_COBBLE 18
+#define CONTENT_STEEL 19
 
 /*
        Content feature list
@@ -106,7 +108,9 @@ enum ContentParamType
 {
        CPT_NONE,
        CPT_LIGHT,
-       CPT_MINERAL
+       CPT_MINERAL,
+       // Direction for chests and furnaces and such
+       CPT_FACEDIR_SIMPLE
 };
 
 enum LiquidType
@@ -117,6 +121,7 @@ enum LiquidType
 };
 
 class MapNode;
+class NodeMetadata;
 
 struct ContentFeatures
 {
@@ -136,13 +141,9 @@ struct ContentFeatures
        */
        TileSpec tiles[6];
        
-       // TODO: Somehow specify inventory image
-       //std::string inventory_image_path;
-       //TextureSpec inventory_texture;
-       //u32 inventory_texture_id;
        video::ITexture *inventory_texture;
 
-       bool is_ground_content; //TODO: Remove, use walkable instead
+       bool is_ground_content;
        bool light_propagates;
        bool sunlight_propagates;
        u8 solidness; // Used when choosing which face is drawn
@@ -409,6 +410,13 @@ inline v3s16 unpackDir(u8 b)
        return d;
 }
 
+/*
+       facedir: CPT_FACEDIR_SIMPLE param1 value
+       dir: The face for which stuff is wanted
+       return value: The face from which the stuff is actually found
+*/
+v3s16 facedir_rotate(u8 facedir, v3s16 dir);
+
 enum LightBank
 {
        LIGHTBANK_DAY,
@@ -431,14 +439,18 @@ struct MapNode
                  Sunlight is LIGHT_SUN, which is LIGHT_MAX+1.
                - Contains 2 values, day- and night lighting. Each takes 4 bits.
        */
-       s8 param;
+       union
+       {
+               s8 param;
+               u8 param1;
+       };
        
+       /*
+               The second parameter. Initialized to 0.
+               E.g. direction for torches and flowing water.
+       */
        union
        {
-               /*
-                       The second parameter. Initialized to 0.
-                       Direction for torches and flowing water.
-               */
                u8 param2;
                u8 dir;
        };