summaryrefslogtreecommitdiff
path: root/src/opengl1graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r--src/opengl1graphics.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp
index 3dfe06ecf..e1d44de23 100644
--- a/src/opengl1graphics.cpp
+++ b/src/opengl1graphics.cpp
@@ -20,9 +20,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "log.h"
#include "opengl1graphics.h"
+#include "graphicsvertexes.h"
+#include "log.h"
+
#include "resources/image.h"
#ifdef USE_OPENGL
@@ -391,6 +393,29 @@ void OpenGL1Graphics::drawRescaledImagePattern(Image *image, int x, int y,
static_cast<GLubyte>(mColor.b), static_cast<GLubyte>(mColor.a));
}
+bool OpenGL1Graphics::calcImageRect(GraphicsVertexes* vert,
+ int x, int y, int w, int h,
+ Image *topLeft _UNUSED_,
+ Image *topRight _UNUSED_,
+ Image *bottomLeft _UNUSED_,
+ Image *bottomRight _UNUSED_,
+ Image *top _UNUSED_, Image *right _UNUSED_,
+ Image *bottom _UNUSED_,
+ Image *left _UNUSED_,
+ Image *center _UNUSED_)
+{
+ vert->init(x, y, w, h);
+ return true;
+}
+
+void OpenGL1Graphics::drawImageRect2(GraphicsVertexes* vert, const ImageRect &imgRect)
+{
+ drawImageRect(vert->getX(), vert->getY(), vert->getW(), vert->getH(),
+ imgRect.grid[0], imgRect.grid[2], imgRect.grid[6], imgRect.grid[8],
+ imgRect.grid[1], imgRect.grid[5], imgRect.grid[7], imgRect.grid[3],
+ imgRect.grid[4]);
+}
+
void OpenGL1Graphics::updateScreen()
{
glFlush();