diff options
| author | oy <Tom_Adams@web.de> | 2011-07-11 11:26:41 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-07-11 11:26:41 +0200 |
| commit | fc13cc6c1881d7bcdf30fea7507927920611516c (patch) | |
| tree | 991ee26742036e917b66604bac629ce17b5d49f1 | |
| parent | 1058fe27f2411f08918fc39183a6101b8d3c9f72 (diff) | |
| download | zcatch-fc13cc6c1881d7bcdf30fea7507927920611516c.tar.gz zcatch-fc13cc6c1881d7bcdf30fea7507927920611516c.zip | |
cleaned up last commit
| -rw-r--r-- | src/tools/dilate.cpp | 16 | ||||
| -rw-r--r-- | src/tools/tileset_borderfix.cpp | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/tools/dilate.cpp b/src/tools/dilate.cpp index a4853e1c..eb770a90 100644 --- a/src/tools/dilate.cpp +++ b/src/tools/dilate.cpp @@ -48,17 +48,17 @@ static void CopyAlpha(int w, int h, CPixel *pSrc, CPixel *pDest) pDest[m].a = pSrc[m].a; } -int DilateFile(const char *FileName) +int DilateFile(const char *pFileName) { png_t Png; CPixel *pBuffer[3] = {0,0,0}; png_init(0, 0); - png_open_file(&Png, FileName); + png_open_file(&Png, pFileName); if(Png.color_type != PNG_TRUECOLOR_ALPHA) { - dbg_msg("dilate", "%s : not an RGBA image", FileName); + dbg_msg("dilate", "%s: not an RGBA image", pFileName); return 1; } @@ -81,7 +81,7 @@ int DilateFile(const char *FileName) CopyAlpha(w, h, pBuffer[0], pBuffer[1]); // save here - png_open_file_write(&Png, FileName); + png_open_file_write(&Png, pFileName); png_set_data(&Png, w, h, 8, PNG_TRUECOLOR_ALPHA, (unsigned char *)pBuffer[1]); png_close_file(&Png); @@ -96,8 +96,8 @@ int main(int argc, const char **argv) dbg_msg("Usage", "%s FILE1 [ FILE2... ]", argv[0]); return -1; } - int errors=0; - for(int i=1;i<argc;i++) - errors += DilateFile(argv[i]); - return errors; + + for(int i = 1; i < argc; i++) + DilateFile(argv[i]); + return 0; } diff --git a/src/tools/tileset_borderfix.cpp b/src/tools/tileset_borderfix.cpp index 1734e997..0facb9a3 100644 --- a/src/tools/tileset_borderfix.cpp +++ b/src/tools/tileset_borderfix.cpp @@ -51,17 +51,17 @@ static void TilesetBorderfix(int w, int h, CPixel *pSrc, CPixel *pDest) } -int FixFile(const char *FileName) +int FixFile(const char *pFileName) { png_t Png; CPixel *pBuffer[2] = {0,0}; png_init(0, 0); - png_open_file(&Png, FileName); + png_open_file(&Png, pFileName); if(Png.color_type != PNG_TRUECOLOR_ALPHA) { - dbg_msg("tileset_borderfix", "%s : not an RGBA image", FileName); + dbg_msg("tileset_borderfix", "%s: not an RGBA image", pFileName); return 1; } @@ -76,7 +76,7 @@ int FixFile(const char *FileName) TilesetBorderfix(w, h, pBuffer[0], pBuffer[1]); // save here - png_open_file_write(&Png, FileName); + png_open_file_write(&Png, pFileName); png_set_data(&Png, w, h, 8, PNG_TRUECOLOR_ALPHA, (unsigned char *)pBuffer[1]); png_close_file(&Png); @@ -91,8 +91,8 @@ int main(int argc, const char **argv) dbg_msg("Usage", "%s FILE1 [ FILE2... ]", argv[0]); return -1; } - int errors=0; - for(int i=1;i<argc;i++) - errors += FixFile(argv[i]); - return errors; + + for(int i = 1; i < argc; i++) + FixFile(argv[i]); + return 0; } |