Game Development Community

dev|Pro Game Development Curriculum

Source code of non-pro max2dts exporter for max 9

by Feng Ning · 07/07/2008 (9:52 am) · 2 comments

Download Code File

This is the compilable source code of non-pro max2dts exporter for max 9 (SVN patch file based on TGE SDK 1.5.2)

I did not include the the project file because I'm using VC 9. To create the project file, basically just need to dup the VS2005\max2dtsExporter_Max4.vcproj and point all references to max sdk 9. And its project dependency is Torque Tool Lib.

Note:
Exported file can be used in games but can not be viewed by TST, because its version is 25 and TST can only view file up to version 24. To temporarily make it viewable, either modify 'S32 TSShape::smVersion = 25;' in top of engine\ts\tsShape.cc and recompile, or modify the first byte of exported file to 24 using a hex editor.

DTS/DSQ version 25:
In engine\ts\tsMaterialList.cc, bool TSMaterialList::read(Stream & s), I found version 25 is about multi-lightmaps. The non-pro exporter within the SDK does not include this feature since it wasn't updated for a long time. Can anybody add this feature? That would be wonderful.

Changes:
1. Updated all TSMesh::tverts due to engine upgrade
2. Updated MakeRefByID(), NoRemap() due to max upgrade
3. Fixed a const Point3 to Point3 & conversion
4. Changed all MultiRes related IParamBlock to IParamBlock2
5. Commented out a duplicate declaration in engine/platformWin32/winMemory.cc
6. Fixed the TORQUE_DISABLE_MEMORY_MANAGER macro (This one should be optional)

Change #2-6 are searched from other resources and posts. Thanks you guys =)

About the author

Recent Blogs


#1
08/11/2008 (5:32 am)
cool...
#2
08/15/2009 (7:49 am)
Nice one Feng,

I used your patch to compile for max2010, see HERE