aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-03-31 12:27:05 +0200
committerWeblate <42@minetest.ru>2013-03-31 12:27:05 +0200
commit319662c0ed047c6604d802336b54c325867fcab9 (patch)
tree5e30a3f9568ddafc41420f8d5bedc1c5dacce6e2 /src/main.cpp
parent5b597a6bfacda92006d153159929c8d777b4df89 (diff)
parenta2e5706661b2aa4796c01a251bc05ae3eb93f9d6 (diff)
downloadminetest-319662c0ed047c6604d802336b54c325867fcab9.tar.gz
minetest-319662c0ed047c6604d802336b54c325867fcab9.tar.bz2
minetest-319662c0ed047c6604d802336b54c325867fcab9.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2e57a8c20..08af6a37d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -618,7 +618,7 @@ void drawMenuBackground(video::IVideoDriver* driver) {
std::string path = getTexturePath("menubg.png");
if (path[0]) {
- video::ITexture *bgtexture =
+ static const video::ITexture *bgtexture =
driver->getTexture(path.c_str());
if (bgtexture) {
@@ -646,7 +646,7 @@ void drawMenuFooter(video::IVideoDriver* driver, bool clouds) {
std::string path = getTexturePath(clouds ?
"menufooter_clouds.png" : "menufooter.png");
if (path[0]) {
- video::ITexture *footertexture =
+ static const video::ITexture *footertexture =
driver->getTexture(path.c_str());
if (footertexture) {
@@ -678,13 +678,10 @@ void drawMenuHeader(video::IVideoDriver* driver) {
std::string path = getTexturePath("menuheader.png");
if (path[0]) {
- video::ITexture *splashtexture =
+ static const video::ITexture *splashtexture =
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") != "") {
- video::ITexture *splashtexture =
- driver->getTexture(getTexturePath("menusplash.png").c_str());
+ std::string path = getTexturePath("menusplash.png");
+ if (path[0]) {
+ static const video::ITexture *splashtexture =
+ driver->getTexture(path.c_str());
if(splashtexture) {
core::rect<s32> splashrect(0, 0, screensize.Width, screensize.Height);