Compiled MapEditor successfully !!!

Buckcherry

25-07-2006 11:38:25

Hi everybody,

I have successfully compiled the MapEditor taken from CVS, but making the following changes:

In the MapEditorListener::keyPressed method I have change these lines:

else
{
if (e->getKey() == KC_T)
{
if (mCamera->getDetailLevel() == SDL_SOLID)
{
mCamera->setDetailLevel(SDL_WIREFRAME);
}
else
{
mCamera->setDetailLevel(SDL_SOLID);
}
}


For these ones:
else
{
/* if (e->getKey() == KC_T)
{
if (mCamera->getDetailLevel() == SDL_SOLID)
{
mCamera->setDetailLevel(SDL_WIREFRAME);
}
else
{
mCamera->setDetailLevel(SDL_SOLID);
}
}
*/
printf("");
// Capture the screen to a PNG graphics file
}


In MapEditor::chooseSceneManager method I have change these lines:

void MapEditor::chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager( ST_EXTERIOR_REAL_FAR );
mSceneMgr->setWorldGeometry( "paginglandscape2.cfg" );

mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0));
}


For these ones:
void MapEditor::chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager("PagingLandScapeSceneManager2");
mSceneMgr->setWorldGeometry( "paginglandscape2.cfg" );

mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0));
}


But when I run the program I get the following exception error:

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManagerEnumerator::getSceneManager
Description: SceneManager instance with name 'PagingLandScapeSceneManager2' not found..
File: \OgreDev\Dagon\OgreMain\src\OgreSceneManagerEnumerator.cpp
Line: 259
Stack unwinding: <<beginning of stack>>
12:07:32: Unregistering ResourceManager for type BspLevel
12:07:32: *-*-* OGRE Shutdown
12:07:32: Unregistering ResourceManager for type Compositor
12:07:32: Unregistering ResourceManager for type Font
12:07:32: Unregistering ResourceManager for type Skeleton
12:07:32: Unregistering ResourceManager for type Mesh
12:07:32: Unregistering ResourceManager for type HighLevelGpuProgram
12:07:32: Unloading library .\Plugin_PagingLandScapeSceneManager2
12:07:32: Unloading library .\Plugin_CgProgramManager
12:07:32: Unloading library .\Plugin_OctreeSceneManager
12:07:32: Unloading library .\Plugin_BSPSceneManager
12:07:32: Unloading library .\Plugin_ParticleFX
12:07:32: *** Stopping Win32GL Subsystem ***
12:07:32: Unloading library .\RenderSystem_GL
12:07:32: Render Target 'OGRE Render Window' Average FPS: 0 Best FPS: 0 Worst FPS: 999
12:07:33: D3D9 : Shutting down cleanly.
12:07:33: Unregistering ResourceManager for type Texture
12:07:33: Unregistering ResourceManager for type GpuProgram
12:07:33: D3D9 : Direct3D9 Rendering Subsystem destroyed.
12:07:33: Unloading library .\RenderSystem_Direct3D9
12:07:33: Unregistering ResourceManager for type Material
12:07:33: Unloading library OgrePlatform.dll


What is wrong?

tuan kuranes

25-07-2006 12:32:49

you need to create the scene manager (getscenemanager is old ogre code)
After that you'll surely run into other troubles... be sure to check goofed before messing with it (either to have source code example to patch mapeditor or to directly use it.)

Buckcherry

25-07-2006 12:46:11

Yep, I have changed:

getSceneManager( ST_EXTERIOR_REAL_FAR );

by:

createSceneManager( ST_EXTERIOR_REAL_FAR );

When I run the program I get the following exception:

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: OverlayElement::setMaterialName
Description: Could not find material Core/StatsBlockCenter.
File: \OgreDev\Dagon\OgreMain\src\OgreOverlayElement.cpp
Line: 317
Stack unwinding: <<beginning of stack>>
13:23:51: Unregistering ResourceManager for type BspLevel
13:23:51: *-*-* OGRE Shutdown
13:23:51: Unregistering ResourceManager for type Compositor
13:23:51: Unregistering ResourceManager for type Font
13:23:51: Unregistering ResourceManager for type Skeleton
13:23:51: Unregistering ResourceManager for type Mesh
13:23:51: Unregistering ResourceManager for type HighLevelGpuProgram
13:23:51: Unloading library .\Plugin_PagingLandScapeSceneManager2
13:23:51: Unloading library .\Plugin_CgProgramManager
13:23:51: Unloading library .\Plugin_OctreeSceneManager
13:23:51: Unloading library .\Plugin_BSPSceneManager
13:23:51: Unloading library .\Plugin_ParticleFX
13:23:51: *** Stopping Win32GL Subsystem ***
13:23:51: Unloading library .\RenderSystem_GL
13:23:51: Render Target 'OGRE Render Window' Average FPS: 0 Best FPS: 0 Worst FPS: 999
13:23:51: D3D9 : Shutting down cleanly.
13:23:51: Unregistering ResourceManager for type Texture
13:23:51: Unregistering ResourceManager for type GpuProgram
13:23:51: D3D9 : Direct3D9 Rendering Subsystem destroyed.
13:23:51: Unloading library .\RenderSystem_Direct3D9
13:23:51: Unregistering ResourceManager for type Material
13:23:51: Unloading library OgrePlatform.dll


What is wrong now?

tuan kuranes

25-07-2006 13:26:08

Could not find material Core/StatsBlockCenter

material is missing.

perharps a resources.cfg that lacks some mapeditor resources...
You might also have to get from older cvs, some cegui interface layout.

Buckcherry

25-07-2006 18:55:39

Where could I find the stuff I need?

tuan kuranes

25-07-2006 20:26:21

using ogre webcvs, browsing old version of plsm2 in ogreaddons.
Or find a link to an old complete binary version of mapeditor...

Buckcherry

25-07-2006 23:20:14

Do you have an old binary version of map editor???

tuan kuranes

25-07-2006 23:44:38

no... but I didn't search both forums...

Buckcherry

31-07-2006 15:10:01

Could anyone possibly post a link where to download an old binary version of map editor, please?.

Has anyone got PLSM2 working successfully??