summaryrefslogtreecommitdiff
path: root/src/irrlichtwrapper.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-25 16:04:51 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-25 16:04:51 +0200
commit07a759fdb8c3239aabb271cbd24e8b24b2dee435 (patch)
treee5f11e37f60dbecc0de6b502392058c917b917ce /src/irrlichtwrapper.cpp
parentc37eb9b139a6730e2bd835dd8820a3be92b855cb (diff)
downloadminetest-07a759fdb8c3239aabb271cbd24e8b24b2dee435.tar.gz
minetest-07a759fdb8c3239aabb271cbd24e8b24b2dee435.tar.bz2
minetest-07a759fdb8c3239aabb271cbd24e8b24b2dee435.zip
better caves
Diffstat (limited to 'src/irrlichtwrapper.cpp')
-rw-r--r--src/irrlichtwrapper.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/irrlichtwrapper.cpp b/src/irrlichtwrapper.cpp
index 30de6846c..81cd7f9f0 100644
--- a/src/irrlichtwrapper.cpp
+++ b/src/irrlichtwrapper.cpp
@@ -1,4 +1,5 @@
#include "irrlichtwrapper.h"
+#include "constants.h"
IrrlichtWrapper::IrrlichtWrapper(IrrlichtDevice *device)
{
@@ -119,10 +120,17 @@ video::ITexture * CrackTextureMod::make(video::ITexture *original,
assert(baseimage);
video::ITexture *other = driver->getTexture("../data/crack.png");
+
// We have to get the whole texture because getting a smaller area
// messes the whole thing. It is probably a bug in Irrlicht.
+ // NOTE: This doesn't work probably because some systems scale
+ // the image to fit a texture or something...
+ /*video::IImage *otherimage = driver->createImage(
+ other, core::position2d<s32>(0,0), other->getSize());*/
+ // This should work on more systems
video::IImage *otherimage = driver->createImage(
- other, core::position2d<s32>(0,0), other->getSize());
+ other, core::position2d<s32>(0,0),
+ v2u32(16, CRACK_ANIMATION_LENGTH * 16));
assert(otherimage);