next, in main() object 'world' is created. this object creats pointers to driver, scene manager and device. everything works, but when i call loadPK3(), it fails to open pk3 file. directories match perfectly, i dont knw what to hook on. maybe there is some kind of exceptions class like in java? returned plain 'false' isnt enough to get rid of this...
roxaz wrote:by default paths are ignored so i dont need full path. i gues i have to set working directory, but i dont know how to do so
So, does this only happen when running from your IDE? If so, what IDE are you using?
In VS2005 Pro I right-click on the project, choose Properties, choose Debugging in the left pane and add $(TargetDir) in the Working Folder on the right.
Note: do this for running Release builds as well [Ctrl-F5]! Slightly confusing having to add settings to the Debugging pane when running without the debugger, but that's MS for you!
Tiny tip: if you select All Configurations in the Configuration drop-down box you can simultaneously set the working folder for Debug, Release, etc.
im using vc++ 2005 express v8. actualy i dont know if it happens only with vc++, i havent tried it on other IDE. however it doesnt work.
const c8 *currentDir = device->getFileSystem()->getWorkingDirectory(); might be useful, if i use this, i have to join const c8 *currentDir with const c8 *pkName. now there is another problem, strcat works with char only, tipecasting doesnt work...
edit:
i managed to get typecasting working but pk3 still isnt loading.. :/
whatever it is, its compilers error. i tried my code on dev-cpp, it worked perfect! cruel world... cant use dec-cpp - no support for directx, cant use vc++ - thx to Micro$ux developers and theur crazy compiler. any ideas what it could be with vc++?
ah one more thingy, i set working dir to C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\myProj\ and it still refuses to work. so what dir should be? \myProj\Debug? this is not working too