Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_sw.c @ 1720:a1ebb17f9c52 SDL-1.3
Cleaned up a bunch of warnings, started adding Win32 event support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 30 Jun 2006 05:42:49 +0000 |
parents | 1577404809f0 |
children | 8dd28c4ef746 |
comparison
equal
deleted
inserted
replaced
1719:5b9f50c957ed | 1720:a1ebb17f9c52 |
---|---|
52 static void SDL_SW_DirtyTexture(SDL_Renderer * renderer, | 52 static void SDL_SW_DirtyTexture(SDL_Renderer * renderer, |
53 SDL_Texture * texture, int numrects, | 53 SDL_Texture * texture, int numrects, |
54 const SDL_Rect * rects); | 54 const SDL_Rect * rects); |
55 static void SDL_SW_SelectRenderTexture(SDL_Renderer * renderer, | 55 static void SDL_SW_SelectRenderTexture(SDL_Renderer * renderer, |
56 SDL_Texture * texture); | 56 SDL_Texture * texture); |
57 static void SDL_SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect, | 57 static int SDL_SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect, |
58 Uint32 color); | 58 Uint32 color); |
59 static int SDL_SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 59 static int SDL_SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
60 const SDL_Rect * srcrect, | 60 const SDL_Rect * srcrect, |
61 const SDL_Rect * dstrect, int blendMode, | 61 const SDL_Rect * dstrect, int blendMode, |
62 int scaleMode); | 62 int scaleMode); |
63 static int SDL_SW_RenderReadPixels(SDL_Renderer * renderer, | 63 static int SDL_SW_RenderReadPixels(SDL_Renderer * renderer, |
353 } else { | 353 } else { |
354 data->target = data->screens[data->current_screen]; | 354 data->target = data->screens[data->current_screen]; |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 static void | 358 static int |
359 SDL_SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect, | 359 SDL_SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect, |
360 Uint32 color) | 360 Uint32 color) |
361 { | 361 { |
362 SDL_SW_RenderData *data = (SDL_SW_RenderData *) renderer->driverdata; | 362 SDL_SW_RenderData *data = (SDL_SW_RenderData *) renderer->driverdata; |
363 SDL_Rect real_rect = *rect; | 363 SDL_Rect real_rect = *rect; |
367 r = (Uint8) ((color >> 16) & 0xFF); | 367 r = (Uint8) ((color >> 16) & 0xFF); |
368 g = (Uint8) ((color >> 8) & 0xFF); | 368 g = (Uint8) ((color >> 8) & 0xFF); |
369 b = (Uint8) (color & 0xFF); | 369 b = (Uint8) (color & 0xFF); |
370 color = SDL_MapRGBA(data->target->format, r, g, b, a); | 370 color = SDL_MapRGBA(data->target->format, r, g, b, a); |
371 | 371 |
372 SDL_FillRect(data->target, &real_rect, color); | 372 return SDL_FillRect(data->target, &real_rect, color); |
373 } | 373 } |
374 | 374 |
375 static int | 375 static int |
376 SDL_SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 376 SDL_SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
377 const SDL_Rect * srcrect, const SDL_Rect * dstrect, | 377 const SDL_Rect * srcrect, const SDL_Rect * dstrect, |