rnd-19990130-2
authorHolger Schemel <info@artsoft.org>
Sat, 30 Jan 1999 22:12:34 +0000 (23:12 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:33:24 +0000 (10:33 +0200)
src/editor.c
src/game.c
src/main.c
src/main.h
src/tools.c

index 82e049596d20baa54ed2d5c4eb2e36bcef659d3a..23f12d071424b82cc6c5ebf0ac9100ed114d9938 100644 (file)
@@ -844,7 +844,7 @@ int editor_element[] =
   EL_INVISIBLE_STEEL,
   EL_UNSICHTBAR,
   EL_SPEED_PILL,
-  EL_LEERRAUM,
+  EL_BLACK_ORB,
 
   EL_CHAR_A + ('S' - 'A'),
   EL_CHAR_A + ('O' - 'A'),
@@ -948,80 +948,85 @@ int editor_element[] =
   EL_LEERRAUM,
   EL_LEERRAUM,
 
-  EL_CHAR_AUSRUF,
-  EL_CHAR_ZOLL,
-  EL_CHAR_DOLLAR,
-  EL_CHAR_PROZ,
+  EL_CHAR(' '),
+  EL_CHAR('!'),
+  EL_CHAR('"'),
+  EL_CHAR('#'),
+
+  EL_CHAR('$'),
+  EL_CHAR('%'),
+  EL_CHAR('&'),
+  EL_CHAR('\''),
+
+  EL_CHAR('('),
+  EL_CHAR(')'),
+  EL_CHAR('*'),
+  EL_CHAR('+'),
+
+  EL_CHAR(','),
+  EL_CHAR('-'),
+  EL_CHAR('.'),
+  EL_CHAR('/'),
+
+  EL_CHAR('0'),
+  EL_CHAR('1'),
+  EL_CHAR('2'),
+  EL_CHAR('3'),
+
+  EL_CHAR('4'),
+  EL_CHAR('5'),
+  EL_CHAR('6'),
+  EL_CHAR('7'),
+
+  EL_CHAR('8'),
+  EL_CHAR('9'),
+  EL_CHAR(':'),
+  EL_CHAR(';'),
+
+  EL_CHAR('<'),
+  EL_CHAR('='),
+  EL_CHAR('>'),
+  EL_CHAR('?'),
+
+  EL_CHAR('@'),
+  EL_CHAR('A'),
+  EL_CHAR('B'),
+  EL_CHAR('C'),
+
+  EL_CHAR('D'),
+  EL_CHAR('E'),
+  EL_CHAR('F'),
+  EL_CHAR('G'),
 
-  EL_CHAR_APOSTR,
-  EL_CHAR_KLAMM1,
-  EL_CHAR_KLAMM2,
-  EL_CHAR_PLUS,
+  EL_CHAR('H'),
+  EL_CHAR('I'),
+  EL_CHAR('J'),
+  EL_CHAR('K'),
 
-  EL_CHAR_KOMMA,
-  EL_CHAR_MINUS,
-  EL_CHAR_PUNKT,
-  EL_CHAR_SLASH,
-
-  EL_CHAR_0 + 0,
-  EL_CHAR_0 + 1,
-  EL_CHAR_0 + 2,
-  EL_CHAR_0 + 3,
-
-  EL_CHAR_0 + 4,
-  EL_CHAR_0 + 5,
-  EL_CHAR_0 + 6,
-  EL_CHAR_0 + 7,
-
-  EL_CHAR_0 + 8,
-  EL_CHAR_0 + 9,
-  EL_CHAR_DOPPEL,
-  EL_CHAR_SEMIKL,
-
-  EL_CHAR_LT,
-  EL_CHAR_GLEICH,
-  EL_CHAR_GT,
-  EL_CHAR_FRAGE,
-
-  EL_CHAR_AT,
-  EL_CHAR_A + 0,
-  EL_CHAR_A + 1,
-  EL_CHAR_A + 2,
-
-  EL_CHAR_A + 3,
-  EL_CHAR_A + 4,
-  EL_CHAR_A + 5,
-  EL_CHAR_A + 6,
-
-  EL_CHAR_A + 7,
-  EL_CHAR_A + 8,
-  EL_CHAR_A + 9,
-  EL_CHAR_A + 10,
-
-  EL_CHAR_A + 11,
-  EL_CHAR_A + 12,
-  EL_CHAR_A + 13,
-  EL_CHAR_A + 14,
-
-  EL_CHAR_A + 15,
-  EL_CHAR_A + 16,
-  EL_CHAR_A + 17,
-  EL_CHAR_A + 18,
-
-  EL_CHAR_A + 19,
-  EL_CHAR_A + 20,
-  EL_CHAR_A + 21,
-  EL_CHAR_A + 22,
-
-  EL_CHAR_A + 23,
-  EL_CHAR_A + 24,
-  EL_CHAR_A + 25,
-  EL_CHAR_AE,
-
-  EL_CHAR_OE,
-  EL_CHAR_UE,
-  EL_CHAR_COPY,
-  EL_LEERRAUM
+  EL_CHAR('L'),
+  EL_CHAR('M'),
+  EL_CHAR('N'),
+  EL_CHAR('O'),
+
+  EL_CHAR('P'),
+  EL_CHAR('Q'),
+  EL_CHAR('R'),
+  EL_CHAR('S'),
+
+  EL_CHAR('T'),
+  EL_CHAR('U'),
+  EL_CHAR('V'),
+  EL_CHAR('W'),
+
+  EL_CHAR('X'),
+  EL_CHAR('Y'),
+  EL_CHAR('Z'),
+  EL_CHAR('Ä'),
+
+  EL_CHAR('Ö'),
+  EL_CHAR('Ü'),
+  EL_CHAR('^'),
+  EL_CHAR(' ')
 };
 int elements_in_list = sizeof(editor_element)/sizeof(int);
 
