- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
- XDisplayName(arg_display), "failed to create graphics context",
- strerror(errno));
- return(1);
- }
-
- gcValues.graphics_exposures = False;
- scoreGC = XCreateGC(display, scorePixmap, GCGraphicsExposures, &gcValues);
- if (scoreGC == 0)
- {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
- XDisplayName(arg_display), "failed to create graphics context",
- strerror(errno));
- return(1);
- }
-
- gcValues.function =
- objmaskBitmap ? GXcopyInverted : sprmaskBitmap ? GXcopy : GXset;
- gcValues.graphics_exposures = False;
- spriteGC = XCreateGC(display, spriteBitmap, GCFunction | GCGraphicsExposures,
- &gcValues);
- if (spriteGC == 0)
- {
- fprintf(stderr, "%s: \"%s\": %s: %s\n", progname,
- XDisplayName(arg_display), "failed to create graphics context",
- strerror(errno));
- return(1);
- }
-
- /* ----------------------------------------------------------------- */
-
-#if defined(PLATFORM_LINUX) || defined(PLATFORM_BSD)
-
-#if 1
- /* disable sound */
- arg_silence = 1;
-#endif
-
- if (arg_silence == 0)
- {
- for (i = 0; i < SAMPLE_MAX; i++)
- {
- name[MAXNAME] = 0;
-
- if (arg_basedir)
- {
- snprintf(name, MAXNAME+2, "%s/%s/%s", arg_basedir, EM_SND_DIR,
- sound_names[i]);
- }
- else
- {
- snprintf(name, MAXNAME+2, "%s/%s", EM_SND_DIR, sound_names[i]);
- }
-
- if (name[MAXNAME]) snprintf_overflow("read sounds/ directory");
-
- if (read_sample(name, &sound_data[i], &sound_length[i]))
- return(1);
-
- {
- short *ptr, *stop;
- int mult = sound_volume[i] * 65536 / (100 * MIXER_MAX);
- stop = sound_data[i] + sound_length[i];
- for (ptr = sound_data[i]; ptr < stop; ptr++)
- *ptr = (*ptr * mult) / 65536;
- }
- }
-
- if (pipe(sound_pipe) == -1)