X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsetup.c;h=7b0189b880f3744e0ff6a0d85137cc7b261bf233;hb=fd38efeb44f3bb6bfaa71351c202fd4fe78c5d16;hp=fefe33dfbd0dfa074578769eb7d865371ce4b9ee;hpb=f1685723f2d920b7d7349c57e902c7adfaffdb1c;p=rocksndiamonds.git diff --git a/src/libgame/setup.c b/src/libgame/setup.c index fefe33df..7b0189b8 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -79,7 +79,8 @@ static char *levelclass_desc[NUM_LEVELCLASS_DESC] = IS_LEVELCLASS_USER(n) ? 7 : \ 9) -#define TOKEN_VALUE_POSITION 30 +#define TOKEN_VALUE_POSITION 40 +#define TOKEN_COMMENT_POSITION 60 #define MAX_COOKIE_LEN 256 @@ -422,6 +423,11 @@ char *getCustomSoundFilename(char *basename) return NULL; /* cannot find image file */ } +char *getCustomSoundConfigFilename() +{ + return getCustomSoundFilename(SOUNDSINFO_FILENAME); +} + char *getCustomMusicDirectory(void) { static char *directory = NULL; @@ -1649,12 +1655,12 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first, if (node_parent == NULL) /* top level group */ { - artwork_new->basepath = base_directory; - artwork_new->fullpath = artwork_new->filename; + artwork_new->basepath = getStringCopy(base_directory); + artwork_new->fullpath = getStringCopy(artwork_new->filename); } else /* sub level group */ { - artwork_new->basepath = node_parent->basepath; + artwork_new->basepath = getStringCopy(node_parent->basepath); artwork_new->fullpath = getPath2(node_parent->fullpath, directory_name); } @@ -1922,7 +1928,9 @@ char *getSetupLine(struct TokenInfo *token_info, char *prefix, int token_nr) if (strcmp(keyname, "(undefined)") != 0 && strcmp(keyname, "(unknown)") != 0) { - for (i=strlen(entry); i<50; i++) + /* add at least one whitespace */ + strcat(entry, " "); + for (i=strlen(entry); i