X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=684cdb4d5155beb501d7f40bec251dd051e6418c;hb=6b83db8bee17d70c4e89dc3e3b703b7032aa5f27;hp=77c5fb65e88283a984432e09eaa2d26e62ee5acd;hpb=240269d614d12d0612cc0764589e6798378e2b8c;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 77c5fb65..684cdb4d 100644 --- a/src/init.c +++ b/src/init.c @@ -18,6 +18,8 @@ #include "sound.h" #include "screens.h" #include "editor.h" +#include "game.h" +#include "tape.h" #include "tools.h" #include "files.h" #include "joystick.h" @@ -48,6 +50,7 @@ static void InitSoundServer(void); 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[]) @@ -67,7 +70,6 @@ void OpenAll(int argc, char *argv[]) InitSoundServer(); InitJoysticks(); InitRND(NEW_RANDOMIZE); - InitLevelEditorGadgets(); signal(SIGINT, CloseAllAndExit); signal(SIGTERM, CloseAllAndExit); @@ -80,6 +82,7 @@ void OpenAll(int argc, char *argv[]) InitGfx(); InitElementProperties(); + InitGadgets(); DrawMainMenu(); @@ -525,6 +528,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 }, @@ -590,6 +602,7 @@ void InitGfx() int src_x, src_y; Pixmap src_pixmap; +#if 0 if (graphic >= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) { @@ -617,6 +630,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); @@ -791,6 +812,14 @@ void LoadGfx(int pos, struct PictureFileInfo *pic) } } +void InitGadgets() +{ + CreateLevelEditorGadgets(); + CreateGameButtons(); + CreateTapeButtons(); + CreateToolButtons(); +} + void InitElementProperties() { int i,j;