Mercurial > sdl-ios-xcode
comparison src/video/SDL_blit_1.c @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children |
comparison
equal
deleted
inserted
replaced
1667:1fddae038bc8 | 1668:4da1ee79c9af |
---|---|
27 #include "SDL_endian.h" | 27 #include "SDL_endian.h" |
28 | 28 |
29 /* Functions to blit from 8-bit surfaces to other surfaces */ | 29 /* Functions to blit from 8-bit surfaces to other surfaces */ |
30 | 30 |
31 static void | 31 static void |
32 Blit1to1 (SDL_BlitInfo * info) | 32 Blit1to1(SDL_BlitInfo * info) |
33 { | 33 { |
34 #ifndef USE_DUFFS_LOOP | 34 #ifndef USE_DUFFS_LOOP |
35 int c; | 35 int c; |
36 #endif | 36 #endif |
37 int width, height; | 37 int width, height; |
77 #else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */ | 77 #else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */ |
78 #define HI 0 | 78 #define HI 0 |
79 #define LO 1 | 79 #define LO 1 |
80 #endif | 80 #endif |
81 static void | 81 static void |
82 Blit1to2 (SDL_BlitInfo * info) | 82 Blit1to2(SDL_BlitInfo * info) |
83 { | 83 { |
84 #ifndef USE_DUFFS_LOOP | 84 #ifndef USE_DUFFS_LOOP |
85 int c; | 85 int c; |
86 #endif | 86 #endif |
87 int width, height; | 87 int width, height; |
183 } | 183 } |
184 } | 184 } |
185 #endif /* USE_DUFFS_LOOP */ | 185 #endif /* USE_DUFFS_LOOP */ |
186 } | 186 } |
187 static void | 187 static void |
188 Blit1to3 (SDL_BlitInfo * info) | 188 Blit1to3(SDL_BlitInfo * info) |
189 { | 189 { |
190 #ifndef USE_DUFFS_LOOP | 190 #ifndef USE_DUFFS_LOOP |
191 int c; | 191 int c; |
192 #endif | 192 #endif |
193 int o; | 193 int o; |
231 src += srcskip; | 231 src += srcskip; |
232 dst += dstskip; | 232 dst += dstskip; |
233 } | 233 } |
234 } | 234 } |
235 static void | 235 static void |
236 Blit1to4 (SDL_BlitInfo * info) | 236 Blit1to4(SDL_BlitInfo * info) |
237 { | 237 { |
238 #ifndef USE_DUFFS_LOOP | 238 #ifndef USE_DUFFS_LOOP |
239 int c; | 239 int c; |
240 #endif | 240 #endif |
241 int width, height; | 241 int width, height; |
279 dst += dstskip; | 279 dst += dstskip; |
280 } | 280 } |
281 } | 281 } |
282 | 282 |
283 static void | 283 static void |
284 Blit1to1Key (SDL_BlitInfo * info) | 284 Blit1to1Key(SDL_BlitInfo * info) |
285 { | 285 { |
286 int width = info->d_width; | 286 int width = info->d_width; |
287 int height = info->d_height; | 287 int height = info->d_height; |
288 Uint8 *src = info->s_pixels; | 288 Uint8 *src = info->s_pixels; |
289 int srcskip = info->s_skip; | 289 int srcskip = info->s_skip; |
326 } | 326 } |
327 } | 327 } |
328 } | 328 } |
329 | 329 |
330 static void | 330 static void |
331 Blit1to2Key (SDL_BlitInfo * info) | 331 Blit1to2Key(SDL_BlitInfo * info) |
332 { | 332 { |
333 int width = info->d_width; | 333 int width = info->d_width; |
334 int height = info->d_height; | 334 int height = info->d_height; |
335 Uint8 *src = info->s_pixels; | 335 Uint8 *src = info->s_pixels; |
336 int srcskip = info->s_skip; | 336 int srcskip = info->s_skip; |
358 dstp += dstskip; | 358 dstp += dstskip; |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 static void | 362 static void |
363 Blit1to3Key (SDL_BlitInfo * info) | 363 Blit1to3Key(SDL_BlitInfo * info) |
364 { | 364 { |
365 int width = info->d_width; | 365 int width = info->d_width; |
366 int height = info->d_height; | 366 int height = info->d_height; |
367 Uint8 *src = info->s_pixels; | 367 Uint8 *src = info->s_pixels; |
368 int srcskip = info->s_skip; | 368 int srcskip = info->s_skip; |
391 dst += dstskip; | 391 dst += dstskip; |
392 } | 392 } |
393 } | 393 } |
394 | 394 |
395 static void | 395 static void |
396 Blit1to4Key (SDL_BlitInfo * info) | 396 Blit1to4Key(SDL_BlitInfo * info) |
397 { | 397 { |
398 int width = info->d_width; | 398 int width = info->d_width; |
399 int height = info->d_height; | 399 int height = info->d_height; |
400 Uint8 *src = info->s_pixels; | 400 Uint8 *src = info->s_pixels; |
401 int srcskip = info->s_skip; | 401 int srcskip = info->s_skip; |
423 dstp += dstskip; | 423 dstp += dstskip; |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 static void | 427 static void |
428 Blit1toNAlpha (SDL_BlitInfo * info) | 428 Blit1toNAlpha(SDL_BlitInfo * info) |
429 { | 429 { |
430 int width = info->d_width; | 430 int width = info->d_width; |
431 int height = info->d_height; | 431 int height = info->d_height; |
432 Uint8 *src = info->s_pixels; | 432 Uint8 *src = info->s_pixels; |
433 int srcskip = info->s_skip; | 433 int srcskip = info->s_skip; |
464 dst += dstskip; | 464 dst += dstskip; |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 static void | 468 static void |
469 Blit1toNAlphaKey (SDL_BlitInfo * info) | 469 Blit1toNAlphaKey(SDL_BlitInfo * info) |
470 { | 470 { |
471 int width = info->d_width; | 471 int width = info->d_width; |
472 int height = info->d_height; | 472 int height = info->d_height; |
473 Uint8 *src = info->s_pixels; | 473 Uint8 *src = info->s_pixels; |
474 int srcskip = info->s_skip; | 474 int srcskip = info->s_skip; |
517 static SDL_loblit one_blitkey[] = { | 517 static SDL_loblit one_blitkey[] = { |
518 NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key | 518 NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key |
519 }; | 519 }; |
520 | 520 |
521 SDL_loblit | 521 SDL_loblit |
522 SDL_CalculateBlit1 (SDL_Surface * surface, int blit_index) | 522 SDL_CalculateBlit1(SDL_Surface * surface, int blit_index) |
523 { | 523 { |
524 int which; | 524 int which; |
525 SDL_PixelFormat *dstfmt; | 525 SDL_PixelFormat *dstfmt; |
526 | 526 |
527 dstfmt = surface->map->dst->format; | 527 dstfmt = surface->map->dst->format; |