diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-30 20:04:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-30 20:05:30 +0300 |
commit | bbed1413d3ea2ef67f7fd7db146c372a7181ad43 (patch) | |
tree | bcfd0e1802df442df157d829e9fc3490877ceb0f /src/render/nullopenglgraphics.cpp | |
parent | e29a87a240fe2f33c51f4e15067122960f667d66 (diff) | |
download | manaplus-bbed1413d3ea2ef67f7fd7db146c372a7181ad43.tar.gz manaplus-bbed1413d3ea2ef67f7fd7db146c372a7181ad43.tar.bz2 manaplus-bbed1413d3ea2ef67f7fd7db146c372a7181ad43.tar.xz manaplus-bbed1413d3ea2ef67f7fd7db146c372a7181ad43.zip |
add calcImageRect into each renderer. but copy function body to shared file.
Diffstat (limited to 'src/render/nullopenglgraphics.cpp')
-rw-r--r-- | src/render/nullopenglgraphics.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index 3883d7134..3a59f44bc 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -859,7 +859,7 @@ void NullOpenGLGraphics::drawTileVertexes(const ImageVertexes *const vert) drawVertexes(vert->ogl); } -bool NullOpenGLGraphics::calcWindow(ImageCollection *const vertCol, +void NullOpenGLGraphics::calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, const ImageRect &imgRect) @@ -867,7 +867,7 @@ bool NullOpenGLGraphics::calcWindow(ImageCollection *const vertCol, ImageVertexes *vert = nullptr; Image *const image = imgRect.grid[4]; if (!image) - return false; + return; if (vertCol->currentGLImage != image->mGLImage) { vert = new ImageVertexes(); @@ -880,8 +880,7 @@ bool NullOpenGLGraphics::calcWindow(ImageCollection *const vertCol, { vert = vertCol->currentVert; } - - return calcImageRect(vert, x, y, w, h, imgRect); + calcImageRect(vert, x, y, w, h, imgRect); } void NullOpenGLGraphics::updateScreen() @@ -1147,6 +1146,14 @@ void NullOpenGLGraphics::drawImageRect(const int x, const int y, #include "render/openglgraphics_drawImageRect.hpp" } +void NullOpenGLGraphics::calcImageRect(ImageVertexes *const vert, + const int x, const int y, + const int w, const int h, + const ImageRect &imgRect) +{ + #include "render/openglgraphics_calcImageRect.hpp" +} + #ifdef DEBUG_BIND_TEXTURE void NullOpenGLGraphics::debugBindTexture(const Image *const image) { |