@@ -3284,10 +3289,17 @@ static void HandleDrawingAreas(struct GadgetInfo *gi)
       break;
 
     case GADGET_ID_PICK_ELEMENT:
+
+      /*
       if (button_press_event)
        PickDrawingElement(button, Feld[lx][ly]);
+      */
+
       if (button_release_event)
        ClickOnGadget(level_editor_gadget[last_drawing_function], MB_LEFT);
+      else
+       PickDrawingElement(button, Feld[lx][ly]);
+
       break;
 
     default:
@@ -3797,6 +3809,9 @@ static void HandleControlButtons(struct GadgetInfo *gi)
          if (edit_mode == ED_MODE_PROPERTIES)
            DrawPropertiesWindow();
        }
+
+       if (drawing_function == GADGET_ID_PICK_ELEMENT)
+         ClickOnGadget(level_editor_gadget[last_drawing_function], MB_LEFT);
       }
 #ifdef DEBUG
       else if (gi->event.type == GD_EVENT_PRESSED)
@@ -4001,11 +4016,17 @@ static void HandleDrawingAreaInfo(struct GadgetInfo *gi)
            break;
        }
 
-       DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
-                 "%s: %d, %d", infotext,
-                 ABS(lx - start_lx) + 1,
-                 ABS(ly - start_ly) + 1);
+       if (drawing_function == GADGET_ID_PICK_ELEMENT)
+         DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+                   "%s: %d, %d", infotext, lx, ly);
+       else
+         DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+                   "%s: %d, %d", infotext,
+                   ABS(lx - start_lx) + 1, ABS(ly - start_ly) + 1);
       }
+      else if (drawing_function == GADGET_ID_PICK_ELEMENT)
+       DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
+                 "%s", element_info[Feld[lx][ly]]);
       else
        DrawTextF(INFOTEXT_XPOS - SX, INFOTEXT_YPOS - SY, FC_YELLOW,
                  "Level position: %d, %d", lx, ly);
index 7f575ebb983b2c7eddbbfc1621da26353819becc..52255c85d375483a062323e8a14af45c270c2161 100644 (file)
@@ -1075,6 +1075,7 @@ void Explode(int ex, int ey, int phase, int mode)
   int num_phase = 9, delay = 2;
   int last_phase = num_phase * delay;
   int half_phase = (num_phase / 2) * delay;
