minor code improvement
authorHolger Schemel <info@artsoft.org>
Mon, 15 Feb 2021 23:46:52 +0000 (00:46 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 15 Feb 2021 23:46:52 +0000 (00:46 +0100)
src/libgame/setup.h

index 2f5489d9e482604a845dcca8889923b15cdf0056..8ec6b4d8dc14fd616eea7c3ee8ff06564ded463e 100644 (file)
@@ -229,10 +229,10 @@ typedef struct hashtable     SetupFileHash;
 
 #define TREE_SORTING_DIR(ti)                                           \
        (((ti)->parent_link                                     ? 0 :   \
-         (ti)->in_user_dir                                     ? 8 :   \
-         (ti)->sort_priority >= LEVELCLASS_CLASSICS_START      ? 6 :   \
-         (ti)->sort_priority >= LEVELCLASS_TUTORIAL_START      ? 4 :   \
-         2) +                                                          \
+         (ti)->in_user_dir                                     ? 4 :   \
+         (ti)->sort_priority >= LEVELCLASS_CLASSICS_START      ? 3 :   \
+         (ti)->sort_priority >= LEVELCLASS_TUTORIAL_START      ? 2 :   \
+         1) * 2 +                                                      \
         ((ti)->level_group ? 0 : 1))
 
 #define TREE_COLOR_DIR(ti, active)                                     \