Skip to content

Commit

Permalink
Fix invalid usage of texture->getSize() where actually texture->getOr…
Browse files Browse the repository at this point in the history
…iginalSize() was meant
  • Loading branch information
sapier authored and sapier committed Nov 3, 2013
1 parent 5fbc39a commit 68bbdf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/guiEngine.cpp
Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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,
Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/mesh.cpp
Expand Up @@ -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)
{
Expand Down

0 comments on commit 68bbdf1

Please sign in to comment.