snprintf(fname, 1024, "%s/images/background/%s", DATA_PREFIX, plevel->bkgd_image);
texture_load(&img_bkgd, fname, IGNORE_ALPHA);
}
+ else
+ {
+ /* Quick hack to make sure an image is loaded, when we are freeing it afterwards. */#
+ level_load_image(&img_bkgd, plevel->theme,"solid0.png", IGNORE_ALPHA);
+ }
}
/* Free graphics data for this level: */
texture_free(&img_bkgd_tile[0][i]);
texture_free(&img_bkgd_tile[1][i]);
}
+
texture_free(&img_bkgd);
}
string_list_copy(level_settings_menu.item[3].list, dsubdirs("images/themes", "solid0.png"));
string_list_copy(level_settings_menu.item[4].list, dfiles("music/",NULL, "-fast"));
string_list_copy(level_settings_menu.item[5].list, dfiles("images/background",NULL, NULL));
+ string_list_add_item(level_settings_menu.item[5].list,"");
if((i = string_list_find(level_settings_menu.item[3].list,le_current_level->theme)) != -1)
level_settings_menu.item[3].list->active_item = i;
if((i = string_list_find(level_settings_menu.item[4].list,le_current_level->song_title)) != -1)
glClear(GL_COLOR_BUFFER_BIT);
}
else
+ {
#endif
SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, r, g, b));
+#ifndef NOOPENGL
+ }
+#endif
}
/* 'Stolen' from the SDL documentation.
y1 += sh_step;
}
drawpixel(x1, y1, color);
+#ifndef NOOPENGL
+
}
+#endif
}
/* --- FILL A RECT --- */
#else
void* sounds[NUM_SOUNDS];
-void* level_song, *herring_song;
+void* level_song, * level_song_fast, * herring_song;
int open_audio (int frequency, int format, int channels, int chunksize)
{
/* fake variables */
extern void* sounds[NUM_SOUNDS];
-extern void* level_song, *herring_song;
+extern void * level_song, * level_song_fast, * herring_song;
/* fake sound handlers */
int open_audio (int frequency, int format, int channels, int chunksize);
typedef struct texture_type
{
SDL_Surface* sdl_surface;
- GLuint gl_texture;
+ unsigned gl_texture;
int w;
int h;
} texture_type;