X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=35d7021ed97eb0a27cb663e6222d8623ff041592;hb=75ebfce89c39bc740367807c4c16f469135ba6d5;hp=db1a37e8705064866c79be94d87ea00baf298a9b;hpb=88a46f726da49d5ae03e736b1388a4b854221685;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index db1a37e8..35d7021e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1298,13 +1298,13 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) { x = (dx == 1 ? 0 : ed_fieldx - 1); for(y=0; y start_sx) { Feld[lx - 1][ly] = delete_buffer[sx - start_sx - 1]; - DrawNewMiniElement(sx - 1, sy, Feld[lx - 1][ly]); + DrawMiniElement(sx - 1, sy, Feld[lx - 1][ly]); DrawLevelText(sx - 1, sy, 0, TEXT_SETCURSOR); } break; @@ -3213,7 +3213,7 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) case TEXT_END: CopyLevelToUndoBuffer(UNDO_IMMEDIATE); - DrawNewMiniElement(sx, sy, Feld[lx][ly]); + DrawMiniElement(sx, sy, Feld[lx][ly]); typing = FALSE; break; @@ -3234,7 +3234,7 @@ static void SetTextCursor(int unused_sx, int unused_sy, int sx, int sy, int ly = sy + level_ypos; if (element == -1) - DrawNewMiniElement(sx, sy, Feld[lx][ly]); + DrawMiniElement(sx, sy, Feld[lx][ly]); else DrawAreaBorder(sx, sy, sx, sy); } @@ -3279,7 +3279,7 @@ static void CopyLevelToUndoBuffer(int mode) last_border_element = BorderElement; SetBorderElement(); if (BorderElement != last_border_element) - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); #if 0 #ifdef DEBUG @@ -3320,7 +3320,7 @@ static void RandomPlacement(int new_element) for (y=0; y= 0 && x - level_xpos < ed_fieldx && y - level_ypos >= 0 && y - level_ypos < ed_fieldy) - DrawNewMiniElement(x - level_xpos, y - level_ypos, + DrawMiniElement(x - level_xpos, y - level_ypos, EL_EMPTY); } } @@ -3466,16 +3466,16 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) } Feld[lx][ly] = new_element; - DrawNewMiniElement(sx, sy, new_element); + DrawMiniElement(sx, sy, new_element); } } else { - DrawNewMiniGraphicExt(drawto, + DrawMiniGraphicExt(drawto, gi->x + sx * MINI_TILEX, gi->y + sy * MINI_TILEY, el2img(new_element)); - DrawNewMiniGraphicExt(window, + DrawMiniGraphicExt(window, gi->x + sx * MINI_TILEX, gi->y + sy * MINI_TILEY, el2img(new_element)); @@ -3575,7 +3575,7 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) if (button_press_event && Feld[lx][ly] != new_element) { FloodFill(lx, ly, new_element); - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); CopyLevelToUndoBuffer(UNDO_IMMEDIATE); } break; @@ -3698,7 +3698,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (button == 1) ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_RIGHT); else - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_HORIZONTAL], GDI_SCROLLBAR_ITEM_POSITION, level_xpos + 1, GDI_END); @@ -3717,7 +3717,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (button == 1) ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_LEFT); else - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_HORIZONTAL], GDI_SCROLLBAR_ITEM_POSITION, level_xpos + 1, GDI_END); @@ -3736,7 +3736,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (button == 1) ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_DOWN); else - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_VERTICAL], GDI_SCROLLBAR_ITEM_POSITION, level_ypos + 1, GDI_END); @@ -3755,7 +3755,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (button == 1) ScrollMiniLevel(level_xpos, level_ypos, ED_SCROLL_UP); else - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); ModifyGadget(level_editor_gadget[GADGET_ID_SCROLL_VERTICAL], GDI_SCROLLBAR_ITEM_POSITION, level_ypos + 1, GDI_END); @@ -3764,12 +3764,12 @@ static void HandleControlButtons(struct GadgetInfo *gi) case GADGET_ID_SCROLL_HORIZONTAL: level_xpos = gi->event.item_position - 1; - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); break; case GADGET_ID_SCROLL_VERTICAL: level_ypos = gi->event.item_position - 1; - DrawNewMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + DrawMiniLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); break; case GADGET_ID_SCROLL_LIST_UP: @@ -3800,7 +3800,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) int element = editor_element[element_shift + i]; UnmapGadget(gi); - getNewMiniGraphicSource(el2img(element), &gd->bitmap, &gd->x, &gd->y); + getMiniGraphicSource(el2img(element), &gd->bitmap, &gd->x, &gd->y); ModifyGadget(gi, GDI_INFO_TEXT, getElementInfoText(element), GDI_END); MapGadget(gi); } @@ -3869,7 +3869,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) for(x=0; x