]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
added simple skybox
authorPerttu Ahola <celeron55@gmail.com>
Fri, 29 Apr 2011 13:00:36 +0000 (16:00 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 29 Apr 2011 13:00:36 +0000 (16:00 +0300)
data/skybox1.png [new file with mode: 0644]
data/skybox2.png [new file with mode: 0644]
data/skybox3.png [new file with mode: 0644]
src/game.cpp

diff --git a/data/skybox1.png b/data/skybox1.png
new file mode 100644 (file)
index 0000000..9801d5f
Binary files /dev/null and b/data/skybox1.png differ
diff --git a/data/skybox2.png b/data/skybox2.png
new file mode 100644 (file)
index 0000000..a8c94b4
Binary files /dev/null and b/data/skybox2.png differ
diff --git a/data/skybox3.png b/data/skybox3.png
new file mode 100644 (file)
index 0000000..2776ec7
Binary files /dev/null and b/data/skybox3.png differ
index 6f0760ee9f129bdd6d09360787e4537e2977aa23..21d960db0c552dc88c353d8d2aadcbbb3638a5e3 100644 (file)
@@ -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