From 7575858027d6e1012d1cc97ffc12360dcb723d46 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 9 Mar 2024 13:06:13 +0100 Subject: [PATCH] added difficulty level to level names for native BD levels --- src/files.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.34.1