From: Holger Schemel Date: Wed, 28 Feb 2024 10:05:43 +0000 (+0100) Subject: added setting new caveset name to current levelset name for BD engine X-Git-Tag: 4.4.0.0-test-1~267 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=513be499c6c935eb97b207cfe204426e2fdc1c65;p=rocksndiamonds.git added setting new caveset name to current levelset name for BD engine --- diff --git a/src/game_bd/bd_caveset.c b/src/game_bd/bd_caveset.c index df3abaf6..ad2ecc4a 100644 --- a/src/game_bd/bd_caveset.c +++ b/src/game_bd/bd_caveset.c @@ -127,7 +127,7 @@ void gd_caveset_clear(void) /* always newly create this */ /* create pseudo cave containing default values */ gd_caveset_data = gd_caveset_data_new(); - gd_strcpy(gd_caveset_data->name, _("New caveset")); + gd_strcpy(gd_caveset_data->name, getCurrentLevelsetName()); } /* return number of caves currently in memory. */ diff --git a/src/game_bd/import_bd.h b/src/game_bd/import_bd.h index b53372d2..6d1fa1e8 100644 --- a/src/game_bd/import_bd.h +++ b/src/game_bd/import_bd.h @@ -34,4 +34,6 @@ byte *TapePlayAction_BD(void); byte *TapeCorrectAction_BD(byte *); boolean TapeIsPlaying_ReplayBD(void); +char *getCurrentLevelsetName(void); + #endif // IMPORT_BD_H diff --git a/src/tools.c b/src/tools.c index 2f3f06a1..e1b79cbf 100644 --- a/src/tools.c +++ b/src/tools.c @@ -11221,6 +11221,11 @@ void OpenURLFromHash(SetupFileHash *hash, int hash_key) OpenURL(getHashEntry(hash, int2str(hash_key, 0))); } +char *getCurrentLevelsetName(void) +{ + return leveldir_current->name; +} + // ============================================================================ // tests diff --git a/src/tools.h b/src/tools.h index abfcc6ff..28dd05c9 100644 --- a/src/tools.h +++ b/src/tools.h @@ -310,6 +310,8 @@ boolean CheckFadeAll(void); void OpenURL(char *); void OpenURLFromHash(SetupFileHash *, int); +char *getCurrentLevelsetName(void); + void TestGeneratingUUIDs(void); #endif // TOOLS_H