14 Surface* img_cloud[2][4];
16 Surface* img_box_full;
17 Surface* img_box_empty;
18 Surface* img_red_glow;
20 /* Load graphics/sounds shared between all levels: */
26 smalltux_stand_left = new Surface(datadir + "/images/shared/smalltux-left-6.png", USE_ALPHA);
27 smalltux_stand_right = new Surface(datadir + "/images/shared/smalltux-right-6.png", USE_ALPHA);
29 smalltux_jump_left = new Surface(datadir + "/images/shared/smalltux-jump-left.png", USE_ALPHA);
30 smalltux_jump_right = new Surface(datadir + "/images/shared/smalltux-jump-right.png", USE_ALPHA);
33 tux_right[0] = new Surface(datadir + "/images/shared/smalltux-right-1.png", USE_ALPHA);
34 tux_right[1] = new Surface(datadir + "/images/shared/smalltux-right-2.png", USE_ALPHA);
35 tux_right[2] = new Surface(datadir + "/images/shared/smalltux-right-3.png", USE_ALPHA);
36 tux_right[3] = new Surface(datadir + "/images/shared/smalltux-right-4.png", USE_ALPHA);
37 tux_right[4] = new Surface(datadir + "/images/shared/smalltux-right-5.png", USE_ALPHA);
38 tux_right[5] = new Surface(datadir + "/images/shared/smalltux-right-6.png", USE_ALPHA);
39 tux_right[6] = new Surface(datadir + "/images/shared/smalltux-right-7.png", USE_ALPHA);
40 tux_right[7] = new Surface(datadir + "/images/shared/smalltux-right-8.png", USE_ALPHA);
43 tux_left[0] = new Surface(datadir + "/images/shared/smalltux-left-1.png", USE_ALPHA);
44 tux_left[1] = new Surface(datadir + "/images/shared/smalltux-left-2.png", USE_ALPHA);
45 tux_left[2] = new Surface(datadir + "/images/shared/smalltux-left-3.png", USE_ALPHA);
46 tux_left[3] = new Surface(datadir + "/images/shared/smalltux-left-4.png", USE_ALPHA);
47 tux_left[4] = new Surface(datadir + "/images/shared/smalltux-left-5.png", USE_ALPHA);
48 tux_left[5] = new Surface(datadir + "/images/shared/smalltux-left-6.png", USE_ALPHA);
49 tux_left[6] = new Surface(datadir + "/images/shared/smalltux-left-7.png", USE_ALPHA);
50 tux_left[7] = new Surface(datadir + "/images/shared/smalltux-left-8.png", USE_ALPHA);
52 firetux_right[0] = new Surface(datadir + "/images/shared/firetux-right-0.png", USE_ALPHA);
53 firetux_right[1] = new Surface(datadir + "/images/shared/firetux-right-1.png", USE_ALPHA);
54 firetux_right[2] = new Surface(datadir + "/images/shared/firetux-right-2.png", USE_ALPHA);
56 firetux_left[0] = new Surface(datadir + "/images/shared/firetux-left-0.png", USE_ALPHA);
57 firetux_left[1] = new Surface(datadir + "/images/shared/firetux-left-1.png", USE_ALPHA);
58 firetux_left[2] = new Surface(datadir + "/images/shared/firetux-left-2.png", USE_ALPHA);
61 cape_right[0] = new Surface(datadir + "/images/shared/cape-right-0.png",
64 cape_right[1] = new Surface(datadir + "/images/shared/cape-right-1.png",
67 cape_left[0] = new Surface(datadir + "/images/shared/cape-left-0.png",
70 cape_left[1] = new Surface(datadir + "/images/shared/cape-left-1.png",
73 bigtux_right[0] = new Surface(datadir + "/images/shared/bigtux-right-0.png",
76 bigtux_right[1] = new Surface(datadir + "/images/shared/bigtux-right-1.png",
79 bigtux_right[2] = new Surface(datadir + "/images/shared/bigtux-right-2.png",
82 bigtux_right_jump = new Surface(datadir + "/images/shared/bigtux-right-jump.png", USE_ALPHA);
84 bigtux_left[0] = new Surface(datadir + "/images/shared/bigtux-left-0.png",
87 bigtux_left[1] = new Surface(datadir + "/images/shared/bigtux-left-1.png",
90 bigtux_left[2] = new Surface(datadir + "/images/shared/bigtux-left-2.png",
93 bigtux_left_jump = new Surface(datadir + "/images/shared/bigtux-left-jump.png", USE_ALPHA);
95 bigcape_right[0] = new Surface(datadir + "/images/shared/bigcape-right-0.png",
98 bigcape_right[1] = new Surface(datadir + "/images/shared/bigcape-right-1.png",
101 bigcape_left[0] = new Surface(datadir + "/images/shared/bigcape-left-0.png",
104 bigcape_left[1] = new Surface(datadir + "/images/shared/bigcape-left-1.png",
107 bigfiretux_right[0] = new Surface(datadir + "/images/shared/bigfiretux-right-0.png",
110 bigfiretux_right[1] = new Surface(datadir + "/images/shared/bigfiretux-right-1.png",
113 bigfiretux_right[2] = new Surface(datadir + "/images/shared/bigfiretux-right-2.png",
116 bigfiretux_right_jump = new Surface(datadir + "/images/shared/bigfiretux-right-jump.png", USE_ALPHA);
118 bigfiretux_left[0] = new Surface(datadir + "/images/shared/bigfiretux-left-0.png",
121 bigfiretux_left[1] = new Surface(datadir + "/images/shared/bigfiretux-left-1.png",
124 bigfiretux_left[2] = new Surface(datadir + "/images/shared/bigfiretux-left-2.png",
127 bigfiretux_left_jump = new Surface(datadir + "/images/shared/bigfiretux-left-jump.png", USE_ALPHA);
129 bigcape_right[0] = new Surface(datadir + "/images/shared/bigcape-right-0.png",
132 bigcape_right[1] = new Surface(datadir + "/images/shared/bigcape-right-1.png",
135 bigcape_left[0] = new Surface(datadir + "/images/shared/bigcape-left-0.png",
138 bigcape_left[1] = new Surface(datadir + "/images/shared/bigcape-left-1.png",
142 ducktux_right = new Surface(datadir +
143 "/images/shared/ducktux-right.png",
146 ducktux_left = new Surface(datadir +
147 "/images/shared/ducktux-left.png",
150 skidtux_right = new Surface(datadir +
151 "/images/shared/skidtux-right.png",
154 skidtux_left = new Surface(datadir +
155 "/images/shared/skidtux-left.png",
158 duckfiretux_right = new Surface(datadir +
159 "/images/shared/duckfiretux-right.png",
162 duckfiretux_left = new Surface(datadir +
163 "/images/shared/duckfiretux-left.png",
166 skidfiretux_right = new Surface(datadir +
167 "/images/shared/skidfiretux-right.png",
170 skidfiretux_left = new Surface(datadir +
171 "/images/shared/skidfiretux-left.png",
177 img_box_full = new Surface(datadir + "/images/shared/box-full.png",
179 img_box_empty = new Surface(datadir + "/images/shared/box-empty.png",
186 img_water = new Surface(datadir + "/images/shared/water.png", IGNORE_ALPHA);
188 img_waves[0] = new Surface(datadir + "/images/shared/waves-0.png",
191 img_waves[1] = new Surface(datadir + "/images/shared/waves-1.png",
194 img_waves[2] = new Surface(datadir + "/images/shared/waves-2.png",
200 img_pole = new Surface(datadir + "/images/shared/pole.png", USE_ALPHA);
201 img_poletop = new Surface(datadir + "/images/shared/poletop.png",
207 img_flag[0] = new Surface(datadir + "/images/shared/flag-0.png",
209 img_flag[1] = new Surface(datadir + "/images/shared/flag-1.png",
215 img_cloud[0][0] = new Surface(datadir + "/images/shared/cloud-00.png",
218 img_cloud[0][1] = new Surface(datadir + "/images/shared/cloud-01.png",
221 img_cloud[0][2] = new Surface(datadir + "/images/shared/cloud-02.png",
224 img_cloud[0][3] = new Surface(datadir + "/images/shared/cloud-03.png",
228 img_cloud[1][0] = new Surface(datadir + "/images/shared/cloud-10.png",
231 img_cloud[1][1] = new Surface(datadir + "/images/shared/cloud-11.png",
234 img_cloud[1][2] = new Surface(datadir + "/images/shared/cloud-12.png",
237 img_cloud[1][3] = new Surface(datadir + "/images/shared/cloud-13.png",
248 img_red_glow = new Surface(datadir + "/images/shared/red-glow.png",
252 img_distro[0] = new Surface(datadir + "/images/shared/distro-0.png",
255 img_distro[1] = new Surface(datadir + "/images/shared/distro-1.png",
258 img_distro[2] = new Surface(datadir + "/images/shared/distro-2.png",
261 img_distro[3] = new Surface(datadir + "/images/shared/distro-3.png",
267 tux_life = new Surface(datadir + "/images/shared/tux-life.png",
272 /* if (use_sound) // this will introduce SERIOUS bugs here ! because "load_sound"
273 // initialize sounds[i] with the correct pointer's value:
274 // NULL or something else. And it will be dangerous to
275 // play with not-initialized pointers.
276 // This is also true with if (use_music)
277 Send a mail to me: neoneurone@users.sf.net, if you have another opinion. :)
279 for (i = 0; i < NUM_SOUNDS; i++)
280 sounds[i] = load_sound(datadir + soundfilenames[i]);
283 herring_song = load_song(datadir + "/music/SALCON.MOD");
287 /* Free shared data: */
288 void unloadshared(void)
294 for (i = 0; i < 3; i++)
298 delete bigtux_right[i];
299 delete bigtux_left[i];
302 delete bigtux_right_jump;
303 delete bigtux_left_jump;
305 for (i = 0; i < 2; i++)
307 delete cape_right[i];
309 delete bigcape_right[i];
310 delete bigcape_left[i];
314 delete ducktux_right;
317 delete skidtux_right;
322 delete img_box_empty;
325 for (i = 0; i < 3; i++)
331 for (i = 0; i < 2; i++)
334 for (i = 0; i < 4; i++)
336 delete img_distro[i];
337 delete img_cloud[0][i];
338 delete img_cloud[1][i];
341 for (i = 0; i < NUM_SOUNDS; i++)
342 free_chunk(sounds[i]);
344 /* free the herring song */
345 free_music( herring_song );