From: Holger Schemel Date: Sat, 30 Jan 1999 22:12:34 +0000 (+0100) Subject: rnd-19990130-2 X-Git-Tag: 1.3.0^2~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0d2143d53f76e2780260996fae2b9f3ce4f29913;p=rocksndiamonds.git rnd-19990130-2 --- diff --git a/src/editor.c b/src/editor.c index 82e04959..23f12d07 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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); diff --git a/src/game.c b/src/game.c index 7f575ebb..52255c85 100644 --- a/src/game.c +++ b/src/game.c @@ -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'", + "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)", diff --git a/src/main.h b/src/main.h index 8f979b49..8e5a427c 100644 --- a/src/main.h +++ b/src/main.h @@ -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) */ diff --git a/src/tools.c b/src/tools.c index 2a8b6f17..0d1f8b91 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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: {