Fix invalid usage of texture->getSize() where actually texture->getOriginalSize(...
authorsapier <Sapier at GMX dot net>
Tue, 22 Oct 2013 17:31:49 +0000 (19:31 +0200)
committersapier <Sapier at GMX dot net>
Sun, 3 Nov 2013 22:00:54 +0000 (23:00 +0100)
src/guiEngine.cpp
src/mesh.cpp

index ac19274c3191581ed37e979082dbd6daabfbe1b3..a96a832c452b1a9ad49c48ff12385b9ed0033907 100644 (file)
@@ -390,7 +390,7 @@ void GUIEngine::drawBackground(video::IVideoDriver* driver)
        }
 
        /* Draw background texture */
-       v2u32 sourcesize = texture->getSize();
+       v2u32 sourcesize = texture->getOriginalSize();
        driver->draw2DImage(texture,
                core::rect<s32>(0, 0, screensize.X, screensize.Y),
                core::rect<s32>(0, 0, sourcesize.X, sourcesize.Y),
@@ -409,7 +409,7 @@ void GUIEngine::drawOverlay(video::IVideoDriver* driver)
                return;
 
        /* Draw background texture */
-       v2u32 sourcesize = texture->getSize();
+       v2u32 sourcesize = texture->getOriginalSize();
        driver->draw2DImage(texture,
                core::rect<s32>(0, 0, screensize.X, screensize.Y),
                core::rect<s32>(0, 0, sourcesize.X, sourcesize.Y),
@@ -427,7 +427,7 @@ void GUIEngine::drawHeader(video::IVideoDriver* driver)
        if(!texture)
                return;
 
-       f32 mult = (((f32)screensize.Width / 2)) /
+       f32 mult = (((f32)screensize.Width / 2.0)) /
                        ((f32)texture->getOriginalSize().Width);
 
        v2s32 splashsize(((f32)texture->getOriginalSize().Width) * mult,
@@ -445,7 +445,7 @@ void GUIEngine::drawHeader(video::IVideoDriver* driver)
 
        driver->draw2DImage(texture, splashrect,
                core::rect<s32>(core::position2d<s32>(0,0),
-               core::dimension2di(texture->getSize())),
+               core::dimension2di(texture->getOriginalSize())),
                NULL, NULL, true);
        }
 }
@@ -477,7 +477,7 @@ void GUIEngine::drawFooter(video::IVideoDriver* driver)
 
                driver->draw2DImage(texture, rect,
                        core::rect<s32>(core::position2d<s32>(0,0),
-                       core::dimension2di(texture->getSize())),
+                       core::dimension2di(texture->getOriginalSize())),
                        NULL, NULL, true);
        }
 }
index 5e5f9f8637c2481a257134e96b9a0c8241e5063b..3200d5fa6c2fd453fc44ab4bc97ca117e563e1f0 100644 (file)
@@ -260,7 +260,7 @@ scene::IAnimatedMesh* createExtrudedMesh(video::ITexture *texture,
                video::IVideoDriver *driver, v3f scale)
 {
        scene::IAnimatedMesh *mesh = NULL;
-       core::dimension2d<u32> size = texture->getSize();
+       core::dimension2d<u32> size = texture->getOriginalSize();
        video::ECOLOR_FORMAT format = texture->getColorFormat();
        if (format == video::ECF_A8R8G8B8)
        {