Linkmap bug fix for 1.5.1
by Tom Spilman · in Torque Game Builder · 08/05/2007 (7:06 pm) · 5 replies
Link maps do not work with 1.5.1 because of a change to t2dImageMapDatablock::onAdd()...
... because link maps do not have a src bitmap name they never get compiled and won't show up. The fix is simple...
Now if you need them to work for stock TGB 1.5.1 you can do this...
... so far in testing the dummy image name doesn't seem to affect anything and makes it work.
// Compile ImageMap.
if( mSrcBitmapName && *mSrcBitmapName )
compileImageMap();... because link maps do not have a src bitmap name they never get compiled and won't show up. The fix is simple...
// Compile ImageMap.
if( (mSrcBitmapName && *mSrcBitmapName) || mImageMode == T2D_IMAGEMODE_LINK)
compileImageMap();Now if you need them to work for stock TGB 1.5.1 you can do this...
new t2dImageMapDatablock(mylinkmap) {
imageName = "dummy";
imageMode = "LINK";
linkImageMaps = "map1 map2 map3";
};... so far in testing the dummy image name doesn't seem to affect anything and makes it work.
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
#2
Its mainly the OR check that is added (readded?) that makes the difference :)
08/06/2007 (9:28 am)
Sure, without the source change, the datablock is pointless.Its mainly the OR check that is added (readded?) that makes the difference :)
#3
08/06/2007 (9:55 am)
Actually the datablock example should work without the source code change... that's the point of that example... it is how to work around the bug in stock TGB 1.5.1.
#4
Also I can still create in the datablock.cs file a hand coded animation using the link image so it doesn't stop my work.
08/06/2007 (10:28 am)
Could it be how the dummy name added? I've noticed in my datablock file that the imageName is often prefaced with either a "~/......" or a "./........".Also I can still create in the datablock.cs file a hand coded animation using the link image so it doesn't stop my work.
#5
08/06/2007 (10:46 am)
I can't say James. In our project just adding imageName = "dummy" makes linkmaps work... nothing else.
Torque Owner James Daniel