From 0847e550f0b5484471e7c02d54ed35443824a86e Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 29 Apr 2011 16:00:36 +0300 Subject: [PATCH] added simple skybox --- data/skybox1.png | Bin 0 -> 236 bytes data/skybox2.png | Bin 0 -> 231 bytes data/skybox3.png | Bin 0 -> 190 bytes src/game.cpp | 18 ++++++++++-------- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 data/skybox1.png create mode 100644 data/skybox2.png create mode 100644 data/skybox3.png diff --git a/data/skybox1.png b/data/skybox1.png new file mode 100644 index 0000000000000000000000000000000000000000..9801d5f4f2acd8bc96c46b57b9f0118393e354d5 GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Eu!2~2l3^S5}6k~CayA#8@b22Z19L@rd$YKTt zZeb8+WSBKa0w~B{;_2(kew#&>$3)ON&UHOdNH#MhqQp5rH#aq}1juDza4t$sEJ;mK zD9TWe19fdb&7bf`=Si84hC#z YV7R5vzsY`QMk2^&Pgg&ebxsLQ0K`yA{{R30 literal 0 HcmV?d00001 diff --git a/data/skybox2.png b/data/skybox2.png new file mode 100644 index 0000000000000000000000000000000000000000..a8c94b4d213ca9af3a6b523bc9fe4f52e4144701 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Eu!2~2l3^S5}6k~CayA#8@b22Z19L@rd$YKTt zZeb8+WSBKa0w~B{;_2(kew#&>$5P?Gp7jl&kZfj1M2T~LZf_#W!)6!6Xl!Z&P$E zPjVfPS>fYc$RlBp@PKWB_b>5D3@S$_Fu&O@w4V8e>sc4WOVO+@yiXpRn-$5MCUeD_qKkZfj1M2T~LZfmdKI;Vst07ZE)<^TWy literal 0 HcmV?d00001 diff --git a/src/game.cpp b/src/game.cpp index 6f0760ee9..21d960db0 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -605,10 +605,9 @@ void the_game( // The color of the sky - //video::SColor skycolor = video::SColor(255,90,140,200); - //video::SColor skycolor = video::SColor(255,166,202,244); - //video::SColor skycolor = video::SColor(255,120,185,244); - video::SColor skycolor = video::SColor(255,140,186,250); + //video::SColor skycolor = video::SColor(255,140,186,250); + + video::SColor bgcolor_bright = video::SColor(255,170,200,230); /* Draw "Loading" screen @@ -719,14 +718,14 @@ void the_game( /* Create skybox */ - /*scene::ISceneNode* skybox; + scene::ISceneNode* skybox; skybox = smgr->addSkyBoxSceneNode( driver->getTexture(porting::getDataPath("skybox2.png").c_str()), driver->getTexture(porting::getDataPath("skybox3.png").c_str()), driver->getTexture(porting::getDataPath("skybox1.png").c_str()), driver->getTexture(porting::getDataPath("skybox1.png").c_str()), driver->getTexture(porting::getDataPath("skybox1.png").c_str()), - driver->getTexture(porting::getDataPath("skybox1.png").c_str()));*/ + driver->getTexture(porting::getDataPath("skybox1.png").c_str())); /* Create the camera node @@ -1676,9 +1675,12 @@ void the_game( u8 l = decode_light((daynight_ratio * LIGHT_SUN) / 1000); video::SColor bgcolor = video::SColor( 255, - skycolor.getRed() * l / 255, + bgcolor_bright.getRed() * l / 255, + bgcolor_bright.getGreen() * l / 255, + bgcolor_bright.getBlue() * l / 255); + /*skycolor.getRed() * l / 255, skycolor.getGreen() * l / 255, - skycolor.getBlue() * l / 255); + skycolor.getBlue() * l / 255);*/ /* Update coulds -- 2.25.1