Started to add PCX routines.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5552 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-02-25 21:45:01 +00:00
parent eb4001a52f
commit 3265f0cf44
6 changed files with 224 additions and 2 deletions

View File

@@ -85,6 +85,18 @@ void FreeBitmap (Bitmap* B)
int ValidBitmapSize (unsigned Width, unsigned Height)
/* Return true if this is a valid size for a bitmap */
{
/* Calculate the size of the bitmap in pixels */
unsigned long Size = (unsigned long) Width * Height;
/* Check the size */
return (Size > 0 && Size <= BM_MAX_SIZE);
}
Color GetPixelColor (const Bitmap* B, unsigned X, unsigned Y)
/* Get the color for a given pixel. For indexed bitmaps, the palette entry
* is returned.