summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-30 22:05:55 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-30 22:05:55 +0300
commit080291d23a1a28cf7c5e3e01eb4ecb1637a1b42b (patch)
treeadb12b2ed2020fc5c636d3c5cb7ba1ee0636f9e0 /src
parent9aa2b0ffb97f8a1b5ae5201983318d03615c11e1 (diff)
downloadplus-080291d23a1a28cf7c5e3e01eb4ecb1637a1b42b.tar.gz
plus-080291d23a1a28cf7c5e3e01eb4ecb1637a1b42b.tar.bz2
plus-080291d23a1a28cf7c5e3e01eb4ecb1637a1b42b.tar.xz
plus-080291d23a1a28cf7c5e3e01eb4ecb1637a1b42b.zip
add calcTileVertexesInline into renders for internal usage.
Diffstat (limited to 'src')
-rw-r--r--src/render/graphics_calcImageRect.hpp8
-rw-r--r--src/render/mobileopenglgraphics.cpp11
-rw-r--r--src/render/mobileopenglgraphics.h4
-rw-r--r--src/render/normalopenglgraphics.cpp11
-rw-r--r--src/render/normalopenglgraphics.h4
-rw-r--r--src/render/nullopenglgraphics.cpp11
-rw-r--r--src/render/nullopenglgraphics.h4
-rw-r--r--src/render/safeopenglgraphics.cpp9
-rw-r--r--src/render/safeopenglgraphics.h4
-rw-r--r--src/render/sdl2graphics.cpp8
-rw-r--r--src/render/sdl2graphics.h4
-rw-r--r--src/render/sdl2softwaregraphics.cpp8
-rw-r--r--src/render/sdl2softwaregraphics.h4
-rw-r--r--src/render/sdlgraphics.cpp8
-rw-r--r--src/render/sdlgraphics.h4
15 files changed, 92 insertions, 10 deletions
diff --git a/src/render/graphics_calcImageRect.hpp b/src/render/graphics_calcImageRect.hpp
index 6da74fff0..bf8da2a37 100644
--- a/src/render/graphics_calcImageRect.hpp
+++ b/src/render/graphics_calcImageRect.hpp
@@ -68,21 +68,21 @@ if (top && left && bottom && right)
calcPatternInline(vert, right, x + w - rw, y + th, rw, h - th - bh);
}
-calcTileVertexes(vert, topLeft, x, y);
+calcTileVertexesInline(vert, topLeft, x, y);
if (topRight)
{
const int trw = topRight->getWidth();
if (w > trw)
- calcTileVertexes(vert, topRight, x + w - trw, y);
+ calcTileVertexesInline(vert, topRight, x + w - trw, y);
}
if (bottomLeft)
- calcTileVertexes(vert, bottomLeft, x, y + h - bottomLeft->getHeight());
+ calcTileVertexesInline(vert, bottomLeft, x, y + h - bottomLeft->getHeight());
if (bottomRight)
{
const int brw = bottomRight->getWidth();
if (w > brw)
{
- calcTileVertexes(vert, bottomRight, x + w - brw,
+ calcTileVertexesInline(vert, bottomRight, x + w - brw,
y + h - bottomRight->getHeight());
}
}
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 52ed81add..2a2d5f98b 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -661,11 +661,11 @@ void MobileOpenGLGraphics::calcTileCollection(ImageCollection *const vertCol,
vertCol->currentVert = vert;
vert->image = image;
vertCol->draws.push_back(vert);
- calcTileVertexes(vert, image, x, y);
+ calcTileVertexesInline(vert, image, x, y);
}
else
{
- calcTileVertexes(vertCol->currentVert, image, x, y);
+ calcTileVertexesInline(vertCol->currentVert, image, x, y);
}
}
@@ -715,6 +715,13 @@ void MobileOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert,
const Image *const image,
int dstX, int dstY) const
{
+ calcTileVertexesInline(vert, image, dstX, dstY);
+}
+
+void MobileOpenGLGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int dstX, int dstY) const
+{
if (!vert || !image)
return;
diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h
index f4f1bf673..bdf366c22 100644
--- a/src/render/mobileopenglgraphics.h
+++ b/src/render/mobileopenglgraphics.h
@@ -111,6 +111,10 @@ class MobileOpenGLGraphics final : public Graphics
const int x, const int y,
const int w, const int h) const;
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
+
GLfloat *mFloatTexArray;
GLshort *mShortVertArray;
GLfloat *mFloatTexArrayCached;
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index c2b702fa8..0ab2e88fa 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -895,11 +895,11 @@ void NormalOpenGLGraphics::calcTileCollection(ImageCollection *const vertCol,
vertCol->currentVert = vert;
vert->image = image;
vertCol->draws.push_back(vert);
- calcTileVertexes(vert, image, x, y);
+ calcTileVertexesInline(vert, image, x, y);
}
else
{
- calcTileVertexes(vertCol->currentVert, image, x, y);
+ calcTileVertexesInline(vertCol->currentVert, image, x, y);
}
}
@@ -949,6 +949,13 @@ void NormalOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert,
const Image *const image,
int dstX, int dstY) const
{
+ calcTileVertexesInline(vert, image, dstX, dstY);
+}
+
+void NormalOpenGLGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int dstX, int dstY) const
+{
if (!vert || !image)
return;
diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h
index dd3e34208..2cb0a7397 100644
--- a/src/render/normalopenglgraphics.h
+++ b/src/render/normalopenglgraphics.h
@@ -125,6 +125,10 @@ class NormalOpenGLGraphics final : public Graphics
const int x, const int y,
const int w, const int h) const;
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
+
GLfloat *mFloatTexArray;
GLint *mIntTexArray;
GLint *mIntVertArray;
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index fa8e8e0e4..d372aa7dc 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -689,11 +689,11 @@ void NullOpenGLGraphics::calcTileCollection(ImageCollection *const vertCol,
vertCol->currentVert = vert;
vert->image = image;
vertCol->draws.push_back(vert);
- calcTileVertexes(vert, image, x, y);
+ calcTileVertexesInline(vert, image, x, y);
}
else
{
- calcTileVertexes(vertCol->currentVert, image, x, y);
+ calcTileVertexesInline(vertCol->currentVert, image, x, y);
}
}
@@ -743,6 +743,13 @@ void NullOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert,
const Image *const image,
int dstX, int dstY) const
{
+ calcTileVertexesInline(vert, image, dstX, dstY);
+}
+
+void NullOpenGLGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int dstX, int dstY) const
+{
if (!vert || !image)
return;
diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h
index 26839bee3..1335bea3a 100644
--- a/src/render/nullopenglgraphics.h
+++ b/src/render/nullopenglgraphics.h
@@ -117,6 +117,10 @@ class NullOpenGLGraphics final : public Graphics
const int x, const int y,
const int w, const int h) const;
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
+
GLfloat *mFloatTexArray;
GLint *mIntTexArray;
GLint *mIntVertArray;
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index b5a82b1fd..e4ae7792e 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -356,6 +356,15 @@ void SafeOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert A_UNUSED,
{
}
+void SafeOpenGLGraphics::calcTileVertexesInline(ImageVertexes *const
+ vert A_UNUSED,
+ const Image *const
+ image A_UNUSED,
+ int x A_UNUSED,
+ int y A_UNUSED) const
+{
+}
+
void SafeOpenGLGraphics::calcPattern(ImageVertexes *const vert A_UNUSED,
const Image *const image A_UNUSED,
const int x A_UNUSED,
diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h
index 6de43109c..4541a8457 100644
--- a/src/render/safeopenglgraphics.h
+++ b/src/render/safeopenglgraphics.h
@@ -77,6 +77,10 @@ class SafeOpenGLGraphics final : public Graphics
const int x, const int y,
const int w, const int h) const;
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
+
bool mTexture;
bool mIsByteColor;
gcn::Color mByteColor;
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 81ace06d9..7c343ea09 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -428,6 +428,14 @@ void SDLGraphics::calcTileVertexes(ImageVertexes *const vert,
calcTileSDL(vert, x, y);
}
+void SDLGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const
+{
+ vert->image = image;
+ calcTileSDL(vert, x, y);
+}
+
void SDLGraphics::calcTileSDL(ImageVertexes *const vert, int x, int y) const
{
// Check that preconditions for blitting are met.
diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h
index 2e40e932f..378997738 100644
--- a/src/render/sdl2graphics.h
+++ b/src/render/sdl2graphics.h
@@ -172,6 +172,10 @@ class SDLGraphics final : public Graphics
const Image *const image,
const int x, const int y,
const int w, const int h) const;
+
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
};
#endif // USE_SDL2
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index cf69312c8..03f6c2e41 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -672,6 +672,14 @@ void SDL2SoftwareGraphics::calcTileVertexes(ImageVertexes *const vert,
calcTileSDL(vert, x, y);
}
+void SDL2SoftwareGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const
+{
+ vert->image = image;
+ calcTileSDL(vert, x, y);
+}
+
void SDL2SoftwareGraphics::calcTileSDL(ImageVertexes *const vert,
int x, int y) const
{
diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h
index dee69bfeb..231cd1a48 100644
--- a/src/render/sdl2softwaregraphics.h
+++ b/src/render/sdl2softwaregraphics.h
@@ -184,6 +184,10 @@ class SDL2SoftwareGraphics final : public Graphics
const Image *const image,
const int x, const int y,
const int w, const int h) const;
+
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
};
#endif // USE_SDL2
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 9acee8bdf..7bd6b82e0 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -665,6 +665,14 @@ void SDLGraphics::calcTileVertexes(ImageVertexes *const vert,
calcTileSDL(vert, x, y);
}
+void SDLGraphics::calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const
+{
+ vert->image = image;
+ calcTileSDL(vert, x, y);
+}
+
void SDLGraphics::calcTileSDL(ImageVertexes *const vert, int x, int y) const
{
// Check that preconditions for blitting are met.
diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h
index 80c6d1c79..30cc3c876 100644
--- a/src/render/sdlgraphics.h
+++ b/src/render/sdlgraphics.h
@@ -177,6 +177,10 @@ class SDLGraphics final : public Graphics
const Image *const image,
const int x, const int y,
const int w, const int h) const;
+
+ void inline calcTileVertexesInline(ImageVertexes *const vert,
+ const Image *const image,
+ int x, int y) const;
};
#endif // USE_SDL2