Getting the Directory

Hello !

In my Game i am using the following :

#ifdef __WIN32
the_file -> setDataDir (“data/”);
#elif APPLE
the_file -> setDataDir ("/Users/wizard/code/turrican/src/data/");
#elif __unix
the_file -> setDataDir ("/home/wizard/code/turrican/src/data/");
#endif

Under Win32 it works great, i can launch the Game from the
Command Line and can click on the icon and it finds all the
Data Files.

How to get the same behaviour under Mac OSX and Linux ?

CU

> Under Win32 it works great, i can launch the Game from the > Command Line and can click on the icon and it finds all the > Data Files. > > How to get the same behaviour under Mac OSX and Linux ?

You might wanna dig around Tux Paint’s “src/tuxpaint.c” in CVS
( http://www.newbreedsoftware.com/tuxpaint/download/source/#cvs )
to see what we’ve done so far.

I think it’d be better if our data were more relocatable, esp. since I’d
eventually like to see a Linux x86 ‘autopackage’ build made available.
(That sh*t kicks ass!)

-bill!On Mon, Oct 03, 2005 at 03:37:20PM +0200, Torsten Giebl wrote:

Torsten Giebl ha scritto:

Under Win32 it works great, i can launch the Game from the
Command Line and can click on the icon and it finds all the
Data Files.

How to get the same behaviour under Mac OSX and Linux ?

fnkdat should do what you need:

http://savannah.nongnu.org/projects/fnkdat
http://www.maccormack.net/~djm/fnkdat/--
SkunkGuru.