LoadLevelFromFileInfo(level, &level_file_info, FALSE);
}
-static void LoadLevel_InitVersion(struct LevelInfo *level, char *filename)
+static void LoadLevel_InitVersion(struct LevelInfo *level)
{
int i, j;
}
}
-static void LoadLevel_InitElements(struct LevelInfo *level, char *filename)
+static void LoadLevel_InitElements(struct LevelInfo *level)
{
LoadLevel_InitStandardElements(level);
InitElementPropertiesGfxElement();
}
-static void LoadLevel_InitPlayfield(struct LevelInfo *level, char *filename)
+static void LoadLevel_InitPlayfield(struct LevelInfo *level)
{
int x, y;
SetBorderElement();
}
-static void LoadLevel_InitNativeEngines(struct LevelInfo *level,char *filename)
+static void LoadLevel_InitNativeEngines(struct LevelInfo *level)
{
struct LevelFileInfo *level_file_info = &level->file_info;
void LoadLevelTemplate(int nr)
{
- char *filename;
-
if (!fileExists(getGlobalLevelTemplateFilename()))
{
Error(ERR_WARN, "no level template found for this level");
}
setLevelFileInfo(&level_template.file_info, nr);
- filename = level_template.file_info.filename;
LoadLevelFromFileInfo(&level_template, &level_template.file_info, FALSE);
- LoadLevel_InitVersion(&level_template, filename);
- LoadLevel_InitElements(&level_template, filename);
+ LoadLevel_InitVersion(&level_template);
+ LoadLevel_InitElements(&level_template);
ActivateLevelTemplate();
}
void LoadLevel(int nr)
{
- char *filename;
-
setLevelFileInfo(&level.file_info, nr);
- filename = level.file_info.filename;
LoadLevelFromFileInfo(&level, &level.file_info, FALSE);
if (level.use_custom_template)
LoadLevelTemplate(-1);
- LoadLevel_InitVersion(&level, filename);
- LoadLevel_InitElements(&level, filename);
- LoadLevel_InitPlayfield(&level, filename);
+ LoadLevel_InitVersion(&level);
+ LoadLevel_InitElements(&level);
+ LoadLevel_InitPlayfield(&level);
- LoadLevel_InitNativeEngines(&level, filename);
+ LoadLevel_InitNativeEngines(&level);
}
void LoadLevelInfoOnly(int nr)