for(i=0; i<NUM_SOUNDS; i++)
{
-#ifdef MSDOS
- sprintf(sound_name[i], "%d", i + 1);
-#endif
-
-#ifdef USE_SDL_LIBRARY
- {
- char *str = getStringCopy(sound_name[i]);
- sprintf(str, "%d", i + 1);
- Sound[i].name = str;
- }
-#else
Sound[i].name = sound_name[i];
-#endif
+
if (!LoadSound(&Sound[i]))
{
sound_status = SOUND_OFF;
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
#define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_VERSION_STRING
-#define COPYRIGHT_STRING "Copyright ^1995-99 by " PROGRAM_AUTHOR_STRING
+#define COPYRIGHT_STRING "Copyright ^1995-2000 by " PROGRAM_AUTHOR_STRING
/* default name for empty highscore entry */
#define EMPTY_PLAYER_NAME "no name"
DrawTextFCentered(100, FC_GREEN,
"Credits:");
DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
- "DOS/Windows port of the game:");
+ "DOS port of the game:");
DrawTextFCentered(ystart + 1 * ystep, FC_RED,
"Guido Schulz");
DrawTextFCentered(ystart + 2 * ystep, FC_YELLOW,
DrawTextFCentered(ystart + 1 * ystep, FC_YELLOW,
"If you like it, send e-mail to:");
DrawTextFCentered(ystart + 2 * ystep, FC_RED,
- "aeglos@valinor.owl.de");
+ "info@artsoft.org");
DrawTextFCentered(ystart + 3 * ystep, FC_YELLOW,
"or SnailMail to:");
DrawTextFCentered(ystart + 4 * ystep + 0, FC_RED,
"Holger Schemel");
DrawTextFCentered(ystart + 4 * ystep + 20, FC_RED,
- "Oststrasse 11a");
+ "Detmolder Strasse 189");
DrawTextFCentered(ystart + 4 * ystep + 40, FC_RED,
"33604 Bielefeld");
DrawTextFCentered(ystart + 4 * ystep + 60, FC_RED,
NextEvent(&event);
HandleOtherEvents(&event);
+
+ Delay(10);
}
}
return;
{
struct SoundControl snd_ctrl = emptySoundControl;
-#ifdef USE_SDL_LIBRARY
- Mix_PlayChannel(-1, Sound[nr].mix_chunk, 0);
-
- /*
- Mix_Volume(-1, SDL_MIX_MAXVOLUME / 4);
- Mix_VolumeMusic(SDL_MIX_MAXVOLUME / 4);
- */
-
- return;
-#endif
-
if (sound_status==SOUND_OFF || !setup.sound)
return;
snd_ctrl.data_ptr = Sound[nr].data_ptr;
snd_ctrl.data_len = Sound[nr].data_len;
+#ifdef USE_SDL_LIBRARY
+
+ Mix_Volume(-1, SDL_MIX_MAXVOLUME / 4);
+ Mix_VolumeMusic(SDL_MIX_MAXVOLUME / 4);
+
+ Mix_PlayChannel(-1, Sound[nr].mix_chunk, (loop ? -1 : 0));
+
+#else
#ifndef MSDOS
if (write(sound_pipe[1], &snd_ctrl, sizeof(snd_ctrl))<0)
{
#else
sound_handler(snd_ctrl);
#endif
+#endif
}
void FadeSound(int nr)
{
struct SoundControl snd_ctrl = emptySoundControl;
-#ifdef USE_SDL_LIBRARY
- Mix_HaltMusic();
- return;
-#endif
-
if (sound_status==SOUND_OFF)
return;
snd_ctrl.stop_sound = TRUE;
}
+#ifdef USE_SDL_LIBRARY
+
+ if (SSND_FADING(method))
+ {
+ Mix_FadeOutChannel(-1, 1000);
+ Mix_FadeOutMusic(1000);
+ }
+ else
+ {
+ Mix_HaltChannel(-1);
+ Mix_HaltMusic();
+ }
+
+#else
#ifndef MSDOS
if (write(sound_pipe[1], &snd_ctrl, sizeof(snd_ctrl))<0)
{
#else
sound_handler(snd_ctrl);
#endif
+#endif
}
void FreeSounds(int num_sounds)