mirror of
https://github.com/minetest/minetest.git
synced 2024-12-25 07:32:24 +01:00
Add a small optimization to the menu splash and remove a old comment
This commit is contained in:
parent
96387ee88a
commit
7d3b3890b5
@ -682,9 +682,6 @@ void drawMenuHeader(video::IVideoDriver* driver) {
|
|||||||
driver->getTexture(path.c_str());
|
driver->getTexture(path.c_str());
|
||||||
|
|
||||||
if(splashtexture) {
|
if(splashtexture) {
|
||||||
//v2s32 splashsize((splashtexture->getOriginalSize().Width*100)/
|
|
||||||
// splashtexture->getOriginalSize().Height, 80);
|
|
||||||
|
|
||||||
f32 mult = (((f32)screensize.Width / 2)) /
|
f32 mult = (((f32)screensize.Width / 2)) /
|
||||||
((f32)splashtexture->getOriginalSize().Width);
|
((f32)splashtexture->getOriginalSize().Width);
|
||||||
|
|
||||||
@ -712,9 +709,10 @@ void drawMenuHeader(video::IVideoDriver* driver) {
|
|||||||
// Draw the Splash over the clouds and under the main menu
|
// Draw the Splash over the clouds and under the main menu
|
||||||
void drawMenuSplash(video::IVideoDriver* driver) {
|
void drawMenuSplash(video::IVideoDriver* driver) {
|
||||||
core::dimension2d<u32> screensize = driver->getScreenSize();
|
core::dimension2d<u32> screensize = driver->getScreenSize();
|
||||||
if (getTexturePath("menusplash.png") != "") {
|
std::string path = getTexturePath("menusplash.png");
|
||||||
|
if (path[0]) {
|
||||||
static const video::ITexture *splashtexture =
|
static const video::ITexture *splashtexture =
|
||||||
driver->getTexture(getTexturePath("menusplash.png").c_str());
|
driver->getTexture(path.c_str());
|
||||||
|
|
||||||
if(splashtexture) {
|
if(splashtexture) {
|
||||||
core::rect<s32> splashrect(0, 0, screensize.Width, screensize.Height);
|
core::rect<s32> splashrect(0, 0, screensize.Width, screensize.Height);
|
||||||
|
Loading…
Reference in New Issue
Block a user