]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/node.h
Use proper format for size_t printf
[dragonblocks_alpha.git] / src / node.h
index aef57e8dfc10a769f84f98d1d9bf39fcd78ab776..ef2171361cdf942552c8c116aaca5cceb7a29b41 100644 (file)
@@ -2,23 +2,38 @@
 #define _NODE_H_
 
 #include <stdbool.h>
+#include <stddef.h>
 #include "types.h"
 
-typedef enum
-{
-       NODE_INVALID,           // Used for unknown nodes received from server (caused by outdated clients)
+#define NODES_TREE case NODE_OAK_WOOD: case NODE_OAK_LEAVES: case NODE_PINE_WOOD: case NODE_PINE_LEAVES: case NODE_PALM_WOOD: case NODE_PALM_LEAVES:
+
+typedef enum {
+       NODE_UNKNOWN,       // Used for unknown nodes received from server (caused by outdated clients)
        NODE_AIR,
        NODE_GRASS,
        NODE_DIRT,
        NODE_STONE,
-       NODE_UNLOADED,          // Used for nodes in unloaded blocks
-} Node;
+       NODE_SNOW,
+       NODE_OAK_WOOD,
+       NODE_OAK_LEAVES,
+       NODE_PINE_WOOD,
+       NODE_PINE_LEAVES,
+       NODE_PALM_WOOD,
+       NODE_PALM_LEAVES,
+       NODE_SAND,
+       NODE_WATER,
+       NODE_LAVA,
+       NODE_VULCANO_STONE,
+       COUNT_NODE,      // Used for nodes in unloaded chunks
+} NodeType;
+
+struct TerrainNode;
 
-typedef struct
-{
-       bool visible;
-} NodeDefintion;
+typedef struct {
+       bool solid;
+       unsigned long dig_class;
+} NodeDef;
 
-extern NodeDefintion node_definitions[];
+extern NodeDef node_def[];
 
 #endif