Map2dif
by Jon Law · in Torque Game Engine · 09/29/2005 (7:01 pm) · 41 replies
Hello, i am having problems compiling map2diff for mac.. im running OSX 10.4 and xcode 2.1
i think the main problem is i simply dont know what im doing
if someone could put a step by step instruction on how to compile from scratch that would be amazingly helpful
thanks
i think the main problem is i simply dont know what im doing
if someone could put a step by step instruction on how to compile from scratch that would be amazingly helpful
thanks
About the author
#22
02/04/2006 (2:20 am)
Ok, i got it to work using the command line that Paul gave us but now it says there is an error opening the .map file at the bottom, it comes up with all the copyright info for the tool though, im using a .map file that i saved from radiant, do i need to export a .map file from radiant so that it is somehow compiled? any help is appreciated
#23
02/06/2006 (11:10 pm)
Come one... someone must have an answer please anything!
#24
Let's assume:
1. map2dif is located at /Users/charles/torque/example/map2dif
2. Your map file is /Users/charles/torque/maps/exportFromRadiant.map
3. Your textures reside in /Users/charles/textures
Try the command:
If this doesn't work, then I'm sorry. I've commandeered my wife's XP laptop so I haven't touched the OS X version of map2dif in a long time.
02/07/2006 (2:55 am)
The command-line Paul provided used relative path names. The one I stated used absolute. Which are you using? I haven't been able to get it to work using relative.Let's assume:
1. map2dif is located at /Users/charles/torque/example/map2dif
2. Your map file is /Users/charles/torque/maps/exportFromRadiant.map
3. Your textures reside in /Users/charles/textures
Try the command:
/Users/charles/torque/example/map2dif -t /Users/charles/textures /Users/charles/torque/maps/exportFromRadiant.map
If this doesn't work, then I'm sorry. I've commandeered my wife's XP laptop so I haven't touched the OS X version of map2dif in a long time.
#25
02/07/2006 (9:01 am)
The same thing as before, just says, 'unable to load map file' what have i done wrong?
#26
02/08/2006 (10:35 am)
Anyone??? any help is appreciated, please help!
#27
02/08/2006 (11:29 am)
Well, "unable to load map file" is different than your "command not found error." Could the .map be in the wrong spot? Please paste your exact command line so we could help out. A few people, including myself, have said exactly how to run the command. There's nothing we're hiding. I don't really have a problem with it - I just choose not to use it on my Mac.
#28
what am i doing wrong here, is it because it can't load the .map file for some reason, please any help is greatly appreciated
02/16/2006 (4:25 am)
This is what i get and the command line i put in to terminal/Users/tim/torque/example/map2dif -t /Users/tim/textures /Users/tim/torque/maps/map.map map2dif - Torque .MAP file converter Copyright (C) GarageGames.com, Inc. Program version: 1.0r Programmers: John Folliard, Dave Moore, and Matthew Fairfax Built: Sep 22 2005 at 13:37:17 Loading /Users/tim/torque/maps/map.map Initial texture search path is set to "/Users/tim/textures/" Unable to load map file: /Users/tim/torque/maps/map.map
what am i doing wrong here, is it because it can't load the .map file for some reason, please any help is greatly appreciated
#29
i have a copy of map2diff in my map folder and all textures ... now I drag my .map file onto map2diff and .. thats it...
Good luck
Berndt
02/16/2006 (5:13 am)
Here is my drag and drop workflow ...i have a copy of map2diff in my map folder and all textures ... now I drag my .map file onto map2diff and .. thats it...
Good luck
Berndt
#30
02/16/2006 (9:19 am)
Wow cool, i'll try that! double post!! thanks for your help
#31
02/16/2006 (9:23 am)
When you say, you drop the map file on the map2dif do you mean in the finder window, i tried that and it doesn't work, it won't let you drop the .map file on the map2dif executable any suggestions?
#32
02/16/2006 (9:32 am)
I have virtual PC 6 with windows xp, would it be easier to do this whole conversion process in that?
#33
02/18/2006 (2:06 am)
Any help please!
#34
Platform::currentWorkingDirectory() wasn't working right when running map2dif.
Here's the fix:
In macCarbFileio.cc, completely replace Platform::getWorkingDirectory() with this:
02/20/2006 (5:04 pm)
Ok, took a look at this today, it's a bug.Platform::currentWorkingDirectory() wasn't working right when running map2dif.
Here's the fix:
In macCarbFileio.cc, completely replace Platform::getWorkingDirectory() with this:
StringTableEntry Platform::getWorkingDirectory()
{
if(!cwd)
{
char cwd_buf[MAX_MAC_PATH_LONG];
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef bundleUrl = CFBundleCopyBundleURL(mainBundle);
bool inside = true;
bool outside = false;
bool done = false;
while(!done)
{
// first look for game content inside the application bundle.
// then we look outside the bundle
// then we assume it's a tool, and the "bundle" = the binary file.
CFURLRef workingUrl;
if(inside)
workingUrl = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault,bundleUrl,CFSTR("Contents/Resources"),true);
else if(outside)
workingUrl = CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorSystemDefault, bundleUrl);
else
{
workingUrl = bundleUrl;
CFRetain(workingUrl); // so that we can release bundleUrl twice.
}
CFStringRef workingString = CFURLCopyFileSystemPath(workingUrl, kCFURLPOSIXPathStyle);
CFMutableStringRef normalizedString = CFStringCreateMutableCopy(NULL, 0, workingString);
CFStringNormalize(normalizedString,kCFStringNormalizationFormC);
CFStringGetCString(normalizedString, cwd_buf, sizeof(cwd_buf)-1, kCFStringEncodingUTF8);
// if we dont see main.cs inside the bundle, try again looking outside
// we're done if we find it, or if we find it neither inside or outside.
if( isMainDotCsPresent(cwd_buf) || ( !inside && !outside))
done = true;
if(inside)
inside = false, outside = true;
else if(outside)
outside = false;
CFRelease(workingUrl);
CFRelease(workingString);
CFRelease(normalizedString);
}
//CFRelease(mainBundle); // apple docs say to release this, but that causes a sigsegv(11)
CFRelease(bundleUrl);
chdir(cwd_buf); // set the current working directory.
if(StringTable)
cwd = StringTable->insert(cwd_buf);
}
return cwd;
}
#35
02/20/2006 (11:12 pm)
Where is this file 'macCarbFileio.cc' is it inside the map2dif application and how do i get to it?
#36
02/22/2006 (8:50 am)
Anybody please??
#37
02/22/2006 (8:59 am)
It is in the platformMacCarb directory. When glancing at the TGE directory structure in Xcode, you should have noticed it.
#38
my solution is on PC, so I made a copy of map2dif.exe and have it in the same folder as my .map and the needed textures, I just drag the map on the exe and really thats it ...
Good luck
Berndt
03/05/2006 (11:06 am)
Hi Charles,my solution is on PC, so I made a copy of map2dif.exe and have it in the same folder as my .map and the needed textures, I just drag the map on the exe and really thats it ...
Good luck
Berndt
#39
Thanks Jesse
03/11/2006 (8:45 pm)
I am new... and disappointed. Has any Mac users developed any games by Mac people using TGE? It seems that most utilities are exclusive for "Window" users. When I say utilities... I mean the exporters for modelers and map programs. Even the feature charts here even say the same thing. It looks like I may have to put some money out for Maya or Lightwave, but is there an official GG exporter for these modelers? How long do I have to wait if there is an official GG exporter? I do not want to put out any more money until I have an anwser that supports my efforts. Thanks Jesse
#40
03/12/2006 (12:40 am)
Try Blender, it is free and very powerfull. And there is a great exporter for Torque, also for free.
Torque Owner Charles Andrew