bullet_type bullets[NUM_BULLETS];
char song_title[20];
char levelname[20];
-
+char leveltheme[20];
/* Local function prototypes: */
if (tux_x >= endpos && endpos != 0)
{
+ /* FIXME: No need to kill Tux to end the level! ;^) */
next_level = 1;
}
fgets(str, 20, fi);
strcpy(levelname, str);
+ /* (Level theme) */
+ fgets(str, 20, fi);
+ strcpy(leveltheme, str);
+ leveltheme[strlen(leveltheme)-1] = '\0';
+
/* (Time to beat level) */
fgets(str, 10, fi);
time_left = atoi(str);
{
char fname[1024];
- snprintf(fname, 1024, "%s/images/level%d/%s", DATA_PREFIX, level, file);
+ snprintf(fname, 1024, "%s/images/%s/%s", DATA_PREFIX, leveltheme, file);
return(load_image(fname, use_alpha));
}