diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-26 18:40:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-26 18:40:15 +0300 |
commit | 3c374b32aafb85dca19d39d5e431c6efe0302f27 (patch) | |
tree | 2bf911551c92af6ea69a53134fd3353d7bb57f37 /src/safeopenglgraphics.h | |
parent | 780c9da133b956785cb9c0d9c5e3e67f8209e15c (diff) | |
download | plus-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.gz plus-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.bz2 plus-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.xz plus-3c374b32aafb85dca19d39d5e431c6efe0302f27.zip |
Add const to graphics class.
Diffstat (limited to 'src/safeopenglgraphics.h')
-rw-r--r-- | src/safeopenglgraphics.h | 75 |
1 files changed, 42 insertions, 33 deletions
diff --git a/src/safeopenglgraphics.h b/src/safeopenglgraphics.h index 8a5f7bc17..a1d744282 100644 --- a/src/safeopenglgraphics.h +++ b/src/safeopenglgraphics.h @@ -43,51 +43,60 @@ class SafeOpenGLGraphics : public Graphics ~SafeOpenGLGraphics(); - bool setVideoMode(int w, int h, int bpp, bool fs, - bool hwaccel, bool resize, bool noFrame); + bool setVideoMode(const int w, const int h, const int bpp, + const bool fs, const bool hwaccel, + const bool resize, const bool noFrame); /** * Draws a resclaled version of the image */ - bool drawRescaledImage(Image *image, int srcX, int srcY, + bool drawRescaledImage(Image *const image, int srcX, int srcY, int dstX, int dstY, - int width, int height, - int desiredWidth, int desiredHeight, - bool useColor); + const int width, const int height, + const int desiredWidth, const int desiredHeight, + const bool useColor); /** * Used to get the smooth rescale option over the standard function. */ - bool drawRescaledImage(Image *image, int srcX, int srcY, + bool drawRescaledImage(Image *const image, int srcX, int srcY, int dstX, int dstY, - int width, int height, - int desiredWidth, int desiredHeight, - bool useColor, bool smooth); + const int width, const int height, + const int desiredWidth, const int desiredHeight, + const bool useColor, bool smooth); - void drawImagePattern(const Image *image, - int x, int y, - int w, int h); + void drawImagePattern(const Image *const image, + const int x, const int y, + const int w, const int h); /** * Draw a pattern based on a rescaled version of the given image... */ - void drawRescaledImagePattern(Image *image, - int x, int y, int w, int h, - int scaledWidth, int scaledHeight); - - bool calcImageRect(GraphicsVertexes* vert, - int x, int y, int w, int h, - Image *topLeft, Image *topRight, - Image *bottomLeft, Image *bottomRight, - Image *top, Image *right, - Image *bottom, Image *left, - Image *center); - - void drawImageRect2(GraphicsVertexes* vert, const ImageRect &imgRect); - - void calcTile(ImageVertexes *vert, int x, int y); - - void drawTile(ImageVertexes *vert); + void drawRescaledImagePattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight); + + bool calcImageRect(GraphicsVertexes *const vert, + const int x, const int y, + const int w, const int h, + const Image *const topLeft, + const Image *const topRight, + const Image *const bottomLeft, + const Image *const bottomRight, + const Image *const top, + const Image *const right, + const Image *const bottom, + const Image *const left, + const Image *const center); + + void drawImageRect2(GraphicsVertexes *const vert, + const ImageRect &imgRect); + + void calcTile(ImageVertexes *const vert, int x, int y); + + void drawTile(const ImageVertexes *const vert); void updateScreen(); @@ -123,11 +132,11 @@ class SafeOpenGLGraphics : public Graphics static GLuint mLastImage; protected: - bool drawImage2(const Image *image, + bool drawImage2(const Image *const image, int srcX, int srcY, int dstX, int dstY, - int width, int height, - bool useColor); + const int width, const int height, + const bool useColor); void setTexturingAndBlending(bool enable); |