From: Holger Schemel Date: Tue, 2 Feb 2021 11:54:31 +0000 (+0100) Subject: replaced string texts with predefined string constants X-Git-Tag: 4.2.3.0~30 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=b47b3780ecbc8260ffd8d3cf1562a32c449e84b7 replaced string texts with predefined string constants --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index a4228a4e..8f98ff01 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -2882,7 +2882,7 @@ static TreeInfo *createParentTreeInfoNode(TreeInfo *node_parent) ti_new->parent_link = TRUE; setString(&ti_new->identifier, node_parent->identifier); - setString(&ti_new->name, ".. (parent directory)"); + setString(&ti_new->name, BACKLINK_TEXT_PARENT); setString(&ti_new->name_sorting, ti_new->name); setString(&ti_new->subdir, STRING_PARENT_DIRECTORY); @@ -2928,7 +2928,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first) TreeInfo *ti_new2 = createParentTreeInfoNode(ti_new); - setString(&ti_new2->name, ".. (main menu)"); + setString(&ti_new2->name, BACKLINK_TEXT_MAIN); setString(&ti_new2->name_sorting, ti_new2->name); return ti_new; diff --git a/src/libgame/system.h b/src/libgame/system.h index 46124b82..87c56d69 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -782,6 +782,9 @@ #define INFOTEXT_LEVEL_NR "Levels" #define INFOTEXT_PLAYER_NAME "Players & Teams" +#define BACKLINK_TEXT_MAIN ".. (main menu)" +#define BACKLINK_TEXT_PARENT ".. (parent directory)" + #define TREE_INFOTEXT(t) ((t) == TREE_TYPE_PLAYER_NAME ? \ INFOTEXT_PLAYER_NAME : \ (t) == TREE_TYPE_LEVEL_NR ? \