From: Holger Schemel Date: Mon, 5 May 2003 21:05:20 +0000 (+0200) Subject: rnd-20030505-1-src X-Git-Tag: 3.0.0^2~71 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7a7f090296fc140cb8d51bcc02759eb0d09ed8c8;p=rocksndiamonds.git rnd-20030505-1-src --- diff --git a/src/conftime.h b/src/conftime.h index d8967827..615e0f6b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-05-03 01:52]" +#define COMPILE_DATE_STRING "[2003-05-05 23:00]" diff --git a/src/editor.c b/src/editor.c index 4fc9d68f..71b89a5f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -900,67 +900,67 @@ static struct "slip down from certain flat walls","use EM style slipping behaviour" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(5), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(6), GADGET_ID_CUSTOM_INDESTRUCTIBLE, &custom_element_properties[EP_INDESTRUCTIBLE], "indestructible", "element cannot be destroyed" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(6), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(7), GADGET_ID_CUSTOM_DIGGABLE, &custom_element_properties[EP_DIGGABLE], "diggable", "element can be digged away" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(7), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(8), GADGET_ID_CUSTOM_COLLECTIBLE, &custom_element_properties[EP_COLLECTIBLE], "collectible", "element can be collected" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(8), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(9), GADGET_ID_CUSTOM_PUSHABLE, &custom_element_properties[EP_PUSHABLE], "pushable", "element can be pushed" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(9), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(10), GADGET_ID_CUSTOM_CAN_FALL, &custom_element_properties[EP_CAN_FALL], "can fall", "element can fall down" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(10), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(11), GADGET_ID_CUSTOM_CAN_SMASH, &custom_element_properties[EP_CAN_SMASH], "can smash", "element can smash other elements" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(11), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(12), GADGET_ID_CUSTOM_CAN_MOVE, &custom_element_properties[EP_CAN_MOVE], "can move", "element can move in some direction" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(12), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(13), GADGET_ID_CUSTOM_SLIPPERY, &custom_element_properties[EP_SLIPPERY], "slippery", "other elements can fall down from it" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(13), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(14), GADGET_ID_CUSTOM_WALKABLE_OVER, &custom_element_properties[EP_WALKABLE_OVER], "player can walk over", "player can walk over this element" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(14), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(15), GADGET_ID_CUSTOM_WALKABLE_INSIDE, &custom_element_properties[EP_WALKABLE_INSIDE], "player can walk inside", "player can walk inside this element" }, { - ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(15), + ED_SETTINGS_XPOS, ED_COUNTER_YPOS2(16), GADGET_ID_CUSTOM_WALKABLE_UNDER, &custom_element_properties[EP_WALKABLE_UNDER], "player can walk under", "player can walk under this element" @@ -2933,6 +2933,10 @@ static void CopyCustomElementPropertiesToGame(int element) for (i=0; i < NUM_CHANGE_EVENTS; i++) SET_CHANGE_EVENT(element, i, custom_element_change_events[i]); + + /* copy change events also to special level editor variable */ + i = properties_element - EL_CUSTOM_START; + custom_element_change = level.custom_element[i].change; } void DrawLevelEd() diff --git a/src/events.c b/src/events.c index bb662896..2ba138ff 100644 --- a/src/events.c +++ b/src/events.c @@ -58,7 +58,8 @@ int FilterMouseMotionEvents(const Event *event) } /* skip mouse motion events without pressed button outside level editor */ - if (button_status == MB_RELEASED && game_status != GAME_MODE_EDITOR) + if (button_status == MB_RELEASED && game_status != GAME_MODE_EDITOR && + game_status != GAME_MODE_PLAYING) return 0; else return 1; diff --git a/src/game.c b/src/game.c index 5a63c25e..666149c2 100644 --- a/src/game.c +++ b/src/game.c @@ -1850,7 +1850,7 @@ void Explode(int ex, int ey, int phase, int mode) if (phase == delay) DrawLevelFieldCrumbledSand(x, y); - if (IS_WALKABLE_OVER(Back[x][y])) + if (IS_WALKABLE_OVER(Back[x][y]) && Back[x][y] != EL_EMPTY) { DrawLevelElement(x, y, Back[x][y]); DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame); @@ -4553,7 +4553,7 @@ static void ChangeElement(int x, int y) { int element = Feld[x][y]; - if (IS_MOVING(x, y)) /* never change moving elements */ + if (IS_MOVING(x, y)) /* never change a running system :-) */ return; if (MovDelay[x][y] == 0) /* initialize element change */ diff --git a/src/libgame/x11.c b/src/libgame/x11.c index 278230de..38365464 100644 --- a/src/libgame/x11.c +++ b/src/libgame/x11.c @@ -198,12 +198,10 @@ static DrawWindow *X11InitWindow() /* Select event types wanted */ window_event_mask = ExposureMask | StructureNotifyMask | FocusChangeMask | - ButtonPressMask | ButtonReleaseMask | PointerMotionMask | + ButtonPressMask | ButtonReleaseMask | + PointerMotionMask | PointerMotionHintMask | KeyPressMask | KeyReleaseMask; - /* unwanted mouse motion events now get filtered out by filter function */ - /* window_event_mask |= PointerMotionHintMask; */ - XSelectInput(display, new_window->drawable, window_event_mask); #endif diff --git a/src/main.c b/src/main.c index 4f1b196d..a9387025 100644 --- a/src/main.c +++ b/src/main.c @@ -27,8 +27,8 @@ Bitmap *bitmap_db_field, *bitmap_db_door; #if 0 Pixmap tile_clipmask[NUM_TILES]; #endif -DrawBuffer *fieldbuffer; -DrawBuffer *drawto_field; +DrawBuffer *fieldbuffer; +DrawBuffer *drawto_field; int game_status = -1; boolean level_editor_test_game = FALSE; diff --git a/src/main.h b/src/main.h index 3f9f9177..bccf5762 100644 --- a/src/main.h +++ b/src/main.h @@ -279,56 +279,11 @@ #define IS_LOOP_SOUND(s) (sound_info[s].loop) -#if 0 - -/* Bitmaps with graphic file */ -#define PIX_BACK 0 -#define PIX_DOOR 1 -#define PIX_TOONS 2 -#define PIX_FONT_BIG 3 -#define PIX_FONT_SMALL 4 -#define PIX_FONT_MEDIUM 5 -#define PIX_FONT_EM 6 -/* Bitmaps without graphic file */ -#define PIX_DB_DOOR 7 -#define PIX_DB_FIELD 8 - -#define NUM_PICTURES 7 -#define NUM_BITMAPS 9 - -#else - -/* Bitmaps with graphic file */ -#define PIX_BACK 0 -#define PIX_ELEMENTS 1 -#define PIX_DOOR 2 -#define PIX_HEROES 3 -#define PIX_TOONS 4 -#define PIX_SP 5 -#define PIX_DC 6 -#define PIX_MORE 7 -#define PIX_FONT_BIG 8 -#define PIX_FONT_SMALL 9 -#define PIX_FONT_MEDIUM 10 -#define PIX_FONT_EM 11 -/* Bitmaps without graphic file */ -#define PIX_DB_DOOR 12 -#define PIX_DB_FIELD 13 - -#define NUM_PICTURES 12 -#define NUM_BITMAPS 14 - -#endif - /* boundaries of arrays etc. */ #define MAX_LEVEL_NAME_LEN 32 #define MAX_LEVEL_AUTHOR_LEN 32 #define MAX_TAPELEN (1000 * 50) /* max. time * framerate */ #define MAX_SCORE_ENTRIES 100 -#if 0 -#define MAX_ELEMENTS 700 /* 500 static + 200 runtime */ -#define MAX_GRAPHICS 1536 /* see below: NUM_TILES */ -#endif #define MAX_NUM_AMOEBA 100 /* values for elements with content */