#include "sound.h"
#include "screens.h"
#include "editor.h"
+#include "game.h"
+#include "tape.h"
#include "tools.h"
#include "files.h"
#include "joystick.h"
static void InitWindow(int, char **);
static void InitGfx(void);
static void LoadGfx(int, struct PictureFileInfo *);
+static void InitGadgets(void);
static void InitElementProperties(void);
void OpenAll(int argc, char *argv[])
InitSoundServer();
InitJoysticks();
InitRND(NEW_RANDOMIZE);
- InitLevelEditorGadgets();
signal(SIGINT, CloseAllAndExit);
signal(SIGTERM, CloseAllAndExit);
InitGfx();
InitElementProperties();
+ InitGadgets();
DrawMainMenu();
XSizeHints size_hints;
XWMHints wm_hints;
XClassHint class_hints;
- char *window_name = WINDOWTITLE_STRING;
- char *icon_name = WINDOWTITLE_STRING;
+ char *window_name = WINDOW_TITLE_STRING;
+ char *icon_name = WINDOW_TITLE_STRING;
long window_event_mask;
Atom proto_atom = None, delete_atom = None;
#endif
};
#endif
+#ifdef DEBUG
+#if 0
+ static struct PictureFileInfo test_pic1 =
+ {
+ "RocksFont2",
+ FALSE
+ };
+ static struct PictureFileInfo test_pic2 =
+ {
+ "mouse",
+ FALSE
+ };
+#endif
+#endif
+
static struct
{
int start;
{ GFX_SPIELER4_RIGHT, 4 },
{ GFX_SPIELER4_PUSH_LEFT, 4 },
{ GFX_SPIELER4_PUSH_RIGHT, 4 },
+ { GFX_SP_MURPHY, 1 },
+ { GFX_MURPHY_GO_LEFT, 3 },
+ { GFX_MURPHY_GO_RIGHT, 3 },
+ { GFX_MURPHY_SNAP_UP, 1 },
+ { GFX_MURPHY_SNAP_DOWN, 1 },
+ { GFX_MURPHY_SNAP_RIGHT, 1 },
+ { GFX_MURPHY_SNAP_LEFT, 1 },
+ { GFX_MURPHY_PUSH_RIGHT, 1 },
+ { GFX_MURPHY_PUSH_LEFT, 1 },
{ GFX_GEBLUBBER, 4 },
{ GFX_DYNAMIT, 7 },
{ GFX_DYNABOMB, 4 },
debug_print_timestamp(0, NULL); /* initialize timestamp function */
#endif
+#ifdef DEBUG
+#if 0
+ printf("Test: Loading RocksFont2.pcx ...\n");
+ LoadGfx(PIX_SMALLFONT,&test_pic1);
+ printf("Test: Done.\n");
+ printf("Test: Loading mouse.pcx ...\n");
+ LoadGfx(PIX_SMALLFONT,&test_pic2);
+ printf("Test: Done.\n");
+#endif
+#endif
+
+
+
LoadGfx(PIX_SMALLFONT,&pic[PIX_SMALLFONT]);
- DrawInitText(WINDOWTITLE_STRING,20,FC_YELLOW);
+ DrawInitText(WINDOW_TITLE_STRING,20,FC_YELLOW);
DrawInitText(COPYRIGHT_STRING,50,FC_RED);
#ifdef MSDOS
DrawInitText("MSDOS version done by Guido Schulz",210,FC_BLUE);
int src_x, src_y;
Pixmap src_pixmap;
+#if 0
if (graphic >= GFX_START_ROCKSSCREEN &&
graphic <= GFX_END_ROCKSSCREEN)
{
}
else
break;
+#else
+
+ int pixmap_nr;
+
+ getGraphicSource(graphic, &pixmap_nr, &src_x, &src_y);
+ src_pixmap = clipmask[pixmap_nr];
+
+#endif
tile_clipmask[tile] = XCreatePixmap(display, window, TILEX,TILEY, 1);
}
}
+void InitGadgets()
+{
+ CreateLevelEditorGadgets();
+ CreateGameButtons();
+ CreateTapeButtons();
+ CreateToolButtons();
+}
+
void InitElementProperties()
{
int i,j;