Re: [Super-tux-devel] Worldmap
Brought to you by:
wkendrick
From: Ingo R. <gr...@gm...> - 2004-03-21 14:48:18
|
Ricardo Cruz <ri...@ae...> writes: > That sounds really great! But when I try to run it, I get: > > [rick2@docelar supertux]$ supertux --worldmap > supertux: worldmap.cpp:128: void WorldMapNS::WorldMap::load_map(): Assertion > `in' failed. > Aborted > > What's the problem? 'File not found', most likly due to the lack of the worldmap being hooked up in the Makefile, thus not getting 'make installed'. Which brings up the topic of how we should handle errors. I think we should go for normal C++ exceptions, passing around such errors with return codes would be a major pain. At the moment my code uses mostly assert() since there currently isn't much usefull the worldmap can do if it can't find content. > I also don't like the fact that we have to do 'make install', in > order to run the game :( Neither does me, I can fix this unless somebody else wants to do the work. Changes for this would basically some startup code that finds the binary location (/proc/self/exe) and sets a 'datadir' variable pointing to it. In the game code I then need to replace DATA_PREFIX with datadir and make sure that everything gets strcat()'s or whatever properly, in the same run I can replace a bunch of char* with std::string. Current workaround by the way is: ./configure --prefix=$PWD -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |