1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-98 Artsoft Entertainment *
8 * phone: ++49 +521 290471 *
9 * email: aeglos@valinor.owl.de *
10 *----------------------------------------------------------*
12 ***********************************************************/
30 GC gc, clip_gc[NUM_PIXMAPS], tile_clip_gc;
31 Pixmap pix[NUM_PIXMAPS];
32 Pixmap clipmask[NUM_PIXMAPS], tile_clipmask[NUM_TILES];
34 #ifdef XPM_INCLUDE_FILE
35 XpmAttributes xpm_att[NUM_PICTURES];
38 Drawable drawto, drawto_field, backbuffer, fieldbuffer;
43 char *sound_device_name = SOUND_DEVICE;
44 int joystick_device = 0;
45 char *joystick_device_name[MAX_PLAYERS] =
55 char *program_name = NULL;
57 int game_status = MAINMENU;
58 int game_emulation = EMU_NONE;
59 boolean network_playing = FALSE;
60 int button_status = MB_NOT_PRESSED;
61 boolean motion_status = FALSE;
62 int key_joystick_mapping = 0;
63 int global_joystick_status = JOYSTICK_STATUS;
64 int joystick_status = JOYSTICK_STATUS;
65 int sound_status = SOUND_STATUS;
66 boolean sound_loops_allowed = FALSE;
68 boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
69 int redraw_x1 = 0, redraw_y1 = 0;
73 short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
74 short Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
75 short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
76 short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
77 short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
78 short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
79 short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
80 short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
81 short Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
82 boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
83 short JustHit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
84 short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
85 short AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
86 unsigned long Elementeigenschaften[MAX_ELEMENTS];
88 int level_nr, leveldir_nr, num_leveldirs;
89 int lev_fieldx,lev_fieldy, scroll_x,scroll_y;
91 int FX = SX, FY = SY, ScrollStepSize = TILEX/8;
92 int ScreenMovDir = MV_NO_MOVING, ScreenMovPos = 0;
94 int GameFrameDelay = GAME_FRAME_DELAY;
95 int FfwdFrameDelay = FFWD_FRAME_DELAY;
97 int BX1 = 0, BY1 = 0, BX2 = SCR_FIELDX-1, BY2 = SCR_FIELDY-1;
98 int ZX,ZY, ExitX,ExitY;
100 int FrameCounter, TimeFrames, TimeLeft;
101 int MampferNr, SiebAktiv;
103 boolean network_player_action_received = FALSE;
106 struct LevelDirInfo leveldir[MAX_LEVDIR_ENTRIES];
107 struct LevelInfo level;
108 struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
109 struct HiScore highscore[MAX_SCORE_ENTRIES];
110 struct SoundInfo Sound[NUM_SOUNDS];
111 struct RecordingInfo tape;
112 struct OptionInfo options;
113 struct SetupInfo setup;
114 struct SetupFileList *setup_list = NULL;
115 struct SetupFileList *level_setup_list = NULL;
117 /* data needed for playing sounds */
118 char *sound_name[NUM_SOUNDS] =
174 /* background music */
175 int background_loop[] =
185 int num_bg_loops = sizeof(background_loop)/sizeof(int);
187 int main(int argc, char *argv[])
189 program_name = (strrchr(argv[0],'/') ? strrchr(argv[0],'/') + 1 : argv[0]);
199 exit(0); /* to keep compilers happy */