Mercurial > sdl-ios-xcode
comparison src/video/SDL_pixels.c @ 1670:eef792d31de8 SDL-1.3
Work in progress. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 07 Jun 2006 16:10:28 +0000 |
parents | 4da1ee79c9af |
children | 7ae8018b2e5d |
comparison
equal
deleted
inserted
replaced
1669:9857d21967bb | 1670:eef792d31de8 |
---|---|
478 } | 478 } |
479 | 479 |
480 /* | 480 /* |
481 * Calculate the pad-aligned scanline width of a surface | 481 * Calculate the pad-aligned scanline width of a surface |
482 */ | 482 */ |
483 Uint16 | 483 int |
484 SDL_CalculatePitch(SDL_Surface * surface) | 484 SDL_CalculatePitch(SDL_Surface * surface) |
485 { | 485 { |
486 Uint16 pitch; | 486 int pitch; |
487 | 487 |
488 /* Surface should be 4-byte aligned for speed */ | 488 /* Surface should be 4-byte aligned for speed */ |
489 pitch = surface->w * surface->format->BytesPerPixel; | 489 pitch = surface->w * surface->format->BytesPerPixel; |
490 switch (surface->format->BitsPerPixel) { | 490 switch (surface->format->BitsPerPixel) { |
491 case 1: | 491 case 1: |