X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=b7b739f5145bfab4cc27355d7a8a7f20c6e850a4;hb=9d23eac9de03f91cf0ac094786ab30cdd589ac49;hp=7931d89665ee533c75f9b6346322840ac4a597c9;hpb=fc75248be965e2d68ebc16af009fefb30e9ac370;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 7931d896..b7b739f5 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // editor.c // ============================================================================ @@ -3856,7 +3856,7 @@ static int last_drawing_function = GADGET_ID_SINGLE_ITEMS; static boolean draw_with_brush = FALSE; static int properties_element = 0; -static short FieldBackup[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +static short TileBackup[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; static short UndoBuffer[NUM_UNDO_STEPS][MAX_LEV_FIELDX][MAX_LEV_FIELDY]; static short IntelliDrawBuffer[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; static int undo_buffer_position = 0; @@ -4056,13 +4056,13 @@ static int editor_el_emerald_mine_club[] = EL_EMC_MAGIC_BALL, EL_EMC_MAGIC_BALL_SWITCH, - EL_SPRING, - EL_EMC_SPRING_BUMPER, - EL_EMC_LENSES, EL_EMC_MAGNIFIER, - EL_EMPTY, - EL_EMPTY, + + EL_SPRING_LEFT, + EL_SPRING, + EL_SPRING_RIGHT, + EL_EMC_SPRING_BUMPER, EL_BALLOON, EL_YAMYAM_UP, @@ -5556,8 +5556,8 @@ static void InitDynamicEditorElementList(int **elements, int *num_elements) // find all elements used in current level for (y = 0; y < lev_fieldy; y++) for (x = 0; x < lev_fieldx; x++) - if (Feld[x][y] < NUM_FILE_ELEMENTS) // should always be true - element_found[Feld[x][y]] = TRUE; + if (Tile[x][y] < NUM_FILE_ELEMENTS) // should always be true + element_found[Tile[x][y]] = TRUE; *num_elements = 0; @@ -5749,10 +5749,10 @@ static void ReinitializeElementList(void) int element = (*editor_elements_info[i].element_list)[j]; if (element >= NUM_FILE_ELEMENTS) - Error(ERR_WARN, "editor element %d is runtime element", element); + Warn("editor element %d is runtime element", element); if (strEqual(getElementInfoText(element), INFOTEXT_UNKNOWN_ELEMENT)) - Error(ERR_WARN, "no element description text for element %d", element); + Warn("no element description text for element %d", element); } } @@ -6218,7 +6218,7 @@ static void CreateControlButtons(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -6284,7 +6284,7 @@ static void CreateControlButtons(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -6337,7 +6337,7 @@ static void CreateControlButtons(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -6431,7 +6431,7 @@ static void CreateCounterButtons(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -6493,7 +6493,7 @@ static void CreateCounterButtons(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -6551,7 +6551,7 @@ static void CreateDrawingAreas(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -6624,7 +6624,7 @@ static void CreateTextInputGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -6673,7 +6673,7 @@ static void CreateTextAreaGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -6752,7 +6752,7 @@ static void CreateSelectboxGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -6836,7 +6836,7 @@ static void CreateTextbuttonGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -6892,7 +6892,7 @@ static void CreateGraphicbuttonGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -7007,7 +7007,7 @@ static void CreateScrollbarGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; } @@ -7067,7 +7067,7 @@ static void CreateCheckbuttonGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -7132,7 +7132,7 @@ static void CreateRadiobuttonGadgets(void) GDI_END); if (gi == NULL) - Error(ERR_EXIT, "cannot create gadget"); + Fail("cannot create gadget"); level_editor_gadget[id] = gi; right_gadget_border[id] = @@ -7151,7 +7151,7 @@ void CreateLevelEditorGadgets(void) num_editor_gadgets = NUM_EDITOR_GADGETS; - // printf("::: allocating %d gadgets ...\n", num_editor_gadgets); + // Debug("editor", "allocating %d gadgets ...\n", num_editor_gadgets); level_editor_gadget = checked_calloc(num_editor_gadgets * sizeof(struct GadgetInfo *)); @@ -7189,7 +7189,7 @@ void FreeLevelEditorGadgets(void) { int i; - // printf("::: freeing %d gadgets ...\n", num_editor_gadgets); + // Debug("editor", "freeing %d gadgets ...\n", num_editor_gadgets); for (i = 0; i < num_editor_gadgets; i++) { @@ -7694,7 +7694,7 @@ static boolean LevelChanged(void) for (y = 0; y < lev_fieldy; y++) for (x = 0; x < lev_fieldx; x++) - if (Feld[x][y] != level.field[x][y]) + if (Tile[x][y] != level.field[x][y]) field_changed = TRUE; return (level.changed || field_changed); @@ -7959,8 +7959,8 @@ static void replace_custom_element_in_playfield(int element_from, for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - if (Feld[x][y] == element_from) - Feld[x][y] = element_to; + if (Tile[x][y] == element_from) + Tile[x][y] = element_to; } static boolean CopyCustomElement(int element_old, int element_new, @@ -8408,8 +8408,7 @@ static void CheckElementDescriptions(void) for (i = 0; i < NUM_FILE_ELEMENTS; i++) if (getElementDescriptionFilename(i) == NULL && !IS_OBSOLETE(i)) - Error(ERR_WARN, "no element description file for element '%s'", - EL_NAME(i)); + Warn("no element description file for element '%s'", EL_NAME(i)); } #endif @@ -8609,8 +8608,8 @@ void DrawLevelEd(void) if (level_editor_test_game) { - CopyPlayfield(level.field, Feld); - CopyPlayfield(FieldBackup, level.field); + CopyPlayfield(level.field, Tile); + CopyPlayfield(TileBackup, level.field); level_editor_test_game = FALSE; } @@ -9555,7 +9554,7 @@ static void DrawPropertiesInfo(void) num_elements_in_level = 0; for (y = 0; y < lev_fieldy; y++) for (x = 0; x < lev_fieldx; x++) - if (Feld[x][y] == properties_element) + if (Tile[x][y] == properties_element) num_elements_in_level++; percentage = num_elements_in_level * 100.0 / (lev_fieldx * lev_fieldy); @@ -9741,6 +9740,8 @@ static struct { EL_EMC_LENSES, &level.lenses_score, TEXT_COLLECTING }, { EL_EMC_MAGNIFIER, &level.magnify_score, TEXT_COLLECTING }, { EL_SPRING, &level.slurp_score, TEXT_SLURPING }, + { EL_SPRING_LEFT, &level.slurp_score, TEXT_SLURPING }, + { EL_SPRING_RIGHT, &level.slurp_score, TEXT_SLURPING }, { EL_EMC_LENSES, &level.lenses_time, TEXT_DURATION }, { EL_EMC_MAGNIFIER, &level.magnify_time, TEXT_DURATION }, { EL_MM_FUSE_ACTIVE, &level.mm_time_fuse, TEXT_DELAY_OFF }, @@ -9793,7 +9794,7 @@ static void SetAutomaticNumberOfGemsNeeded(void) { for (y = 0; y < lev_fieldy; y++) { - int element = Feld[x][y]; + int element = Tile[x][y]; switch (element) { @@ -10016,7 +10017,9 @@ static void DrawPropertiesConfig(void) if (MAYBE_DONT_COLLIDE_WITH(properties_element)) MapCheckbuttonGadget(ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH); - if (properties_element == EL_SPRING) + if (properties_element == EL_SPRING || + properties_element == EL_SPRING_LEFT || + properties_element == EL_SPRING_RIGHT) MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_SPRING_BUG); if (properties_element == EL_TIME_ORB_FULL) @@ -10845,7 +10848,7 @@ static void SetElementSimpleExt(int x, int y, int dx, int dy, int element, { int sx = x - level_xpos; int sy = y - level_ypos; - int old_element = Feld[x][y]; + int old_element = Tile[x][y]; int new_element = element; unsigned int new_bitmask = (getDrawModeHiRes() ? (dx + 1) << (dy * 2) : 0x0f); boolean draw_masked = FALSE; @@ -10871,7 +10874,7 @@ static void SetElementSimpleExt(int x, int y, int dx, int dy, int element, IntelliDrawBuffer[x][y] = element; if (change_level) - Feld[x][y] = element; + Tile[x][y] = element; if (IN_ED_FIELD(sx, sy)) { @@ -11697,7 +11700,7 @@ static void ResetIntelliDraw(void) for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - IntelliDrawBuffer[x][y] = Feld[x][y]; + IntelliDrawBuffer[x][y] = Tile[x][y]; SetElementIntelliDraw(-1, -1, EL_UNDEFINED, FALSE, -1); } @@ -11740,7 +11743,7 @@ static void SetElementExt(int x, int y, int dx, int dy, int element, boolean change_level, int button) { if (element < 0) - SetElementSimple(x, y, Feld[x][y], change_level); + SetElementSimple(x, y, Tile[x][y], change_level); else if (GetKeyModState() & KMOD_Shift && !IS_MM_WALL_EDITOR(element)) SetElementIntelliDraw(x, y, element, change_level, button); else @@ -11784,7 +11787,7 @@ static int getLevelElementHiRes(int lx2, int ly2) int ly = ly2 / 2; int dx = lx2 % 2; int dy = ly2 % 2; - int element = Feld[lx][ly]; + int element = Tile[lx][ly]; unsigned int bitmask = (dx + 1) << (dy * 2); if (IS_MM_WALL(element)) @@ -12040,14 +12043,14 @@ static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y, for (y = 0; y < height; y++) for (x = 0; x < width; x++) - if ((draw_with_brush ? brush_buffer[x][y] : Feld[x][y]) > 999) + if ((draw_with_brush ? brush_buffer[x][y] : Tile[x][y]) > 999) format = "%s%04d"; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { - int element = (draw_with_brush ? brush_buffer[x][y] : Feld[x][y]); + int element = (draw_with_brush ? brush_buffer[x][y] : Tile[x][y]); char *prefix = (mode == CB_DUMP_BRUSH || mode == CB_BRUSH_TO_CLIPBOARD ? "`" : "¸"); @@ -12068,7 +12071,7 @@ static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y, mode == CB_BRUSH_TO_CLIPBOARD_SMALL) SDL_SetClipboardText(text); else - printf("%s", text); + Print("%s", text); // print brush data to console and log file return; } @@ -12229,7 +12232,7 @@ static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y, for (x = 0; x < MAX_LEV_FIELDX; x++) for (y = 0; y < MAX_LEV_FIELDY; y++) - Feld[x][y] = brush_buffer[x][y]; + Tile[x][y] = brush_buffer[x][y]; lev_fieldx = level.fieldx = brush_width; lev_fieldy = level.fieldy = brush_height; @@ -12266,7 +12269,7 @@ static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y, { for (x = 0; x < brush_width; x++) { - brush_buffer[x][y] = Feld[from_lx + x][from_ly + y]; + brush_buffer[x][y] = Tile[from_lx + x][from_ly + y]; if (button != 1) DrawBrushElement(from_x + x, from_y + y, new_element, TRUE); @@ -12407,7 +12410,7 @@ void RedoLevelEditorOperation(void) static void FloodFill(int from_x, int from_y, int fill_element) { - FloodFillLevel(from_x, from_y, fill_element, Feld, lev_fieldx, lev_fieldy); + FloodFillLevel(from_x, from_y, fill_element, Tile, lev_fieldx, lev_fieldy); } static void FloodFillWall_MM(int from_sx2, int from_sy2, int fill_element) @@ -12416,20 +12419,20 @@ static void FloodFillWall_MM(int from_sx2, int from_sy2, int fill_element) int from_y = from_sy2 + 2 * level_ypos; int max_fillx = lev_fieldx * 2; int max_filly = lev_fieldy * 2; - short FillFeld[max_fillx][max_filly]; + short Fill[max_fillx][max_filly]; int x, y; for (x = 0; x < max_fillx; x++) for (y = 0; y < max_filly; y++) - FillFeld[x][y] = getLevelElementHiRes(x, y); + Fill[x][y] = getLevelElementHiRes(x, y); FloodFillLevelExt(from_x, from_y, fill_element, max_fillx, max_filly, - FillFeld, max_fillx, max_filly); + Fill, max_fillx, max_filly); for (x = 0; x < max_fillx; x++) for (y = 0; y < max_filly; y++) - if (FillFeld[x][y] == fill_element) - SetLevelElementHiRes(x, y, FillFeld[x][y]); + if (Fill[x][y] == fill_element) + SetLevelElementHiRes(x, y, Fill[x][y]); } // values for DrawLevelText() modes @@ -12493,7 +12496,7 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) break; case TEXT_SETCURSOR: - DrawEditorElement(last_sx, last_sy, Feld[lx][ly]); + DrawEditorElement(last_sx, last_sy, Tile[lx][ly]); DrawAreaBorder(sx, sy, sx, sy); StartTextInput(SX + sx * ed_tilesize, SY + sy * ed_tilesize, ed_tilesize, ed_tilesize); @@ -12508,8 +12511,8 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) new_element1 <= EL_STEEL_CHAR_END) letter_element = letter_element - EL_CHAR_START + EL_STEEL_CHAR_START; - delete_buffer[sx - start_sx] = Feld[lx][ly]; - Feld[lx][ly] = letter_element; + delete_buffer[sx - start_sx] = Tile[lx][ly]; + Tile[lx][ly] = letter_element; if (sx + 1 < ed_fieldx && lx + 1 < lev_fieldx) DrawLevelText(sx + 1, sy, 0, TEXT_SETCURSOR); @@ -12525,8 +12528,8 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) case TEXT_BACKSPACE: if (sx > start_sx) { - Feld[lx - 1][ly] = delete_buffer[sx - start_sx - 1]; - DrawEditorElement(sx - 1, sy, Feld[lx - 1][ly]); + Tile[lx - 1][ly] = delete_buffer[sx - start_sx - 1]; + DrawEditorElement(sx - 1, sy, Tile[lx - 1][ly]); DrawLevelText(sx - 1, sy, 0, TEXT_SETCURSOR); } break; @@ -12540,7 +12543,7 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) case TEXT_END: CopyLevelToUndoBuffer(UNDO_IMMEDIATE); - DrawEditorElement(sx, sy, Feld[lx][ly]); + DrawEditorElement(sx, sy, Tile[lx][ly]); StopTextInput(); typing = FALSE; break; @@ -12562,7 +12565,7 @@ static void SetTextCursor(int unused_sx, int unused_sy, int sx, int sy, int ly = sy + level_ypos; if (element == -1) - DrawEditorElement(sx, sy, Feld[lx][ly]); + DrawEditorElement(sx, sy, Tile[lx][ly]); else DrawAreaBorder(sx, sy, sx, sy); } @@ -12616,7 +12619,7 @@ static void CopyLevelToUndoBuffer(int mode) for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - UndoBuffer[undo_buffer_position][x][y] = Feld[x][y]; + UndoBuffer[undo_buffer_position][x][y] = Tile[x][y]; // check if drawing operation forces change of border style CheckLevelBorderElement(TRUE); @@ -12638,8 +12641,8 @@ static void RandomPlacement(int new_element) { free_position[x][y] = (random_placement_background_restricted ? - Feld[x][y] == random_placement_background_element : - Feld[x][y] != new_element); + Tile[x][y] == random_placement_background_element : + Tile[x][y] != new_element); if (free_position[x][y]) num_free_positions++; @@ -12687,12 +12690,12 @@ static void WrapLevel(int dx, int dy) for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - FieldBackup[x][y] = Feld[x][y]; + TileBackup[x][y] = Tile[x][y]; for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - Feld[x][y] = - FieldBackup[(x + wrap_dx) % lev_fieldx][(y + wrap_dy) % lev_fieldy]; + Tile[x][y] = + TileBackup[(x + wrap_dx) % lev_fieldx][(y + wrap_dy) % lev_fieldy]; DrawEditorLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); CopyLevelToUndoBuffer(UNDO_ACCUMULATE); @@ -12784,7 +12787,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) } else if (!button_press_event) { - int old_element = (IN_LEV_FIELD(lx, ly) ? Feld[lx][ly] : EL_UNDEFINED); + int old_element = (IN_LEV_FIELD(lx, ly) ? Tile[lx][ly] : EL_UNDEFINED); boolean hires_drawing = (level.game_engine_type == GAME_ENGINE_TYPE_MM && isHiresTileElement(old_element) && isHiresDrawElement(new_element)); @@ -12867,7 +12870,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) { for (x = 0; x < lev_fieldx; x++) { - int old_element = Feld[x][y]; + int old_element = Tile[x][y]; if (ELEM_IS_PLAYER(old_element)) { @@ -13026,7 +13029,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) break; case GADGET_ID_FLOOD_FILL: - if (button_press_event && Feld[lx][ly] != new_element) + if (button_press_event && Tile[lx][ly] != new_element) { if (IS_MM_WALL_EDITOR(new_element)) FloodFillWall_MM(sx2, sy2, new_element); @@ -13043,7 +13046,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) ClickOnGadget(level_editor_gadget[last_drawing_function], MB_LEFTBUTTON); else if (draw_level) - PickDrawingElement(button, Feld[lx][ly]); + PickDrawingElement(button, Tile[lx][ly]); else { int pos = sx * drawingarea_info[type_id].area_ysize + sy; @@ -13287,10 +13290,10 @@ static void HandleTextbuttonGadgets(struct GadgetInfo *gi) boolean new_template = !fileExists(getLocalLevelTemplateFilename()); // backup original "level.field" (needed to track playfield changes) - CopyPlayfield(level.field, FieldBackup); + CopyPlayfield(level.field, TileBackup); // "SaveLevelTemplate()" uses "level.field", so copy editor playfield - CopyPlayfield(Feld, level.field); + CopyPlayfield(Tile, level.field); if (new_template || Request("Save this template and kill the old?", REQ_ASK)) @@ -13300,7 +13303,7 @@ static void HandleTextbuttonGadgets(struct GadgetInfo *gi) Request("Template saved!", REQ_CONFIRM); // restore original "level.field" (needed to track playfield changes) - CopyPlayfield(FieldBackup, level.field); + CopyPlayfield(TileBackup, level.field); } else if (type_id == ED_TEXTBUTTON_ID_SAVE_LEVELSET) { @@ -13917,7 +13920,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) for (x = 0; x < lev_fieldx; x++) for (y = 0; y < lev_fieldy; y++) - Feld[x][y] = UndoBuffer[undo_buffer_position][x][y]; + Tile[x][y] = UndoBuffer[undo_buffer_position][x][y]; // check if undo operation forces change of border style CheckLevelBorderElement(FALSE); @@ -13945,7 +13948,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) for (x = 0; x < MAX_LEV_FIELDX; x++) for (y = 0; y < MAX_LEV_FIELDY; y++) - Feld[x][y] = (button == 1 ? EL_EMPTY : new_element); + Tile[x][y] = (button == 1 ? EL_EMPTY : new_element); CopyLevelToUndoBuffer(GADGET_ID_CLEAR); @@ -13976,7 +13979,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) SetAutomaticNumberOfGemsNeeded(); - CopyPlayfield(Feld, level.field); + CopyPlayfield(Tile, level.field); SaveLevel(level_nr); level.changed = FALSE; @@ -14007,8 +14010,8 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (LevelChanged()) level.game_version = GAME_VERSION_ACTUAL; - CopyPlayfield(level.field, FieldBackup); - CopyPlayfield(Feld, level.field); + CopyPlayfield(level.field, TileBackup); + CopyPlayfield(Tile, level.field); CopyNativeLevel_RND_to_Native(&level); @@ -14108,13 +14111,13 @@ static void HandleControlButtons(struct GadgetInfo *gi) } #ifdef DEBUG else if (gi->event.type == GD_EVENT_PRESSED) - printf("default: HandleControlButtons: GD_EVENT_PRESSED(%d)\n", id); + Debug("editor", "default: HandleControlButtons: GD_EVENT_PRESSED(%d)", id); else if (gi->event.type == GD_EVENT_RELEASED) - printf("default: HandleControlButtons: GD_EVENT_RELEASED(%d)\n", id); + Debug("editor", "default: HandleControlButtons: GD_EVENT_RELEASED(%d)", id); else if (gi->event.type == GD_EVENT_MOVING) - printf("default: HandleControlButtons: GD_EVENT_MOVING(%d)\n", id); + Debug("editor", "default: HandleControlButtons: GD_EVENT_MOVING(%d)", id); else - printf("default: HandleControlButtons: ? (id == %d)\n", id); + Debug("editor", "default: HandleControlButtons: ? (id == %d)", id); #endif break; } @@ -14473,7 +14476,7 @@ static void HandleDrawingAreaInfo(struct GadgetInfo *gi) ABS(lx - start_lx) + 1, ABS(ly - start_ly) + 1); } else if (actual_drawing_function == GADGET_ID_PICK_ELEMENT) - strncpy(infotext, getElementInfoText(Feld[lx][ly]), max_infotext_len); + strncpy(infotext, getElementInfoText(Tile[lx][ly]), max_infotext_len); else sprintf(infotext, "Level position: %d, %d", lx, ly); }