- commited MatzeB's update patch
[supertux.git] / src / resources.cpp
index b02fe49..f4b6340 100644 (file)
@@ -15,8 +15,6 @@ texture_type img_cloud[2][4];
 
 texture_type img_box_full;
 texture_type img_box_empty;
-texture_type img_mints;
-texture_type img_coffee;
 texture_type img_red_glow;
 
 /* Load graphics/sounds shared between all levels: */
@@ -244,20 +242,12 @@ void loadshared()
   load_badguy_gfx();
 
   /* Upgrades: */
-
-  texture_load(&img_mints, datadir + "/images/shared/mints.png", USE_ALPHA);
-  texture_load(&img_coffee, datadir + "/images/shared/coffee.png", USE_ALPHA);
-
+  load_special_gfx();
 
   /* Weapons: */
-
-  texture_load(&img_bullet, datadir + "/images/shared/bullet.png", USE_ALPHA);
-
   texture_load(&img_red_glow, datadir + "/images/shared/red-glow.png",
                USE_ALPHA);
 
-
-
   /* Distros: */
   texture_load(&img_distro[0], datadir + "/images/shared/distro-0.png",
                USE_ALPHA);
@@ -277,12 +267,6 @@ void loadshared()
   texture_load(&tux_life, datadir + "/images/shared/tux-life.png",
                USE_ALPHA);
 
-  /* Herring: */
-
-  texture_load(&img_golden_herring, datadir + "/images/shared/golden-herring.png",
-               USE_ALPHA);
-
-
   /* Sound effects: */
 
   /* if (use_sound) // this will introduce SERIOUS bugs here ! because "load_sound"
@@ -305,6 +289,8 @@ void unloadshared(void)
 {
   int i;
 
+  free_special_gfx();
+
   for (i = 0; i < 3; i++)
     {
       texture_free(&tux_right[i]);
@@ -345,9 +331,6 @@ void unloadshared(void)
   for (i = 0; i < 2; i++)
     texture_free(&img_flag[i]);
 
-  texture_free(&img_mints);
-  texture_free(&img_coffee);
-
   for (i = 0; i < 4; i++)
     {
       texture_free(&img_distro[i]);
@@ -355,8 +338,6 @@ void unloadshared(void)
       texture_free(&img_cloud[1][i]);
     }
 
-  texture_free(&img_golden_herring);
-
   for (i = 0; i < NUM_SOUNDS; i++)
     free_chunk(sounds[i]);