diff options
author | tron <tron@openttd.org> | 2005-07-15 14:16:14 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-15 14:16:14 +0000 |
commit | 8f71864bef912a9cd8b8f649c5acbe638d48fc24 (patch) | |
tree | 37a7c3272357635a96d29652c78fbc738b0c782d /screenshot.c | |
parent | b21ee889fec9b8d197692969855cb54675edfa6d (diff) | |
download | openttd-8f71864bef912a9cd8b8f649c5acbe638d48fc24.tar.xz |
(svn r2571) Add explicit type Pixel for ... Pixels
Diffstat (limited to 'screenshot.c')
-rw-r--r-- | screenshot.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/screenshot.c b/screenshot.c index 3c23e327b..8350cb35f 100644 --- a/screenshot.c +++ b/screenshot.c @@ -57,7 +57,7 @@ static bool MakeBmpImage(const char *name, ScreenshotCallback *callb, void *user BitmapFileHeader bfh; BitmapInfoHeader bih; RgbQuad rq[256]; - byte *buff; + Pixel *buff; FILE *f; uint i, padw; uint n, maxlines; @@ -159,7 +159,7 @@ static void PNGAPI png_my_warning(png_structp png_ptr, png_const_charp message) static bool MakePNGImage(const char *name, ScreenshotCallback *callb, void *userdata, uint w, uint h, int pixelformat, const Colour *palette) { png_color rq[256]; - byte *buff; + Pixel *buff; FILE *f; uint i, y, n; uint maxlines; @@ -272,7 +272,7 @@ assert_compile(sizeof(PcxHeader) == 128); static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *userdata, uint w, uint h, int pixelformat, const Colour *palette) { - byte *buff; + Pixel *buff; FILE *f; uint maxlines; uint y; @@ -330,14 +330,14 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user // write them to pcx for (i = 0; i != n; i++) { - const byte* bufp = buff + i * w; + const Pixel* bufp = buff + i * w; byte runchar = bufp[0]; uint runcount = 1; uint j; // for each pixel... for (j = 1; j < w; j++) { - byte ch = bufp[j]; + Pixel ch = bufp[j]; if (ch != runchar || runcount >= 0x3f) { if (runcount > 1 || (runchar & 0xC0) == 0xC0) @@ -426,7 +426,7 @@ void SetScreenshotFormat(int i) } // screenshot generator that dumps the current video buffer -static void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) +static void CurrentScreenCallback(void *userdata, Pixel *buf, uint y, uint pitch, uint n) { for (; n > 0; --n) { memcpy(buf, _screen.dst_ptr + y * _screen.pitch, _screen.width); @@ -436,7 +436,7 @@ static void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, } // generate a large piece of the world -static void LargeWorldCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) +static void LargeWorldCallback(void *userdata, Pixel *buf, uint y, uint pitch, uint n) { ViewPort *vp = (ViewPort *)userdata; DrawPixelInfo dpi, *old_dpi; |