summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-03-30 18:40:33 -0400
committerkwolekr <kwolekr@minetest.net>2013-03-30 22:02:46 -0400
commit7d3b3890b5fde204051662f5ad73dd5d75e0a6f8 (patch)
tree38acd8a38fa9e25196ae165412acacd299ad8f34 /src/main.cpp
parent96387ee88a89d172fa23ef325a15da510afac3e5 (diff)
downloadminetest-7d3b3890b5fde204051662f5ad73dd5d75e0a6f8.tar.gz
minetest-7d3b3890b5fde204051662f5ad73dd5d75e0a6f8.tar.bz2
minetest-7d3b3890b5fde204051662f5ad73dd5d75e0a6f8.zip
Add a small optimization to the menu splash and remove a old comment
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 439b59d31..08af6a37d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -682,9 +682,6 @@ void drawMenuHeader(video::IVideoDriver* driver) {
driver->getTexture(path.c_str());
if(splashtexture) {
- //v2s32 splashsize((splashtexture->getOriginalSize().Width*100)/
- // splashtexture->getOriginalSize().Height, 80);
-
f32 mult = (((f32)screensize.Width / 2)) /
((f32)splashtexture->getOriginalSize().Width);
@@ -712,9 +709,10 @@ void drawMenuHeader(video::IVideoDriver* driver) {
// Draw the Splash over the clouds and under the main menu
void drawMenuSplash(video::IVideoDriver* driver) {
core::dimension2d<u32> screensize = driver->getScreenSize();
- if (getTexturePath("menusplash.png") != "") {
+ std::string path = getTexturePath("menusplash.png");
+ if (path[0]) {
static const video::ITexture *splashtexture =
- driver->getTexture(getTexturePath("menusplash.png").c_str());
+ driver->getTexture(path.c_str());
if(splashtexture) {
core::rect<s32> splashrect(0, 0, screensize.Width, screensize.Height);