rnd-20030505-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 5 May 2003 21:05:20 +0000 (23:05 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:41:43 +0000 (10:41 +0200)
src/conftime.h
src/editor.c
src/events.c
src/game.c
src/libgame/x11.c
src/main.c
src/main.h

index d8967827cc7be4defd362ad27361d91e196b42e4..615e0f6bd439b8d899f8e90d2073b25d17aca16b 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-05-03 01:52]"
+#define COMPILE_DATE_STRING "[2003-05-05 23:00]"
index 4fc9d68fc503bbae10aab70ce277c72a5237243c..71b89a5f18f3c20602fcce2f20625bf1362bdde8 100644 (file)
@@ -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()
index bb6628964d216db9fb65949b80c36fe00bfb4c4a..2ba138ffd67661107ee06d30444a21ceb36f20b3 100644 (file)
@@ -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;
index 5a63c25ea5fc04c0c8c90389daa48c5023acacb2..666149c277e1194c35a72586529cc89dfe84ec67 100644 (file)
@@ -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 */
index 278230de2cc7ea417641c1d93981f93c9d7c2f4e..38365464e3d8617bf4d7c512f84e25cc9f46a0a1 100644 (file)
@@ -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
 
index 4f1b196dea116e6f95b9f656e82692f6ea33fba9..a9387025a59e25ce5eb0e6499bba08ec18fe5f69 100644 (file)
@@ -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;
index 3f9f9177b39dbb4c5401082ca1b71cc851cd4f4c..bccf5762a1f0640ad8cc4e3ebd8a033e07baffff 100644 (file)
 #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 */