X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Finit.c;h=7c62ad953e0e56ee95b5c0b3ac99751220b38208;hp=b92780b6e32130eee8eb92defdc08e2b35c9b0ff;hb=3ae3dff29ac1a6022b1e5af414ba2c99391148c8;hpb=cc17a49a1a63c1df0e55a5afd510698e21b71dfe diff --git a/src/init.c b/src/init.c index b92780b6..7c62ad95 100644 --- a/src/init.c +++ b/src/init.c @@ -81,8 +81,8 @@ void OpenAll(int argc, char *argv[]) XFlush(display); InitGfx(); - InitGadgets(); InitElementProperties(); + InitGadgets(); DrawMainMenu(); @@ -497,6 +497,21 @@ void InitGfx() }; #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; @@ -528,6 +543,15 @@ void InitGfx() { 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 }, @@ -542,6 +566,19 @@ void InitGfx() 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(WINDOW_TITLE_STRING,20,FC_YELLOW); DrawInitText(COPYRIGHT_STRING,50,FC_RED); @@ -593,6 +630,7 @@ void InitGfx() int src_x, src_y; Pixmap src_pixmap; +#if 0 if (graphic >= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) { @@ -620,6 +658,14 @@ void InitGfx() } 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); @@ -799,6 +845,7 @@ void InitGadgets() CreateLevelEditorGadgets(); CreateGameButtons(); CreateTapeButtons(); + CreateToolButtons(); } void InitElementProperties()