GRAPHICS: Enable drawing of bitmaps/tiles with just one sub-image

Instead of using the number of sub-images to decide whether bitmaps
should be drawn using TIL information, better use the existance
of texture coordinates which are distinctive for tiles.
This commit is contained in:
Christian Krause 2015-05-05 02:06:21 +02:00
parent 11ca8cca47
commit d7e7ee214d
3 changed files with 4 additions and 4 deletions

View file

@ -1137,8 +1137,8 @@ void GfxOpenGL::createBitmap(BitmapData *bitmap) {
void GfxOpenGL::drawBitmap(const Bitmap *bitmap, int dx, int dy, uint32 layer) {
// The PS2 version of EMI uses a TGA for it's splash-screen
// avoid using the TIL-code below for that, by checking
// numImages here:
if (g_grim->getGameType() == GType_MONKEY4 && bitmap->_data->_numImages > 1) {
// for texture coordinates set by BitmapData::loadTile
if (g_grim->getGameType() == GType_MONKEY4 && bitmap->_data && bitmap->_data->_texc) {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();