X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=b26add564164aa3468f02f09a5e8bb8c9cf2fff5;hb=0448c027347ae76facf5475a21884ca2476f035f;hp=61320d3c2f1528ad25539ab8166ea3e164105fff;hpb=a672ed603b77a6119d35890793b922a7ec82099e;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 61320d3c..b26add56 100644 --- a/src/tools.c +++ b/src/tools.c @@ -257,9 +257,19 @@ void DrawMaskedBorder(int redraw_mask) void BackToFront() { - int x,y; + int x, y; DrawBuffer *buffer = (drawto_field == window ? backbuffer : drawto_field); +#if 0 + printf("::: TILES TO REFRESH: %d\n", redraw_tiles); + for (x = 0; x < SCR_FIELDX; x++) + for (y = 0 ; y < SCR_FIELDY; y++) + if (redraw[redraw_x1 + x][redraw_y1 + y]) + printf("::: - %d, %d [%s]\n", + LEVELX(x), LEVELY(y), + EL_NAME(Feld[LEVELX(x)][LEVELY(y)])); +#endif + if (redraw_mask & REDRAW_TILES && redraw_tiles > REDRAWTILES_THRESHOLD) redraw_mask |= REDRAW_FIELD; @@ -427,8 +437,12 @@ void BackToFront() if (!global.fps_slowdown) info1[0] = '\0'; - sprintf(text, "%.1f fps%s", global.frames_per_second, info1); + sprintf(text, "%04.1f fps%s", global.frames_per_second, info1); +#if 1 + DrawTextExt(window, SX + SXSIZE + SX, 0, text, FONT_TEXT_2, BLIT_OPAQUE); +#else DrawTextExt(window, SX, SY, text, FONT_TEXT_2, BLIT_OPAQUE); +#endif } FlushDisplay(); @@ -1941,7 +1955,13 @@ void DrawLevel() { int x,y; +#if 1 + SetMainBackgroundImage(IMG_BACKGROUND_PLAYING); + SetDrawBackgroundMask(REDRAW_FIELD); +#else SetDrawBackgroundMask(REDRAW_NONE); +#endif + ClearField(); for (x = BX1; x <= BX2; x++) @@ -3198,6 +3218,11 @@ unsigned int MoveDoor(unsigned int door_state) door_state &= ~DOOR_CLOSE_ALL; } +#if 1 + if (game_status == GAME_MODE_EDITOR) + door_state |= DOOR_NO_DELAY; +#endif + if (door_state & DOOR_ACTION) { boolean handle_door_1 = (door_state & DOOR_ACTION_1);