From: Holger Schemel Date: Sat, 9 Mar 2024 12:06:13 +0000 (+0100) Subject: added difficulty level to level names for native BD levels X-Git-Tag: 4.4.0.0-test-1~219 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7575858027d6e1012d1cc97ffc12360dcb723d46;p=rocksndiamonds.git added difficulty level to level names for native BD levels --- diff --git a/src/files.c b/src/files.c index 62069398..4b2db0f8 100644 --- a/src/files.c +++ b/src/files.c @@ -3771,12 +3771,16 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level) level->bd_intermission = cave->intermission; level->bd_diagonal_movements = cave->diagonal_movements; - strncpy(level->name, cave->name, MAX_LEVEL_NAME_LEN); + char *cave_name = getStringPrint("%s / %d", cave->name, bd_level_nr + 1); + + strncpy(level->name, cave_name, MAX_LEVEL_NAME_LEN); level->name[MAX_LEVEL_NAME_LEN] = '\0'; for (x = 0; x < level->fieldx; x++) for (y = 0; y < level->fieldy; y++) level->field[x][y] = map_element_BD_to_RND(cave->map[y][x]); + + checked_free(cave_name); } static void setTapeInfoToDefaults(void);