get name of map via code?

Grom

13-03-2007 18:04:31

I notice that the actual directories containing the heightmap and texture map page textures aren't included in the resource.cfg file. I want to access these textures, but I don't want to have to hardcode it into my application.

Basically, how can I get the name of the map being used via code? So that I can add the right folder as a resource group and start reading the images?

vanzu

13-03-2007 23:29:44

I didn't try it but this may be what you look for.


Ogre::String * mapname;
mSceneManager->getOption("CurrentMap", mapname);


That being said I believe the terrain folder is already loaded by the resource manager so you dont need to do anything actually.

I may be wrong though