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/normalopenglgraphics.h | |
parent | 780c9da133b956785cb9c0d9c5e3e67f8209e15c (diff) | |
download | manaverse-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.gz manaverse-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.bz2 manaverse-3c374b32aafb85dca19d39d5e431c6efe0302f27.tar.xz manaverse-3c374b32aafb85dca19d39d5e431c6efe0302f27.zip |
Add const to graphics class.
Diffstat (limited to 'src/normalopenglgraphics.h')
-rw-r--r-- | src/normalopenglgraphics.h | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h index 875b04bee..45973941a 100644 --- a/src/normalopenglgraphics.h +++ b/src/normalopenglgraphics.h @@ -46,47 +46,53 @@ class NormalOpenGLGraphics : public Graphics ~NormalOpenGLGraphics(); - 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); + void drawRescaledImagePattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight); - void calcImagePattern(GraphicsVertexes* vert, Image *image, - int x, int y, int w, int h); + void calcImagePattern(GraphicsVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h); - void calcTile(ImageVertexes *vert, int x, int y); + void calcTile(ImageVertexes *const vert, int x, int y); - void drawTile(ImageVertexes *vert); + void drawTile(const ImageVertexes *const vert); - void drawImagePattern2(GraphicsVertexes *vert, const Image *image); + void drawImagePattern2(GraphicsVertexes *const vert, + const Image *const image); void updateScreen(); @@ -133,7 +139,8 @@ class NormalOpenGLGraphics : public Graphics void prepareScreenshot(); - bool drawNet(int x1, int y1, int x2, int y2, int width, int height); + bool drawNet(const int x1, const int y1, const int x2, const int y2, + const int width, const int height); int getMemoryUsage(); @@ -144,11 +151,11 @@ class NormalOpenGLGraphics : 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); |