From: Holger Schemel Date: Thu, 25 Feb 2021 18:36:56 +0000 (+0100) Subject: added marking nodes in "last played level sets" sub-tree as copy X-Git-Tag: 4.2.3.1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f44158a4e1de9725bdd1d751b4a4005d29b51271;p=rocksndiamonds.git added marking nodes in "last played level sets" sub-tree as copy --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index d867ebba..581aac21 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -2520,6 +2520,7 @@ static void setTreeInfoToDefaults(TreeInfo *ti, int type) ti->sort_priority = LEVELCLASS_UNDEFINED; // default: least priority ti->latest_engine = FALSE; // default: get from level ti->parent_link = FALSE; + ti->is_copy = FALSE; ti->in_user_dir = FALSE; ti->user_defined = FALSE; ti->color = 0; @@ -2601,6 +2602,7 @@ static void setTreeInfoToDefaultsFromParent(TreeInfo *ti, TreeInfo *parent) ti->sort_priority = parent->sort_priority; ti->latest_engine = parent->latest_engine; ti->parent_link = FALSE; + ti->is_copy = FALSE; ti->in_user_dir = parent->in_user_dir; ti->user_defined = parent->user_defined; ti->color = parent->color; @@ -2701,6 +2703,7 @@ static TreeInfo *getTreeInfoCopy(TreeInfo *ti) ti_copy->level_group = ti->level_group; ti_copy->parent_link = ti->parent_link; + ti_copy->is_copy = ti->is_copy; ti_copy->in_user_dir = ti->in_user_dir; ti_copy->user_defined = ti->user_defined; ti_copy->readonly = ti->readonly; @@ -4561,6 +4564,8 @@ void UpdateLastPlayedLevels_TreeInfo(void) (*node_new)->node_top = &leveldir_first; // correct top node link (*node_new)->node_parent = leveldir_last; // correct parent node link + (*node_new)->is_copy = TRUE; // mark entry as node copy + (*node_new)->node_group = NULL; (*node_new)->next = NULL; diff --git a/src/libgame/system.h b/src/libgame/system.h index ca8494bc..2db4961c 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1565,6 +1565,7 @@ struct TreeInfo boolean level_group; // directory contains more level series directories boolean parent_link; // entry links back to parent directory + boolean is_copy; // this entry is a copy of another entry in the tree boolean in_user_dir; // user defined levels are stored in home directory boolean user_defined; // levels in user directory and marked as "private" boolean readonly; // readonly levels can not be changed with editor