Game Development Community

Torque Tool Lib project won't compile map2dif* for VS2005

by Danner Jones · in Torque Game Engine · 03/25/2007 (8:06 am) · 3 replies

Observed Behavior:
When loading up the "...VS2005\Torque 2005.sln" in VS2005 (I'm not using express, but shouldn't matter) and compiling map2dif or map2difPlus, get a linker error - there are functions missing in engine_Debug.lib. For example, sgClearDetailMapping.

Notes:
It appears as though the lightingSystem folder isn't included in the "Torque Tool Lib" project.

Suggested fix:
Simple matter of adding all the files under engine\lightingSystem to the "Torque Tool Lib" project and recompiling the engine_Debug.lib (or Release version). Then building map2dif and/or map2difPlus.

-ner

#1
03/27/2007 (5:01 pm)
Did you get your resulting compilation to work?

I was getting some nasty string buffer overflows in InteriorMap::setPath when I tried to compile a map.

I had to change
dSprintf(dir, dStrlen(Platform::getWorkingDirectory()) + 1, "%s/[[628142c133410]]", Platform::getWorkingDirectory());
to
dStrncpy(dir, Platform::getWorkingDirectory(),(int)dStrlen(Platform::getWorkingDirectory()));
	dir[(int)(dStrlen(Platform::getWorkingDirectory()) + 1)] = 0;
in order to rectify the assert.

Oddly enough, the directory I was specifying was only 42 characters long, and the string buffer is 4k. Go figure.

Now after I made that change I was able to stop the assert, but now it's crashing when generating the lightmap with a "not a power of 2" (interiorIO.cc line 947).

The pre-compiled EXE works fine on the same MAP file, but no matter what I do compiling my own doesn't work. :(

If you got it to work I'd love to hear what you did.
#2
03/28/2007 (1:16 pm)
I was just recompiling everything "from scratch" from 1.5 and received Visual Studio compile errors (maybe other projects include the lightingSystem files).

I use Quark for creating DIF interiors and wanted the latest version of map2dif for its use. I haven't actually tried out the compiled version yet - I'm still using a version I compiled from 1.4 without problem. I plan on re-creating a few DIFs this weekend, to test out my 1.5 compiled version - I'll post the results. I'll make sure to test the "clean" compiled version as I have some changes I need to merge into the map2dif code - hence my reason for getting map2dif to compile.

-ner
#3
03/28/2007 (10:17 pm)
Hi guys,
Be sure to check out this post and this post. The latter in particular has a wealth of bugfixes.

I never did get 1.5's version of Map2dif_plus working, but map2dif is working very nicely since I implemented Joel's fixes and stripped out the WAD entity processing code.

-- JohnDopp