]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/client/client_node.h
Add items
[dragonblocks_alpha.git] / src / client / client_node.h
index 6ff257d0dfa549c9170ef5865761c11d875631ef..57ae62567f4e4beb826ed1805d5daf393d6e0b34 100644 (file)
@@ -1,22 +1,39 @@
 #ifndef _CLIENT_NODE_H_
 #define _CLIENT_NODE_H_
 
-#include "client/object.h"
+#include "client/terrain_gfx.h"
 #include "client/texture.h"
-#include "map.h"
+#include "terrain.h"
 
-typedef struct
-{
-       struct
-       {
-               char *paths[6];                 // input
-               int indices[6];                 // input
-               Texture *textures[6];   // output
+typedef enum {
+       VISIBILITY_NONE,
+       VISIBILITY_CLIP,
+       VISIBILITY_BLEND,
+       VISIBILITY_SOLID,
+} NodeVisibility;
+
+typedef struct {
+       v3s32 pos;
+       TerrainNode *node;
+       TerrainVertex vertex;
+       unsigned int f, v;
+} NodeArgsRender;
+
+typedef struct {
+       struct {
+               char *paths[6];       // input
+               int indices[6];       // input
+               Texture *textures[6]; // output
        } tiles;
-       void (*render)(v3s32 pos, MapNode *node, Vertex3D *vertex, int f, int v);
-} ClientNodeDefintion;
+       NodeVisibility visibility;
+       bool mipmap;
+       void (*render)(NodeArgsRender *args);
+       bool pointable;
+       v3f32 selection_color;
+       char *name;
+} ClientNodeDef;
 
-extern ClientNodeDefintion client_node_definitions[];
+extern ClientNodeDef client_node_defs[];
 void client_node_init();
 
-#endif
+#endif // _CLIENT_NODE_H_