+  int first_phase_after_start = EX_PHASE_START + 1;
 
   if (phase == EX_PHASE_START)         /* initialize 'Store[][]' field */
   {
@@ -1189,9 +1190,20 @@ void Explode(int ex, int ey, int phase, int mode)
   x = ex;
   y = ey;
 
-  Frame[x][y] = (phase<last_phase ? phase+1 : 0);
+  Frame[x][y] = (phase < last_phase ? phase + 1 : 0);
 
-  if (phase == half_phase)
+  if (phase == first_phase_after_start)
+  {
+    int element = Store2[x][y];
+
+    if (element == EL_BLACK_ORB)
+    {
+      Feld[x][y] = Store2[x][y];
+      Store2[x][y] = 0;
+      Bang(x, y);
+    }
+  }
+  else if (phase == half_phase)
   {
     int element = Store2[x][y];
 
index 565394fc72dc071c39105f94bd52c318c146c9d1..161f384350a2992c7ff72e6958ab6f1ed7e22588 100644 (file)
@@ -319,86 +319,86 @@ char *element_info[] =
   "pig",
   "fire breathing dragon",
   "unknown",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
-  "letter",
+  "letter ' '",
+  "letter '!'",
+  "letter '\"'",
+  "letter '#'",
+  "letter '$'",
+  "letter '%'",
+  "letter '&'",
+  "letter '''",
+  "letter '('",
+  "letter ')'",
+  "letter '*'",
+  "letter '+'",
+  "letter ','",
+  "letter '-'",
+  "letter '.'",
+  "letter '/'",
+  "letter '0'",
+  "letter '1'",
+  "letter '2'",
+  "letter '3'",
+  "letter '4'",
+  "letter '5'",
+  "letter '6'",
+  "letter '7'",
+  "letter '8'",
+  "letter '9'",
+  "letter ':'",
+  "letter ';'",
+  "letter '<'",
+  "letter '='",
+  "letter '>'",
+  "letter '?'",
+  "letter '@'",
+  "letter 'A'",
+  "letter 'B'",
+  "letter 'C'",
+  "letter 'D'",
+  "letter 'E'",
+  "letter 'F'",
+  "letter 'G'",
+  "letter 'H'",
+  "letter 'I'",
+  "letter 'J'",
+  "letter 'K'",
+  "letter 'L'",
+  "letter 'M'",
+  "letter 'N'",
+  "letter 'O'",
+  "letter 'P'",
+  "letter 'Q'",
+  "letter 'R'",
+  "letter 'S'",
+  "letter 'T'",
+  "letter 'U'",
+  "letter 'V'",
+  "letter 'W'",
+  "letter 'X'",
+  "letter 'Y'",
+  "letter 'Z'",
+  "letter 'Ä'",
+  "letter 'Ö'",
+  "letter 'Ü'",
+  "letter '^'",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
+  "letter ''",
   "growing wall (horizontally)",
   "growing wall (vertically)",
   "growing wall (all directions)",
index 8f979b491fd74bcb32d00198a05a7f21b443a69e..8e5a427ce45b3014710ea987c46d4180ce8385c1 100644 (file)
@@ -664,7 +664,7 @@ extern char         *element_info[];
 
 #define EL_AUSGANG_AUF         107
 
-#define EL_UNUSED_108          108
+#define EL_BLACK_ORB           108
 
 #define EL_AMOEBA2DIAM         109
 #define EL_MAULWURF            110
@@ -683,11 +683,14 @@ extern char               *element_info[];
 #define EL_CHAR_ASCII0         (EL_CHAR_START-32)
 #define EL_CHAR_AUSRUF         (EL_CHAR_ASCII0+33)
 #define EL_CHAR_ZOLL           (EL_CHAR_ASCII0+34)
+#define EL_CHAR_RAUTE          (EL_CHAR_ASCII0+35)
 #define EL_CHAR_DOLLAR         (EL_CHAR_ASCII0+36)
 #define EL_CHAR_PROZ           (EL_CHAR_ASCII0+37)
+#define EL_CHAR_AMPERSAND      (EL_CHAR_ASCII0+38)
 #define EL_CHAR_APOSTR         (EL_CHAR_ASCII0+39)
 #define EL_CHAR_KLAMM1         (EL_CHAR_ASCII0+40)
 #define EL_CHAR_KLAMM2         (EL_CHAR_ASCII0+41)
+#define EL_CHAR_MULT           (EL_CHAR_ASCII0+42)
 #define EL_CHAR_PLUS           (EL_CHAR_ASCII0+43)
 #define EL_CHAR_KOMMA          (EL_CHAR_ASCII0+44)
 #define EL_CHAR_MINUS          (EL_CHAR_ASCII0+45)
@@ -710,7 +713,10 @@ extern char                *element_info[];
 #define EL_CHAR_COPY           (EL_CHAR_ASCII0+94)
 #define EL_CHAR_END            (EL_CHAR_START+79)
 
-#define EL_CHAR(x)             (EL_CHAR_A + x - 'A')
+#define EL_CHAR(x)             ((x) == 'Ä' ? EL_CHAR_AE : \
+                                (x) == 'Ö' ? EL_CHAR_OE : \
+                                (x) == 'Ü' ? EL_CHAR_UE : \
+                                EL_CHAR_A + (x) - 'A')
 
 #define EL_MAUER_X             200
 #define EL_MAUER_Y             201
@@ -935,6 +941,7 @@ extern char         *element_info[];
 #define GFX_EDELSTEIN_ROT      152
 #define GFX_EDELSTEIN_LILA     154
 #define GFX_DYNABOMB_XL                156
+#define GFX_BLACK_ORB          157
 #define GFX_SPEED_PILL         158
 #define GFX_SONDE              159
 /* Zeile 10 (160) */
index 2a8b6f17b3d901eec7188a60715bd69d7f9c140c..0d1f8b910314491db687c2059f612c7dc9e81e57 100644 (file)
@@ -2723,6 +2723,7 @@ int el2gfx(int element)
     case EL_SP_TERMINAL_ACTIVE:        return GFX_SP_TERMINAL;
     case EL_SP_BUG_ACTIVE:     return GFX_SP_BUG_ACTIVE;
     case EL_INVISIBLE_STEEL:   return GFX_INVISIBLE_STEEL;
+    case EL_BLACK_ORB:         return GFX_BLACK_ORB;
 
     default:
     {