X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=89e8d438d85b3e7947b1eb3930b46f7fc9865f50;hb=2ae6ae8ed951e87fcba7c363705cd6ddea8de91c;hp=0977a92a6dbb97b4161369f7ccb0425dfa9cd903;hpb=4bca9bc5f299a9b287134b06e41b147f506792b4;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 0977a92a..89e8d438 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1,23 +1,23 @@ /*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * +* Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-98 Artsoft Entertainment * -* Holger Schemel * -* Oststrasse 11a * -* 33604 Bielefeld * -* phone: ++49 +521 290471 * -* email: aeglos@valinor.owl.de * +* (c) 1995-2000 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * *----------------------------------------------------------* -* editor.c * +* editor.c * ***********************************************************/ #include +#include "libgame/libgame.h" + #include "editor.h" #include "screens.h" #include "tools.h" -#include "misc.h" -#include "buttons.h" #include "files.h" #include "game.h" #include "tape.h" @@ -1305,7 +1305,7 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) static void CreateControlButtons() { - Bitmap gd_bitmap = pix[PIX_DOOR]; + Bitmap *gd_bitmap = pix[PIX_DOOR]; struct GadgetInfo *gi; unsigned long event_mask; int i; @@ -1394,6 +1394,7 @@ static void CreateControlButtons() GDI_ALT_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y2, GDI_ALT_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2, GDI_EVENT_MASK, event_mask, + GDI_CALLBACK_INFO, HandleEditorGadgetInfoText, GDI_CALLBACK_ACTION, HandleControlButtons, GDI_END); @@ -1451,6 +1452,7 @@ static void CreateControlButtons() GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1, GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2, GDI_EVENT_MASK, event_mask, + GDI_CALLBACK_INFO, HandleEditorGadgetInfoText, GDI_CALLBACK_ACTION, HandleControlButtons, GDI_END); @@ -1463,7 +1465,7 @@ static void CreateControlButtons() /* create buttons for element list */ for (i=0; ix + sx * MINI_TILEX, gi->y + sy * MINI_TILEY, el2gfx(new_element)); - DrawMiniGraphicExt(window, gc, + DrawMiniGraphicExt(window, gi->x + sx * MINI_TILEX, gi->y + sy * MINI_TILEY, el2gfx(new_element)); @@ -4048,6 +4057,9 @@ void HandleEditorGadgetInfoText(void *ptr) char infotext[MAX_INFOTEXT_LEN + 1]; char shortcut[MAX_INFOTEXT_LEN + 1]; + if (game_status != LEVELED) + return; + ClearEditorGadgetInfoText(); /* misuse this function to delete brush cursor, if needed */