1 /* 2000-08-10T18:03:54Z
3 * open X11 display and sound
16 char play[SAMPLE_MAX];
17 int play_x[SAMPLE_MAX];
18 int play_y[SAMPLE_MAX];
19 int play_element[SAMPLE_MAX];
21 struct GlobalInfo_EM global_em_info;
22 struct GameInfo_EM game_em;
29 Bitmap *emc_bitmaps[2];
31 SetBitmaps_EM(emc_bitmaps);
33 objBitmap = emc_bitmaps[0];
34 sprBitmap = emc_bitmaps[1];
39 void InitGfxBuffers_EM(void)
41 ReCreateBitmap(&screenBitmap, MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY);
43 global_em_info.screenbuffer = screenBitmap;
46 void em_open_all(void)
48 /* pre-calculate some data */
51 progname = "emerald mine";
54 Error(ERR_EXIT, "em_open_all(): open_all() failed");
56 /* after "open_all()", because we need the graphic bitmaps to be defined */
57 tab_generate_graphics_info_em();
62 void em_close_all(void)
66 /* ---------------------------------------------------------------------- */
71 void play_element_sound(int x, int y, int sample, int element)
73 PlayLevelSound_EM(x, y, element, sample);
76 void play_sound(int x, int y, int sample)
78 play_element_sound(x, y, sample, -1);
85 unsigned int InitEngineRandom_EM(int seed)
87 if (seed == NEW_RANDOMIZE)
89 int simple_rnd = GetSimpleRandom(1000);
92 for (i = 0; i < simple_rnd || RandomEM == NEW_RANDOMIZE; i++)
93 RandomEM = RandomEM * 129 + 1;
100 return (unsigned int) seed;