You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(27) |
May
(60) |
Jun
(71) |
Jul
(66) |
Aug
(36) |
Sep
(58) |
Oct
(68) |
Nov
(30) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(97) |
Feb
(52) |
Mar
(6) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(32) |
Aug
(83) |
Sep
(47) |
Oct
(30) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
(92) |
Mar
(7) |
Apr
(41) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|
From: Ralph L. <rl...@in...> - 2012-10-01 23:40:41
|
Hi, > 4) "Window" > > I see that the OGRE plugin creates the graphic window then hands the window handle off to the GUI and INPUT managers which also need them to work. Ah, I see that for MyGUI it is all about the Ogre render window. Hmm, it's a bit dirty-feeling, but I can't think of a better way round it. Cheers, Ralph |
|
From: Ralph L. <rl...@in...> - 2012-10-01 18:49:25
|
Hi, I've been thinking about the OGE component architecture that we have from the point of view of a user and I have some thoughts. In general I see that the aims for OGE after Bile involve tackling some additional "interesting" functionality, but I think that there are some pretty fundamental issues that need to be locked down before we get there. Sorry about the longish ranty-sounding email. I know you're busy with other stuff at the moment. I'm just wanting to bounce some thoughts off you before I start barking up the wrong tree. A lot of this stuff may well have been discussed before I came to the project. All the old forum stuff has long since gone unfortunately. That Google hangout idea of yours is probably more useful at this stage, now I know a bit more about the code. Perhaps we could do that when things ease off for you a bit. Also, perhaps the forum might be a better place for this. ============= 1) "The anti-pattern" I see that the component design pattern is intended to create a minimalist extensible framework and is described quite eloquently here: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ ...which I saw referenced in a comment. The OGRE "Animation" component is derived from "GraphicsComponent" so that they both instantiate mesh nodes. This flummoxed me a bit when I was experimenting with my basic sample learning tool. I created an object with "GraphicsComponent" to create a static mesh. Then to animate it I added an Animate component. This caused issues because the Animate component is designed to *replace* GraphicsComponent rather than enhance it and they both are fighting to create the same mesh. Personally, I think this is an example of the anti-pattern that the component setup is trying to avoid. Each component should add enhancement to the object in co-operation with the other components. A logical consequence of that is that any combination of components should be feasible, even if it makes no practical sense to do so. Another example is the Camera/EnhancedCamera dichotomy. This leaves us with a dilemma: what is the proper solution? a) Solution 1: Animation is an inherent property of a mesh. Perhaps we should just roll the animation functionality into GraphicsComponent and accept that some functionality that is not always used cannot be farmed off to other components. The obvious danger here is component bloat which the component pattern is trying to avoid. b) Solution 2: Keep the Animation component separate but make it co-operate with the GraphicsComponent behind the scenes. The downsides to this are that i) Animation component on its own is pointless (unless we widen the role of the animation component, for example, pre-programmed sequences of rotation of a camera, say?), and ii) it might be difficult to tie the Animation and GraphicsComponent data together. They might also probably have to be instantiated in a set order and I don't like that kind of thing: it's just something else waiting to go wrong. This also touches on thought 2) below: if an object can have more than one mesh, which mesh does the animation refer to? ============= 2) "Multiple Instances" If I want an object to be composed of two or more meshes how might I achieve this? (Example, player mesh with a weapon mesh, or picks up an object) If I have an object that plays a sound, but sometimes emits another sound, is the best solution to this problem two audio components, or a single component that can handle multiple sounds simultaneously? (Example, a ticking alarm clock that additionally rings its bell on a timer). How might we organise scripting of this separate event? Is it a script attached to a component instance or directed at the object as a whole by sending it a message (how do we direct a message at a specific audio component, or even should we be doing this?)? Another way of handling the mesh picking up an object (or holding a weapon) is to have two co-operating objects. However, this sounds like it might involve a lot of message passing to keep the objects tied together in terms of rotation and displacement whereas two meshes attached to the same scene node is easier to maintain. Maybe it wouldn't be as bad as I think, though. For the audio conundrum, my feeling is that one audio component that can handle multiple sounds is probably the best solution. A script component attached to the object determines when to sound the alarm and sends itself a "Play Sound" message for the ring which is caught by the Audio component. Similarly for the mesh animation. However, if an object can play multiple sounds simultaneously, how do we separately manipulate them (start/stop/pause)? By resource id? Coming back to the final note in 1) above about associating an Animation with one of potentially many meshes, perhaps the flat component model is insufficient to represent the subtle interactions that we might need. A tree of inter-relations might be more suitable, albeit a little more complex to implement and set up. Might we add an "Animation" component to a specific "GraphicsComponent" rather than the object itself so that they connect structurally? The danger with all these structural flights of fancy are that we lose the simplicity of the message handling model that we currently have. ============= 3) "Templating" Currently, an object template contains a collection of components and little else. In terms of how useful this might be, I can see that a lot of other things could be hung off of the object that come from these template factories like scripts, initial values for those components (do we really need to specify the same initial mesh for all those robots?), sounds, animations etc. Is it intended that the game programmer will provide his/her own component factories in code by deriving their own component factories? I suggest that perhaps this would be difficult to define in game scripts if specific code is necessary to achieve the object instantiation. Dunno. ============= 4) "Window" I see that the OGRE plugin creates the graphic window then hands the window handle off to the GUI and INPUT managers which also need them to work. My gut is telling me that although it naturally feels right that the "graphical" subsystem should create the window, I think that the Window creation should be a core engine function. If it was, then a lot of the sequencing issues during startup between these managers would disappear. You could argue that the basic engine shouldn't necessarily have a window in it's most basic incarnation, like in the HelloWorld sample. My answer would be that we add some basic engine API that creates the Window in response to the first request from a plugin asking for the window as part of its initialisation. That way, if no plugin needs the window, it never gets created. Well, that's it for now. Cheers, Ralph |
|
From: Ralph L. <rl...@in...> - 2011-09-08 19:15:46
|
Hi, Sorry, not had much time to work on this: first week back to school for the kids and other stuff going on. Many apologies, will try to put some time in the next few days. Cheers, Ralph On 31/08/11 08:34, Juglea Stefan wrote: > Hello Ralph, > > I will appreciate if you send me the ogre dependencies for (VC8). > It will spare me a couple of hours to figure out how to build them > correctly. (i am not a programmer) > I thought that using 1.7.x will cause trouble. > > If you ever need graphics(2d or 3d), just ask. > Thank You, > Juglea Stefan-Ioan, > > ------------------------------------------------------------------------ > *From:* Ralph Little <rl...@in...> > *To:* Juglea Stefan <jug...@ya...>; Alex Peterson > <ale...@ma...>; "Oge...@li..." > <Oge...@li...> > *Sent:* Wednesday, August 31, 2011 6:19 PM > *Subject:* RE: Oge Compile issue VS2005 > > Hi, > Sounds like it is a problem with the Ogre version itself. > 1.4.x is pretty old now and OGE has moved on quite a bit since then. > > The easiest thing might be for me to actually regenerate you a new set > of up-to-date dependencies using Ogre 1.7 if that would be of use to you. > I am actually doing this right now for Windows testing although they > are for VC9 (2008). > If I can get a hold of a VC8 (2005) Express Edition then I will > generate a new set for you. > > You also have to understand that OGE (CVSHEAD) is actually part way > through development so there are no guarantees at this stage :D > > Cheers, > Ralph > ________________________________________ > From: Juglea Stefan [jug...@ya... > <mailto:jug...@ya...>] > Sent: Wednesday, August 31, 2011 1:08 AM > To: Steven.Gay; Alex Peterson; Ralph Little; > Oge...@li... > <mailto:Oge...@li...> > Subject: Oge Compile issue VS2005 > > Hello, > > I have a little issue with building Oge. > > I've downloaded the OGE_Dependencies_VC80_0_5, and with the CVS Head i > tried to build but i have those errors. > > Any ideea, any help? > > I am a little noob in programming, but i have friend that could help > me if you could direct me. We are more into graphics/3D graphics, so > if you need help, just ask. > > PS: I didn't build ogre 1.4.x. Just copied from the Oge dependencies > and Ogre 1.4.9 SDK the missing files(e.g. OgreCEGUIResourceProvider.h > and OgreCEGUIRenderer.h) > > Here is the log: > > > 1>------ Build started: Project: oge, Configuration: Debug Win32 ------ > 1>Compiling... > 1>OgeGraphicsManager.cpp > 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(400) : > error C2259: 'oge::OgreResourceGroupManager' : cannot instantiate > abstract class > 1> due to following members: > 1> 'void Ogre::ResourceGroupListener::scriptParseStarted(const > Ogre::String &,bool &)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(108) : see > declaration of 'Ogre::ResourceGroupListener::scriptParseStarted' > 1> 'void Ogre::ResourceGroupListener::scriptParseEnded(const > Ogre::String &,bool)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(112) : see > declaration of 'Ogre::ResourceGroupListener::scriptParseEnded' > 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(532) : > error C2440: 'initializing' : cannot convert from 'const > Ogre::RenderSystemList' to 'Ogre::RenderSystemList *' > 1> No user-defined-conversion operator available that can > perform this conversion, or the operator cannot be called > 1>OgeOgreArchive.cpp > 1>..\..\src\oge\systems\graphicssystem\OgeOgreArchive.cpp(163) : error > C2259: 'oge::OgreArchive' : cannot instantiate abstract class > 1> due to following members: > 1> 'Ogre::DataStreamPtr Ogre::Archive::open(const Ogre::String > &,bool) const' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreArchive.h(147) : see declaration > of 'Ogre::Archive::open' > 1> 'time_t Ogre::Archive::getModifiedTime(const Ogre::String > &)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreArchive.h(214) : see declaration > of 'Ogre::Archive::getModifiedTime' > 1>OgeEngineManager.cpp > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(218) : error C2059: syntax error : ')' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(223) : error C2059: syntax error : ',' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(238) : error C2059: syntax error : ')' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(243) : error C2059: syntax error : ',' > 1>OgeInputManager.cpp > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(525) : error > C2039: 'numKeyboards' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(526) : error > C2039: 'numMice' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(527) : error > C2039: 'numJoySticks' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>Project : warning PRJ0018 : The following environment variables were > not found: > 1>$(OGE) > 1>Build log was saved at "file://c:\Work\Open Game > Engine\ogeroot\oge\obj\Debug\BuildLog.htm" > 1>oge - 10 error(s), 0 warning(s) > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped > ========== > > > > > . |
|
From: Steven.Gay <laz...@gm...> - 2011-09-01 00:12:11
|
Congratulations Petrocket, I am happy to say you were promoted to OGE project admin :) You will be the active admin from now on and any design decisions are now yours. I will simply stay in the background as backup.It was always my fear that because I was the sole admin in case something happened to me then nobody could access the project anymore... My last recommendation would be to: - decrease drastically the number of dependencies (Poco & tbb where only added for thread support it could be worth to make a sub-library for this only purpose such as wrapping pthread and MS threads), - include the dependencies in the sourceforge code to make it easier for newbies and - try to make a small web browser plugin). Long Life OGE, Steven |
|
From: Ralph L. <rl...@in...> - 2011-08-31 17:34:47
|
Hi, OK, will do. It might take me a day or two though. I do have regular globs of time here and there but I have to squeeze it in between gouts of full-time employment :D Cheers, Ralph On 31/08/11 08:34, Juglea Stefan wrote: > Hello Ralph, > > I will appreciate if you send me the ogre dependencies for (VC8). > It will spare me a couple of hours to figure out how to build them > correctly. (i am not a programmer) > I thought that using 1.7.x will cause trouble. > > If you ever need graphics(2d or 3d), just ask. > Thank You, > Juglea Stefan-Ioan, > > ------------------------------------------------------------------------ > *From:* Ralph Little <rl...@in...> > *To:* Juglea Stefan <jug...@ya...>; Alex Peterson > <ale...@ma...>; "Oge...@li..." > <Oge...@li...> > *Sent:* Wednesday, August 31, 2011 6:19 PM > *Subject:* RE: Oge Compile issue VS2005 > > Hi, > Sounds like it is a problem with the Ogre version itself. > 1.4.x is pretty old now and OGE has moved on quite a bit since then. > > The easiest thing might be for me to actually regenerate you a new set > of up-to-date dependencies using Ogre 1.7 if that would be of use to you. > I am actually doing this right now for Windows testing although they > are for VC9 (2008). > If I can get a hold of a VC8 (2005) Express Edition then I will > generate a new set for you. > > You also have to understand that OGE (CVSHEAD) is actually part way > through development so there are no guarantees at this stage :D > > Cheers, > Ralph > ________________________________________ > From: Juglea Stefan [jug...@ya... > <mailto:jug...@ya...>] > Sent: Wednesday, August 31, 2011 1:08 AM > To: Steven.Gay; Alex Peterson; Ralph Little; > Oge...@li... > <mailto:Oge...@li...> > Subject: Oge Compile issue VS2005 > > Hello, > > I have a little issue with building Oge. > > I've downloaded the OGE_Dependencies_VC80_0_5, and with the CVS Head i > tried to build but i have those errors. > > Any ideea, any help? > > I am a little noob in programming, but i have friend that could help > me if you could direct me. We are more into graphics/3D graphics, so > if you need help, just ask. > > PS: I didn't build ogre 1.4.x. Just copied from the Oge dependencies > and Ogre 1.4.9 SDK the missing files(e.g. OgreCEGUIResourceProvider.h > and OgreCEGUIRenderer.h) > > Here is the log: > > > 1>------ Build started: Project: oge, Configuration: Debug Win32 ------ > 1>Compiling... > 1>OgeGraphicsManager.cpp > 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(400) : > error C2259: 'oge::OgreResourceGroupManager' : cannot instantiate > abstract class > 1> due to following members: > 1> 'void Ogre::ResourceGroupListener::scriptParseStarted(const > Ogre::String &,bool &)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(108) : see > declaration of 'Ogre::ResourceGroupListener::scriptParseStarted' > 1> 'void Ogre::ResourceGroupListener::scriptParseEnded(const > Ogre::String &,bool)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(112) : see > declaration of 'Ogre::ResourceGroupListener::scriptParseEnded' > 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(532) : > error C2440: 'initializing' : cannot convert from 'const > Ogre::RenderSystemList' to 'Ogre::RenderSystemList *' > 1> No user-defined-conversion operator available that can > perform this conversion, or the operator cannot be called > 1>OgeOgreArchive.cpp > 1>..\..\src\oge\systems\graphicssystem\OgeOgreArchive.cpp(163) : error > C2259: 'oge::OgreArchive' : cannot instantiate abstract class > 1> due to following members: > 1> 'Ogre::DataStreamPtr Ogre::Archive::open(const Ogre::String > &,bool) const' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreArchive.h(147) : see declaration > of 'Ogre::Archive::open' > 1> 'time_t Ogre::Archive::getModifiedTime(const Ogre::String > &)' : is abstract > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ogre/OgreArchive.h(214) : see declaration > of 'Ogre::Archive::getModifiedTime' > 1>OgeEngineManager.cpp > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(218) : error C2059: syntax error : ')' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(223) : error C2059: syntax error : ',' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(238) : error C2059: syntax error : ')' > 1>C:\Program Files\Microsoft Visual Studio > 8\VC\include\mbstring.h(243) : error C2059: syntax error : ',' > 1>OgeInputManager.cpp > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(525) : error > C2039: 'numKeyboards' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(526) : error > C2039: 'numMice' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(527) : error > C2039: 'numJoySticks' : is not a member of 'OIS::InputManager' > 1> c:\Work\Open Game > Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration > of 'OIS::InputManager' > 1>Project : warning PRJ0018 : The following environment variables were > not found: > 1>$(OGE) > 1>Build log was saved at "file://c:\Work\Open Game > Engine\ogeroot\oge\obj\Debug\BuildLog.htm" > 1>oge - 10 error(s), 0 warning(s) > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped > ========== > > > > > . |
|
From: Juglea S. <jug...@ya...> - 2011-08-31 15:34:37
|
Hello Ralph, I will appreciate if you send me the ogre dependencies for (VC8). It will spare me a couple of hours to figure out how to build them correctly. (i am not a programmer) I thought that using 1.7.x will cause trouble. If you ever need graphics(2d or 3d), just ask. Thank You, Juglea Stefan-Ioan, ________________________________ From: Ralph Little <rl...@in...> To: Juglea Stefan <jug...@ya...>; Alex Peterson <ale...@ma...>; "Oge...@li..." <Oge...@li...> Sent: Wednesday, August 31, 2011 6:19 PM Subject: RE: Oge Compile issue VS2005 Hi, Sounds like it is a problem with the Ogre version itself. 1.4.x is pretty old now and OGE has moved on quite a bit since then. The easiest thing might be for me to actually regenerate you a new set of up-to-date dependencies using Ogre 1.7 if that would be of use to you. I am actually doing this right now for Windows testing although they are for VC9 (2008). If I can get a hold of a VC8 (2005) Express Edition then I will generate a new set for you. You also have to understand that OGE (CVSHEAD) is actually part way through development so there are no guarantees at this stage :D Cheers, Ralph ________________________________________ From: Juglea Stefan [jug...@ya...] Sent: Wednesday, August 31, 2011 1:08 AM To: Steven.Gay; Alex Peterson; Ralph Little; Oge...@li... Subject: Oge Compile issue VS2005 Hello, I have a little issue with building Oge. I've downloaded the OGE_Dependencies_VC80_0_5, and with the CVS Head i tried to build but i have those errors. Any ideea, any help? I am a little noob in programming, but i have friend that could help me if you could direct me. We are more into graphics/3D graphics, so if you need help, just ask. PS: I didn't build ogre 1.4.x. Just copied from the Oge dependencies and Ogre 1.4.9 SDK the missing files(e.g. OgreCEGUIResourceProvider.h and OgreCEGUIRenderer.h) Here is the log: 1>------ Build started: Project: oge, Configuration: Debug Win32 ------ 1>Compiling... 1>OgeGraphicsManager.cpp 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(400) : error C2259: 'oge::OgreResourceGroupManager' : cannot instantiate abstract class 1> due to following members: 1> 'void Ogre::ResourceGroupListener::scriptParseStarted(const Ogre::String &,bool &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(108) : see declaration of 'Ogre::ResourceGroupListener::scriptParseStarted' 1> 'void Ogre::ResourceGroupListener::scriptParseEnded(const Ogre::String &,bool)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(112) : see declaration of 'Ogre::ResourceGroupListener::scriptParseEnded' 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(532) : error C2440: 'initializing' : cannot convert from 'const Ogre::RenderSystemList' to 'Ogre::RenderSystemList *' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>OgeOgreArchive.cpp 1>..\..\src\oge\systems\graphicssystem\OgeOgreArchive.cpp(163) : error C2259: 'oge::OgreArchive' : cannot instantiate abstract class 1> due to following members: 1> 'Ogre::DataStreamPtr Ogre::Archive::open(const Ogre::String &,bool) const' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(147) : see declaration of 'Ogre::Archive::open' 1> 'time_t Ogre::Archive::getModifiedTime(const Ogre::String &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(214) : see declaration of 'Ogre::Archive::getModifiedTime' 1>OgeEngineManager.cpp 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(218) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(223) : error C2059: syntax error : ',' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(238) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(243) : error C2059: syntax error : ',' 1>OgeInputManager.cpp 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(525) : error C2039: 'numKeyboards' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(526) : error C2039: 'numMice' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(527) : error C2039: 'numJoySticks' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>Project : warning PRJ0018 : The following environment variables were not found: 1>$(OGE) 1>Build log was saved at "file://c:\Work\Open Game Engine\ogeroot\oge\obj\Debug\BuildLog.htm" 1>oge - 10 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
From: Ralph L. <rl...@in...> - 2011-08-31 15:32:53
|
Hi, Sounds like it is a problem with the Ogre version itself. 1.4.x is pretty old now and OGE has moved on quite a bit since then. The easiest thing might be for me to actually regenerate you a new set of up-to-date dependencies using Ogre 1.7 if that would be of use to you. I am actually doing this right now for Windows testing although they are for VC9 (2008). If I can get a hold of a VC8 (2005) Express Edition then I will generate a new set for you. You also have to understand that OGE (CVSHEAD) is actually part way through development so there are no guarantees at this stage :D Cheers, Ralph ________________________________________ From: Juglea Stefan [jug...@ya...] Sent: Wednesday, August 31, 2011 1:08 AM To: Steven.Gay; Alex Peterson; Ralph Little; Oge...@li... Subject: Oge Compile issue VS2005 Hello, I have a little issue with building Oge. I've downloaded the OGE_Dependencies_VC80_0_5, and with the CVS Head i tried to build but i have those errors. Any ideea, any help? I am a little noob in programming, but i have friend that could help me if you could direct me. We are more into graphics/3D graphics, so if you need help, just ask. PS: I didn't build ogre 1.4.x. Just copied from the Oge dependencies and Ogre 1.4.9 SDK the missing files(e.g. OgreCEGUIResourceProvider.h and OgreCEGUIRenderer.h) Here is the log: 1>------ Build started: Project: oge, Configuration: Debug Win32 ------ 1>Compiling... 1>OgeGraphicsManager.cpp 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(400) : error C2259: 'oge::OgreResourceGroupManager' : cannot instantiate abstract class 1> due to following members: 1> 'void Ogre::ResourceGroupListener::scriptParseStarted(const Ogre::String &,bool &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(108) : see declaration of 'Ogre::ResourceGroupListener::scriptParseStarted' 1> 'void Ogre::ResourceGroupListener::scriptParseEnded(const Ogre::String &,bool)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(112) : see declaration of 'Ogre::ResourceGroupListener::scriptParseEnded' 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(532) : error C2440: 'initializing' : cannot convert from 'const Ogre::RenderSystemList' to 'Ogre::RenderSystemList *' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>OgeOgreArchive.cpp 1>..\..\src\oge\systems\graphicssystem\OgeOgreArchive.cpp(163) : error C2259: 'oge::OgreArchive' : cannot instantiate abstract class 1> due to following members: 1> 'Ogre::DataStreamPtr Ogre::Archive::open(const Ogre::String &,bool) const' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(147) : see declaration of 'Ogre::Archive::open' 1> 'time_t Ogre::Archive::getModifiedTime(const Ogre::String &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(214) : see declaration of 'Ogre::Archive::getModifiedTime' 1>OgeEngineManager.cpp 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(218) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(223) : error C2059: syntax error : ',' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(238) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(243) : error C2059: syntax error : ',' 1>OgeInputManager.cpp 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(525) : error C2039: 'numKeyboards' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(526) : error C2039: 'numMice' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(527) : error C2039: 'numJoySticks' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>Project : warning PRJ0018 : The following environment variables were not found: 1>$(OGE) 1>Build log was saved at "file://c:\Work\Open Game Engine\ogeroot\oge\obj\Debug\BuildLog.htm" 1>oge - 10 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
From: Juglea S. <jug...@ya...> - 2011-08-31 08:09:02
|
Hello, I have a little issue with building Oge. I've downloaded the OGE_Dependencies_VC80_0_5, and with the CVS Head i tried to build but i have those errors. Any ideea, any help? I am a little noob in programming, but i have friend that could help me if you could direct me. We are more into graphics/3D graphics, so if you need help, just ask. PS: I didn't build ogre 1.4.x. Just copied from the Oge dependencies and Ogre 1.4.9 SDK the missing files(e.g. OgreCEGUIResourceProvider.h and OgreCEGUIRenderer.h) Here is the log: 1>------ Build started: Project: oge, Configuration: Debug Win32 ------ 1>Compiling... 1>OgeGraphicsManager.cpp 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(400) : error C2259: 'oge::OgreResourceGroupManager' : cannot instantiate abstract class 1> due to following members: 1> 'void Ogre::ResourceGroupListener::scriptParseStarted(const Ogre::String &,bool &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(108) : see declaration of 'Ogre::ResourceGroupListener::scriptParseStarted' 1> 'void Ogre::ResourceGroupListener::scriptParseEnded(const Ogre::String &,bool)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreResourceGroupManager.h(112) : see declaration of 'Ogre::ResourceGroupListener::scriptParseEnded' 1>..\..\src\oge\systems\graphicssystem\OgeGraphicsManager.cpp(532) : error C2440: 'initializing' : cannot convert from 'const Ogre::RenderSystemList' to 'Ogre::RenderSystemList *' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>OgeOgreArchive.cpp 1>..\..\src\oge\systems\graphicssystem\OgeOgreArchive.cpp(163) : error C2259: 'oge::OgreArchive' : cannot instantiate abstract class 1> due to following members: 1> 'Ogre::DataStreamPtr Ogre::Archive::open(const Ogre::String &,bool) const' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(147) : see declaration of 'Ogre::Archive::open' 1> 'time_t Ogre::Archive::getModifiedTime(const Ogre::String &)' : is abstract 1> c:\Work\Open Game Engine\ogeroot\oge\include\ogre/OgreArchive.h(214) : see declaration of 'Ogre::Archive::getModifiedTime' 1>OgeEngineManager.cpp 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(218) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(223) : error C2059: syntax error : ',' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(238) : error C2059: syntax error : ')' 1>C:\Program Files\Microsoft Visual Studio 8\VC\include\mbstring.h(243) : error C2059: syntax error : ',' 1>OgeInputManager.cpp 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(525) : error C2039: 'numKeyboards' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(526) : error C2039: 'numMice' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>..\..\src\oge\systems\inputsystem\OgeInputManager.cpp(527) : error C2039: 'numJoySticks' : is not a member of 'OIS::InputManager' 1> c:\Work\Open Game Engine\ogeroot\oge\include\ois/OISInputManager.h(39) : see declaration of 'OIS::InputManager' 1>Project : warning PRJ0018 : The following environment variables were not found: 1>$(OGE) 1>Build log was saved at "file://c:\Work\Open Game Engine\ogeroot\oge\obj\Debug\BuildLog.htm" 1>oge - 10 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:20
|
Update of /cvsroot/oge/samples/common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/common Modified Files: ExampleProgressBar.h Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: ExampleProgressBar.h =================================================================== RCS file: /cvsroot/oge/samples/common/ExampleProgressBar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExampleProgressBar.h 21 Sep 2007 12:06:43 -0000 1.2 --- ExampleProgressBar.h 2 Apr 2008 06:34:25 -0000 1.3 *************** *** 172,177 **** mComment = boost::any_cast<String>(data); ! if (mShowing) ! mLoadingCommentElement->setCaption(mComment); } }; --- 172,177 ---- mComment = boost::any_cast<String>(data); ! // TODO MT bug if (mShowing) ! // mLoadingCommentElement->setCaption(mComment); } }; |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:20
|
Update of /cvsroot/oge/samples/ObjectSerialisation/scripts/VC8 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/ObjectSerialisation/scripts/VC8 Modified Files: Object Serialisation.vcproj Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: Object Serialisation.vcproj =================================================================== RCS file: /cvsroot/oge/samples/ObjectSerialisation/scripts/VC8/Object Serialisation.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Object Serialisation.vcproj 27 Sep 2007 03:41:03 -0000 1.1 --- Object Serialisation.vcproj 2 Apr 2008 06:34:25 -0000 1.2 *************** *** 63,66 **** --- 63,67 ---- AdditionalLibraryDirectories="..\..\..\..\oge\lib\$(ConfigurationName)" GenerateDebugInformation="true" + SubSystem="1" TargetMachine="1" /> *************** *** 136,139 **** --- 137,141 ---- AdditionalLibraryDirectories="..\..\..\..\oge\lib\$(ConfigurationName)" GenerateDebugInformation="true" + SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/bin/debug In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/bin/debug Modified Files: .cvsignore Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: .cvsignore =================================================================== RCS file: /cvsroot/oge/samples/bin/debug/.cvsignore,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** .cvsignore 4 Oct 2007 18:33:39 -0000 1.23 --- .cvsignore 2 Apr 2008 06:34:25 -0000 1.24 *************** *** 95,97 **** libogg.dll libvorbis.dll ! libvorbisfile.dll \ No newline at end of file --- 95,104 ---- libogg.dll libvorbis.dll ! libvorbisfile.dll ! boost_filesystem-vc80-mt-gd-1_34_1.dll ! boost_thread-vc80-mt-gd-1_34_1.dll ! FPS\ Sample_d.pdb ! FPS\ Sample.bsc ! FPS\ Sample_d.exe ! FPS\ Sample_d.ilk ! Object\ Serialisation.exe \ No newline at end of file |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/ObjectSerialisation In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/ObjectSerialisation Modified Files: Main.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: Main.cpp =================================================================== RCS file: /cvsroot/oge/samples/ObjectSerialisation/Main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Main.cpp 19 Aug 2007 14:02:54 -0000 1.2 --- Main.cpp 2 Apr 2008 06:34:24 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 135,142 **** void printDebug() { ! LOG( "----" + getClass()); LOG( "----" + getFamily()); LOG( "----" + mesh); ! std::cout << "----" << getClass() << std::endl; std::cout << "----" << getFamily() << std::endl; std::cout << "----" << mesh << std::endl; --- 135,142 ---- void printDebug() { ! LOG( "----" + getType()); LOG( "----" + getFamily()); LOG( "----" + mesh); ! std::cout << "----" << getType() << std::endl; std::cout << "----" << getFamily() << std::endl; std::cout << "----" << mesh << std::endl; *************** *** 172,177 **** virtual bool write(SerialiserPtr serialisePtr) { ! LOG(getClass()); ! std::cout << getClass() << std::endl; bool success = VisualComponent::write(serialisePtr); // This MUST be the first write of any component --- 172,177 ---- virtual bool write(SerialiserPtr serialisePtr) { ! LOG(getType()); ! std::cout << getType() << std::endl; bool success = VisualComponent::write(serialisePtr); // This MUST be the first write of any component *************** *** 191,194 **** --- 191,200 ---- }; + virtual MessageDelegateMap getMessageDelgates() + { + MessageDelegateMap map; + return map; + }; + // ---------------------------------------------------------------------- // This wouldn't normally be public, but it's more convenient for this example *************** *** 198,205 **** { VisualComponent::printDebug(); ! LOG( "----" + (String)getClass()); LOG( "----" + (String)getFamily()); LOG( "----" + StringUtil::toString((int) unitColor)); ! std::cout << "----- " << (String)getClass() << std::endl; std::cout << "----- " << (String)getFamily() << std::endl; std::cout << "----- " << StringUtil::toString((int) unitColor) << std::endl; --- 204,211 ---- { VisualComponent::printDebug(); ! LOG( "----" + (String)getType()); LOG( "----" + (String)getFamily()); LOG( "----" + StringUtil::toString((int) unitColor)); ! std::cout << "----- " << (String)getType() << std::endl; std::cout << "----- " << (String)getFamily() << std::endl; std::cout << "----- " << StringUtil::toString((int) unitColor) << std::endl; *************** *** 216,223 **** { public: ! WarriorVisualComponentTemplate() { setClass("WarriorVisualComponentTemplate"); }; // Can be used to verify it is allocated to the correct ObjectTemplate ! virtual Component* makeComponent( Object* object ) { WarriorVisualComponent* comp = --- 222,229 ---- { public: ! WarriorVisualComponentTemplate() { setType("WarriorVisualComponentTemplate"); }; // Can be used to verify it is allocated to the correct ObjectTemplate ! virtual Component* createComponent( Object* object ) { WarriorVisualComponent* comp = *************** *** 235,243 **** /** Main entry point for the application *****************************************************************************/ ! #ifndef _CONSOLE && OGE_PLATFORM == OGE_PLATFORM_WIN32 ! INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE,LPSTR strCmdLine, INT) ! #else int main(int argc, char *argv[]) ! #endif { std::cout << "----- Component/Object system - v0.1 -----" << std::endl; --- 241,249 ---- /** Main entry point for the application *****************************************************************************/ ! //#if OGE_PLATFORM == OGE_PLATFORM_WIN32 ! //INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE,LPSTR strCmdLine, INT) ! //#else int main(int argc, char *argv[]) ! //#endif { std::cout << "----- Component/Object system - v0.1 -----" << std::endl; *************** *** 246,250 **** { // Create the LogManager ! LogManager* logManager = LogManager::createManager(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); --- 252,256 ---- { // Create the LogManager ! LogManager* logManager = LogManager::createInstance(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/GUI In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/GUI Modified Files: Main.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: Main.cpp =================================================================== RCS file: /cvsroot/oge/samples/GUI/Main.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Main.cpp 21 Sep 2007 12:06:43 -0000 1.8 --- Main.cpp 2 Apr 2008 06:34:24 -0000 1.9 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 467,471 **** { // Create the LogManager ! LogManager* logManager = LogManager::createManager(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); --- 467,471 ---- { // Create the LogManager ! LogManager* logManager = LogManager::createInstance(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); *************** *** 474,478 **** LOGR( "Creating GUI sample." ); ! EngineManager* engineManager = EngineManager::createManager(); GameManager* gameManager = GameManager::getSingletonPtr(); --- 474,478 ---- LOGR( "Creating GUI sample." ); ! EngineManager* engineManager = EngineManager::createInstance(); GameManager* gameManager = GameManager::getSingletonPtr(); *************** *** 500,504 **** // Delete the managers // btw the gamemanager will destroy the GameStates! ! EngineManager::destroyManager(); } catch (...) --- 500,504 ---- // Delete the managers // btw the gamemanager will destroy the GameStates! ! EngineManager::destroyInstance(); } catch (...) |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/HelloWorld/scripts/VC8 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/HelloWorld/scripts/VC8 Modified Files: HelloWorld.vcproj Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: HelloWorld.vcproj =================================================================== RCS file: /cvsroot/oge/samples/HelloWorld/scripts/VC8/HelloWorld.vcproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** HelloWorld.vcproj 25 Feb 2007 21:57:48 -0000 1.9 --- HelloWorld.vcproj 2 Apr 2008 06:34:24 -0000 1.10 *************** *** 196,199 **** --- 196,203 ---- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + <File + RelativePath="..\..\..\common\ExampleProgressBar.h" + > + </File> </Filter> <Filter |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/HelloWorld In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/HelloWorld Modified Files: Main.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: Main.cpp =================================================================== RCS file: /cvsroot/oge/samples/HelloWorld/Main.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Main.cpp 23 Oct 2007 23:01:37 -0000 1.20 --- Main.cpp 2 Apr 2008 06:34:24 -0000 1.21 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 57,60 **** --- 57,61 ---- #include "oge/systems/graphicssystem/OgeGraphicsSceneManager.h" #include "../common/ExampleProgressBar.h" + #include "oge/systems/objectsystem/OgeObjectManager.h" #include "ogre/Ogre.h" *************** *** 134,138 **** { SceneManager* sm = boost::any_cast<SceneManager*>(param); ! GraphicsSceneManager* gsm = static_cast<GraphicsSceneManager*>(sm); Ogre::SceneManager* sceneManager = gsm->_getInternalSceneManager(); --- 135,139 ---- { SceneManager* sm = boost::any_cast<SceneManager*>(param); ! GraphicsSceneManager* gsm = dynamic_cast<GraphicsSceneManager*>(sm); Ogre::SceneManager* sceneManager = gsm->_getInternalSceneManager(); *************** *** 183,187 **** { // Create the LogManager ! LogManager* logManager = LogManager::createManager(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); --- 184,188 ---- { // Create the LogManager ! LogManager* logManager = LogManager::createInstance(); logManager->createLog( "Oge_log", LogManager::LOGTYPE_HTML ); *************** *** 190,194 **** LOGR( "Creating game" ); ! EngineManager* engineManager = EngineManager::createManager(); --- 191,195 ---- LOGR( "Creating game" ); ! EngineManager* engineManager = EngineManager::createInstance(); *************** *** 214,218 **** // Delete the managers ! EngineManager::destroyManager(); } catch (...) --- 215,219 ---- // Delete the managers ! EngineManager::destroyInstance(); } catch (...) |
|
From: Steven <laz...@us...> - 2008-04-02 06:34:19
|
Update of /cvsroot/oge/samples/Chat In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11074/Chat Modified Files: Main.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: Main.cpp =================================================================== RCS file: /cvsroot/oge/samples/Chat/Main.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Main.cpp 21 Sep 2007 12:06:43 -0000 1.11 --- Main.cpp 2 Apr 2008 06:34:24 -0000 1.12 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 515,519 **** { // Create the LogManager ! LogManager* logManager = LogManager::createManager(); // Ask if should be run as server or client --- 515,519 ---- { // Create the LogManager ! LogManager* logManager = LogManager::createInstance(); // Ask if should be run as server or client *************** *** 542,546 **** LOGR( "Creating chat sample." ); ! EngineManager* engineManager = EngineManager::createManager(); GameManager* gameManager = GameManager::getSingletonPtr(); --- 542,546 ---- LOGR( "Creating chat sample." ); ! EngineManager* engineManager = EngineManager::createInstance(); GameManager* gameManager = GameManager::getSingletonPtr(); *************** *** 585,589 **** // Delete the managers ! EngineManager::destroyManager(); } catch (...) --- 585,589 ---- // Delete the managers ! EngineManager::destroyInstance(); } catch (...) |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:32
|
Update of /cvsroot/oge/oge/include/oge/utilities/serialisation In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/include/oge/utilities/serialisation Modified Files: OgeAddressTranslator.h OgeBinarySerialiser.h OgeSerialisable.h OgeSerialiser.h Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeSerialisable.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/serialisation/OgeSerialisable.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeSerialisable.h 19 Aug 2007 14:01:46 -0000 1.2 --- OgeSerialisable.h 2 Apr 2008 06:33:00 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2007 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 50,55 **** * the first data to be send. * ! * @author Steven 'lazalong' GAY ! * *****************************************************************************/ class OGEAPI Serialisable --- 50,54 ---- * the first data to be send. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class OGEAPI Serialisable *************** *** 66,69 **** virtual bool fixup() = 0; }; ! } #endif // __OGE_SERIALISABLE_H__ --- 65,68 ---- virtual bool fixup() = 0; }; ! } // namespace #endif // __OGE_SERIALISABLE_H__ Index: OgeBinarySerialiser.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/serialisation/OgeBinarySerialiser.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OgeBinarySerialiser.h 27 Sep 2007 03:28:42 -0000 1.4 --- OgeBinarySerialiser.h 2 Apr 2008 06:33:00 -0000 1.5 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2007 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 53,58 **** * @todo UTF8 string must be serialisable * ! * @author Steven 'lazalong' GAY ! * *****************************************************************************/ class OGEAPI BinarySerialiser : public Serialiser --- 53,57 ---- * @todo UTF8 string must be serialisable * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class OGEAPI BinarySerialiser : public Serialiser *************** *** 64,68 **** /** Read methods * @todo add all primitive and complex classes to stream ! *************************************************************************/ virtual int readInt(); virtual float readFloat(); --- 63,67 ---- /** Read methods * @todo add all primitive and complex classes to stream ! */ virtual int readInt(); virtual float readFloat(); *************** *** 70,74 **** /** Write methods * @todo add all primitive and complex classes to stream ! *************************************************************************/ virtual bool writeInt (int i); virtual bool writeFloat (float f); --- 69,73 ---- /** Write methods * @todo add all primitive and complex classes to stream ! */ virtual bool writeInt (int i); virtual bool writeFloat (float f); *************** *** 76,97 **** /** TODO to remove ! *************************************************************************/ void printDebug() { LOG( "-"); if (getReadMode()) ! { LOG("Read True") } ! else LOG("Read False"); if (getWriteMode()) { LOG("Write True") } ! else LOG("Write False"); LOG( "-" ); }; }; ! } ! #endif // __OGE_BINARYSERIALISER_H__ --- 75,101 ---- /** TODO to remove ! */ void printDebug() { LOG( "-"); if (getReadMode()) ! { // careful the {} are needed if LOG_NONE is set LOG("Read True") } ! else ! { ! LOG("Read False"); ! } if (getWriteMode()) { LOG("Write True") } ! else ! { ! LOG("Write False"); ! } LOG( "-" ); }; }; ! } // namespace #endif // __OGE_BINARYSERIALISER_H__ Index: OgeAddressTranslator.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/serialisation/OgeAddressTranslator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeAddressTranslator.h 19 Aug 2007 14:01:46 -0000 1.2 --- OgeAddressTranslator.h 2 Apr 2008 06:33:00 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2007 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 51,59 **** * to be able to translate the "old" pointers to the new ones. * ! * @author Steven 'lazalong' GAY ! * *****************************************************************************/ class OGEAPI AddressTranslator { public: /** Save a memory addresse of a newly created object along its old one. --- 51,62 ---- * to be able to translate the "old" pointers to the new ones. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class OGEAPI AddressTranslator { + private: + typedef HashMap<int, int> AddressTable; + static AddressTable sAddressTable; + public: /** Save a memory addresse of a newly created object along its old one. *************** *** 65,74 **** static void * translateAddress (void * oldAddress); static void resetAddresses (); - - private: - typedef HashMap<int, int> AddressTable; - static AddressTable sAddressTable; - }; ! } #endif // __OGE_ADDRESSTRANSLATOR_H__ --- 68,72 ---- static void * translateAddress (void * oldAddress); static void resetAddresses (); }; ! } // namespace #endif // __OGE_ADDRESSTRANSLATOR_H__ Index: OgeSerialiser.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/serialisation/OgeSerialiser.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OgeSerialiser.h 26 Aug 2007 13:12:07 -0000 1.3 --- OgeSerialiser.h 2 Apr 2008 06:33:00 -0000 1.4 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2007 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 50,62 **** * to serialise classes (those must implement the Serialisable interface). * ! * @author Steven 'lazalong' GAY ! * *****************************************************************************/ class OGEAPI Serialiser { public: Serialiser(DataStreamPtr dataStream) : mReadMode(false), mWriteMode(false), mDataStream(dataStream) {}; ! virtual ~Serialiser(void) {}; bool getReadMode() { return mReadMode; }; --- 50,66 ---- * to serialise classes (those must implement the Serialisable interface). * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class OGEAPI Serialiser { + protected: + bool mReadMode; + bool mWriteMode; + DataStreamPtr mDataStream; + public: Serialiser(DataStreamPtr dataStream) : mReadMode(false), mWriteMode(false), mDataStream(dataStream) {}; ! virtual ~Serialiser() {}; bool getReadMode() { return mReadMode; }; *************** *** 65,69 **** /** Read methods * @todo add all primitive and complex classes to stream ! *************************************************************************/ virtual int readInt() = 0; virtual float readFloat() = 0; --- 69,73 ---- /** Read methods * @todo add all primitive and complex classes to stream ! */ virtual int readInt() = 0; virtual float readFloat() = 0; *************** *** 72,85 **** /** Write methods * @todo add all primitive and complex classes to stream ! *************************************************************************/ virtual bool writeInt (int i) = 0; virtual bool writeFloat (float f) = 0; virtual bool writeString (const std::string & str) = 0; - - protected: - bool mReadMode; - bool mWriteMode; - - DataStreamPtr mDataStream; }; } --- 76,83 ---- /** Write methods * @todo add all primitive and complex classes to stream ! */ virtual bool writeInt (int i) = 0; virtual bool writeFloat (float f) = 0; virtual bool writeString (const std::string & str) = 0; }; } |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:32
|
Update of /cvsroot/oge/oge/scripts/VC8 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/scripts/VC8 Modified Files: combined.sln Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: combined.sln =================================================================== RCS file: /cvsroot/oge/oge/scripts/VC8/combined.sln,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** combined.sln 27 Sep 2007 03:28:42 -0000 1.4 --- combined.sln 2 Apr 2008 06:33:00 -0000 1.5 *************** *** 15,21 **** --- 15,26 ---- EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Sample", "..\..\..\samples\GUI\scripts\VC8\GUI.vcproj", "{424E2CF8-8CCB-46CB-96B9-6B5DA8C87F58}" + ProjectSection(ProjectDependencies) = postProject + {443D4D88-0E14-47B7-83B0-E57C05D3E89E} = {443D4D88-0E14-47B7-83B0-E57C05D3E89E} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Object Serialisation", "..\..\..\samples\ObjectSerialisation\scripts\VC8\Object Serialisation.vcproj", "{515F739E-6B97-4FEE-A7C7-B2A2E46765B4}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FPS Sample", "..\..\..\samples\FPS Sample\scripts\VC8\FPS.vcproj", "{220570CA-E003-4FF5-B7DE-F831FF2C8D2F}" + EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution *************** *** 44,47 **** --- 49,56 ---- {515F739E-6B97-4FEE-A7C7-B2A2E46765B4}.Release|Win32.ActiveCfg = Release|Win32 {515F739E-6B97-4FEE-A7C7-B2A2E46765B4}.Release|Win32.Build.0 = Release|Win32 + {220570CA-E003-4FF5-B7DE-F831FF2C8D2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {220570CA-E003-4FF5-B7DE-F831FF2C8D2F}.Debug|Win32.Build.0 = Debug|Win32 + {220570CA-E003-4FF5-B7DE-F831FF2C8D2F}.Release|Win32.ActiveCfg = Release|Win32 + {220570CA-E003-4FF5-B7DE-F831FF2C8D2F}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:31
|
Update of /cvsroot/oge/oge/src/oge/systems/gamesystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/src/oge/systems/gamesystem Modified Files: OgeEngineManager.cpp OgeGameManager.cpp OgeGameState.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeEngineManager.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/gamesystem/OgeEngineManager.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OgeEngineManager.cpp 28 Oct 2007 18:50:41 -0000 1.7 --- OgeEngineManager.cpp 2 Apr 2008 06:33:01 -0000 1.8 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 63,67 **** //----------------------------------------------------------------------------- ! EngineManager::EngineManager(void) : mIsInitialised(false), mIsStarted(false), mResourceLocationManager(0), mBackgroundResourceManager(0), mResourceGroupManager(0), mConfigManager(0), mGameManager(0), --- 63,67 ---- //----------------------------------------------------------------------------- ! EngineManager::EngineManager() : mIsInitialised(false), mIsStarted(false), mResourceLocationManager(0), mBackgroundResourceManager(0), mResourceGroupManager(0), mConfigManager(0), mGameManager(0), *************** *** 75,93 **** // Hence calling the singletons returns a valid pointer // and tests for null pointers can be discarded. ! Clock::createSingleton(); ! mResourceLocationManager = ResourceLocationManager::createManager(); ! mBackgroundResourceManager = BackgroundResourceManager::createManager(); ! mConfigManager = ConfigManager::createManager(); ! mGameManager = GameManager::createManager(); ! mObjectManager = ObjectManager::createManager(); ! mGraphicsManager = GraphicsManager::createManager(); ! mInputManager = InputManager::createManager(); ! mAudioManager = AudioManager::createManager(); ! mNetworkManager = NetworkManager::createManager(); ! //mPhysicsManager = PhysicsManager::createManager(); ! PhysicsManager::createManager(); // TODO: change for above ! //mScriptManager = ScriptManager::createManager(); ! ScriptManager::createManager(); // TODO: change for above ! mResourceGroupManager = new OgeResourceGroupManager("Engine"); --- 75,93 ---- // Hence calling the singletons returns a valid pointer // and tests for null pointers can be discarded. ! Clock::createInstance(); ! mResourceLocationManager = ResourceLocationManager::createInstance(); ! mBackgroundResourceManager = BackgroundResourceManager::createInstance(); ! mConfigManager = ConfigManager::createInstance(); ! mGameManager = GameManager::createInstance(); ! mObjectManager = ObjectManager::createInstance(); ! mGraphicsManager = GraphicsManager::createInstance(); ! mInputManager = InputManager::createInstance(); ! mAudioManager = AudioManager::createInstance(); ! mNetworkManager = NetworkManager::createInstance(); ! //mPhysicsManager = PhysicsManager::createInstance(); ! PhysicsManager::createInstance(); ! //mScriptManager = ScriptManager::createInstance(); ! ScriptManager::createInstance(); ! mResourceGroupManager = new OgeResourceGroupManager("Engine"); *************** *** 95,99 **** } //----------------------------------------------------------------------------- ! EngineManager* EngineManager::createManager(void) { if (mSingleton == 0) --- 95,99 ---- } //----------------------------------------------------------------------------- ! EngineManager* EngineManager::createInstance() { if (mSingleton == 0) *************** *** 102,106 **** } //----------------------------------------------------------------------------- ! void EngineManager::destroyManager(void) { if (mSingleton != 0) --- 102,106 ---- } //----------------------------------------------------------------------------- ! void EngineManager::destroyInstance() { if (mSingleton != 0) *************** *** 111,115 **** } //----------------------------------------------------------------------------- ! EngineManager::~EngineManager(void) { FN("EngineManager::~EngineManager()"); --- 111,115 ---- } //----------------------------------------------------------------------------- ! EngineManager::~EngineManager() { FN("EngineManager::~EngineManager()"); *************** *** 120,135 **** delete mResourceGroupManager; ! ScriptManager::destroyManager(); ! PhysicsManager::destroyManager(); ! NetworkManager::destroyManager(); ! AudioManager::destroyManager(); ! InputManager::destroyManager(); ! GraphicsManager::destroyManager(); ! ObjectManager::destroyManager(); ! GameManager::destroyManager(); ! ConfigManager::destroyManager(); ! BackgroundResourceManager::destroyManager(); ! ResourceLocationManager::destroyManager(); ! Clock::destroyManager(); LOGR("EngineManager deleted."); --- 120,135 ---- delete mResourceGroupManager; ! ScriptManager::destroyInstance(); ! PhysicsManager::destroyInstance(); ! NetworkManager::destroyInstance(); ! AudioManager::destroyInstance(); ! InputManager::destroyInstance(); ! GraphicsManager::destroyInstance(); ! ObjectManager::destroyInstance(); ! GameManager::destroyInstance(); ! ConfigManager::destroyInstance(); ! BackgroundResourceManager::destroyInstance(); ! ResourceLocationManager::destroyInstance(); ! Clock::destroyInstance(); LOGR("EngineManager deleted."); *************** *** 172,176 **** if (mConfig->getOptionValue("Input") == "True") nbThreads++; ! barrierBeforeRun = new boost::barrier(nbThreads); // Starting the main manager --- 172,176 ---- if (mConfig->getOptionValue("Input") == "True") nbThreads++; ! mBarrierBeforeRun = new boost::barrier(nbThreads); // Starting the main manager *************** *** 233,246 **** mEngineConfig = mConfigManager->getConfig("OGE.EngineManager"); ! if (!mEngineConfig) { ! LOGE("EngineManager Config could not be created!"); ! return false; } ! ! mConfig = mEngineConfig->getConfig(config); if (!mConfig) { ! mConfig = mEngineConfig->createConfig(config, String("Profile")); if (!mConfig) { --- 233,253 ---- mEngineConfig = mConfigManager->getConfig("OGE.EngineManager"); ! if (mEngineConfig) { ! mConfig = mEngineConfig->getConfig(config); } ! else ! { ! mEngineConfig = mConfigManager->createConfig("OGE.EngineManager", "OGE.EngineManager"); ! if (!mEngineConfig) ! { ! LOGE("EngineManager Config could not be created!"); ! return false; ! } ! } ! if (!mConfig) { ! mConfig = mEngineConfig->createConfig(config, "Profile"); if (!mConfig) { *************** *** 292,296 **** } //----------------------------------------------------------------------------- ! void EngineManager::_shutdown(void) { // Unregister the EngineManager's ResourceGroupManager --- 299,303 ---- } //----------------------------------------------------------------------------- ! void EngineManager::_shutdown() { // Unregister the EngineManager's ResourceGroupManager *************** *** 367,372 **** }; ! //InputManager::destroyManager(); ! //GraphicsManager::destroyManager(); mGraphicsManager->_toggleFullscreen(); --- 374,379 ---- }; ! //InputManager::destroyInstance(); ! //GraphicsManager::destroyInstance(); mGraphicsManager->_toggleFullscreen(); *************** *** 378,382 **** // Need to "reinitialise" the game state GameManager::getSingletonPtr()->setNextGameState( ! GameManager::getSingletonPtr()->getCurrentGameState()); int nbThreads = 1; --- 385,389 ---- // Need to "reinitialise" the game state GameManager::getSingletonPtr()->setNextGameState( ! GameManager::getSingletonPtr()->getCurrentGameStateName()); int nbThreads = 1; *************** *** 389,393 **** nbThreads++; ! barrierBeforeRun = new boost::barrier(nbThreads); if (mConfig->getOptionValue("Graphics") == "True") --- 396,400 ---- nbThreads++; ! mBarrierBeforeRun = new boost::barrier(nbThreads); if (mConfig->getOptionValue("Graphics") == "True") *************** *** 399,403 **** InputManager::start(); ! barrierBeforeRun->wait(); pause(false); --- 406,410 ---- InputManager::start(); ! mBarrierBeforeRun->wait(); pause(false); *************** *** 414,418 **** version += OGE_BUILD; version += " "; ! version += OGE_VERSION; return version; } --- 421,425 ---- version += OGE_BUILD; version += " "; ! version += StringUtil::toString(OGE_VERSION); return version; } *************** *** 459,463 **** } ! // OTHERS libararies version += "Boost "; version += BOOST_LIB_VERSION; --- 466,470 ---- } ! // OTHERS libraries version += "Boost "; version += BOOST_LIB_VERSION; Index: OgeGameState.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/gamesystem/OgeGameState.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeGameState.cpp 6 Jan 2007 14:14:08 -0000 1.2 --- OgeGameState.cpp 2 Apr 2008 06:33:01 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 42,45 **** --- 42,46 ---- namespace oge { + //----------------------------------------------------------------------------- GameState::GameState(const String& name) : mName(name), mActive(false) *************** *** 47,51 **** } //----------------------------------------------------------------------------- ! GameState::~GameState(void) { if (mActive) --- 48,52 ---- } //----------------------------------------------------------------------------- ! GameState::~GameState() { if (mActive) *************** *** 53,61 **** } //----------------------------------------------------------------------------- ! void GameState::process(void) { } //----------------------------------------------------------------------------- ! bool GameState::activate(void) { mActive = true; --- 54,62 ---- } //----------------------------------------------------------------------------- ! void GameState::process() { } //----------------------------------------------------------------------------- ! bool GameState::activate() { mActive = true; *************** *** 63,67 **** } //----------------------------------------------------------------------------- ! bool GameState::deactivate(void) { mActive = false; --- 64,68 ---- } //----------------------------------------------------------------------------- ! bool GameState::deactivate() { mActive = false; *************** *** 69,73 **** } //----------------------------------------------------------------------------- ! const String& GameState::getName(void) { return mName; --- 70,74 ---- } //----------------------------------------------------------------------------- ! const String& GameState::getName() { return mName; Index: OgeGameManager.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/gamesystem/OgeGameManager.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** OgeGameManager.cpp 26 Aug 2007 13:12:20 -0000 1.24 --- OgeGameManager.cpp 2 Apr 2008 06:33:01 -0000 1.25 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,52 **** const String GameManager::DEFAULT_GAME_STATE_NAME = "OGE_DEFAULT_GAME_STATE"; //----------------------------------------------------------------------------- ! GameManager::GameManager(void) : mIsInitialised(false), mNextGameState(0) { FN("GameManager::GameManager()"); --- 48,52 ---- const String GameManager::DEFAULT_GAME_STATE_NAME = "OGE_DEFAULT_GAME_STATE"; //----------------------------------------------------------------------------- ! GameManager::GameManager() : mIsInitialised(false), mNextGameState(0) { FN("GameManager::GameManager()"); *************** *** 59,79 **** } //----------------------------------------------------------------------------- ! GameManager* GameManager::createManager(void) ! { ! if (mSingleton == 0) ! mSingleton = new GameManager(); ! return mSingleton; ! } ! //----------------------------------------------------------------------------- ! void GameManager::destroyManager(void) ! { ! if (mSingleton != 0) ! { ! delete mSingleton; ! mSingleton = 0; ! } ! } ! //----------------------------------------------------------------------------- ! GameManager::~GameManager(void) { FN("GameManager::~GameManager()"); --- 59,63 ---- } //----------------------------------------------------------------------------- ! GameManager::~GameManager() { FN("GameManager::~GameManager()"); *************** *** 91,95 **** } //----------------------------------------------------------------------------- ! bool GameManager::start(void) { FN("GameManager::start()"); --- 75,79 ---- } //----------------------------------------------------------------------------- ! bool GameManager::start() { FN("GameManager::start()"); *************** *** 102,106 **** } //----------------------------------------------------------------------------- ! bool GameManager::_initialise(void) { FN("GameManager::_initialise()"); --- 86,90 ---- } //----------------------------------------------------------------------------- ! bool GameManager::_initialise() { FN("GameManager::_initialise()"); *************** *** 113,117 **** } //----------------------------------------------------------------------------- ! void GameManager::processGameState(void) { if (mNextGameState) --- 97,101 ---- } //----------------------------------------------------------------------------- ! void GameManager::processGameState() { if (mNextGameState) *************** *** 120,124 **** } //----------------------------------------------------------------------------- ! void GameManager::swapState(void) { boost::recursive_mutex::scoped_lock lock(mGameStateMutex); --- 104,108 ---- } //----------------------------------------------------------------------------- ! void GameManager::swapState() { boost::recursive_mutex::scoped_lock lock(mGameStateMutex); *************** *** 165,169 **** } //----------------------------------------------------------------------------- ! void GameManager::removeAllGameStates(void) { boost::recursive_mutex::scoped_lock lock(mGameStateMutex); --- 149,153 ---- } //----------------------------------------------------------------------------- ! void GameManager::removeAllGameStates() { boost::recursive_mutex::scoped_lock lock(mGameStateMutex); *************** *** 176,184 **** } //----------------------------------------------------------------------------- ! String GameManager::getCurrentGameState(void) { return mGameState->getName(); } //----------------------------------------------------------------------------- const String GameManager::getLibrariesVersion() { --- 160,173 ---- } //----------------------------------------------------------------------------- ! String GameManager::getCurrentGameStateName() { return mGameState->getName(); } //----------------------------------------------------------------------------- + GameState* GameManager::getCurrentGameState() + { + return mGameState; + } + //----------------------------------------------------------------------------- const String GameManager::getLibrariesVersion() { |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:31
|
Update of /cvsroot/oge/oge/src/oge/systems/audiosystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/src/oge/systems/audiosystem Modified Files: OgeAudio.cpp OgeAudioContext.cpp OgeAudioManager.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeAudio.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/audiosystem/OgeAudio.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeAudio.cpp 30 Sep 2007 07:44:42 -0000 1.1 --- OgeAudio.cpp 2 Apr 2008 06:33:00 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 42,55 **** #include "oge/systems/audiosystem/OgeAudioManager.h" - /* OpenAL doc - * - * Rolloff factor: Basically it judges the strength of attenuation - * over distance. By setting it to 0 we will have turned it off. - * This means that no matter how far away the Listener - * is to the source of the audio source he will still hear it. - * - * - */ - namespace oge { --- 42,45 ---- *************** *** 107,111 **** //----------------------------------------------------------------------------- bool AudioSource::setSound( unsigned int source, Vector3 position, ! Vector3 velocity, Vector3 direction, float maxDistance, float minGain, float maxGain, float rolloff ) { --- 97,101 ---- //----------------------------------------------------------------------------- bool AudioSource::setSound( unsigned int source, Vector3 position, ! Vector3 velocity, Vector3 direction, float maxDistance, float referenceDistance, float minGain, float maxGain, float rolloff ) { *************** *** 126,133 **** alSourcef(source, AL_MAX_DISTANCE, maxDistance ); /// Set the MIN_GAIN ( IMPORTANT - if not set, nothing audible! ) ! alSourcef( source, AL_MIN_GAIN, minGain ); ! alSourcef( source, AL_MAX_GAIN, minGain ); ! alSourcef( source, AL_ROLLOFF_FACTOR, maxGain ); return true; } --- 116,124 ---- alSourcef(source, AL_MAX_DISTANCE, maxDistance ); + alSourcef(source, AL_REFERENCE_DISTANCE, referenceDistance ); /// Set the MIN_GAIN ( IMPORTANT - if not set, nothing audible! ) ! // alSourcef( source, AL_MIN_GAIN, minGain ); ! // alSourcef( source, AL_MAX_GAIN, maxGain ); ! alSourcef( source, AL_ROLLOFF_FACTOR, rolloff ); return true; } *************** *** 395,404 **** bool OggAudioSource::play() { - FN("OggAudioSource::play()"); if(isPlaying()) return true; ! ! // TODO This should be done before... especially for small sounds often used! // Now inform OpenAL of the sound assignment and attach the audio buffer // to the audio source --- 386,393 ---- bool OggAudioSource::play() { if(isPlaying()) return true; ! // TODO This should be done before... especially for small sounds used often! // Now inform OpenAL of the sound assignment and attach the audio buffer // to the audio source Index: OgeAudioContext.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/audiosystem/OgeAudioContext.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeAudioContext.cpp 30 Sep 2007 07:44:42 -0000 1.1 --- OgeAudioContext.cpp 2 Apr 2008 06:33:00 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 46,55 **** namespace oge { #define OGG_BUFFER_SIZE 32768 // 32 KB buffers #define OGE_BIG_ENDIAN 0 // buffer is always in big endian! ! static unsigned short read16Byte(const unsigned char buffer[2]) { ! #if OGE_BIG_ENDIAN return (buffer[0] << 8) + buffer[1]; --- 46,57 ---- namespace oge { + // TODO THIS SHOULDN'T BE HERE !!! and make a more general solution + // as this will not work on LOW endian machine !!! #define OGG_BUFFER_SIZE 32768 // 32 KB buffers #define OGE_BIG_ENDIAN 0 // buffer is always in big endian! ! static unsigned short read16Byte(const unsigned char buffer[2]) ! { #if OGE_BIG_ENDIAN return (buffer[0] << 8) + buffer[1]; *************** *** 66,70 **** } - //----------------------------------------------------------------------------- AudioContext::AudioContext(ALCcontext* c, const String& name) --- 68,71 ---- *************** *** 158,166 **** for (iter = mAudioSources.begin(); iter != mAudioSources.end(); ++iter) { - // TODO faster way? if (iter->second->isPlaying()) return true; } - return false; } --- 159,165 ---- *************** *** 381,385 **** alGetError(); // clear alerrors ! if(!(file = fopen(filename.c_str(), "rb"))) // TODO ! { //throw String("Could not open Ogg file."); --- 380,384 ---- alGetError(); // clear alerrors ! if(!(file = fopen(filename.c_str(), "rb"))) // TODO use ResourceManager { //throw String("Could not open Ogg file."); *************** *** 463,467 **** alGetError(); // clear alerrors ! // TODO TODO TODO Make a macro or something ! int endian = 0; // 0 = Little-Endian, 1 = Big-Endian --- 462,466 ---- alGetError(); // clear alerrors ! // TODO Make a macro or something ! int endian = 0; // 0 = Little-Endian, 1 = Big-Endian *************** *** 469,473 **** FILE* file = 0; ! if(!(file = fopen(filename.c_str(), "rb"))) // TODO ! { //throw String("Could not open Ogg file."); --- 468,472 ---- FILE* file = 0; ! if(!(file = fopen(filename.c_str(), "rb"))) // TODO use resource mgr { //throw String("Could not open Ogg file."); *************** *** 511,515 **** frequency = info->rate; ! array = new char[OGG_BUFFER_SIZE]; // TODO limit or not? do --- 510,514 ---- frequency = info->rate; ! array = new char[OGG_BUFFER_SIZE]; do *************** *** 532,536 **** // try { ! alBufferData(buffer, format, &data[0], data.size(), frequency); if(alGetError() != AL_NO_ERROR || buffer == AL_NONE) { --- 531,536 ---- // try { ! alBufferData(buffer, format, &data[0], ! (ALsizei)(data.size()), (ALsizei)frequency); if(alGetError() != AL_NO_ERROR || buffer == AL_NONE) { *************** *** 587,591 **** ALuint buffer = AL_NONE; vector<char> data; ! long bytes; alGetError(); // clear alerrors --- 587,591 ---- ALuint buffer = AL_NONE; vector<char> data; ! size_t bytes; alGetError(); // clear alerrors *************** *** 780,784 **** } ! alBufferData(buffer, format, &data[0], data.size(), freq); if( alGetError() != AL_NO_ERROR) { --- 780,785 ---- } ! alBufferData(buffer, format, &data[0], ! (ALsizei)(data.size()), (ALsizei)freq); if( alGetError() != AL_NO_ERROR) { *************** *** 828,830 **** } //----------------------------------------------------------------------------- ! }; --- 829,831 ---- } //----------------------------------------------------------------------------- ! } // namespace Index: OgeAudioManager.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/audiosystem/OgeAudioManager.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OgeAudioManager.cpp 30 Sep 2007 07:44:42 -0000 1.8 --- OgeAudioManager.cpp 2 Apr 2008 06:33:00 -0000 1.9 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 49,58 **** volatile bool AudioManager::mIsStarted = false; - //----------------------------------------------------------------------------- AudioManager::AudioManager() : mIsInitialised(false), mIsRunning(false), mTime(0), mWait(true), ! mAudioDevice(0L), mCurrentAudioContext(0L), mOggExtensionPresent(false) { } //----------------------------------------------------------------------------- --- 49,60 ---- volatile bool AudioManager::mIsStarted = false; //----------------------------------------------------------------------------- AudioManager::AudioManager() : mIsInitialised(false), mIsRunning(false), mTime(0), mWait(true), ! mAudioDevice(0L), mCurrentAudioContext(0L), mOggExtensionPresent(false), ! mIsEAXPresent(false) { + FN("AudioManager::~AudioManager()"); + LOGR("Creating AudioManager..."); } //----------------------------------------------------------------------------- *************** *** 60,64 **** { FN("AudioManager::~AudioManager()"); ! LOG("Deleting AudioManager..."); if (!_exitOpenAL()) --- 62,66 ---- { FN("AudioManager::~AudioManager()"); ! LOGR("Deleting AudioManager..."); if (!_exitOpenAL()) *************** *** 70,89 **** } //----------------------------------------------------------------------------- - AudioManager* AudioManager::createManager() - { - if (mSingleton == 0) - mSingleton = new AudioManager(); - return mSingleton; - } - //----------------------------------------------------------------------------- - void AudioManager::destroyManager() - { - if (mSingleton != 0) - { - delete mSingleton; - mSingleton = 0; - } - } - //----------------------------------------------------------------------------- void AudioManager::start() { --- 72,75 ---- *************** *** 203,206 **** --- 189,195 ---- mOggExtensionPresent = isOggExtensionPresent(); + // Test if EAX is supported + isEAXAndExtensionPresent(); + mIsInitialised = true; LOG("AudioManager initialiation ok"); *************** *** 305,309 **** /// NEXT: The second param is a list of attributes ! ALCcontext* context = alcCreateContext(mAudioDevice, NULL); if (!context && alGetError() == ALC_INVALID_VALUE) --- 294,301 ---- /// NEXT: The second param is a list of attributes ! /// See http://opensource.creative.com/pipermail/openal/2006-February/009337.html ! // ALCint attribs[] = {ALC_STEREO_SOURCES, 128, 0}; ! // ALCcontext* context = alcCreateContext(mAudioDevice, &attribs[0] ); ! ALCcontext* context = alcCreateContext(mAudioDevice, NULL ); if (!context && alGetError() == ALC_INVALID_VALUE) *************** *** 331,338 **** // See altest.c in openal_svn_sep06\contrib\tests\altest ALint major, minor; ! ALCdevice *Device; ! Device = alcOpenDevice (NULL); ! alcGetIntegerv (Device, ALC_MAJOR_VERSION, 1, &major); ! alcGetIntegerv (Device, ALC_MINOR_VERSION, 1, &minor); version += StringUtil::toString((int)major); version += "."; --- 323,337 ---- // See altest.c in openal_svn_sep06\contrib\tests\altest ALint major, minor; ! ! if (mAudioDevice) ! { ! alcGetIntegerv (mAudioDevice, ALC_MAJOR_VERSION, sizeof(int), &major); ! alcGetIntegerv (mAudioDevice, ALC_MINOR_VERSION, sizeof(int), &minor); ! } ! else ! { ! alcGetIntegerv (0, ALC_MAJOR_VERSION, sizeof(int), &major); ! alcGetIntegerv (0, ALC_MINOR_VERSION, sizeof(int), &minor); ! } version += StringUtil::toString((int)major); version += "."; *************** *** 391,396 **** bool AudioManager::isEAXAndExtensionPresent() { ! bool isEAXPresent = (bool) alIsExtensionPresent( "EAX2.0" ); ! if ( isEAXPresent ) { LOG( "EAX 2.0 Extension available\n" ); --- 390,402 ---- bool AudioManager::isEAXAndExtensionPresent() { ! FN("AudioManager::isEAXAndExtensionPresent()"); ! ! if (alIsExtensionPresent( "EAX2.0" ) != AL_TRUE) ! { ! LOG( "EAX 2.0 Extension unavailable\n" ); ! mIsEAXPresent = false; ! return false; ! } ! else { LOG( "EAX 2.0 Extension available\n" ); *************** *** 399,409 **** eaxSet = (EAXSet) alGetProcAddress( "EAXSet" ); if ( eaxSet == NULL ) ! isEAXPresent = false; eaxGet = (EAXGet) alGetProcAddress( "EAXGet" ); if ( eaxGet == NULL ) ! isEAXPresent = false; ! if ( !isEAXPresent ) { checkALError( "Failed to get the EAX extension functions adresses.\n" ); --- 405,415 ---- eaxSet = (EAXSet) alGetProcAddress( "EAXSet" ); if ( eaxSet == NULL ) ! mIsEAXPresent = false; eaxGet = (EAXGet) alGetProcAddress( "EAXGet" ); if ( eaxGet == NULL ) ! mIsEAXPresent = false; ! if ( !mIsEAXPresent ) { checkALError( "Failed to get the EAX extension functions adresses.\n" ); *************** *** 411,422 **** } #else ! isEAXPresent = false; ! printf( "... but not used.\n" ); ! LOG( "... but not used.\n" ); #endif // _USEEAX } ! else ! LOG( "EAX 2.0 Extension not available\n" ); ! return true; } //----------------------------------------------------------------------------- --- 417,425 ---- } #else ! mIsEAXPresent = false; ! LOG( "EAX 2.0 Extension available ... but not used.\n" ); #endif // _USEEAX } ! return mIsEAXPresent; } //----------------------------------------------------------------------------- *************** *** 540,549 **** bool AudioManager::setSound( unsigned int source, Vector3 position, Vector3 velocity, Vector3 direction, float maxDistance, ! float minGain, float maxGain, float rolloff ) { AudioSource* audio = mCurrentAudioContext->getAudio( source ); if (audio) return audio->setSound( source, position, velocity, direction, ! maxDistance, minGain, maxGain, rolloff ); return false; } --- 543,552 ---- bool AudioManager::setSound( unsigned int source, Vector3 position, Vector3 velocity, Vector3 direction, float maxDistance, ! float referenceDistance, float minGain, float maxGain, float rolloff ) { AudioSource* audio = mCurrentAudioContext->getAudio( source ); if (audio) return audio->setSound( source, position, velocity, direction, ! maxDistance, referenceDistance, minGain, maxGain, rolloff ); return false; } *************** *** 613,615 **** --- 616,619 ---- } //----------------------------------------------------------------------------- + } // namespace |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:31
|
Update of /cvsroot/oge/oge/src/oge/systems/guisystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/src/oge/systems/guisystem Modified Files: OgeGuiManager.cpp Added Files: OgeGuiSceneManager.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). --- NEW FILE: OgeGuiSceneManager.cpp --- /* ----------------------------------------------------------------------------- This source file is part of OGE (Open Game Engine) For the latest info, see http://sourceforge.net/projects/oge Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html This program is distributed under a dual-licensing scheme: 1. The first license, which is the default one, state that this software is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got a written agreement from the 'OGE Team'. The exact wording of this license can be obtained from the 'OGE Team'. In essence this OGE Unrestricted License state that the GNU Lesser General Public License applies except that the software is distributed with no limitation or requirements to publish or give back to the OGE Team changes made to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE Unrestricted License apply only for those who got a written agreement from the OGE Team. Under both licenses, this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt. For the OGE Unrestricted License contact the OGE Team. ----------------------------------------------------------------------------- */ #include "oge/systems/graphicssystem/OgeGraphicsManager.h" #include "oge/systems/guisystem/OgeGuiSceneManager.h" #include "oge/systems/guisystem/OgeGuiManager.h" namespace oge { //----------------------------------------------------------------------------- GuiSceneManager::GuiSceneManager(const String& name) : SceneManager(name), mGuiManager(0) { initMetaData(); } //----------------------------------------------------------------------------- GuiSceneManager::~GuiSceneManager() { } //----------------------------------------------------------------------------- void GuiSceneManager::init() { mGuiManager = GuiManager::getSingletonPtr(); assert(mGuiManager); assert(GraphicsManager::getSingletonPtr()); // Add methods // Set the extension manager: GRAPHCIS not GUI as gui has no loop // to process extension messages!!! _setExtensionManager(GraphicsManager::getSingletonPtr()); } //----------------------------------------------------------------------------- void GuiSceneManager::initMetaData() const { mMetaData.type = "Gui Generic SM"; mMetaData.family = "Gui"; mMetaData.description = "Gui Generic scene manager"; mMetaData.sceneTypeMask = false; // irrelevant used in graphics sm mMetaData.worldGeometrySupported = false; // irrelevant used in graphics sm } //----------------------------------------------------------------------------- void GuiSceneManager::update(double deltaTime) { } //----------------------------------------------------------------------------- void GuiSceneManager::clearScene() { // nothing to do } //----------------------------------------------------------------------------- void GuiSceneManager::_loadScene(const String& scene) { // WIP !!! mGuiManager->setWindowLayout(scene); } //----------------------------------------------------------------------------- bool GuiSceneManager::_setEventToButton( String button, const CEGUI::Event::Subscriber& subscriber) { return mGuiManager->setEventToButton( button, subscriber ); } //----------------------------------------------------------------------------- void GuiSceneManager::_createComponent(Component* component) { // TODO assert(component); // mComponents.push_back(component); } //----------------------------------------------------------------------------- void GuiSceneManager::_destroyComponent(Component* component) { // TODO assert(component); // mComponents.push_back(component); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- GuiSceneManagerFactory::GuiSceneManagerFactory() { // Temporary sm to get the type name GuiSceneManager sm("temp"); sm.initMetaData(); mType = sm.getType(); } //----------------------------------------------------------------------------- GuiSceneManagerFactory::~GuiSceneManagerFactory() { } //----------------------------------------------------------------------------- SceneManager* GuiSceneManagerFactory::createInstance( const String& name) { // CEGui is dependent on the existence of ogre root assert( GraphicsManager::getSingletonPtr()->_getOgreRoot() ); GuiSceneManager* sm = new GuiSceneManager(name); sm->init(); assert( sm->getType() == mType); return sm; } //----------------------------------------------------------------------------- void GuiSceneManagerFactory::checkAvailability() { mAvailable = true; } //----------------------------------------------------------------------------- } Index: OgeGuiManager.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/guisystem/OgeGuiManager.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** OgeGuiManager.cpp 26 Aug 2007 13:12:20 -0000 1.14 --- OgeGuiManager.cpp 2 Apr 2008 06:33:03 -0000 1.15 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,52 **** //----------------------------------------------------------------------------- ! GuiManager::GuiManager(void) : mRenderWindow(0), mGUIRenderer(0), mGUISystem(0), mSceneManager(0), mIsInitialised(false) { --- 48,52 ---- //----------------------------------------------------------------------------- ! GuiManager::GuiManager() : mRenderWindow(0), mGUIRenderer(0), mGUISystem(0), mSceneManager(0), mIsInitialised(false) { *************** *** 56,78 **** } //----------------------------------------------------------------------------- ! GuiManager* GuiManager::createManager(void) ! { ! if (mSingleton == 0) ! { ! mSingleton = new GuiManager(); ! } ! return mSingleton; ! } ! //----------------------------------------------------------------------------- ! void GuiManager::destroyManager(void) ! { ! if (mSingleton != 0) ! { ! delete mSingleton; ! mSingleton = 0; ! } ! } ! //----------------------------------------------------------------------------- ! GuiManager::~GuiManager(void) { FN("GuiManager::~GuiManager()"); --- 56,60 ---- } //----------------------------------------------------------------------------- ! GuiManager::~GuiManager() { FN("GuiManager::~GuiManager()"); *************** *** 127,131 **** } //----------------------------------------------------------------------------- ! void GuiManager::_shutdown(void) { if (mGUISystem) --- 109,113 ---- } //----------------------------------------------------------------------------- ! void GuiManager::_shutdown() { if (mGUISystem) *************** *** 171,175 **** } //----------------------------------------------------------------------------- ! void GuiManager::_configure(void) { Option* option = mGuiConfig->getOption("Scheme"); --- 153,157 ---- } //----------------------------------------------------------------------------- ! void GuiManager::_configure() { Option* option = mGuiConfig->getOption("Scheme"); *************** *** 306,308 **** --- 288,295 ---- } //----------------------------------------------------------------------------- + void GuiManager::setTargetSceneManager(Ogre::SceneManager* scene_manager) + { + mGUIRenderer->setTargetSceneManager(scene_manager); + } + //----------------------------------------------------------------------------- } |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:31
|
Update of /cvsroot/oge/oge/src/oge/systems/configsystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/src/oge/systems/configsystem Modified Files: OgeConfig.cpp OgeConfigManager.cpp OgeConfigResource.cpp OgeOption.cpp OgeOptionDictionary.cpp Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeConfig.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/configsystem/OgeConfig.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OgeConfig.cpp 28 Oct 2007 18:50:40 -0000 1.9 --- OgeConfig.cpp 2 Apr 2008 06:33:00 -0000 1.10 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 69,82 **** mTemplate(configTemplate) { mType = configTemplate->getType(); ! ConfigTemplate::Iterator iter = mTemplate->getSingletonConfigTemplates(); ! while(iter.hasMoreElements()) { ! ConfigTemplatePtr tpl = iter.getNextElement(); _createConfig(tpl->getType(), tpl); } } //----------------------------------------------------------------------------- ! Config::~Config(void) { --- 69,86 ---- mTemplate(configTemplate) { + typedef ConfigTemplate::ConfigTemplateVector ConfigTemplateVector; + mType = configTemplate->getType(); ! ConfigTemplateVector configs = mTemplate->getSingletonConfigTemplates(); ! ConfigTemplateVector::iterator iter = configs.begin(); ! ! for(; iter != configs.end(); ++iter) { ! ConfigTemplatePtr tpl = *iter; _createConfig(tpl->getType(), tpl); } } //----------------------------------------------------------------------------- ! Config::~Config() { *************** *** 189,193 **** } //----------------------------------------------------------------------------- ! void Config::removeAllConfigs(void) { FN("Config::removeAllConfigs()"); --- 193,197 ---- } //----------------------------------------------------------------------------- ! void Config::removeAllConfigs() { FN("Config::removeAllConfigs()"); *************** *** 231,252 **** } //----------------------------------------------------------------------------- ! Config::Iterator Config::getConfigs(void) { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::Iterator allConfigs; ConfigMap::Iter iter = mConfigs.begin(); for (; iter != mConfigs.end(); ++iter) { ! allConfigs._pushElement(iter->second); } ! allConfigs.begin(); return allConfigs; } //----------------------------------------------------------------------------- ! Config::Iterator Config::getConfigsOfType(const String& type) { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::Iterator configs; ConfigMap::Iter iter = mConfigs.begin(); --- 235,257 ---- } //----------------------------------------------------------------------------- ! Config::ConfigVector Config::getConfigs() { boost::mutex::scoped_lock lock(mConfigMutex); ! ConfigVector allConfigs; ConfigMap::Iter iter = mConfigs.begin(); for (; iter != mConfigs.end(); ++iter) { ! allConfigs.push_back(iter->second); ! //allConfigs._pushElement(iter->second); } ! //allConfigs.begin(); return allConfigs; } //----------------------------------------------------------------------------- ! Config::ConfigVector Config::getConfigsOfType(const String& type) { boost::mutex::scoped_lock lock(mConfigMutex); ! ConfigVector configs; ConfigMap::Iter iter = mConfigs.begin(); *************** *** 255,259 **** String str = iter->second->getType(); if (iter->second->getType() == type) ! configs._pushElement(iter->second); } --- 260,264 ---- String str = iter->second->getType(); if (iter->second->getType() == type) ! configs.push_back(iter->second); } *************** *** 267,271 **** } //----------------------------------------------------------------------------- ! ConfigTemplate::~ConfigTemplate(void) { --- 272,276 ---- } //----------------------------------------------------------------------------- ! ConfigTemplate::~ConfigTemplate() { *************** *** 312,323 **** } //----------------------------------------------------------------------------- ! ConfigTemplate::Iterator ConfigTemplate::getSingletonConfigTemplates(void) { ! ConfigTemplate::Iterator iter; ConfigTemplateMap::Iter configIter = mSingletonConfigs.begin(); for (; configIter != mSingletonConfigs.end(); ++configIter) { ! iter._pushElement(configIter->second); } --- 317,328 ---- } //----------------------------------------------------------------------------- ! ConfigTemplate::ConfigTemplateVector ConfigTemplate::getSingletonConfigTemplates() { ! ConfigTemplateVector iter; ConfigTemplateMap::Iter configIter = mSingletonConfigs.begin(); for (; configIter != mSingletonConfigs.end(); ++configIter) { ! iter.push_back(configIter->second); } *************** *** 325,329 **** } //----------------------------------------------------------------------------- ! void ConfigTemplate::removeAllConfigTemplates(void) { FN("ConfigTemplate::removeAllConfigs()"); --- 330,334 ---- } //----------------------------------------------------------------------------- ! void ConfigTemplate::removeAllConfigTemplates() { FN("ConfigTemplate::removeAllConfigs()"); Index: OgeOptionDictionary.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/configsystem/OgeOptionDictionary.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OgeOptionDictionary.cpp 28 Oct 2007 18:50:41 -0000 1.8 --- OgeOptionDictionary.cpp 2 Apr 2008 06:33:01 -0000 1.9 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 74,78 **** } //----------------------------------------------------------------------------- ! OptionDictionary::~OptionDictionary(void) { removeAllOptions(); --- 74,78 ---- } //----------------------------------------------------------------------------- ! OptionDictionary::~OptionDictionary() { removeAllOptions(); *************** *** 176,180 **** } //----------------------------------------------------------------------------- ! void OptionDictionary::removeAllOptionsValues(void) { boost::mutex::scoped_lock lock(mOptionsMutex); --- 176,180 ---- } //----------------------------------------------------------------------------- ! void OptionDictionary::removeAllOptionsValues() { boost::mutex::scoped_lock lock(mOptionsMutex); *************** *** 192,196 **** } //----------------------------------------------------------------------------- ! void OptionDictionary::removeAllOptions(void) { boost::mutex::scoped_lock lock(mOptionsMutex); --- 192,196 ---- } //----------------------------------------------------------------------------- ! void OptionDictionary::removeAllOptions() { boost::mutex::scoped_lock lock(mOptionsMutex); *************** *** 215,219 **** } //----------------------------------------------------------------------------- ! OptionDictionaryTemplate::~OptionDictionaryTemplate(void) { removeAllOptions(); --- 215,219 ---- } //----------------------------------------------------------------------------- ! OptionDictionaryTemplate::~OptionDictionaryTemplate() { removeAllOptions(); *************** *** 251,255 **** } //----------------------------------------------------------------------------- ! void OptionDictionaryTemplate::removeAllOptions(void) { boost::mutex::scoped_lock lock(mOptionsMutex); --- 251,255 ---- } //----------------------------------------------------------------------------- ! void OptionDictionaryTemplate::removeAllOptions() { boost::mutex::scoped_lock lock(mOptionsMutex); Index: OgeConfigManager.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/configsystem/OgeConfigManager.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** OgeConfigManager.cpp 28 Oct 2007 18:50:41 -0000 1.20 --- OgeConfigManager.cpp 2 Apr 2008 06:33:00 -0000 1.21 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 47,73 **** //----------------------------------------------------------------------------- ! ConfigManager* ConfigManager::createManager(void) ! { ! if (mSingleton == 0) ! mSingleton = new ConfigManager(); ! ! return mSingleton; ! } ! //----------------------------------------------------------------------------- ! void ConfigManager::destroyManager(void) ! { ! if (mSingleton != 0) ! { ! delete mSingleton; ! mSingleton = 0; ! } ! } ! //----------------------------------------------------------------------------- ! ConfigManager::ConfigManager(void) : ResourceManager("Config"), mIsInitialised(false) { } //----------------------------------------------------------------------------- ! ConfigManager::~ConfigManager(void) { if (mIsInitialised) --- 47,56 ---- //----------------------------------------------------------------------------- ! ConfigManager::ConfigManager() : ResourceManager("Config"), mIsInitialised(false) { } //----------------------------------------------------------------------------- ! ConfigManager::~ConfigManager() { if (mIsInitialised) *************** *** 152,156 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_shutdown(void) { if (!mIsInitialised) --- 135,139 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_shutdown() { if (!mIsInitialised) *************** *** 235,239 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeObjectManagerConfig(void) { ConfigTemplatePtr objMgr = createConfigTemplate("OGE.EngineManager", true, true); --- 218,222 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeObjectManagerConfig() { ConfigTemplatePtr objMgr = createConfigTemplate("OGE.EngineManager", true, true); *************** *** 259,263 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeResourceConfig(void) { ConfigTemplatePtr res = createConfigTemplate("OGE.ResourceManagement", true, true); --- 242,246 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeResourceConfig() { ConfigTemplatePtr res = createConfigTemplate("OGE.ResourceManagement", true, true); *************** *** 289,293 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeGraphicsConfig(void) { ConfigTemplatePtr ogeGraphics = createConfigTemplate("OGE.Graphics", true, true); --- 272,276 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeGraphicsConfig() { ConfigTemplatePtr ogeGraphics = createConfigTemplate("OGE.Graphics", true, true); *************** *** 320,324 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeGuiConfig(void) { ConfigTemplatePtr ogeGui = createConfigTemplate("OGE.Gui", true, true); --- 303,307 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeGuiConfig() { ConfigTemplatePtr ogeGui = createConfigTemplate("OGE.Gui", true, true); *************** *** 330,338 **** } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgePhysicsConfig(void) { } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeNetworkConfig(void) { ConfigTemplatePtr networkManager = createConfigTemplate("OGE.Network", true, true); --- 313,321 ---- } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgePhysicsConfig() { } //----------------------------------------------------------------------------- ! void ConfigManager::_createOgeNetworkConfig() { ConfigTemplatePtr networkManager = createConfigTemplate("OGE.Network", true, true); *************** *** 350,371 **** } //----------------------------------------------------------------------------- ! Config::Iterator ConfigManager::getConfigs(void) { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::Iterator allConfigs; Config::ConfigMap::Iter iter = mConfigs.begin(); for (; iter != mConfigs.end(); ++iter) { ! allConfigs._pushElement(iter->second); } ! allConfigs.begin(); return allConfigs; } //----------------------------------------------------------------------------- ! Config::Iterator ConfigManager::getConfigsOfType(const String& type) { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::Iterator configs; Config::ConfigMap::Iter iter = mConfigs.begin(); --- 333,354 ---- } //----------------------------------------------------------------------------- ! Config::ConfigVector ConfigManager::getConfigs() { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::ConfigVector allConfigs; Config::ConfigMap::Iter iter = mConfigs.begin(); for (; iter != mConfigs.end(); ++iter) { ! allConfigs.push_back(iter->second); } ! return allConfigs; } //----------------------------------------------------------------------------- ! Config::ConfigVector ConfigManager::getConfigsOfType(const String& type) { boost::mutex::scoped_lock lock(mConfigMutex); ! Config::ConfigVector configs; Config::ConfigMap::Iter iter = mConfigs.begin(); *************** *** 373,379 **** { if (iter->second->getType() == type) ! configs._pushElement(iter->second); } ! configs.begin(); return configs; } --- 356,362 ---- { if (iter->second->getType() == type) ! configs.push_back(iter->second); } ! return configs; } Index: OgeOption.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/configsystem/OgeOption.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OgeOption.cpp 23 Oct 2007 23:00:49 -0000 1.6 --- OgeOption.cpp 2 Apr 2008 06:33:00 -0000 1.7 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 54,58 **** } //----------------------------------------------------------------------------- ! Option::~Option(void) { } --- 54,58 ---- } //----------------------------------------------------------------------------- ! Option::~Option() { } *************** *** 113,117 **** } //----------------------------------------------------------------------------- ! void Option::removeAllValues(void) { mValues.clear(); --- 113,117 ---- } //----------------------------------------------------------------------------- ! void Option::removeAllValues() { mValues.clear(); *************** *** 149,153 **** } //----------------------------------------------------------------------------- ! OptionTemplate::~OptionTemplate(void) { } --- 149,153 ---- } //----------------------------------------------------------------------------- ! OptionTemplate::~OptionTemplate() { } Index: OgeConfigResource.cpp =================================================================== RCS file: /cvsroot/oge/oge/src/oge/systems/configsystem/OgeConfigResource.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OgeConfigResource.cpp 28 Oct 2007 18:50:41 -0000 1.7 --- OgeConfigResource.cpp 2 Apr 2008 06:33:00 -0000 1.8 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 53,62 **** } //----------------------------------------------------------------------------- ! ConfigResource::~ConfigResource(void) { unload(); } //----------------------------------------------------------------------------- ! bool ConfigResource::_load(void) { FN("ConfigResource::_load"); --- 53,62 ---- } //----------------------------------------------------------------------------- ! ConfigResource::~ConfigResource() { unload(); } //----------------------------------------------------------------------------- ! bool ConfigResource::_load() { FN("ConfigResource::_load"); *************** *** 81,85 **** } //----------------------------------------------------------------------------- ! bool ConfigResource::_unload(void) { mParser.unload(); --- 81,85 ---- } //----------------------------------------------------------------------------- ! bool ConfigResource::_unload() { mParser.unload(); *************** *** 93,97 **** } //----------------------------------------------------------------------------- ! ConfigParser::~ConfigParser(void) { --- 93,97 ---- } //----------------------------------------------------------------------------- ! ConfigParser::~ConfigParser() { *************** *** 104,108 **** } //----------------------------------------------------------------------------- ! XmlConfigParser::~XmlConfigParser(void) { } --- 104,108 ---- } //----------------------------------------------------------------------------- ! XmlConfigParser::~XmlConfigParser() { } *************** *** 319,323 **** } //----------------------------------------------------------------------------- ! void XmlConfigParser::unload(void) { Config::ConfigMap::Iter iter; --- 319,323 ---- } //----------------------------------------------------------------------------- ! void XmlConfigParser::unload() { Config::ConfigMap::Iter iter; |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:30
|
Update of /cvsroot/oge/oge/include/oge/systems/scriptsystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/include/oge/systems/scriptsystem Modified Files: OgeScriptManager.h Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeScriptManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/scriptsystem/OgeScriptManager.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OgeScriptManager.h 29 Aug 2007 10:21:03 -0000 1.6 --- OgeScriptManager.h 2 Apr 2008 06:33:00 -0000 1.7 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 54,93 **** * @brief Manages the scripts (only Squirrel for now) * ! * @author Steven GAY ! *************************************************************************/ class OGEAPI ScriptManager : public Singleton<ScriptManager> { public: ! /** ! * Used to create a singleton manager, if the manager is already ! * created returns the pointer to the manager. ! * ! * @return A pointer to the manager instance ! * @author Steven GAY ! *************************************************************************/ ! static ScriptManager* createManager(void); ! /** ! * Used to destroy the singleton manager, ! * ! * @author Steven GAY ! *************************************************************************/ ! static void destroyManager(void); ! /** ! * Returns the pointer to the manager. ! * ! * @return A pointer to the manager instance ! * @author Steven GAY ! *************************************************************************/ ! static inline ScriptManager* getSingletonPtr(void) ! { ! assert(mSingleton); ! return mSingleton; ! }; /** * Initialise the manager * * @return True if initialisation was successfull, false if not. ! * @author Steven GAY ! *************************************************************************/ bool initialise(); /** --- 54,75 ---- * @brief Manages the scripts (only Squirrel for now) * ! * @author Steven 'lazalong' Gay ! ****************************************************************************/ class OGEAPI ScriptManager : public Singleton<ScriptManager> { public: ! friend class Singleton<class ScriptManager>; ! ! private: ! boost::recursive_mutex mMutex; ! bool mIsInitialised; ! HSQUIRRELVM mVM; // The Squirrel Virtual Machine ! ! public: /** * Initialise the manager * * @return True if initialisation was successfull, false if not. ! */ bool initialise(); /** *************** *** 96,105 **** * * @return True if initialisation was successfull, false if not. ! * @author Steven GAY ! *************************************************************************/ bool runScript( String scriptFile ); /** * Returns the Squirell Virtual Machine ! *************************************************************************/ HSQUIRRELVM getVM() { return mVM; }; /** --- 78,86 ---- * * @return True if initialisation was successfull, false if not. ! */ bool runScript( String scriptFile ); /** * Returns the Squirell Virtual Machine ! */ HSQUIRRELVM getVM() { return mVM; }; /** *************** *** 107,140 **** * This method is principally used for debugging on remote pc (testers) * and determine if the appropriate libraries are present. ! *************************************************************************/ const String getLibrariesVersion(); protected: /** * Redirect the Squirrel VM output * @note ! * @author Steven GAY ! *************************************************************************/ static void _printFunc(HSQUIRRELVM v,const SQChar * s,...); /** * Bind classes to Squirrel. * @note The classes are hard-coded in this method. ! * @author Steven GAY ! *************************************************************************/ ! void _bindClasses( ); private: - boost::recursive_mutex mMutex; /** ! * @author Steven GAY ! *************************************************************************/ ! ScriptManager(void); /** ! * @author Steven GAY ! *************************************************************************/ ! ~ScriptManager(void); ! ! bool mIsInitialised; ! HSQUIRRELVM mVM; // The Squirrel Virtual Machine ! }; ! } #endif --- 88,114 ---- * This method is principally used for debugging on remote pc (testers) * and determine if the appropriate libraries are present. ! */ const String getLibrariesVersion(); + protected: /** * Redirect the Squirrel VM output * @note ! */ static void _printFunc(HSQUIRRELVM v,const SQChar * s,...); /** * Bind classes to Squirrel. * @note The classes are hard-coded in this method. ! */ ! void _bindClasses(); ! private: /** ! */ ! ScriptManager(); /** ! */ ! ~ScriptManager(); }; ! } // namespace #endif |
|
From: Steven <laz...@us...> - 2008-04-02 06:33:29
|
Update of /cvsroot/oge/oge/include/oge/systems/graphicssystem In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/include/oge/systems/graphicssystem Modified Files: OgeDebugOverlay.h OgeGraphicsManager.h OgeGraphicsSceneManager.h OgeOgreArchive.h OgeOgreDataStream.h OgeOgreResourceGroupManager.h OgeRenderTargetManager.h Added Files: OgeGraphicsComponent.h Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeDebugOverlay.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeDebugOverlay.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OgeDebugOverlay.h 25 Feb 2007 21:54:57 -0000 1.4 --- OgeDebugOverlay.h 2 Apr 2008 06:32:58 -0000 1.5 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,63 **** namespace oge { class DebugOverlay { - public: - DebugOverlay(Ogre::Root* ogreRoot, Ogre::RenderWindow* renderWindow); - ~DebugOverlay(void); - void updateStatistics(void); - void showOverlay(bool show); - /** - * Set a simple debug message. For example to print "Saved screenshot x" - * @author Steven GAY - *************************************************************************/ - void setCaption(const String& caption) { mCaption = caption; }; protected: Ogre::Root* mOgreRoot; --- 48,56 ---- namespace oge { + /** + * @author Steven 'lazalong' Gay + *****************************************************************************/ class DebugOverlay { protected: Ogre::Root* mOgreRoot; *************** *** 68,73 **** bool mIsInitialised; String mCaption; - }; - } #endif --- 61,75 ---- bool mIsInitialised; String mCaption; + public: + DebugOverlay(Ogre::Root* ogreRoot, Ogre::RenderWindow* renderWindow); + ~DebugOverlay(); + void updateStatistics(); + void showOverlay(bool show); + /** + * Set a simple debug message. For example to print "Saved screenshot x" + */ + void setCaption(const String& caption) { mCaption = caption; }; + }; + } // namespace #endif Index: OgeGraphicsManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeGraphicsManager.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** OgeGraphicsManager.h 21 Sep 2007 12:04:18 -0000 1.27 --- OgeGraphicsManager.h 2 Apr 2008 06:32:58 -0000 1.28 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 43,47 **** #include "oge/platform/OgePrerequisites.h" - #include "oge/utilities/OgeString.h" #include "oge/utilities/OgeScheduler.h" --- 43,46 ---- *************** *** 60,137 **** #include "ogre/Ogre.h" //Temporary, will be replaced by individual headers - namespace oge { - class OGEAPI GraphicsManager : public Singleton<GraphicsManager>, public ExtensionManager { public: ! virtual ~GraphicsManager(void); ! /** ! * Used to create a singleton manager, if the manager is already ! * created returns the pointer to the manager ! * @return A pointer to the manager instance ! * @author Steven GAY ! *************************************************************************/ ! static GraphicsManager* createManager(void); ! /** ! * Used to delete the manager. ! * @author Steven GAY ! *************************************************************************/ ! static void destroyManager(void); ! /** ! * Return the pointer to the manager ! * @return A pointer to the manager instance ! * @author Steven GAY ! *************************************************************************/ ! static inline GraphicsManager* getSingletonPtr(void) ! { ! assert(mSingleton); ! return mSingleton; ! }; /** * Start the manager ! * @author Steven GAY ! *************************************************************************/ ! static void start(void); /** * Used to stop the manager ! * @author Steven GAY ! *************************************************************************/ ! void stop(void); /** * Push a message to the manager's queue: the scheduler will process them. ! * @author Steven GAY ! *************************************************************************/ void pushMessage(Message& message); /** * Use to wake the thread from wait * @param delta game time since the last draw ! * @author Steven GAY ! *************************************************************************/ void tick(double deltaTime); /** * Returns the GuiManager ! * @author Steven GAY ! *************************************************************************/ ! GuiManager* getGuiManager(void) { return mGuiManager; }; /** * Draws the scene ! * @author Steven GAY ! *************************************************************************/ void draw(); bool canDraw() { return mDraw; } void setAllowedToDraw(bool allowed); ! void forceImmediateDraw(void); /** * Return the ogre scene manager ! * @author Steven GAY ! *************************************************************************/ Ogre::SceneManager* _getSceneManager(void) { return mOgreSceneManager; } /** * Run a code extension in the graphics manager ! * @author Steven GAY ! *************************************************************************/ void runExtension(const ExtensionMethod& extensionMethod); void runExtension(const ExtensionMethodDataReply& extensionMethod); --- 59,144 ---- #include "ogre/Ogre.h" //Temporary, will be replaced by individual headers + namespace oge { + /** + * + * @author Steven 'lazalong' GAY, Christopher Jones + ****************************************************************************/ class OGEAPI GraphicsManager : public Singleton<GraphicsManager>, public ExtensionManager { + private: + friend class Singleton<class GraphicsManager>; + + boost::mutex mMutex; + boost::mutex mWaitMutex; + boost::mutex mDrawMutex; + boost::condition mWaitCondition; + + double mTime; + + static volatile bool mIsStarted; // the thread is running + bool mWait; + bool mIsRunning; // the thread is executing the managers main loop + bool mIsInitialised; // the manager main loop is ready to be run + bool mDraw; + bool mAllowedToDraw; + Ogre::Viewport* mDefaultViewport; + + Ogre::Root* mOgreRoot; + Ogre::RenderSystem* mRenderSystem; + Ogre::SceneManager* mOgreSceneManager; + GraphicsSceneManager* mSceneManager; + Ogre::Camera* mDefaultCamera; + Ogre::RenderWindow* mRenderWindow; + + DebugOverlay* mDebugOverlay; + GuiManager* mGuiManager; + TaskScheduler mTaskScheduler; + ConfigPtr mGraphicsConfig; + OgreResourceGroupManager* mResourceGroupManager; + OgreArchiveFactory* mArchiveFactory; + RenderTargetManager* mRenderTargetManager; + SceneManagerFactoryManager* mSceneManagerFactoryManager; + size_t windowHnd; // TODO should be mWindowHnd + public: ! virtual ~GraphicsManager(); /** * Start the manager ! */ ! static void start(); /** * Used to stop the manager ! */ ! void stop(); /** * Push a message to the manager's queue: the scheduler will process them. ! */ void pushMessage(Message& message); /** * Use to wake the thread from wait * @param delta game time since the last draw ! */ void tick(double deltaTime); /** * Returns the GuiManager ! */ ! GuiManager* getGuiManager() { return mGuiManager; }; /** * Draws the scene ! */ void draw(); bool canDraw() { return mDraw; } void setAllowedToDraw(bool allowed); ! void forceImmediateDraw(); /** * Return the ogre scene manager ! */ Ogre::SceneManager* _getSceneManager(void) { return mOgreSceneManager; } /** * Run a code extension in the graphics manager ! */ void runExtension(const ExtensionMethod& extensionMethod); void runExtension(const ExtensionMethodDataReply& extensionMethod); *************** *** 140,171 **** * Toggle between fullscreen and windowed mode * @note Should not be called directly but through EngineManager::toggleFullScreen ! * @author Steven GAY ! *************************************************************************/ ! void _toggleFullscreen(void); /** * Returns true if the thread is started/alive ! * @author Steven GAY ! *************************************************************************/ ! static bool isStarted(void) { return mIsStarted; }; /** * Return true if the manager was initialised. ! * @author Steven GAY ! *************************************************************************/ ! bool isInitialised(void) { return mIsInitialised; }; /** * Returns true if the infinite loop is running ! * @author Steven GAY ! *************************************************************************/ ! bool isRunning(void) { return mIsRunning; }; ! ResourceGroupManager* getResourceGroupManager(void); ! RenderTargetManager* getRenderTargetManager(void); SceneManagerFactoryManager* getSceneManagerFactoryManager(void); ! Ogre::Root* _getOgreRoot(void) { return mOgreRoot; } /** * Return the dependancies libraries version * This method is principally used for debugging on remote pc (testers) * and determine if the appropriate libraries are present. ! *************************************************************************/ const String getLibrariesVersion(); protected: /** --- 147,189 ---- * Toggle between fullscreen and windowed mode * @note Should not be called directly but through EngineManager::toggleFullScreen ! */ ! void _toggleFullscreen(); /** * Returns true if the thread is started/alive ! */ ! static bool isStarted() { return mIsStarted; }; /** * Return true if the manager was initialised. ! */ ! bool isInitialised() { return mIsInitialised; }; /** * Returns true if the infinite loop is running ! */ ! bool isRunning() { return mIsRunning; }; ! ResourceGroupManager* getResourceGroupManager(); ! RenderTargetManager* getRenderTargetManager(); SceneManagerFactoryManager* getSceneManagerFactoryManager(void); ! Ogre::Root* _getOgreRoot() { return mOgreRoot; } /** * Return the dependancies libraries version * This method is principally used for debugging on remote pc (testers) * and determine if the appropriate libraries are present. ! */ const String getLibrariesVersion(); + /// Return true if the render window is present + bool isRenderWindowPresent() { return mRenderWindow != 0; }; + /** Initialise all the render targets + * @note Actually what it does is to reset the statistics + * (fps count, polygon count,...). + */ + void _initRenderTargets(); + /** Create a screenshot + * @param filename Name of the resulting screenshot file. The extension + * will determine the type of the generated file (png, bmp, jpg, ...) + * @timestamped If true (default) the file will have its name timestamped + * in the format screenshot_MMDDYYY_HHMMSSmmm.xxx + */ + void saveScreenshot(const String& filename, bool timestamped = true); + protected: /** *************** *** 182,270 **** * * @todo Convert this to a scheduler ! * @author Steven GAY ! *************************************************************************/ ! void processMessages(void); private: /** * Constructor should not be used directly ! * @author Steven GAY ! *************************************************************************/ ! GraphicsManager(void); /** * Copy-construction is not defined to prevent the compiler * to create a default one and hence prevent the copy-construction * problem with singleton ! * @author Steven GAY ! *************************************************************************/ GraphicsManager(const GraphicsManager&); // No definition /** * Add the methods to method map ! * @author Steven GAY ! *************************************************************************/ ! void _addMethods(void); /** * Initialise the manager: This method is used to get info or pointer such * as the window handle that can be obtained only when some managers threads * are running. ! * @author Steven GAY ! *************************************************************************/ ! bool _initialise(void); /** * Start the thread: should not be called directly but by the static * start() method. ! * @author Steven GAY ! *************************************************************************/ ! void _run(void); /** * Start the manager thread ! * @author Steven GAY ! *************************************************************************/ ! static void _startThread(void); ! bool _setupResourceManagement(void); ! bool _loadPlugins(void); ! bool _configureRenderer(void); ! bool _setRenderSystem(void); ! void _configureRenderSystem(void); ! void _initialiseRenderer(void); ! void _createRenderWindows(void); ! void _createSceneManagement(void); ! void _createDefaultSceneManager(void); ! void _createDefaultViewportAndCamera(void); ! void _prepareRenderer(void); ! void _shutdown(void); Ogre::RenderSystem* _findRenderSystem(const String& name); String _convertOgeOptionToOgreOption(const String& ogreOption); - - size_t windowHnd; - boost::mutex mMutex; - static volatile bool mIsStarted; // the thread is running - bool mIsRunning; // the thread is executing the managers main loop - bool mIsInitialised; // the manager main loop is ready to be run - TaskScheduler mTaskScheduler; - ConfigPtr mGraphicsConfig; - OgreResourceGroupManager* mResourceGroupManager; - OgreArchiveFactory* mArchiveFactory; - Ogre::Root* mOgreRoot; - Ogre::RenderSystem* mRenderSystem; - Ogre::SceneManager* mOgreSceneManager; - GraphicsSceneManager* mSceneManager; - Ogre::Viewport* mDefaultViewport; - Ogre::Camera* mDefaultCamera; - Ogre::RenderWindow* mRenderWindow; - DebugOverlay* mDebugOverlay; - GuiManager* mGuiManager; - bool mWait; - boost::mutex mWaitMutex; - boost::condition mWaitCondition; - double mTime; - bool mDraw; - bool mAllowedToDraw; - boost::mutex mDrawMutex; - RenderTargetManager* mRenderTargetManager; - SceneManagerFactoryManager* mSceneManagerFactoryManager; }; ! } #endif --- 200,259 ---- * * @todo Convert this to a scheduler ! */ ! void processMessages(); ! private: /** * Constructor should not be used directly ! */ ! GraphicsManager(); /** * Copy-construction is not defined to prevent the compiler * to create a default one and hence prevent the copy-construction * problem with singleton ! */ GraphicsManager(const GraphicsManager&); // No definition /** * Add the methods to method map ! */ ! void _addMethods(); /** * Initialise the manager: This method is used to get info or pointer such * as the window handle that can be obtained only when some managers threads * are running. ! */ ! bool _initialise(); /** * Start the thread: should not be called directly but by the static * start() method. ! */ ! void _run(); /** * Start the manager thread ! */ ! static void _startThread(); ! bool _setupResourceManagement(); ! bool _loadPlugins(); ! bool _configureRenderer(); ! bool _setRenderSystem(); ! void _configureRenderSystem(); ! void _initialiseRenderer(); ! void _createRenderWindows(); ! void _createSceneManagement(); ! /** @brief Create a default scene manager name 'OGE_Default_SceneManager" ! * of type 'Generic SM' ! */ ! void _createDefaultSceneManager(); ! /** @todo must probably be put into _createDefaultSceneManager ! * as the viewport and camera should be related to the scene ! */ ! void _createDefaultViewportAndCamera(); ! void _shutdown(); Ogre::RenderSystem* _findRenderSystem(const String& name); String _convertOgeOptionToOgreOption(const String& ogreOption); }; ! } // namespace #endif Index: OgeRenderTargetManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeRenderTargetManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeRenderTargetManager.h 21 Sep 2007 12:04:18 -0000 1.1 --- OgeRenderTargetManager.h 2 Apr 2008 06:32:58 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 48,70 **** #include "ogre/OgreCommon.h" namespace oge { struct OGEAPI RenderWindowSettings { String name; bool fullscreen; unsigned int width; unsigned int height; Ogre::NameValuePairList miscParams; }; ! struct OGEAPI ViewportSettings ! { ! oge::String renderTargetName; ! Ogre::Camera* camera; ! int zOrder; ! float left, top, width, height; ! }; ! class OGEAPI RenderTargetManager : public Extension { --- 48,99 ---- #include "ogre/OgreCommon.h" + + /** + TODO NOTES: + http://www.ogre3d.org/phpBB2/viewtopic.php?t=24861&highlight=remove+viewport + + */ + namespace oge { + /** Viewport settings + * + * @note (Oge developer) One difficulty is that ogre::Viewport don't have + * a unique id. They can only be retrieved either by Z-Order !? + * or by an index - that can change if a viewport is removed. + * Hence we must keep in the settings a ptr to the viewport itself! + * + *****************************************************************************/ + struct OGEAPI ViewportSettings + { + /// Render target name (window or texture) + oge::String renderTargetName; + /// Ogre Camera displaying on this overlay + Ogre::Camera* camera; + /** Relative Z-order on the target. Lower = further to the front. + * @note Must be unique for the same rendertarget. This prevents overlap + * and used to delete the viewport individually. + */ + int zOrder; + /// Relative dimensions to the target + float left, top, width, height; + }; struct OGEAPI RenderWindowSettings { + /// RenderWindow name id String name; + /// Fullscreen bool fullscreen; + /// Width in pixel unsigned int width; + /// Height in pixel unsigned int height; + /// Ogre parameters list - see Ogre doc Ogre::NameValuePairList miscParams; }; ! /* ! * ! *****************************************************************************/ class OGEAPI RenderTargetManager : public Extension { *************** *** 75,80 **** ADD_VIEWPORT }; RenderTargetManager(Ogre::Root* ogreRoot); ! ~RenderTargetManager(void); void createRenderWindow(RenderWindowSettings& settings, ReplyDelegate* replyMethod = 0); --- 104,114 ---- ADD_VIEWPORT }; + + private: + Ogre::Root* mOgreRoot; + + public: RenderTargetManager(Ogre::Root* ogreRoot); ! ~RenderTargetManager(); void createRenderWindow(RenderWindowSettings& settings, ReplyDelegate* replyMethod = 0); *************** *** 87,92 **** float top = 0.0f, float width = 1.0f, float height = 1.0f); protected: - Ogre::Root* mOgreRoot; - void _createRenderWindow(const ExtensionData& data, ReplyDelegate* replyMethod); --- 121,124 ---- *************** *** 95,98 **** }; ! } #endif --- 127,130 ---- }; ! } // namespace #endif Index: OgeOgreDataStream.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeOgreDataStream.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OgeOgreDataStream.h 27 Jul 2007 16:26:31 -0000 1.3 --- OgeOgreDataStream.h 2 Apr 2008 06:32:58 -0000 1.4 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 49,67 **** namespace oge { class OGEAPI OgreDataStream : public Ogre::DataStream { public: OgreDataStream(oge::DataStreamPtr ogeDataStream); ! ~OgreDataStream(void); size_t read(void* buf, size_t count); virtual void skip(long count); virtual void seek(size_t pos); ! virtual size_t tell(void) const; ! virtual bool eof(void) const; ! virtual void close(void); ! protected: ! oge::DataStreamPtr mStream; }; - } #endif --- 49,72 ---- namespace oge { + /** + * + * @author Christoper Jones + *****************************************************************************/ class OGEAPI OgreDataStream : public Ogre::DataStream { + protected: + oge::DataStreamPtr mStream; + public: OgreDataStream(oge::DataStreamPtr ogeDataStream); ! ~OgreDataStream(); size_t read(void* buf, size_t count); virtual void skip(long count); virtual void seek(size_t pos); ! virtual size_t tell() const; ! virtual bool eof() const; ! virtual void close(); }; + } // namespace #endif Index: OgeOgreArchive.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeOgreArchive.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OgeOgreArchive.h 27 Jul 2007 16:26:31 -0000 1.3 --- OgeOgreArchive.h 2 Apr 2008 06:32:58 -0000 1.4 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 51,60 **** namespace oge { class OGEAPI OgreArchive : public Ogre::Archive { public: OgreArchive(const Ogre::String& name); ! ~OgreArchive(void); ! bool isCaseSensitive(void) const; void load(); void unload(); --- 51,68 ---- namespace oge { + /** + * + * @author Christoper Jones + *****************************************************************************/ class OGEAPI OgreArchive : public Ogre::Archive { + protected: + ResourceLocationManager* mRLM; + ResourceLocationPtr mLocationPtr; + public: OgreArchive(const Ogre::String& name); ! ~OgreArchive(); ! bool isCaseSensitive() const; void load(); void unload(); *************** *** 67,73 **** Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true, bool dirs = false); protected: - ResourceLocationManager* mRLM; - ResourceLocationPtr mLocationPtr; void _convertResourceInfoToFileInfo(Ogre::FileInfoListPtr fileInfo, oge::ResourceInfoVectorPtr resourceInfo); --- 75,80 ---- Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true, bool dirs = false); + protected: void _convertResourceInfoToFileInfo(Ogre::FileInfoListPtr fileInfo, oge::ResourceInfoVectorPtr resourceInfo); *************** *** 77,90 **** class OGEAPI OgreArchiveFactory : public Ogre::ArchiveFactory { - public: - OgreArchiveFactory(void); - const Ogre::String& getType(void) const { return mType; } - Ogre::Archive* createInstance( const Ogre::String& name ); - void destroyInstance(Ogre::Archive* archive); protected: Ogre::String mType; ResourceLocationManager* mRLM; }; ! } #endif --- 84,98 ---- class OGEAPI OgreArchiveFactory : public Ogre::ArchiveFactory { protected: Ogre::String mType; ResourceLocationManager* mRLM; + + public: + OgreArchiveFactory(); + const Ogre::String& getType() const { return mType; } + Ogre::Archive* createInstance( const Ogre::String& name ); + void destroyInstance(Ogre::Archive* archive); }; ! } // namespace #endif --- NEW FILE: OgeGraphicsComponent.h --- /* ----------------------------------------------------------------------------- This source file is part of OGE (Open Game Engine) For the latest info, see http://sourceforge.net/projects/oge Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html This program is distributed under a dual-licensing scheme: 1. The first license, which is the default one, state that this software is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got a written agreement from the 'OGE Team'. The exact wording of this license can be obtained from the 'OGE Team'. In essence this OGE Unrestricted License state that the GNU Lesser General Public License applies except that the software is distributed with no limitation or requirements to publish or give back to the OGE Team changes made to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE Unrestricted License apply only for those who got a written agreement from the OGE Team. Under both licenses, this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt . For the OGE Unrestricted License contact the OGE Team. ----------------------------------------------------------------------------- */ #ifndef __OGE_GRAPHICSCOMPONENT_H__ #define __OGE_GRAPHICSCOMPONENT_H__ #include "oge/platform/OgePrerequisites.h" #include "oge/systems/objectsystem/OgeComponent.h" #include "oge/utilities/OgeMessage.h" #include "oge/utilities/OgeString.h" #include "ogre/OgreEntity.h" #include "ogre/OgreSceneNode.h" namespace oge { /** * The 'GraphicsComponent' type component which is the base graphical * component. It enables to make call such as: * ((GraphicsComponent*) component)->render(); * * @author Steven 'lazalong' GAY ****************************************************************************/ class OGEAPI GraphicsComponent : public Component { private: String mMeshName; Ogre::Entity* mEntity; Ogre::SceneNode* mNode; public: GraphicsComponent(ComponentType type); /// (Re)set the default values virtual void reset(const IntAnyMap& params); virtual void update(); /** Implement Serialisable methods * @note Actually the serialisation methods read/write the whole object. * @todo Only the differences from the object template should be serialised. */ virtual bool write(SerialiserPtr serialiserPtr); virtual bool read(SerialiserPtr serialiserPtr); virtual bool fixup(); // TODO TO REMOVE virtual void printDebug(); /// Render the component (Specific method to the Graphics Family) virtual void render() const; /// (Specific method to the Graphics Family) void setMesh(const String& meshName); /// (Specific method to the Graphics Family) const String& getMeshName(); void _setEntity(Ogre::Entity* entity); void _setNode(Ogre::SceneNode* node); void _setPosition(const Vector3& position); Ogre::SceneNode* _getNode() { return mNode; }; bool _setPositionByMessage(const Message& message ); bool _setDimensionsByMessage(const Message& message ); /** @note The object is first reset to an upright position * and then pitch (around x axis), roll (y) and yaw (z) * are applied in this order. */ bool _setEulerOrientationByMessage(const Message& message ); virtual MessageDelegateMap getMessageDelgates(); void showBoundingBox( bool show ); void setDimensions( const Vector3& dimensions ); void setOrientation( const Vector3& orientation ); }; /** * Builder that is used to create Graphics Components based on a template. * * @author Steven 'lazalong' GAY ****************************************************************************/ class OGEAPI GraphicsComponentTemplate : public ComponentTemplate { private: String mMeshName; public: GraphicsComponentTemplate(); /** * Create the component * @param object The object containing/owning this component */ virtual Component* createComponent( Object* object, const IntAnyMap& params ); void setMesh(const String& meshName); }; } // namespace #endif // __OGE_GRAPHICSCOMPONENT_H__ Index: OgeOgreResourceGroupManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeOgreResourceGroupManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeOgreResourceGroupManager.h 27 Jul 2007 16:26:31 -0000 1.1 --- OgeOgreResourceGroupManager.h 2 Apr 2008 06:32:58 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 51,65 **** namespace oge { class OgreResourceGroupManager : public ResourceGroupManager, public BackgroundResourceQueue, protected Ogre::ResourceGroupListener { public: ! OgreResourceGroupManager(void); ! ~OgreResourceGroupManager(void); void operationCompleted(Ogre::BackgroundProcessTicket ticket); void operationCompletedInThread(Ogre::BackgroundProcessTicket ticket); ! void _notifyRegisteredToBackground(void); ! void _notifyUnregisteredFromBackground(void); ! void _processNextRequest(void); bool createResourceGroup(const String& groupName); void destroyResourceGroup(const String& groupName); --- 51,72 ---- namespace oge { + /** + * + * @author Christoper Jones + *****************************************************************************/ class OgreResourceGroupManager : public ResourceGroupManager, public BackgroundResourceQueue, protected Ogre::ResourceGroupListener { + protected: + Ogre::ResourceGroupManager* mResourceGroupManager; + public: ! OgreResourceGroupManager(); ! ~OgreResourceGroupManager(); void operationCompleted(Ogre::BackgroundProcessTicket ticket); void operationCompletedInThread(Ogre::BackgroundProcessTicket ticket); ! void _notifyRegisteredToBackground(); ! void _notifyUnregisteredFromBackground(); ! void _processNextRequest(); bool createResourceGroup(const String& groupName); void destroyResourceGroup(const String& groupName); *************** *** 84,90 **** BackgroundRequestTicketPtr backgroundClearResourceGroup( const String& groupName, BackgroundRequestListener* listener); - protected: - Ogre::ResourceGroupManager* mResourceGroupManager; void resourceGroupScriptingStarted(const String& groupName, size_t scriptCount); void scriptParseStarted(const String& scriptName); --- 91,96 ---- BackgroundRequestTicketPtr backgroundClearResourceGroup( const String& groupName, BackgroundRequestListener* listener); + protected: void resourceGroupScriptingStarted(const String& groupName, size_t scriptCount); void scriptParseStarted(const String& scriptName); *************** *** 93,102 **** void resourceGroupLoadStarted(const String& groupName, size_t resourceCount); void resourceLoadStarted(const Ogre::ResourcePtr& resource); ! void resourceLoadEnded(void); void worldGeometryStageStarted(const String& description); ! void worldGeometryStageEnded(void); void resourceGroupLoadEnded(const String& groupName); }; ! } #endif --- 99,108 ---- void resourceGroupLoadStarted(const String& groupName, size_t resourceCount); void resourceLoadStarted(const Ogre::ResourcePtr& resource); ! void resourceLoadEnded(); void worldGeometryStageStarted(const String& description); ! void worldGeometryStageEnded(); void resourceGroupLoadEnded(const String& groupName); }; ! } // namespace #endif Index: OgeGraphicsSceneManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/systems/graphicssystem/OgeGraphicsSceneManager.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeGraphicsSceneManager.h 21 Sep 2007 12:04:18 -0000 1.1 --- OgeGraphicsSceneManager.h 2 Apr 2008 06:32:58 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2007 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 45,52 **** --- 45,54 ---- #include "oge/utilities/OgeString.h" #include "oge/systems/objectsystem/OgeSceneManager.h" + #include "ogre/OgrePrerequisites.h" namespace oge { + // TODO Remove ? struct EntitySettings { *************** *** 54,59 **** --- 56,65 ---- }; + /** Default graphical scene manager: */ class OGEAPI GraphicsSceneManager : public SceneManager { + protected: + Ogre::SceneManager* mSceneManager; + public: enum GRAPHICSMETHODIDS *************** *** 65,82 **** GraphicsSceneManager(const String& name, const String& creatorType, Ogre::Root* ogreRoot); ! virtual ~GraphicsSceneManager(void); ! virtual void clearScene(void); ! virtual void _clearScene(void); virtual void createSceneNode(const String& name, ReplyDelegate* replyMethod); virtual Ogre::SceneNode* _createSceneNode(const String& name); ! virtual void createEntity(const String& name, const String& meshName, ReplyDelegate* replyMethod); virtual Ogre::Entity* _createEntity(const String& name, const String& meshName); virtual void createCamera(const String& name, ReplyDelegate* replyMethod); virtual Ogre::Camera* _createCamera(const String& name); ! Ogre::SceneManager* _getInternalSceneManager(void) { return mSceneManager; } protected: - Ogre::SceneManager* mSceneManager; - void _createSceneNode(const ExtensionData& data, ReplyDelegate* replyMethod); void _createEntity(const ExtensionData& data, ReplyDelegate* replyMethod); --- 71,87 ---- GraphicsSceneManager(const String& name, const String& creatorType, Ogre::Root* ogreRoot); ! virtual ~GraphicsSceneManager(); ! virtual void clearScene(); ! virtual void _clearScene(); virtual void createSceneNode(const String& name, ReplyDelegate* replyMethod); virtual Ogre::SceneNode* _createSceneNode(const String& name); ! virtual void createEntity(const String& name, const String& meshName, ReplyDelegate* replyMethod); virtual Ogre::Entity* _createEntity(const String& name, const String& meshName); virtual void createCamera(const String& name, ReplyDelegate* replyMethod); virtual Ogre::Camera* _createCamera(const String& name); ! Ogre::SceneManager* _getInternalSceneManager() { return mSceneManager; }; ! protected: void _createSceneNode(const ExtensionData& data, ReplyDelegate* replyMethod); void _createEntity(const ExtensionData& data, ReplyDelegate* replyMethod); *************** *** 87,93 **** { public: ! GraphicsSceneManagerFactory(void); GraphicsSceneManagerFactory(const String& type); ! virtual ~GraphicsSceneManagerFactory(void); virtual SceneManager* createSceneManager(const String& name); protected: --- 92,98 ---- { public: ! GraphicsSceneManagerFactory(); GraphicsSceneManagerFactory(const String& type); ! virtual ~GraphicsSceneManagerFactory(); virtual SceneManager* createSceneManager(const String& name); protected: *************** *** 95,99 **** }; - } #endif --- 100,105 ---- }; + + } // namespace #endif |
Update of /cvsroot/oge/oge/include/oge/utilities In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9902/include/oge/utilities Modified Files: OgeClock.h OgeContainer.h OgeExtension.h OgeExtensionManager.h OgeIterator.h OgeLogManager.h OgeMath.h OgeMatrix3.h OgeMatrix4.h OgeMessage.h OgeMessageQueue.h OgeNonCopyable.h OgeQuaternion.h OgeScheduler.h OgeSingleton.h OgeString.h OgeTextFileParser.h OgeTimer.h OgeVector2.h OgeVector3.h OgeXmlParser.h Log Message: 2008/04/02 - CVS HEAD v0.2.20 - Added Place and Physics components - Added several sub SceneManagers (gui, physics, etc) - Updated the licensing year to 2008 - Fix several small fixes NOTE: This version will be branched to the 0.2.20 cvs version. There will probably not be any new commit to this 0.2 branch. The HEAD will be cleaned completely (even the folders) and replaced by the refactoring code (aka 0.3). Index: OgeIterator.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeIterator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OgeIterator.h 16 Nov 2007 00:24:42 -0000 1.1 --- OgeIterator.h 2 Apr 2008 06:33:00 -0000 1.2 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 10,25 **** 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE --- 10,25 ---- 1. The first license, which is the default one, state that this software ! is free software; you can redistribute it and/or modify it under the terms ! of the GNU Lesser General Public License (LGPL) as published by the ! Free Software Foundation; either version 2 of the License, ! or (at your option) any later version. 2. The second license, which is not free, apply only for licensee who got ! a written agreement from the 'OGE Team'. The exact wording of this ! license can be obtained from the 'OGE Team'. In essence this ! OGE Unrestricted License state that the GNU Lesser General Public License ! applies except that the software is distributed with no limitation or ! requirements to publish or give back to the OGE Team changes made ! to the OGE source code. By default, the first type of license applies (the GNU LGPL), the OGE *************** *** 55,102 **** typedef typename ListType::iterator Iterator; typedef typename ListType::value_type ElementType; ! ListIterator(void) { ! } ! virtual ~ListIterator(void) { ! ! } ListIterator(ListIterator<ListType, true>& rhs) : mList(rhs.mList) { begin(); ! } /// Are there any more elements left ! bool hasMoreElements(void) { return mCurrentIter != mList.end(); ! } /// Sets the iterator to the beginning ! void begin(void) { mCurrentIter = mList.begin(); ! } /// Returns the current element and increments the iterator ! ElementType getNextElement(void) { ElementType element = *mCurrentIter; ++mCurrentIter; return element; ! } /// Get the current element but don't increment the iterator ! ElementType peekNextElement(void) { return *mCurrentIter; ! } ! size_t getNumberOfElements(void) { return mList.size(); ! } void _pushElement(ElementType element) { mList.push_back(element); ! } ! protected: ! ListType mList; ! Iterator mCurrentIter; }; --- 55,104 ---- typedef typename ListType::iterator Iterator; typedef typename ListType::value_type ElementType; ! ! protected: ! ListType mList; ! Iterator mCurrentIter; ! ! public: ! ListIterator() { ! }; ! virtual ~ListIterator() { ! }; ListIterator(ListIterator<ListType, true>& rhs) : mList(rhs.mList) { begin(); ! }; /// Are there any more elements left ! bool hasMoreElements() { return mCurrentIter != mList.end(); ! }; /// Sets the iterator to the beginning ! void begin() { mCurrentIter = mList.begin(); ! }; /// Returns the current element and increments the iterator ! ElementType getNextElement() { ElementType element = *mCurrentIter; ++mCurrentIter; return element; ! }; /// Get the current element but don't increment the iterator ! ElementType peekNextElement() { return *mCurrentIter; ! }; ! size_t getNumberOfElements() { return mList.size(); ! }; void _pushElement(ElementType element) { mList.push_back(element); ! }; }; *************** *** 106,143 **** typedef typename ListType::iterator Iterator; typedef typename ListType::value_type ElementType; ! ListIterator(Iterator& beginIter, Iterator& endIter) : mBeginIter(beginIter), mEndIter(endIter), mCurrentIter(beginIter) { ! } ! virtual ~ListIterator(void) { ! ! } /// Are there any more elements left ! bool hasMoreElements(void) { return mCurrentIter != mEndIter; ! } /// Sets the iterator to the beginning ! void begin(void) { mCurrentIter = mBeginIter; ! } /// Returns the current element and increments the iterator ! ElementType getNextElement(void) { return *mCurrentIter++; ! } /// Get the current element but don't increment the iterator ! ElementType peekNextElement(void) { return *mCurrentIter; ! } ! protected: ! Iterator mBeginIter; ! Iterator mCurrentIter; ! Iterator mEndIter; }; ! } ! #endif; \ No newline at end of file --- 108,147 ---- typedef typename ListType::iterator Iterator; typedef typename ListType::value_type ElementType; ! ! protected: ! Iterator mBeginIter; ! Iterator mCurrentIter; ! Iterator mEndIter; ! ! public: ! ListIterator(Iterator& beginIter, Iterator& endIter) : mBeginIter(beginIter), mEndIter(endIter), mCurrentIter(beginIter) { ! }; ! virtual ~ListIterator() { ! }; /// Are there any more elements left ! bool hasMoreElements() { return mCurrentIter != mEndIter; ! }; /// Sets the iterator to the beginning ! void begin() { mCurrentIter = mBeginIter; ! }; /// Returns the current element and increments the iterator ! ElementType getNextElement() { return *mCurrentIter++; ! }; /// Get the current element but don't increment the iterator ! ElementType peekNextElement() { return *mCurrentIter; ! }; }; ! } // namespace ! #endif Index: OgeTimer.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeTimer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OgeTimer.h 2 Feb 2007 23:37:55 -0000 1.3 --- OgeTimer.h 2 Apr 2008 06:33:00 -0000 1.4 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 49,81 **** /** Timer class * ! * @author GAY Steven *****************************************************************************/ class Timer { public: - /** - * Timer - * - * @author Steven GAY - *************************************************************************/ Timer(); ~Timer() {}; /** * (Re)start the timer ! * ! * @author Steven GAY ! *************************************************************************/ void start(); /** * Pause the timer: i.e. to pause the game and stop the bullets to fly ! * ! * @author Steven GAY ! *************************************************************************/ void pause(); /** * Get time in milliseconds: time is counted in ms from the timer start() ! * ! * @author Steven GAY ! *************************************************************************/ inline double getTime() { --- 49,77 ---- /** Timer class * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class Timer { + private: + Clock* mClock; + bool mIsRunning; + double mNewTicks; + double mStartTicks; + double mLastTicks; + public: Timer(); ~Timer() {}; /** * (Re)start the timer ! */ void start(); /** * Pause the timer: i.e. to pause the game and stop the bullets to fly ! */ void pause(); /** * Get time in milliseconds: time is counted in ms from the timer start() ! */ inline double getTime() { *************** *** 86,98 **** return mNewTicks; }; - private: - Clock* mClock; - bool mIsRunning; - double mNewTicks; - double mStartTicks; - double mLastTicks; }; ! } // end namespace ! #endif --- 82,87 ---- return mNewTicks; }; }; ! } // namespace #endif Index: OgeExtensionManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeExtensionManager.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OgeExtensionManager.h 21 Sep 2007 12:04:07 -0000 1.5 --- OgeExtensionManager.h 2 Apr 2008 06:33:00 -0000 1.6 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 50,61 **** namespace oge { class OGEAPI ExtensionManager { public: ! ExtensionManager(void); ! ~ExtensionManager(void); virtual void runExtension(const ExtensionMethod& extensionMethod) = 0; virtual void runExtension(const ExtensionMethodDataReply& extensionMethod) = 0; virtual void runExtension(const ExtensionMethodDataFullReply& extensionMethod) = 0; protected: void _runExtension(Extension* extension, MethodId methodId); --- 50,65 ---- namespace oge { + /* + * + *************************************************************************/ class OGEAPI ExtensionManager { public: ! ExtensionManager(); ! ~ExtensionManager(); virtual void runExtension(const ExtensionMethod& extensionMethod) = 0; virtual void runExtension(const ExtensionMethodDataReply& extensionMethod) = 0; virtual void runExtension(const ExtensionMethodDataFullReply& extensionMethod) = 0; + protected: void _runExtension(Extension* extension, MethodId methodId); *************** *** 70,73 **** }; ! } #endif --- 74,77 ---- }; ! } // namespace #endif Index: OgeString.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeString.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OgeString.h 27 Jul 2007 16:26:31 -0000 1.6 --- OgeString.h 2 Apr 2008 06:33:00 -0000 1.7 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 75,111 **** //----------------------- StringUtil ---------------------------------------- namespace oge { - class OGEAPI StringUtil - { - public: - #if OGE_WCHAR_T_STRINGS - typedef std::wostringstream StringStreamType; - #else - typedef std::ostringstream StringStreamType; - #endif ! static const String BLANK; ! static String toString(Real value, unsigned short precision = 6, ! unsigned short width = 0, char fill = ' ', ! std::ios::fmtflags flags = std::ios::fmtflags(0)); ! static String toString(int value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags Flags = std::ios::fmtflags(0)); ! static String toString(unsigned int value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags Flags = std::ios::fmtflags(0)); ! static String toString(long value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0)); ! static Real toFloat(const String& Val); ! static int toInt(const String& Val); ! static unsigned int toUnsignedInt(const String& Val); ! static long toLong(const String& Val); ! static unsigned long toUnsignedLong(const String& Val); ! static void trim(String& string); ! static void toLowerCase(String& string); - }; // StringUtil } // namespace oge #endif // __OGE_STRING_H__ --- 75,112 ---- //----------------------- StringUtil ---------------------------------------- namespace oge { ! class OGEAPI StringUtil ! { ! public: ! static const String BLANK; ! #if OGE_WCHAR_T_STRINGS ! typedef std::wostringstream StringStreamType; ! #else ! typedef std::ostringstream StringStreamType; ! #endif ! static String toString(Real value, unsigned short precision = 6, ! unsigned short width = 0, char fill = ' ', ! std::ios::fmtflags flags = std::ios::fmtflags(0)); ! static String toString(int value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags Flags = std::ios::fmtflags(0)); ! static String toString(unsigned int value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags Flags = std::ios::fmtflags(0)); ! static String toString(long value, unsigned short width = 0, ! char fill = ' ', std::ios::fmtflags flags = std::ios::fmtflags(0)); ! ! static Real toFloat(const String& Val); ! static int toInt(const String& Val); ! static unsigned int toUnsignedInt(const String& Val); ! static long toLong(const String& Val); ! static unsigned long toUnsignedLong(const String& Val); ! static void trim(String& string); ! static void toLowerCase(String& string); ! }; } // namespace oge #endif // __OGE_STRING_H__ Index: OgeSingleton.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeSingleton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeSingleton.h 6 Jan 2007 14:14:08 -0000 1.2 --- OgeSingleton.h 2 Apr 2008 06:33:00 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 43,78 **** #include "oge/platform/OgePrerequisites.h" - #include "oge/utilities/OgeNonCopyable.h" namespace oge { ! template<typename T> class OGEAPI Singleton : public NonCopyable { public: ! static inline T* getSingletonPtr(void) { return mSingleton; ! } ! static inline T& getSingleton(void) { assert(mSingleton); return *mSingleton; ! } protected: ! static T* mSingleton; ! Singleton(void) { assert(!mSingleton); mSingleton = static_cast<T*>(this); ! } ! ~Singleton(void) { assert(mSingleton); mSingleton = 0; ! } ! //Singleton(const Singleton&); ! private: }; ! } #endif --- 43,106 ---- #include "oge/platform/OgePrerequisites.h" namespace oge { ! template<typename T> class OGEAPI Singleton { + protected: + static T* mSingleton; + public: ! static inline T* getSingletonPtr() { return mSingleton; ! }; ! static inline T& getSingleton() { assert(mSingleton); return *mSingleton; ! }; ! /** ! * Used to create a singleton instance, if the instance ! * is already created returns the pointer to the instance. ! * ! * @return A pointer to the instance ! */ ! static inline T* createInstance() ! { ! if (mSingleton == 0) ! mSingleton = new T(); ! return mSingleton; ! }; ! /** ! * Used to delete the instance. ! */ ! static void destroyInstance() ! { ! if (mSingleton != 0) ! { ! delete mSingleton; ! mSingleton = 0; ! } ! }; ! protected: ! Singleton() { assert(!mSingleton); mSingleton = static_cast<T*>(this); ! }; ! ~Singleton() { assert(mSingleton); mSingleton = 0; ! }; + private: + /// Not implemented to make the singleton non-copyable + Singleton(const Singleton&); + /// Not implemented to make the singleton non-copyable + const Singleton& operator=(const Singleton&); }; ! } // namespace #endif Index: OgeExtension.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeExtension.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OgeExtension.h 21 Sep 2007 12:04:07 -0000 1.6 --- OgeExtension.h 2 Apr 2008 06:33:00 -0000 1.7 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,55 **** struct OGEAPI ExtensionMethod { - ExtensionMethod(Extension* ext, const MethodId& method); - ExtensionMethod(void); Extension* extension; MethodId methodId; }; --- 48,56 ---- struct OGEAPI ExtensionMethod { Extension* extension; MethodId methodId; + + ExtensionMethod(Extension* ext, const MethodId& method); + ExtensionMethod(); }; *************** *** 57,95 **** { public: - ExtensionMethodDataReply(Extension* ext, const MethodId& method, - ExtensionData data = ExtensionData(), ReplyDelegate* reply = 0); - ExtensionMethodDataReply(void); ExtensionData extensionData; ReplyDelegate* replyDelegate; }; struct OGEAPI ExtensionMethodFullReply : public ExtensionMethod { ExtensionMethodFullReply(ExtensionManager* manager, Extension* ext, const MethodId& method); ! ExtensionMethodFullReply(void); void operator()(const ExtensionData& data); - ExtensionManager* extensionManager; }; struct OGEAPI ExtensionMethodDataFullReply : public ExtensionMethod { - ExtensionMethodDataFullReply(Extension* ext, const MethodId& method, - ExtensionData data, const ExtensionMethodFullReply& reply); - ExtensionMethodDataFullReply(void); ExtensionData extensionData; ExtensionMethodFullReply fullReply; }; class OGEAPI Extension { - public: - Extension(ExtensionManager* extensionManager = 0); - virtual ~Extension(void); - void _runMethod(MethodId method); - void _runMethod(MethodId method, const ExtensionData& data, - ReplyDelegate* replyMethod); - void _runMethod(MethodId method, const ExtensionData& data, - ExtensionMethodFullReply& fullReply); protected: typedef HashMap<MethodId, ExtensionDelegateVoid> DelegateVoidMap; --- 58,91 ---- { public: ExtensionData extensionData; ReplyDelegate* replyDelegate; + + ExtensionMethodDataReply(Extension* ext, const MethodId& method, + ExtensionData data = ExtensionData(), ReplyDelegate* reply = 0); + ExtensionMethodDataReply(); }; struct OGEAPI ExtensionMethodFullReply : public ExtensionMethod { + ExtensionManager* extensionManager; + ExtensionMethodFullReply(ExtensionManager* manager, Extension* ext, const MethodId& method); ! ExtensionMethodFullReply(); void operator()(const ExtensionData& data); }; struct OGEAPI ExtensionMethodDataFullReply : public ExtensionMethod { ExtensionData extensionData; ExtensionMethodFullReply fullReply; + + ExtensionMethodDataFullReply(Extension* ext, const MethodId& method, + ExtensionData data, const ExtensionMethodFullReply& reply); + ExtensionMethodDataFullReply(); }; class OGEAPI Extension { protected: typedef HashMap<MethodId, ExtensionDelegateVoid> DelegateVoidMap; *************** *** 103,106 **** --- 99,112 ---- DelegateDataFullReplyMap mDataFullReplyMethods; + public: + Extension(ExtensionManager* extensionManager = 0); + virtual ~Extension(); + void _runMethod(MethodId method); + void _runMethod(MethodId method, const ExtensionData& data, + ReplyDelegate* replyMethod); + void _runMethod(MethodId method, const ExtensionData& data, + ExtensionMethodFullReply& fullReply); + + protected: void _addMethod(MethodId methodId, const ExtensionDelegateVoid& method); void _addMethod(MethodId methodId, const ExtensionDelegateDataReply& method); *************** *** 110,113 **** }; ! } #endif --- 116,119 ---- }; ! } // namespace #endif Index: OgeMatrix3.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeMatrix3.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeMatrix3.h 6 Jan 2007 14:14:08 -0000 1.2 --- OgeMatrix3.h 2 Apr 2008 06:33:00 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 47,54 **** namespace oge { class OGEAPI Matrix3 : public Ogre::Matrix3 { - }; ! } #endif --- 47,57 ---- namespace oge { + /* + * + *************************************************************************/ class OGEAPI Matrix3 : public Ogre::Matrix3 { }; ! ! } // namespace #endif Index: OgeMessage.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeMessage.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OgeMessage.h 21 Sep 2007 12:04:07 -0000 1.9 --- OgeMessage.h 2 Apr 2008 06:33:00 -0000 1.10 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,52 **** /** Message class * ! * @author GAY Steven *****************************************************************************/ class Message --- 48,52 ---- /** Message class * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class Message *************** *** 65,71 **** * @var FREE * Etc ! * ! * @author GAY Steven ! *************************************************************************/ enum Type { --- 65,69 ---- * @var FREE * Etc ! */ enum Type { *************** *** 85,91 **** * @var MEDIUM = Message should be processed in the actual cycle * @var LOW = Message processing can be postponed ! * ! * @author GAY Steven ! *************************************************************************/ enum Priority { --- 83,87 ---- * @var MEDIUM = Message should be processed in the actual cycle * @var LOW = Message processing can be postponed ! */ enum Priority { *************** *** 110,116 **** * @param[in] data_1 Data transmitted as a boost::any type. * @param[in] data_2 Data transmitted as a boost::any type. ! * ! * @author GAY Steven ! *************************************************************************/ Message(const int& type = EMPTY, const Priority& priority = MEDIUM, --- 106,110 ---- * @param[in] data_1 Data transmitted as a boost::any type. * @param[in] data_2 Data transmitted as a boost::any type. ! */ Message(const int& type = EMPTY, const Priority& priority = MEDIUM, *************** *** 121,156 **** mElapsedTime(0) { ! } ! /** ! * Destructor ! *************************************************************************/ ! virtual ~Message(void) {} ! /** ! * Used to sort by highest-priority first ! * Operator < defined for the std::sort algoritm used in MessageQueue. ! *************************************************************************/ ! bool operator<(const Message& rhs) const ! { ! return (mPriority > rhs.getPriority()); // TODO Test ! ! } ! /** ! * Different get/set ! * ! * @author GAY Steven ! *************************************************************************/ ! virtual inline int getType(void) const { return mType; } ! virtual inline void setType(int type) { mType = type; } ! ! virtual inline int getPriority(void) const { return mPriority; } ! virtual inline void setPriority(int priority) { mPriority = priority; } ! ! virtual inline boost::any& getData_1(void) { return mData_1; } ! virtual inline void setData_1(const boost::any& data) { mData_1 = data; } ! ! virtual inline boost::any& getData_2(void) { return mData_2; } ! virtual inline void setData_2(const boost::any& data) { mData_2 = data; } ! ! virtual inline double getElapsedTime(void) const { return mElapsedTime; } ! virtual inline void setElapsedTime(double elapsedTime) { mElapsedTime = elapsedTime; } protected: --- 115,119 ---- mElapsedTime(0) { ! }; protected: *************** *** 179,184 **** */ double mElapsedTime; }; ! } #endif --- 142,178 ---- */ double mElapsedTime; + + public: + /** + * Destructor + */ + virtual ~Message() {}; + /** + * Used to sort by highest-priority first + * Operator < defined for the std::sort algoritm used in MessageQueue. + */ + bool operator<(const Message& rhs) const + { + return (mPriority > rhs.getPriority()); // TODO Test ! + }; + /** + * Different get/set + */ + virtual inline int getType() const { return mType; }; + virtual inline void setType(int type) { mType = type; }; + + virtual inline int getPriority() const { return mPriority; }; + virtual inline void setPriority(int priority) { mPriority = priority; }; + + virtual inline boost::any& getData_1() { return mData_1; }; + virtual inline void setData_1(const boost::any& data) { mData_1 = data; }; + + virtual inline boost::any& getData_2() { return mData_2; }; + virtual inline void setData_2(const boost::any& data) { mData_2 = data; }; + + virtual inline double getElapsedTime() const { return mElapsedTime; }; + virtual inline void setElapsedTime(double elapsedTime) { mElapsedTime = elapsedTime; }; }; ! } // namespace #endif Index: OgeTextFileParser.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeTextFileParser.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OgeTextFileParser.h 27 Jul 2007 16:26:31 -0000 1.5 --- OgeTextFileParser.h 2 Apr 2008 06:33:00 -0000 1.6 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 47,65 **** namespace oge { class OGEAPI TextFileParser { - public: - TextFileParser(DataStreamPtr dataStream); - ~TextFileParser(void); - String readUntil(char delim); - String readAll(void); - String readLine(void); - bool isAtEndOfFile(void) { return mDataStream->isAtEndOfStream(); } - protected: private: DataStreamPtr mDataStream; unsigned int mSize; }; - } #endif --- 47,66 ---- namespace oge { + class OGEAPI TextFileParser { private: DataStreamPtr mDataStream; unsigned int mSize; + + public: + TextFileParser(DataStreamPtr dataStream); + ~TextFileParser(); + String readUntil(char delim); + String readAll(); + String readLine(); + bool isAtEndOfFile() { return mDataStream->isAtEndOfStream(); } }; + } // namespace #endif Index: OgeQuaternion.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeQuaternion.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OgeQuaternion.h 6 Jan 2007 14:14:08 -0000 1.2 --- OgeQuaternion.h 2 Apr 2008 06:33:00 -0000 1.3 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 47,54 **** namespace oge { class OGEAPI Quaternion : public Ogre::Quaternion { - }; ! } #endif --- 47,56 ---- namespace oge { + /* + * + *************************************************************************/ class OGEAPI Quaternion : public Ogre::Quaternion { }; ! } // namespace #endif Index: OgeScheduler.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeScheduler.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OgeScheduler.h 21 Sep 2007 12:04:07 -0000 1.5 --- OgeScheduler.h 2 Apr 2008 06:33:00 -0000 1.6 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 48,62 **** namespace oge { - //----------------------------------------------------------------------------- /** * Base class for scheduler * ! * @author GAY Steven *****************************************************************************/ class Scheduler { public: - Scheduler() {}; - ~Scheduler() {}; enum Policy { --- 48,59 ---- namespace oge { /** * Base class for scheduler * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class Scheduler { public: enum Policy { *************** *** 69,72 **** --- 66,72 ---- }; + Scheduler() {}; + ~Scheduler() {}; + void process(); // not virtual (for speed) }; *************** *** 76,80 **** * in a cycle. The priority is only used to determine a processing order. * ! * @author GAY Steven *****************************************************************************/ class SchedulerImmediate : public Scheduler --- 76,80 ---- * in a cycle. The priority is only used to determine a processing order. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerImmediate : public Scheduler *************** *** 93,101 **** double lastCallTime; }; - SchedulerImmediate(); - bool process_Immediate(double time); - void addMessage_Immediate(Message& message); - void addMethod_Immediate(int id, const MessageDelegate& method); MessageDelegateMap mMethodMap_Immediate; MessageQueue<Task> mMessageQueue_Immediate; --- 93,98 ---- double lastCallTime; }; + public: MessageDelegateMap mMethodMap_Immediate; MessageQueue<Task> mMessageQueue_Immediate; *************** *** 103,107 **** --- 100,111 ---- double mTime; unsigned int mImmediateMessageProcessed; // TEMP + + public: + SchedulerImmediate(); + bool process_Immediate(double time); + void addMessage_Immediate(Message& message); + void addMethod_Immediate(int id, const MessageDelegate& method); }; + /** * This sheduler will process messages as long as either: *************** *** 116,121 **** * because it means that this message can't be removed. * ! * ! * @author GAY Steven *****************************************************************************/ class SchedulerTimeLimited : public Scheduler --- 120,124 ---- * because it means that this message can't be removed. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerTimeLimited : public Scheduler *************** *** 135,145 **** double lastCallTime; }; - SchedulerTimeLimited(); - bool process_TimeLimited(double time); - void addMessage_TimeLimited(Message& message); - void addMethod_TimeLimited(int id, const MessageDelegate& method); - void setTimeLimit(double timeLimit); - void reset(); MessageDelegateMap mMethodMap_TimeLimited; MessageQueue<Task> mMessageQueue_TimeLimited; --- 138,143 ---- double lastCallTime; }; + public: MessageDelegateMap mMethodMap_TimeLimited; MessageQueue<Task> mMessageQueue_TimeLimited; *************** *** 152,155 **** --- 150,161 ---- double mTime; unsigned int mTimeLimitedMessageProcessed; // TEMP + + public: + SchedulerTimeLimited(); + bool process_TimeLimited(double time); + void addMessage_TimeLimited(Message& message); + void addMethod_TimeLimited(int id, const MessageDelegate& method); + void setTimeLimit(double timeLimit); + void reset(); }; /** *************** *** 158,178 **** * is allowd then the real frame rate will be near the range 60 to 55 fps. * ! * @author GAY Steven *****************************************************************************/ class SchedulerAveraged : public Scheduler { public: - bool process_Averaged(); - void addMessage_Averaged(Message& message, double duration = 0); - void addMethod_Averaged(int id, const MessageDelegate& method); - MessageDelegateMap mMethodMap_Averaged; MessageQueue<Message> mMessageQueue_Averaged; std::vector<Message> mUnfinished_Averaged; }; /** * Messages are based on timing informations : priority, start, finish, end. * ! * @author GAY Steven *****************************************************************************/ class SchedulerTimed : public Scheduler --- 164,184 ---- * is allowd then the real frame rate will be near the range 60 to 55 fps. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerAveraged : public Scheduler { public: MessageDelegateMap mMethodMap_Averaged; MessageQueue<Message> mMessageQueue_Averaged; std::vector<Message> mUnfinished_Averaged; + + bool process_Averaged(); + void addMessage_Averaged(Message& message, double duration = 0); + void addMethod_Averaged(int id, const MessageDelegate& method); }; /** * Messages are based on timing informations : priority, start, finish, end. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerTimed : public Scheduler *************** *** 183,189 **** * - an end time after which is should no * - a duration time which determine how long this message should be processed. ! * ! * @author GAY Steven ! */ class Message_Timed : public Message { --- 189,193 ---- * - an end time after which is should no * - a duration time which determine how long this message should be processed. ! **************************************************************************/ class Message_Timed : public Message { *************** *** 203,250 **** double mEnd; }; - //------------------------------------------------------------------------- - bool process_Timed(); - void addMessage_Timed(Message& message, double start = 0, double end = 0, - double duration = 0); - void addMethod_Timed(int id, const MessageDelegate& method); MessageDelegateMap mMethodMap_Timed; MessageQueue<Message_Timed> mMessageQueue_Timed; std::vector<Message_Timed> mUnfinished_Timed; }; /** * Message are processed based on their sequence: 1,2,3,... * ! * @author GAY Steven *****************************************************************************/ class SchedulerSequenced : public Scheduler { public: bool process_Sequenced(); void addMessage_Sequenced(Message& message); void addMethod_Sequenced(int id, const MessageDelegate& method); - - MessageDelegateMap mMethodMap_Sequenced; - MessageQueue<Message> mMessageQueue_Sequenced; }; /** * Message are processed based on their sequence: 1,2,3,... and time constraints * ! * @author GAY Steven *****************************************************************************/ class SchedulerTimedSequenced : public Scheduler { public: bool process_TimedSequenced(); void addMessage_TimedSequenced(Message& message); void addMethod_TimedSequenced(int id, const MessageDelegate& method); - - MessageDelegateMap mMethodMap_TimedSequenced; - MessageQueue<Message> mMessageQueue_TimedSequenced; }; /** * Combination of two schedulers * ! * @author GAY Steven *****************************************************************************/ class MessageScheduler : public SchedulerImmediate, public SchedulerTimeLimited --- 207,257 ---- double mEnd; }; + public: MessageDelegateMap mMethodMap_Timed; MessageQueue<Message_Timed> mMessageQueue_Timed; std::vector<Message_Timed> mUnfinished_Timed; + + public: + bool process_Timed(); + void addMessage_Timed(Message& message, double start = 0, double end = 0, + double duration = 0); + void addMethod_Timed(int id, const MessageDelegate& method); }; + /** * Message are processed based on their sequence: 1,2,3,... * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerSequenced : public Scheduler { public: + MessageDelegateMap mMethodMap_Sequenced; + MessageQueue<Message> mMessageQueue_Sequenced; + bool process_Sequenced(); void addMessage_Sequenced(Message& message); void addMethod_Sequenced(int id, const MessageDelegate& method); }; /** * Message are processed based on their sequence: 1,2,3,... and time constraints * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class SchedulerTimedSequenced : public Scheduler { public: + MessageDelegateMap mMethodMap_TimedSequenced; + MessageQueue<Message> mMessageQueue_TimedSequenced; + bool process_TimedSequenced(); void addMessage_TimedSequenced(Message& message); void addMethod_TimedSequenced(int id, const MessageDelegate& method); }; /** * Combination of two schedulers * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class MessageScheduler : public SchedulerImmediate, public SchedulerTimeLimited *************** *** 260,264 **** * Combination of two schedulers * ! * @author GAY Steven *****************************************************************************/ class TaskScheduler : public SchedulerAveraged, public SchedulerTimeLimited --- 267,271 ---- * Combination of two schedulers * ! * @author Steven 'lazalong' Gay *****************************************************************************/ class TaskScheduler : public SchedulerAveraged, public SchedulerTimeLimited *************** *** 274,278 **** }; ! } #endif --- 281,285 ---- }; ! } // namespace #endif Index: OgeClock.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeClock.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OgeClock.h 6 Jan 2007 20:59:05 -0000 1.4 --- OgeClock.h 2 Apr 2008 06:33:00 -0000 1.5 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 43,46 **** --- 43,47 ---- #include "oge/platform/OgePrerequisites.h" + #include "oge/utilities/OgeSingleton.h" namespace oge { *************** *** 59,117 **** /** Clock class * ! * @todo If the MS Perfromance Counter is not present this clock must be * modified with the code from PreciseTimer from CodeProject: * http://www.codeproject.com/cpp/precisetimer.asp * (Mingw will need '-Wno-long-long' to compile "long long" type). * ! * @author GAY Steven *****************************************************************************/ ! class Clock { public: ! // TODO TMP should derive from Singleton ! static Clock* mSingleton; ! /** ! * Used to create a singleton manager, if the manager is already ! * created returns the pointer to the manager ! * ! * @return A pointer to the singleton instance ! * @author Steven GAY ! *************************************************************************/ ! static Clock* createSingleton() ! { ! if (mSingleton == 0) ! mSingleton = new Clock(); ! return mSingleton; ! }; ! /** ! * Used to delete the manager. ! * ! * @author Steven GAY ! *************************************************************************/ ! static void destroyManager(void) ! { ! if (mSingleton != 0) ! { ! delete mSingleton; ! mSingleton = 0; ! } ! }; ! /** ! * Return the pointer to the manager ! * ! * @return A pointer to the manager instance ! * @author Steven GAY ! *************************************************************************/ ! static inline Clock* getSingletonPtr(void) ! { ! assert(mSingleton); ! return mSingleton; ! }; /** * Clock ! * ! * @author Steven GAY ! *************************************************************************/ Clock(); ~Clock(){}; --- 60,88 ---- /** Clock class * ! * @next If the MS Perfromance Counter is not present this clock must be * modified with the code from PreciseTimer from CodeProject: * http://www.codeproject.com/cpp/precisetimer.asp * (Mingw will need '-Wno-long-long' to compile "long long" type). * ! * @author 'lazalong' Gay, fraggleonlinux *****************************************************************************/ ! class Clock : public Singleton<Clock> { public: + friend class Singleton<class Clock>; ! private: ! static bool gInitialised; ! static double gStartTicks; ! static double gStartTime; ! static double gSecsPerTick; ! ! double mNewTicks; ! LARGE_INTEGER mCurrentTime; ! ! public: /** * Clock ! */ Clock(); ~Clock(){}; *************** *** 121,133 **** * This avoids the problem of getting stable time measures in the same frame * if the update method was called multiple time during a frame cycle. ! * ! * @author Steven GAY ! *************************************************************************/ void update(); /** * Get time in milliseconds : time is counted in ms from the clock start(). ! * ! * @author Steven GAY ! *************************************************************************/ inline double getTime() { --- 92,100 ---- * This avoids the problem of getting stable time measures in the same frame * if the update method was called multiple time during a frame cycle. ! */ void update(); /** * Get time in milliseconds : time is counted in ms from the clock start(). ! */ inline double getTime() { *************** *** 137,143 **** * Update and Get time in milliseconds : time is counted in ms from * the clock start(). ! * ! * @author Steven GAY ! *************************************************************************/ inline double updateAndGetTime() { --- 104,108 ---- * Update and Get time in milliseconds : time is counted in ms from * the clock start(). ! */ inline double updateAndGetTime() { *************** *** 145,205 **** return mNewTicks; }; private: static bool gInitialised; static double gStartTicks; ! static double gStartTime; ! static double gSecsPerTick; double mNewTicks; ! LARGE_INTEGER mCurrentTime; ! }; ! ! #else // --------------------- Linux + Mac ---------------------------------- - class Clock - { public: ~Clock() {}; - // TODO TMP should derive from Singleton - static Clock* mSingleton; - /** - * Used to create a singleton manager, if the manager is already - * created returns the pointer to the manager - * - * @return A pointer to the singleton instance - * @author Steven GAY - *************************************************************************/ - static Clock* createSingleton() - { - if (mSingleton == 0) - mSingleton = new Clock(); - return mSingleton; - }; - /** - * Used to delete the manager. - * - * @author Steven GAY - *************************************************************************/ - static void destroyManager(void) - { - if (mSingleton != 0) - { - delete mSingleton; - mSingleton = 0; - } - }; - /** - * Return the pointer to the manager - * - * @return A pointer to the manager instance - * @author Steven GAY - *************************************************************************/ - static inline Clock* getSingletonPtr(void) - { - assert(mSingleton); - return mSingleton; - }; /** * Update the clock : this should be called ONCE by frame cycle. --- 110,132 ---- return mNewTicks; }; + }; + + #else // --------------------- Linux + Mac ---------------------------------- + class Clock + { private: + friend class Singleton<class Clock>; static bool gInitialised; static double gStartTicks; ! static timeval gStartTime; ! // static ?? gFrequency; NEXT Needed with Linux ? double mNewTicks; ! timeval mCurrentTime; public: ~Clock() {}; /** * Update the clock : this should be called ONCE by frame cycle. *************** *** 207,219 **** * This avoids the problem of getting stable time measures in the same frame * if the update method was called multiple time during a frame cycle. ! * ! * @author Steven GAY ! *************************************************************************/ void update(); /** * Get time in milliseconds : time is counted in ms from the clock start(). ! * ! * @author Steven GAY ! *************************************************************************/ inline double getTime() { --- 134,142 ---- * This avoids the problem of getting stable time measures in the same frame * if the update method was called multiple time during a frame cycle. ! */ void update(); /** * Get time in milliseconds : time is counted in ms from the clock start(). ! */ inline double getTime() { *************** *** 224,230 **** * Update and Get time in milliseconds : time is counted in ms from * the clock start(). ! * ! * @author Steven GAY, fraggleonlinux ! *************************************************************************/ inline double updateAndGetTime() { --- 147,151 ---- * Update and Get time in milliseconds : time is counted in ms from * the clock start(). ! */ inline double updateAndGetTime() { *************** *** 236,250 **** /** * Clock ! * ! * @author Steven GAY ! *************************************************************************/ Clock(); - static bool gInitialised; - static double gStartTicks; - static timeval gStartTime; - // static ?? gFrequency; TODO Needed with Linux ? - - double mNewTicks; - timeval mCurrentTime; }; --- 157,162 ---- /** * Clock ! */ Clock(); }; *************** *** 252,255 **** } // end namespace - #endif --- 164,166 ---- Index: OgeMessageQueue.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeMessageQueue.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OgeMessageQueue.h 6 Jan 2007 14:14:08 -0000 1.9 --- OgeMessageQueue.h 2 Apr 2008 06:33:00 -0000 1.10 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 52,56 **** /** A simple thread-safe FIFO queue class based on the Monitor pattern. * ! * @author GAY Steven *****************************************************************************/ template<typename T> class MessageQueue : NonCopyable --- 52,56 ---- /** A simple thread-safe FIFO queue class based on the Monitor pattern. * ! * @author Steven 'lazalong' Gay *****************************************************************************/ template<typename T> class MessageQueue : NonCopyable *************** *** 69,81 **** public: /** Constructor ! *************************************************************************/ ! MessageQueue(void) : begin(0), end(0), buffered(0), circular_buf(2) { ! } /** Destructor ! *************************************************************************/ ! virtual ~MessageQueue(void) { ! } /** * Push a message: a sender add a message to the queue that will be --- 69,81 ---- public: /** Constructor ! */ ! MessageQueue() : begin(0), end(0), buffered(0), circular_buf(2) { ! }; /** Destructor ! */ ! virtual ~MessageQueue() { ! }; /** * Push a message: a sender add a message to the queue that will be *************** *** 83,89 **** * * @param[in] message Message to be send. ! * ! * @author GAY Steven ! *************************************************************************/ void push(const T& message) { --- 83,87 ---- * * @param[in] message Message to be send. ! */ void push(const T& message) { *************** *** 93,97 **** mDeque.push_back(message); mWaitCondition.notify_one(); // careful: only one receiver should wait! ! } /** * Pop a message: used by the receiver who will process the message. --- 91,95 ---- mDeque.push_back(message); mWaitCondition.notify_one(); // careful: only one receiver should wait! ! }; /** * Pop a message: used by the receiver who will process the message. *************** *** 99,106 **** * If the queue is empty an empty message is returned instead. * This method is *non-blocking*. ! * ! * @author GAY Steven ! *************************************************************************/ ! T pop(void) { FN("MessageQueue::popMessage"); --- 97,102 ---- * If the queue is empty an empty message is returned instead. * This method is *non-blocking*. ! */ ! T pop() { FN("MessageQueue::popMessage"); *************** *** 114,118 **** mDeque.pop_front(); return (T)(message); ! } /** * Wait a message: used by the receiver who will process the message. --- 110,114 ---- mDeque.pop_front(); return (T)(message); ! }; /** * Wait a message: used by the receiver who will process the message. *************** *** 120,127 **** * The message is removed from the waiting list. * Only one receiver should wait on messages per queue. ! * ! * @author GAY Steven ! *************************************************************************/ ! T waitPop(void) { FN("MessageQueue::waitPopMessage"); --- 116,121 ---- * The message is removed from the waiting list. * Only one receiver should wait on messages per queue. ! */ ! T waitPop() { FN("MessageQueue::waitPopMessage"); *************** *** 142,152 **** mDeque.pop_front(); return (message); ! } /** TODO Temporary : use a circular buffer * Created to make test - taken from boost example * DOESNT WORK WITH BUFFER > 2 ?! ! * ! * @author GAY Steven ! *************************************************************************/ void send(const T& message) { --- 136,144 ---- mDeque.pop_front(); return (message); ! }; /** TODO Temporary : use a circular buffer * Created to make test - taken from boost example * DOESNT WORK WITH BUFFER > 2 ?! ! */ void send(const T& message) { *************** *** 158,168 **** ++buffered; buffer_not_empty.notify_one(); ! } /** TODO Temporary : use a circular buffer * Created to make test ! * ! * @author GAY Steven ! *************************************************************************/ ! T receive(void) { boost::mutex::scoped_lock lk(monitor); --- 150,158 ---- ++buffered; buffer_not_empty.notify_one(); ! }; /** TODO Temporary : use a circular buffer * Created to make test ! */ ! T receive() { boost::mutex::scoped_lock lk(monitor); *************** *** 174,202 **** buffer_not_full.notify_one(); return message; ! } /** * Return true if the queue is empty ! * ! * @author GAY Steven ! *************************************************************************/ bool isEmpty() { return mDeque.empty(); ! } /** * Sort the queue by message priority. ! * ! * @author GAY Steven ! *************************************************************************/ void sort() { boost::mutex::scoped_lock lock(mMutex); std::sort(mDeque.begin(), mDeque.end()); ! } /** * Returns the number of messages ! * ! * @author GAY Steven ! *************************************************************************/ int size() { --- 164,186 ---- buffer_not_full.notify_one(); return message; ! }; /** * Return true if the queue is empty ! */ bool isEmpty() { return mDeque.empty(); ! }; /** * Sort the queue by message priority. ! */ void sort() { boost::mutex::scoped_lock lock(mMutex); std::sort(mDeque.begin(), mDeque.end()); ! }; /** * Returns the number of messages ! */ int size() { *************** *** 205,211 **** /** * Clear the queue ! * ! * @author GAY Steven ! *************************************************************************/ void clear() { --- 189,193 ---- /** * Clear the queue ! */ void clear() { *************** *** 214,217 **** }; }; ! } #endif --- 196,199 ---- }; }; ! } // namespace #endif Index: OgeLogManager.h =================================================================== RCS file: /cvsroot/oge/oge/include/oge/utilities/OgeLogManager.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** OgeLogManager.h 30 Sep 2007 07:44:42 -0000 1.12 --- OgeLogManager.h 2 Apr 2008 06:33:00 -0000 1.13 *************** *** 4,8 **** For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006 The OGE Team Also see acknowledgements in Readme.html --- 4,8 ---- For the latest info, see http://sourceforge.net/projects/oge ! Copyright (c) 2006-2008 The OGE Team Also see acknowledgements in Readme.html *************** *** 168,195 **** * * @author: Steven 'lazalong' GAY ! * ! */ class OGEAPI LogManager { public: ! // Helper function designed to push and pop class OGEAPI EventLogFN { - public: - /** - * Constructor - *********************************************************************/ - EventLogFN(const char* function) { mSingleton->pushFunction(function);}; - /** - * Destructor - *****... [truncated message content] |