diff options
Diffstat (limited to 'Tools/AnvilStats/ImageComposingCallback.h')
-rw-r--r-- | Tools/AnvilStats/ImageComposingCallback.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Tools/AnvilStats/ImageComposingCallback.h b/Tools/AnvilStats/ImageComposingCallback.h index 916e61d92..6a1288fef 100644 --- a/Tools/AnvilStats/ImageComposingCallback.h +++ b/Tools/AnvilStats/ImageComposingCallback.h @@ -21,17 +21,16 @@ SetPixel() or SetPixelURow() functions. For the purpose of this class the image data is indexed U (horz) * V (vert), to avoid confusion with other coords. The image is a 32bpp raw imagedata, written into a BMP file. */ -class cImageComposingCallback : - public cCallback +class cImageComposingCallback : public cCallback { -public: + public: enum { INVALID_REGION_COORD = 99999, ///< Used for un-assigned region coords IMAGE_WIDTH = 32 * 16, IMAGE_HEIGHT = 32 * 16, PIXEL_COUNT = IMAGE_WIDTH * IMAGE_HEIGHT, ///< Total pixel count of the image data - } ; + }; cImageComposingCallback(const AString & a_FileNamePrefix); virtual ~cImageComposingCallback(); @@ -59,7 +58,8 @@ public: /** Erases the entire image with the specified color */ void EraseImage(int a_Color); - /** Erases the specified chunk's portion of the image with the specified color. Note that chunk coords are relative to the current region */ + /** Erases the specified chunk's portion of the image with the specified color. Note that chunk coords are relative + * to the current region */ void EraseChunk(int a_Color, int a_RelChunkX, int a_RelChunkZ); /** Returns the current region X coord */ @@ -74,7 +74,8 @@ public: /** Returns the color of the pixel at the specified UV coords; -1 if outside */ int GetPixel(int a_RelU, int a_RelV); - /** Sets a row of pixels. a_Pixels is expected to be a_CountU pixels wide. a_RelUStart + a_CountU is assumed less than image width */ + /** Sets a row of pixels. a_Pixels is expected to be a_CountU pixels wide. a_RelUStart + a_CountU is assumed less + * than image width */ void SetPixelURow(int a_RelUStart, int a_RelV, int a_CountU, int * a_Pixels); /** "Shades" the given color based on the shade amount given @@ -87,7 +88,7 @@ public: /** Mixes the two colors in the specified ratio; a_Ratio is between 0 and 256, 0 returning a_Src */ static int MixColor(int a_Src, int a_Dest, int a_Ratio); -protected: + protected: /** Prefix for the filenames, when generated by the default GetFileName() function */ AString m_FileNamePrefix; @@ -98,4 +99,4 @@ protected: int * m_ImageData; void SaveImage(const AString & a_FileName); -} ; +}; |