]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/client/client_node.h
refactoring
[dragonblocks_alpha.git] / src / client / client_node.h
index bb145f6a47a36588538a14b7f3bc45e346b27e33..a922df486fe63ab78ee103eb2cf042469a1dd0cc 100644 (file)
@@ -1,32 +1,36 @@
 #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 enum
-{
-       NV_NONE,
-       NV_CLIP,
-       NV_BLEND,
-       NV_SOLID,
+typedef enum {
+       VISIBILITY_NONE,
+       VISIBILITY_CLIP,
+       VISIBILITY_BLEND,
+       VISIBILITY_SOLID,
 } NodeVisibility;
 
-typedef struct
-{
-       struct
-       {
+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;
        NodeVisibility visibility;
        bool mipmap;
-       void (*render)(v3s32 pos, MapNode *node, Vertex3D *vertex, int f, int v);
+       void (*render)(NodeArgsRender *args);
 } ClientNodeDefinition;
 
 extern ClientNodeDefinition client_node_definitions[];
 void client_node_init();
 
-#endif
+#endif // _CLIENT_NODE_H_