X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=ab3ac82d20e80fa80ebb2f1ea29ad41f790a2da0;hb=93926b59ca45db5bb31f63e08d7ee729745e0306;hp=a71ee30cb2069a3175bd88f60d600cd550b884b2;hpb=2c54d1765fec2db1ab23e2d5b5fba927efa463ce;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index a71ee30c..ab3ac82d 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -402,8 +402,6 @@ void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height, int src_x = x, src_y = y; int dst_x = x, dst_y = y; unsigned int time_last, time_current; - float alpha; - int alpha_final; src_rect.x = src_x; src_rect.y = src_y; @@ -498,6 +496,7 @@ void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height, int ypos[melt_columns]; int max_steps = height / 8 + 32; int steps_done = 0; + float steps = 0; int i; SDL_BlitSurface(surface_source, &src_rect, surface_screen, &dst_rect); @@ -520,7 +519,6 @@ void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height, while (!done) { - float steps; int steps_final; time_last = time_current; @@ -600,11 +598,19 @@ void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height, } if (steps_done >= steps_final) + { + if (draw_border_function != NULL) + draw_border_function(); + SDL_UpdateRect(surface_screen, dst_x, dst_y, width, height); + } } } else { + float alpha; + int alpha_final; + for (alpha = 0.0; alpha < 255.0;) { time_last = time_current; @@ -1631,6 +1637,8 @@ Bitmap *SDLLoadImage(char *filename) return NULL; } + UPDATE_BUSY_STATE(); + /* create native non-transparent surface for current image */ if ((new_bitmap->surface = SDL_DisplayFormat(sdl_image_tmp)) == NULL) { @@ -1639,6 +1647,8 @@ Bitmap *SDLLoadImage(char *filename) return NULL; } + UPDATE_BUSY_STATE(); + /* create native transparent surface for current image */ SDL_SetColorKey(sdl_image_tmp, SDL_SRCCOLORKEY, SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00)); @@ -1649,6 +1659,8 @@ Bitmap *SDLLoadImage(char *filename) return NULL; } + UPDATE_BUSY_STATE(); + /* free temporary surface */ SDL_FreeSurface(sdl_image_tmp);