diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-02-18 22:25:13 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-02-18 22:25:13 +0200 |
commit | 74f4a0ece8457d6519f7e5ae9fab20aea6ff8cf3 (patch) | |
tree | 00166815145613b3642a0ce646f980b90bfcb624 /src | |
parent | fcecaddb5648a649de063f4274a353b221791244 (diff) | |
download | minetest-74f4a0ece8457d6519f7e5ae9fab20aea6ff8cf3.tar.gz minetest-74f4a0ece8457d6519f7e5ae9fab20aea6ff8cf3.tar.bz2 minetest-74f4a0ece8457d6519f7e5ae9fab20aea6ff8cf3.zip |
Set ambient light in inventory cube generation
Diffstat (limited to 'src')
-rw-r--r-- | src/tile.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tile.cpp b/src/tile.cpp index 16140958f..cfbb68249 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -32,6 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc., */ inline bool replace_ext(std::string &path, const char *ext) { + if(ext == NULL) + return false; // Find place of last dot, fail if \ or / found. s32 last_dot_i = -1; for(s32 i=path.size()-1; i>=0; i--) @@ -1098,6 +1100,8 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg, /*scene::ILightSceneNode *light =*/ smgr->addLightSceneNode(0, v3f(-50, 100, 0), video::SColorf(0.5,0.5,0.5), 1000); + smgr->setAmbientLight(video::SColorf(0.2,0.2,0.2)); + // Render scene driver->beginScene(true, true, video::SColor(0,0,0,0)); smgr->drawAll(); |