Overlayeditor problem

Problems building or running the engine, queries about how to use features etc.
User avatar
scarpelius
Halfling
Posts: 50
Joined: Sun Aug 29, 2004 8:17 am
Location: Romania, Bucharest

Overlayeditor problem

Post by scarpelius »

After hours of struggle with the code to compile and searching through forum for answers I finally manage to compile the OverlayEditor code. Especially I have trouble in ManagerDlg.cpp in line 422 where I have to convert an Ogre::String to a LPCTSTR an I change it to
HTREEITEM node = pWndOverlayTree->InsertItem (pChildGuiElement->getName().c_str(), parent, NULL) ;

Now the big problem is this:

Code: Select all

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: ...new\Samples\Common\bin\Debug\OverlayEditor.exe
File: g:\program files\ogre3d\ogrenew\...\ogreov...ger.cpp
Line: 54

Expression: ms_Singleton

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
---------------------------
Abort   Retry   Ignore   
---------------------------
Is there anything to change in configuration file like in resource.cfg where I chage the path of OverlayEditorMedia.zip to my real path?
And where should be BackgroundImageOverlay which is mentioned here:

Code: Select all

bool isBackgroundSet () {
    return (OverlayManager::getSingleton ().getByName ("BackgroundImageOverlay") != NULL) ;
  }
OverlayEditorMedia.zip only have a material file OverlayEditor.material and a png file resizepoint.png
User avatar
scriptkid
Bronze Sponsor
Bronze Sponsor
Posts: 88
Joined: Fri Jun 25, 2004 8:16 pm
Location: The Hague, Netherlands

Post by scriptkid »

Hi,

i've had some other complaints about people having trouble with putting an Ogre::String.c_str() into a MFC CString. I use VC6 and have had no such problems...

The assert looks like the OverlayManager isn't loaded. Did you compile it and put it in your Plugins file?

I will have to look into the OverlayEditorMedia.zip problem. I downloaded the overlayeditor.zip file myself and see that there is no such media file in it, which is weird. I have to look at my PC at home. I think you can change the path in your resources.cfg file without problems.

The BackgroundImageOverlay is created when you set a background. It is not initially availabe. (That's why the check is in place).

Btw. i ported the editor to support the Crazy Eddie's GUI library. His site is here: http://crayzedsgui.sourceforge.net/index.php

The (new) editor can be found here:
http://www.2dgame-tutorial.com/download ... Editor.zip

And it's "thread" here:
http://crayzedsgui.sourceforge.net/modu ... topic&t=75

But i will come back on your errors anyway! :-)
User avatar
scriptkid
Bronze Sponsor
Bronze Sponsor
Posts: 88
Joined: Fri Jun 25, 2004 8:16 pm
Location: The Hague, Netherlands

Post by scriptkid »

Hi,

the media zip file is a seperate download. It's here:

http://www.2dgame-tutorial.com/ogre/Ove ... rMedia.zip

you can see an example usage here:

http://www.2dgame-tutorial.com/ogre/resources.cfg

Good luck (sorry for the rather late reply :oops: )