1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * ©1995 Artsoft Development *
6 * 33659 Bielefeld-Senne *
7 * Telefon: (0521) 493245 *
8 * eMail: aeglos@valinor.owl.de *
9 * aeglos@uni-paderborn.de *
10 * q99492@pbhrzx.uni-paderborn.de *
11 *----------------------------------------------------------*
13 ***********************************************************/
15 #ifdef USE_SDL_LIBRARY
19 inline void SDLCopyArea(SDL_Surface *src_surface, SDL_Surface *dst_surface,
21 int width, int height,
24 SDL_Rect src_rect, dst_rect;
36 SDL_BlitSurface(src_surface, &src_rect, dst_surface, &dst_rect);
37 SDL_UpdateRect(dst_surface, dst_x, dst_y, width, height);
40 inline void SDLFillRectangle(SDL_Surface *surface, int x, int y,
41 int width, int height, unsigned int color)
44 unsigned int color_r = (color >> 2) && 0xff;
45 unsigned int color_g = (color >> 1) && 0xff;
46 unsigned int color_b = (color >> 0) && 0xff;
53 SDL_FillRect(surface, &rect,
54 SDL_MapRGB(surface->format, color_r, color_g, color_b));
57 #endif /* USE_SDL_LIBRARY */