added generic function to add new level or artwork set to tree
[rocksndiamonds.git] / src / libgame / system.h
index aaf4604ec0c1a431a7e1303835135ec9adce029c..5249adfcb599df787c497ba9aa6ba153949eedfb 100644 (file)
                                 getUserMusicDir() :                    \
                                 NULL)
 
+#define TREE_FIRST_NODE_PTR(t) ((t) == TREE_TYPE_LEVEL_DIR ?           \
+                                &leveldir_first :                      \
+                                (t) == TREE_TYPE_GRAPHICS_DIR ?        \
+                                &artwork.gfx_first :                   \
+                                (t) == TREE_TYPE_SOUNDS_DIR ?          \
+                                &artwork.snd_first :                   \
+                                (t) == TREE_TYPE_MUSIC_DIR ?           \
+                                &artwork.mus_first :                   \
+                                NULL)
+
 // values for artwork handling
 #define LEVELDIR_ARTWORK_SET_PTR(leveldir, type)                       \
                                ((type) == ARTWORK_TYPE_GRAPHICS ?      \