X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=6414dbd4b5619682cb9771fe62c231819d7d9597;hb=cc1d6b89872ea3d6ae3e53023653ab86dd76c2ea;hp=4a6e9dd40b89bcbac935369d246b00ac2324d766;hpb=ee757c0d98ec8e10cf04b44609b7f73697a9bc81;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 4a6e9dd4..6414dbd4 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3424,10 +3424,6 @@ static int new_element3 = EL_SAND; #define BUTTON_ELEMENT(button) ((button) == 1 ? new_element1 : \ (button) == 2 ? new_element2 : \ (button) == 3 ? new_element3 : EL_EMPTY) -#define BUTTON_STEPSIZE(button) ((button) == 1 ? 1 : \ - (button) == 2 ? 5 : \ - (button) == 3 ? 10 : \ - (button)) /* forward declaration for internal use */ static void ModifyEditorCounterValue(int, int); @@ -5221,9 +5217,9 @@ void PrintEditorElementList() int cascade_element_show = EL_CASCADE_INACTIVE(cascade_element); char *headline = element_info[cascade_element_show].editor_description; - printf_line_with_prefix("# ", "-", 77); - printf("# %s\n", headline); - printf_line_with_prefix("# ", "-", 77); + PrintLineWithPrefix("# ", "-", 77); + Print("# %s\n", headline); + PrintLineWithPrefix("# ", "-", 77); } for (j = 0; j < *editor_elements_info[i].headline_list_size; j++) @@ -5233,21 +5229,21 @@ void PrintEditorElementList() if (IS_EDITOR_CASCADE(element)) element = EL_CHAR_MINUS; - printf("# %s\n", element_info[element].token_name); + Print("# %s\n", element_info[element].token_name); } if (j > 0) - printf("#\n"); + Print("#\n"); for (j = 0; j < *editor_elements_info[i].element_list_size; j++) { int element = (*editor_elements_info[i].element_list)[j]; - printf("# %s\n", element_info[element].token_name); + Print("# %s\n", element_info[element].token_name); } if (j > 0) - printf("#\n"); + Print("#\n"); } } @@ -7620,17 +7616,39 @@ static boolean playfield_area_changed = FALSE; void DrawLevelEd() { + int fade_mask = REDRAW_FIELD; + StopAnimation(); CloseDoor(DOOR_CLOSE_ALL); - FadeOut(REDRAW_FIELD); +#if 1 + /* needed if different viewport properties defined for editor */ + ChangeViewportPropertiesIfNeeded(); +#endif + + if (CheckIfRedrawGlobalBorderIsNeeded()) + fade_mask = REDRAW_ALL; + +#if 0 + printf("::: %d\n", (fade_mask == REDRAW_ALL ? 1 : 0)); +#endif + + FadeOut(fade_mask); +#if 0 /* needed after playing if editor playfield area has different size */ ClearRectangle(drawto, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE); +#endif +#if 0 /* needed if different viewport properties defined for editor */ ChangeViewportPropertiesIfNeeded(); +#endif + +#if 1 + ClearField(); +#endif InitZoomLevelSettings(); @@ -7694,7 +7712,12 @@ void DrawLevelEd() DrawEditModeWindow(); - FadeIn(playfield_area_changed ? REDRAW_ALL : REDRAW_FIELD); + fade_mask = (playfield_area_changed ? REDRAW_ALL : REDRAW_FIELD); + + if (CheckIfRedrawGlobalBorderIsNeeded()) + fade_mask = REDRAW_ALL; + + FadeIn(fade_mask); /* copy actual editor door content to door double buffer for OpenDoor() */ BlitBitmap(drawto, bitmap_db_door_1, DX, DY, DXSIZE, DYSIZE, 0, 0);