level_file_info->nr = 0;
level_file_info->type = LEVEL_FILE_TYPE_UNKNOWN;
level_file_info->packed = FALSE;
- level_file_info->basename = NULL;
- level_file_info->filename = NULL;
+
+ setString(&level_file_info->basename, NULL);
+ setString(&level_file_info->filename, NULL);
}
int getMappedElement_SB(int, boolean);
{
lfi->type = type;
lfi->packed = FALSE;
- lfi->basename = getSingleLevelBasename(lfi->nr, lfi->type);
- lfi->filename = getLevelFilenameFromBasename(lfi->basename);
+
+ setString(&lfi->basename, getSingleLevelBasename(lfi->nr, lfi->type));
+ setString(&lfi->filename, getLevelFilenameFromBasename(lfi->basename));
}
#endif
lfi->type = type;
lfi->packed = FALSE;
- lfi->basename = basename;
- lfi->filename = getLevelFilenameFromBasename(lfi->basename);
+
+ setString(&lfi->basename, basename);
+ setString(&lfi->filename, getLevelFilenameFromBasename(lfi->basename));
}
static void setLevelFileInfo_PackedLevelFilename(struct LevelFileInfo *lfi,
{
lfi->type = type;
lfi->packed = TRUE;
- lfi->basename = getPackedLevelBasename(lfi->type);
- lfi->filename = getLevelFilenameFromBasename(lfi->basename);
+
+ setString(&lfi->basename, getPackedLevelBasename(lfi->type));
+ setString(&lfi->filename, getLevelFilenameFromBasename(lfi->basename));
}
static int getFiletypeFromID(char *filetype_id)
getSingleLevelBasename(-1));
/* replace local level template filename with global template filename */
- lfi->filename = getGlobalLevelTemplateFilename();
+ setString(&lfi->filename, getGlobalLevelTemplateFilename());
/* no fallback if template file not existing */
return;
level_file_info.nr = 0; /* unknown level number */
level_file_info.type = LEVEL_FILE_TYPE_RND; /* no others supported yet */
- level_file_info.filename = filename;
+
+ setString(&level_file_info.filename, filename);
LoadLevelFromFileInfo(level, &level_file_info, FALSE);
}