Przeglądaj źródła

Newline cleanup, where all whitespace outside of {methods, functions} was reduced to two new lines, and all whitespace within {methods, functions} was reduced to one new line.
Reordered all #includes to be in alphabetical order, with system includes first then local includes (mostly just moved the .cpp header into the local list).

Bryce Groff 11 lat temu
rodzic
commit
09b95e86ae
43 zmienionych plików z 134 dodań i 898 usunięć
  1. 1 52
      QGearsMain/src/core/AudioManager.cpp
  2. 43 48
      QGearsMain/src/core/Background2D.cpp
  3. 11 16
      QGearsMain/src/core/Background2DAnimation.cpp
  4. 4 20
      QGearsMain/src/core/CameraManager.cpp
  5. 0 6
      QGearsMain/src/core/ConfigCmd.cpp
  6. 2 10
      QGearsMain/src/core/ConfigCmdManager.cpp
  7. 1 3
      QGearsMain/src/core/ConfigFile.cpp
  8. 1 15
      QGearsMain/src/core/ConfigVar.cpp
  9. 0 5
      QGearsMain/src/core/ConfigVarManager.cpp
  10. 1 23
      QGearsMain/src/core/Console.cpp
  11. 1 24
      QGearsMain/src/core/DebugDraw.cpp
  12. 11 111
      QGearsMain/src/core/Entity.cpp
  13. 2 5
      QGearsMain/src/core/EntityCollision.cpp
  14. 1 5
      QGearsMain/src/core/EntityDirection.cpp
  15. 20 124
      QGearsMain/src/core/EntityManager.cpp
  16. 1 10
      QGearsMain/src/core/EntityModel.cpp
  17. 1 13
      QGearsMain/src/core/EntityPoint.cpp
  18. 1 14
      QGearsMain/src/core/EntityTrigger.cpp
  19. 1 17
      QGearsMain/src/core/GameFrameListner.cpp
  20. 2 16
      QGearsMain/src/core/InputManager.cpp
  21. 5 33
      QGearsMain/src/core/ScriptManager.cpp
  22. 1 12
      QGearsMain/src/core/Timer.cpp
  23. 1 25
      QGearsMain/src/core/UiAnimation.cpp
  24. 1 13
      QGearsMain/src/core/UiFont.cpp
  25. 1 23
      QGearsMain/src/core/UiManager.cpp
  26. 1 15
      QGearsMain/src/core/UiSprite.cpp
  27. 1 22
      QGearsMain/src/core/UiTextArea.cpp
  28. 1 68
      QGearsMain/src/core/UiWidget.cpp
  29. 2 6
      QGearsMain/src/core/Utilites.cpp
  30. 2 17
      QGearsMain/src/core/Walkmesh.cpp
  31. 1 6
      QGearsMain/src/core/XmlBackground2DFile.cpp
  32. 1 15
      QGearsMain/src/core/XmlFile.cpp
  33. 1 5
      QGearsMain/src/core/XmlFontFile.cpp
  34. 1 5
      QGearsMain/src/core/XmlFontsFile.cpp
  35. 1 4
      QGearsMain/src/core/XmlMapFile.cpp
  36. 1 6
      QGearsMain/src/core/XmlMapsFile.cpp
  37. 1 5
      QGearsMain/src/core/XmlMusicsFile.cpp
  38. 1 5
      QGearsMain/src/core/XmlPrototypesFile.cpp
  39. 1 56
      QGearsMain/src/core/XmlScreenFile.cpp
  40. 1 5
      QGearsMain/src/core/XmlScreensFile.cpp
  41. 1 5
      QGearsMain/src/core/XmlScriptsFile.cpp
  42. 1 5
      QGearsMain/src/core/XmlTextFile.cpp
  43. 1 5
      QGearsMain/src/core/XmlTextsFile.cpp

+ 1 - 52
QGearsMain/src/core/AudioManager.cpp

@@ -1,20 +1,17 @@
-#include "core/AudioManager.h"
-
 #include <list>
 #include <list>
 #include <boost/thread.hpp>
 #include <boost/thread.hpp>
 
 
+#include "core/AudioManager.h"
 #include "core/XmlMusicsFile.h"
 #include "core/XmlMusicsFile.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 
 
 
 
-
 template<>AudioManager *Ogre::Singleton< AudioManager >::msSingleton = NULL;
 template<>AudioManager *Ogre::Singleton< AudioManager >::msSingleton = NULL;
 
 
 ALsizei AudioManager::m_ChannelBufferNumber = 2;
 ALsizei AudioManager::m_ChannelBufferNumber = 2;
 int AudioManager::m_ChannelBufferSize = 96 * 1024;
 int AudioManager::m_ChannelBufferSize = 96 * 1024;
 
 
 
 
-
 AudioManager::AudioManager():
 AudioManager::AudioManager():
     m_Initialized( false ),
     m_Initialized( false ),
     m_ThreadContinue( true ),
     m_ThreadContinue( true ),
@@ -53,15 +50,12 @@ AudioManager::AudioManager():
         LOG_ERROR( "AudioManager failed to initialised. There's no default sound device." );
         LOG_ERROR( "AudioManager failed to initialised. There's no default sound device." );
     }
     }
 
 
-
-
     // Load musics
     // Load musics
     XmlMusicsFile musics( "./data/musics.xml" );
     XmlMusicsFile musics( "./data/musics.xml" );
     musics.LoadMusics();
     musics.LoadMusics();
 }
 }
 
 
 
 
-
 AudioManager::~AudioManager()
 AudioManager::~AudioManager()
 {
 {
     MusicStop();
     MusicStop();
@@ -81,7 +75,6 @@ AudioManager::~AudioManager()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::operator()()
 AudioManager::operator()()
 {
 {
@@ -99,7 +92,6 @@ AudioManager::operator()()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::Update()
 AudioManager::Update()
 {
 {
@@ -109,7 +101,6 @@ AudioManager::Update()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::MusicPause()
 AudioManager::MusicPause()
 {
 {
@@ -119,7 +110,6 @@ AudioManager::MusicPause()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::MusicPlay( const Ogre::String& name )
 AudioManager::MusicPlay( const Ogre::String& name )
 {
 {
@@ -140,7 +130,6 @@ AudioManager::MusicPlay( const Ogre::String& name )
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::MusicStop()
 AudioManager::MusicStop()
 {
 {
@@ -150,7 +139,6 @@ AudioManager::MusicStop()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::AddMusic( const AudioManager::Music& music )
 AudioManager::AddMusic( const AudioManager::Music& music )
 {
 {
@@ -169,7 +157,6 @@ AudioManager::AddMusic( const AudioManager::Music& music )
 }
 }
 
 
 
 
-
 AudioManager::Music*
 AudioManager::Music*
 AudioManager::GetMusic( const Ogre::String& name )
 AudioManager::GetMusic( const Ogre::String& name )
 {
 {
@@ -187,7 +174,6 @@ AudioManager::GetMusic( const Ogre::String& name )
 }
 }
 
 
 
 
-
 const char*
 const char*
 AudioManager::ALError()
 AudioManager::ALError()
 {
 {
@@ -203,7 +189,6 @@ AudioManager::ALError()
 }
 }
 
 
 
 
-
 const char*
 const char*
 AudioManager::ALCError( const ALCdevice* device )
 AudioManager::ALCError( const ALCdevice* device )
 {
 {
@@ -221,7 +206,6 @@ AudioManager::ALCError( const ALCdevice* device )
 }
 }
 
 
 
 
-
 AudioManager::Player::Player( boost::recursive_mutex* mutex ):
 AudioManager::Player::Player( boost::recursive_mutex* mutex ):
     m_Loop( -1.0 ),
     m_Loop( -1.0 ),
     m_VorbisInfo( NULL ),
     m_VorbisInfo( NULL ),
@@ -232,14 +216,12 @@ AudioManager::Player::Player( boost::recursive_mutex* mutex ):
 }
 }
 
 
 
 
-
 AudioManager::Player::~Player()
 AudioManager::Player::~Player()
 {
 {
     Stop();
     Stop();
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::Player::Pause()
 AudioManager::Player::Pause()
 {
 {
@@ -249,7 +231,6 @@ AudioManager::Player::Pause()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::Player::Play( const Ogre::String &file )
 AudioManager::Player::Play( const Ogre::String &file )
 {
 {
@@ -325,7 +306,6 @@ AudioManager::Player::Stop()
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::Player::SetLoop( const float loop )
 AudioManager::Player::SetLoop( const float loop )
 {
 {
@@ -335,7 +315,6 @@ AudioManager::Player::SetLoop( const float loop )
 }
 }
 
 
 
 
-
 void
 void
 AudioManager::Player::Update()
 AudioManager::Player::Update()
 {
 {
@@ -390,7 +369,6 @@ AudioManager::Player::Update()
 }
 }
 
 
 
 
-
 ALsizei
 ALsizei
 AudioManager::Player::FillBuffer()
 AudioManager::Player::FillBuffer()
 {
 {
@@ -447,7 +425,6 @@ AudioManager::Player::FillBuffer()
 }
 }
 
 
 
 
-
 float
 float
 AudioManager::Player::GetPosition()
 AudioManager::Player::GetPosition()
 {
 {
@@ -457,31 +434,3 @@ AudioManager::Player::GetPosition()
     alGetSourcei( m_Source, AL_SAMPLE_OFFSET, &play_offset );
     alGetSourcei( m_Source, AL_SAMPLE_OFFSET, &play_offset );
     return ( ov_pcm_tell( &m_VorbisFile ) - ( m_ChannelBufferNumber * m_ChannelBufferSize / m_VorbisInfo->channels / sizeof( int16_t ) - play_offset ) ) * 1000 / m_VorbisInfo->rate;
     return ( ov_pcm_tell( &m_VorbisFile ) - ( m_ChannelBufferNumber * m_ChannelBufferSize / m_VorbisInfo->channels / sizeof( int16_t ) - play_offset ) ) * 1000 / m_VorbisInfo->rate;
 }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

+ 43 - 48
QGearsMain/src/core/Background2D.cpp

@@ -1,10 +1,9 @@
-#include "core/Background2D.h"
-
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreLogManager.h>
 #include <OgreLogManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreException.h>
 #include <OgreException.h>
 
 
+#include "core/Background2D.h"
 #include "core/CameraManager.h"
 #include "core/CameraManager.h"
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
@@ -73,7 +72,7 @@ Background2D::Background2D():
     m_SceneManager->addRenderQueueListener( this );
     m_SceneManager->addRenderQueueListener( this );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 Background2D::~Background2D()
 Background2D::~Background2D()
 {
 {
     m_SceneManager->removeRenderQueueListener( this );
     m_SceneManager->removeRenderQueueListener( this );
@@ -86,7 +85,7 @@ Background2D::~Background2D()
     DestroyVertexBuffers();
     DestroyVertexBuffers();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::InputDebug(const QGears::Event& event)
 Background2D::InputDebug(const QGears::Event& event)
 {
 {
@@ -113,7 +112,7 @@ Background2D::InputDebug(const QGears::Event& event)
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::Update()
 Background2D::Update()
 {
 {
@@ -159,8 +158,6 @@ Background2D::Update()
         }
         }
     }
     }
 
 
-
-
     // remove stopped animations
     // remove stopped animations
     std::vector< AnimationPlayed >::iterator i = m_AnimationPlayed.begin();
     std::vector< AnimationPlayed >::iterator i = m_AnimationPlayed.begin();
     for( ; i != m_AnimationPlayed.end(); )
     for( ; i != m_AnimationPlayed.end(); )
@@ -176,7 +173,7 @@ Background2D::Update()
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::UpdateDebug()
 Background2D::UpdateDebug()
 {
 {
@@ -199,7 +196,7 @@ Background2D::UpdateDebug()
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::calculateScreenScale( void )
 Background2D::calculateScreenScale( void )
 {
 {
@@ -215,7 +212,7 @@ Background2D::calculateScreenScale( void )
     m_screen_proportion.y = m_screen_scale / scale_height;
     m_screen_proportion.y = m_screen_scale / scale_height;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::OnResize()
 Background2D::OnResize()
 {
 {
@@ -292,7 +289,7 @@ Background2D::OnResize()
     applyScroll();
     applyScroll();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::Clear()
 Background2D::Clear()
 {
 {
@@ -326,21 +323,21 @@ Background2D::Clear()
     CreateVertexBuffers();
     CreateVertexBuffers();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::ScriptAutoScrollToEntity( Entity* entity )
 Background2D::ScriptAutoScrollToEntity( Entity* entity )
 {
 {
     m_ScrollEntity = entity;
     m_ScrollEntity = entity;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 Entity*
 Entity*
 Background2D::GetAutoScrollEntity() const
 Background2D::GetAutoScrollEntity() const
 {
 {
     return m_ScrollEntity;
     return m_ScrollEntity;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::ScriptScrollToPosition( const float x, const float y, const ScrollType type, const float seconds )
 Background2D::ScriptScrollToPosition( const float x, const float y, const ScrollType type, const float seconds )
 {
 {
@@ -363,7 +360,7 @@ Background2D::ScriptScrollToPosition( const float x, const float y, const Scroll
     m_ScrollCurrentSeconds = 0;
     m_ScrollCurrentSeconds = 0;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 int
 int
 Background2D::ScriptScrollSync()
 Background2D::ScriptScrollSync()
 {
 {
@@ -375,7 +372,7 @@ Background2D::ScriptScrollSync()
     return -1;
     return -1;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::UnsetScroll()
 Background2D::UnsetScroll()
 {
 {
@@ -388,56 +385,56 @@ Background2D::UnsetScroll()
     m_ScrollSync.clear();
     m_ScrollSync.clear();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 const Ogre::Vector2&
 const Ogre::Vector2&
 Background2D::GetScrollPositionStart() const
 Background2D::GetScrollPositionStart() const
 {
 {
     return m_ScrollPositionStart;
     return m_ScrollPositionStart;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 const Ogre::Vector2&
 const Ogre::Vector2&
 Background2D::GetScrollPositionEnd() const
 Background2D::GetScrollPositionEnd() const
 {
 {
     return m_ScrollPositionEnd;
     return m_ScrollPositionEnd;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 Background2D::ScrollType
 Background2D::ScrollType
 Background2D::GetScrollType() const
 Background2D::GetScrollType() const
 {
 {
     return m_ScrollType;
     return m_ScrollType;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 float
 float
 Background2D::GetScrollSeconds() const
 Background2D::GetScrollSeconds() const
 {
 {
     return m_ScrollSeconds;
     return m_ScrollSeconds;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetScrollCurrentSeconds( const float seconds )
 Background2D::SetScrollCurrentSeconds( const float seconds )
 {
 {
     m_ScrollCurrentSeconds = seconds;
     m_ScrollCurrentSeconds = seconds;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 float
 float
 Background2D::GetScrollCurrentSeconds() const
 Background2D::GetScrollCurrentSeconds() const
 {
 {
     return m_ScrollCurrentSeconds;
     return m_ScrollCurrentSeconds;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetScreenScroll( const Ogre::Vector2& position )
 Background2D::SetScreenScroll( const Ogre::Vector2& position )
 {
 {
     SetScroll( position / m_screen_scale );
     SetScroll( position / m_screen_scale );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetScroll( const Ogre::Vector2& position )
 Background2D::SetScroll( const Ogre::Vector2& position )
 {
 {
@@ -457,7 +454,7 @@ Background2D::SetScroll( const Ogre::Vector2& position )
     applyScroll();
     applyScroll();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::applyScroll()
 Background2D::applyScroll()
 {
 {
@@ -468,21 +465,21 @@ Background2D::applyScroll()
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 const Ogre::Vector2&
 const Ogre::Vector2&
 Background2D::GetScroll() const
 Background2D::GetScroll() const
 {
 {
     return m_Position;
     return m_Position;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 const Ogre::Vector2
 const Ogre::Vector2
 Background2D::GetScreenScroll() const
 Background2D::GetScreenScroll() const
 {
 {
     return GetScroll() * m_screen_scale;
     return GetScroll() * m_screen_scale;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetImage( const Ogre::String& image )
 Background2D::SetImage( const Ogre::String& image )
 {
 {
@@ -496,14 +493,14 @@ Background2D::SetImage( const Ogre::String& image )
     tex->setTextureName( image );
     tex->setTextureName( image );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetRange( const Ogre::Vector4& range )
 Background2D::SetRange( const Ogre::Vector4& range )
 {
 {
     SetRange( ( int )range.x, ( int )range.y, ( int )range.z, ( int )range.w );
     SetRange( ( int )range.x, ( int )range.y, ( int )range.z, ( int )range.w );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::SetRange( const int min_x, const int min_y, const int max_x, const int max_y )
 Background2D::SetRange( const int min_x, const int min_y, const int max_x, const int max_y )
 {
 {
@@ -521,7 +518,7 @@ Background2D::SetRange( const int min_x, const int min_y, const int max_x, const
     calculateScreenScale();
     calculateScreenScale();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::AddTile(  const QGears::Tile& tile )
 Background2D::AddTile(  const QGears::Tile& tile )
 {
 {
@@ -546,14 +543,14 @@ Background2D::AddTile(  const QGears::Tile& tile )
     AddTile( tile.destination, tile.width, tile.height, depth, tile.uv, tile.blending );
     AddTile( tile.destination, tile.width, tile.height, depth, tile.uv, tile.blending );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::AddTile( const Ogre::Vector2& destination, const int width, const int height, const float depth, const Ogre::Vector4& uv, const Blending blending )
 Background2D::AddTile( const Ogre::Vector2& destination, const int width, const int height, const float depth, const Ogre::Vector4& uv, const Blending blending )
 {
 {
     AddTile( static_cast<int>(destination.x), static_cast<int>(destination.y), width, height, depth, uv.x, uv.y, uv.z, uv.w, blending );
     AddTile( static_cast<int>(destination.x), static_cast<int>(destination.y), width, height, depth, uv.x, uv.y, uv.z, uv.w, blending );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::virtualScreenToWorldSpace( Ogre::Vector2& pos ) const
 Background2D::virtualScreenToWorldSpace( Ogre::Vector2& pos ) const
 {
 {
@@ -564,7 +561,7 @@ Background2D::virtualScreenToWorldSpace( Ogre::Vector2& pos ) const
     pos.y *= m_screen_proportion.y;
     pos.y *= m_screen_proportion.y;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::AddTile( const int x, const int y, const int width, const int height, const float depth, const float u1, const float v1, const float u2, const float v2, const Blending blending )
 Background2D::AddTile( const int x, const int y, const int width, const int height, const float depth, const float u1, const float v1, const float u2, const float v2, const Blending blending )
 {
 {
@@ -696,7 +693,7 @@ Background2D::AddTile( const int x, const int y, const int width, const int heig
     vertex_buffer->unlock();
     vertex_buffer->unlock();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::UpdateTileUV( const unsigned int tile_id, const float u1, const float v1, const float u2, const float v2 )
 Background2D::UpdateTileUV( const unsigned int tile_id, const float u1, const float v1, const float u2, const float v2 )
 {
 {
@@ -743,14 +740,14 @@ Background2D::UpdateTileUV( const unsigned int tile_id, const float u1, const fl
     vertex_buffer->unlock();
     vertex_buffer->unlock();
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::AddAnimation( Background2DAnimation* animation )
 Background2D::AddAnimation( Background2DAnimation* animation )
 {
 {
     m_Animations.push_back( animation );
     m_Animations.push_back( animation );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::PlayAnimation( const Ogre::String& animation, const Background2DAnimation::State state )
 Background2D::PlayAnimation( const Ogre::String& animation, const Background2DAnimation::State state )
 {
 {
@@ -787,21 +784,21 @@ Background2D::PlayAnimation( const Ogre::String& animation, const Background2DAn
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::ScriptPlayAnimationLooped( const char* name )
 Background2D::ScriptPlayAnimationLooped( const char* name )
 {
 {
     PlayAnimation( Ogre::String( name ), Background2DAnimation::LOOPED );
     PlayAnimation( Ogre::String( name ), Background2DAnimation::LOOPED );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::ScriptPlayAnimationOnce( const char* name )
 Background2D::ScriptPlayAnimationOnce( const char* name )
 {
 {
     PlayAnimation( Ogre::String( name ), Background2DAnimation::ONCE );
     PlayAnimation( Ogre::String( name ), Background2DAnimation::ONCE );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 int
 int
 Background2D::ScriptAnimationSync( const char* animation )
 Background2D::ScriptAnimationSync( const char* animation )
 {
 {
@@ -818,7 +815,7 @@ Background2D::ScriptAnimationSync( const char* animation )
     return 1;
     return 1;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation )
 Background2D::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation )
 {
 {
@@ -855,7 +852,7 @@ Background2D::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& in
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::CreateVertexBuffers()
 Background2D::CreateVertexBuffers()
 {
 {
@@ -900,7 +897,7 @@ Background2D::CreateVertexBuffers()
     m_AddRenderOp.useIndexes = false;
     m_AddRenderOp.useIndexes = false;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::DestroyVertexBuffers()
 Background2D::DestroyVertexBuffers()
 {
 {
@@ -915,7 +912,7 @@ Background2D::DestroyVertexBuffers()
     m_AddMaxVertexCount = 0;
     m_AddMaxVertexCount = 0;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::load( const QGears::Background2DFilePtr& background )
 Background2D::load( const QGears::Background2DFilePtr& background )
 {
 {
@@ -932,7 +929,7 @@ Background2D::load( const QGears::Background2DFilePtr& background )
     load( background->getTiles() );
     load( background->getTiles() );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::load( const QGears::Background2DFile::TileList& tiles )
 Background2D::load( const QGears::Background2DFile::TileList& tiles )
 {
 {
@@ -947,7 +944,7 @@ Background2D::load( const QGears::Background2DFile::TileList& tiles )
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2D::load( const size_t tile_index, const QGears::AnimationMap& animations )
 Background2D::load( const size_t tile_index, const QGears::AnimationMap& animations )
 {
 {
@@ -970,5 +967,3 @@ Background2D::load( const size_t tile_index, const QGears::AnimationMap& animati
         ++it;
         ++it;
     }
     }
 }
 }
-
-//------------------------------------------------------------------------------

+ 11 - 16
QGearsMain/src/core/Background2DAnimation.cpp

@@ -1,13 +1,10 @@
-#include "core/Background2DAnimation.h"
-
 #include <OgreVector2.h>
 #include <OgreVector2.h>
 
 
+#include "core/Background2DAnimation.h"
 #include "core/Background2D.h"
 #include "core/Background2D.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 
 
 
 
-
-//------------------------------------------------------------------------------
 Background2DAnimation::Background2DAnimation( const Ogre::String& name, Background2D* background, const int tile_index ):
 Background2DAnimation::Background2DAnimation( const Ogre::String& name, Background2D* background, const int tile_index ):
     m_Name( name ),
     m_Name( name ),
     m_Background( background ),
     m_Background( background ),
@@ -17,12 +14,12 @@ Background2DAnimation::Background2DAnimation( const Ogre::String& name, Backgrou
 {
 {
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 Background2DAnimation::~Background2DAnimation()
 Background2DAnimation::~Background2DAnimation()
 {
 {
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::AddTime( const float time )
 Background2DAnimation::AddTime( const float time )
 {
 {
@@ -53,56 +50,56 @@ Background2DAnimation::AddTime( const float time )
     }
     }
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 const Ogre::String&
 const Ogre::String&
 Background2DAnimation::GetName() const
 Background2DAnimation::GetName() const
 {
 {
     return m_Name;
     return m_Name;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::SetTime( const float time )
 Background2DAnimation::SetTime( const float time )
 {
 {
     m_Time = time;
     m_Time = time;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 float
 float
 Background2DAnimation::GetTime() const
 Background2DAnimation::GetTime() const
 {
 {
     return m_Time;
     return m_Time;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::SetLength( const float time )
 Background2DAnimation::SetLength( const float time )
 {
 {
     m_Length = time;
     m_Length = time;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 float
 float
 Background2DAnimation::GetLength() const
 Background2DAnimation::GetLength() const
 {
 {
     return m_Length;
     return m_Length;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::AddUVKeyFrame( const QGears::KeyFrame key_frame )
 Background2DAnimation::AddUVKeyFrame( const QGears::KeyFrame key_frame )
 {
 {
     AddUVKeyFrame( key_frame.time, key_frame.uv );
     AddUVKeyFrame( key_frame.time, key_frame.uv );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::AddUVKeyFrame( const float time, const Ogre::Vector4& uv )
 Background2DAnimation::AddUVKeyFrame( const float time, const Ogre::Vector4& uv )
 {
 {
     AddUVKeyFrame( time, uv.x, uv.y, uv.z, uv.w );
     AddUVKeyFrame( time, uv.x, uv.y, uv.z, uv.w );
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void
 void
 Background2DAnimation::AddUVKeyFrame( const float time, const float u1, const float v1, const float u2, const float v2 )
 Background2DAnimation::AddUVKeyFrame( const float time, const float u1, const float v1, const float u2, const float v2 )
 {
 {
@@ -114,5 +111,3 @@ Background2DAnimation::AddUVKeyFrame( const float time, const float u1, const fl
     uv_key_frame.v2 = v2;
     uv_key_frame.v2 = v2;
     m_UV.push_back( uv_key_frame );
     m_UV.push_back( uv_key_frame );
 }
 }
-
-//------------------------------------------------------------------------------

+ 4 - 20
QGearsMain/src/core/CameraManager.cpp

@@ -1,25 +1,19 @@
-#include "core/CameraManager.h"
-#include "core/CameraManagerCommands.h"
-
 #include <OgreRenderWindow.h>
 #include <OgreRenderWindow.h>
 #include <OgreRoot.h>
 #include <OgreRoot.h>
 #include <OIS.h>
 #include <OIS.h>
 
 
+#include "core/CameraManager.h"
+#include "core/CameraManagerCommands.h"
 #include "common/QGearsApplication.h"
 #include "common/QGearsApplication.h"
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/InputManager.h"
 #include "core/InputManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 
 
 
 
-
 ConfigVar cv_cam_speed( "camera_speed", "Camera speed", "0.02" );
 ConfigVar cv_cam_speed( "camera_speed", "Camera speed", "0.02" );
-
-
-
 template<>CameraManager* Ogre::Singleton< CameraManager >::msSingleton = NULL;
 template<>CameraManager* Ogre::Singleton< CameraManager >::msSingleton = NULL;
 
 
 
 
-
 CameraManager::CameraManager():
 CameraManager::CameraManager():
     m_CameraFree( false ),
     m_CameraFree( false ),
     m_CameraFreeRotate( false ),
     m_CameraFreeRotate( false ),
@@ -44,14 +38,12 @@ CameraManager::CameraManager():
 }
 }
 
 
 
 
-
 CameraManager::~CameraManager()
 CameraManager::~CameraManager()
 {
 {
     LOG_TRIVIAL( "CameraManager finished." );
     LOG_TRIVIAL( "CameraManager finished." );
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::Input(const QGears::Event& event, Ogre::Real timeSinceLastFrame)
 CameraManager::Input(const QGears::Event& event, Ogre::Real timeSinceLastFrame)
 {
 {
@@ -96,14 +88,12 @@ CameraManager::Input(const QGears::Event& event, Ogre::Real timeSinceLastFrame)
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::Update()
 CameraManager::Update()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::OnResize()
 CameraManager::OnResize()
 {
 {
@@ -111,7 +101,6 @@ CameraManager::OnResize()
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::SetCameraFree( const bool enable )
 CameraManager::SetCameraFree( const bool enable )
 {
 {
@@ -132,7 +121,6 @@ CameraManager::SetCameraFree( const bool enable )
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::Set2DCamera( const Ogre::Vector3 position, const Ogre::Quaternion orientation, const Ogre::Radian fov )
 CameraManager::Set2DCamera( const Ogre::Vector3 position, const Ogre::Quaternion orientation, const Ogre::Radian fov )
 {
 {
@@ -146,7 +134,6 @@ CameraManager::Set2DCamera( const Ogre::Vector3 position, const Ogre::Quaternion
 }
 }
 
 
 
 
-
 void
 void
 CameraManager::Set2DScroll( const Ogre::Vector2& position )
 CameraManager::Set2DScroll( const Ogre::Vector2& position )
 {
 {
@@ -168,7 +155,6 @@ CameraManager::Set2DScroll( const Ogre::Vector2& position )
 }
 }
 
 
 
 
-
 const Ogre::Vector2&
 const Ogre::Vector2&
 CameraManager::Get2DScroll() const
 CameraManager::Get2DScroll() const
 {
 {
@@ -176,7 +162,6 @@ CameraManager::Get2DScroll() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3
 const Ogre::Vector3
 CameraManager::ProjectPointToScreen( const Ogre::Vector3& point )
 CameraManager::ProjectPointToScreen( const Ogre::Vector3& point )
 {
 {
@@ -195,21 +180,20 @@ CameraManager::ProjectPointToScreen( const Ogre::Vector3& point )
 }
 }
 
 
 
 
-
 Ogre::Camera*
 Ogre::Camera*
 CameraManager::GetCurrentCamera()
 CameraManager::GetCurrentCamera()
 {
 {
     return m_Camera;
     return m_Camera;
 }
 }
 
 
-//--------------------------------------------------------------------------
+
 Ogre::Viewport*
 Ogre::Viewport*
 CameraManager::getViewport()
 CameraManager::getViewport()
 {
 {
     return m_Viewport;
     return m_Viewport;
 }
 }
 
 
-//--------------------------------------------------------------------------
+
 void CameraManager::EnableWireFrame(bool)
 void CameraManager::EnableWireFrame(bool)
 {
 {
     if ( m_Camera )
     if ( m_Camera )

+ 0 - 6
QGearsMain/src/core/ConfigCmd.cpp

@@ -1,7 +1,6 @@
 #include "core/ConfigCmd.h"
 #include "core/ConfigCmd.h"
 
 
 
 
-
 ConfigCmd::ConfigCmd(const Ogre::String& name, const Ogre::String& description, const Ogre::String& params_description, ConfigCmdHandler handler, ConfigCmdCompletion completion):
 ConfigCmd::ConfigCmd(const Ogre::String& name, const Ogre::String& description, const Ogre::String& params_description, ConfigCmdHandler handler, ConfigCmdCompletion completion):
     m_Name(name),
     m_Name(name),
     m_Description(description),
     m_Description(description),
@@ -12,7 +11,6 @@ ConfigCmd::ConfigCmd(const Ogre::String& name, const Ogre::String& description,
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigCmd::GetName() const
 ConfigCmd::GetName() const
 {
 {
@@ -20,7 +18,6 @@ ConfigCmd::GetName() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigCmd::GetDescription() const
 ConfigCmd::GetDescription() const
 {
 {
@@ -28,7 +25,6 @@ ConfigCmd::GetDescription() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigCmd::GetParamsDescription() const
 ConfigCmd::GetParamsDescription() const
 {
 {
@@ -36,7 +32,6 @@ ConfigCmd::GetParamsDescription() const
 }
 }
 
 
 
 
-
 ConfigCmdHandler
 ConfigCmdHandler
 ConfigCmd::GetHandler() const
 ConfigCmd::GetHandler() const
 {
 {
@@ -44,7 +39,6 @@ ConfigCmd::GetHandler() const
 }
 }
 
 
 
 
-
 ConfigCmdCompletion
 ConfigCmdCompletion
 ConfigCmd::GetCompletion() const
 ConfigCmd::GetCompletion() const
 {
 {

+ 2 - 10
QGearsMain/src/core/ConfigCmdManager.cpp

@@ -1,28 +1,24 @@
+#include "common/make_unique.h"
+#include "core/Assert.h"
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigCmdManagerCommands.h"
 #include "core/ConfigCmdManagerCommands.h"
 
 
-#include "core/Assert.h"
-#include "common/make_unique.h"
-
 
 
 template<>ConfigCmdManager *Ogre::Singleton< ConfigCmdManager >::msSingleton = NULL;
 template<>ConfigCmdManager *Ogre::Singleton< ConfigCmdManager >::msSingleton = NULL;
 
 
 
 
-
 ConfigCmdManager::ConfigCmdManager()
 ConfigCmdManager::ConfigCmdManager()
 {
 {
     InitCmd();
     InitCmd();
 }
 }
 
 
 
 
-
 ConfigCmdManager::~ConfigCmdManager()
 ConfigCmdManager::~ConfigCmdManager()
 {
 {
 
 
 }
 }
 
 
 
 
-
 void
 void
 ConfigCmdManager::AddCommand( const Ogre::String& name, const Ogre::String& description, const Ogre::String& params_description, ConfigCmdHandler handler, ConfigCmdCompletion completion )
 ConfigCmdManager::AddCommand( const Ogre::String& name, const Ogre::String& description, const Ogre::String& params_description, ConfigCmdHandler handler, ConfigCmdCompletion completion )
 {
 {
@@ -39,14 +35,12 @@ ConfigCmdManager::AddCommand( const Ogre::String& name, const Ogre::String& desc
 }
 }
 
 
 
 
-
 void
 void
 ConfigCmdManager::ExecuteString( const Ogre::String& cmd_string )
 ConfigCmdManager::ExecuteString( const Ogre::String& cmd_string )
 {
 {
 }
 }
 
 
 
 
-
 ConfigCmd*
 ConfigCmd*
 ConfigCmdManager::Find( const Ogre::String& name ) const
 ConfigCmdManager::Find( const Ogre::String& name ) const
 {
 {
@@ -61,7 +55,6 @@ ConfigCmdManager::Find( const Ogre::String& name ) const
 }
 }
 
 
 
 
-
 int
 int
 ConfigCmdManager::GetConfigCmdNumber()
 ConfigCmdManager::GetConfigCmdNumber()
 {
 {
@@ -69,7 +62,6 @@ ConfigCmdManager::GetConfigCmdNumber()
 }
 }
 
 
 
 
-
 ConfigCmd*
 ConfigCmd*
 ConfigCmdManager::GetConfigCmd( unsigned int i ) const
 ConfigCmdManager::GetConfigCmd( unsigned int i ) const
 {
 {

+ 1 - 3
QGearsMain/src/core/ConfigFile.cpp

@@ -1,11 +1,9 @@
-#include "core/ConfigFile.h"
-
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigCmdManager.h"
+#include "core/ConfigFile.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/Utilites.h"
 #include "core/Utilites.h"
 
 
 
 
-
 void
 void
 ConfigFile::Execute( const Ogre::String& name )
 ConfigFile::Execute( const Ogre::String& name )
 {
 {

+ 1 - 15
QGearsMain/src/core/ConfigVar.cpp

@@ -1,15 +1,12 @@
-#include "core/ConfigVar.h"
-
 #include <OgreStringConverter.h>
 #include <OgreStringConverter.h>
 
 
 #include "core/Assert.h"
 #include "core/Assert.h"
-
+#include "core/ConfigVar.h"
 
 
 
 
 ConfigVar* ConfigVar::m_StaticConfigVarList = NULL;
 ConfigVar* ConfigVar::m_StaticConfigVarList = NULL;
 
 
 
 
-
 ConfigVar::ConfigVar(const Ogre::String& name, const Ogre::String& description, const Ogre::String& default_value):
 ConfigVar::ConfigVar(const Ogre::String& name, const Ogre::String& description, const Ogre::String& default_value):
     m_Name(name),
     m_Name(name),
     m_Description(description),
     m_Description(description),
@@ -35,7 +32,6 @@ ConfigVar::ConfigVar(const Ogre::String& name, const Ogre::String& description,
 }
 }
 
 
 
 
-
 int
 int
 ConfigVar::GetI() const
 ConfigVar::GetI() const
 {
 {
@@ -43,7 +39,6 @@ ConfigVar::GetI() const
 }
 }
 
 
 
 
-
 float
 float
 ConfigVar::GetF() const
 ConfigVar::GetF() const
 {
 {
@@ -51,7 +46,6 @@ ConfigVar::GetF() const
 }
 }
 
 
 
 
-
 bool
 bool
 ConfigVar::GetB() const
 ConfigVar::GetB() const
 {
 {
@@ -59,7 +53,6 @@ ConfigVar::GetB() const
 }
 }
 
 
 
 
-
 Ogre::String
 Ogre::String
 ConfigVar::GetS() const
 ConfigVar::GetS() const
 {
 {
@@ -76,7 +69,6 @@ ConfigVar::SetI(int value)
 }
 }
 
 
 
 
-
 void
 void
 ConfigVar::SetF(float value)
 ConfigVar::SetF(float value)
 {
 {
@@ -85,7 +77,6 @@ ConfigVar::SetF(float value)
 }
 }
 
 
 
 
-
 void
 void
 ConfigVar::SetB(bool value)
 ConfigVar::SetB(bool value)
 {
 {
@@ -94,7 +85,6 @@ ConfigVar::SetB(bool value)
 }
 }
 
 
 
 
-
 void
 void
 ConfigVar::SetS(const Ogre::String& value)
 ConfigVar::SetS(const Ogre::String& value)
 {
 {
@@ -103,7 +93,6 @@ ConfigVar::SetS(const Ogre::String& value)
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigVar::GetName() const
 ConfigVar::GetName() const
 {
 {
@@ -111,7 +100,6 @@ ConfigVar::GetName() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigVar::GetDescription() const
 ConfigVar::GetDescription() const
 {
 {
@@ -119,7 +107,6 @@ ConfigVar::GetDescription() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 ConfigVar::GetDefaultValue() const
 ConfigVar::GetDefaultValue() const
 {
 {
@@ -127,7 +114,6 @@ ConfigVar::GetDefaultValue() const
 }
 }
 
 
 
 
-
 void
 void
 ConfigVar::UpdateVariables()
 ConfigVar::UpdateVariables()
 {
 {

+ 0 - 5
QGearsMain/src/core/ConfigVarManager.cpp

@@ -1,11 +1,9 @@
 #include "core/ConfigVarManager.h"
 #include "core/ConfigVarManager.h"
 
 
 
 
-
 template<>ConfigVarManager *Ogre::Singleton< ConfigVarManager >::msSingleton = NULL;
 template<>ConfigVarManager *Ogre::Singleton< ConfigVarManager >::msSingleton = NULL;
 
 
 
 
-
 ConfigVarManager::ConfigVarManager()
 ConfigVarManager::ConfigVarManager()
 {
 {
     if( ConfigVar::m_StaticConfigVarList != ( ConfigVar* )0xffffffff )
     if( ConfigVar::m_StaticConfigVarList != ( ConfigVar* )0xffffffff )
@@ -20,7 +18,6 @@ ConfigVarManager::ConfigVarManager()
 }
 }
 
 
 
 
-
 ConfigVar*
 ConfigVar*
 ConfigVarManager::Find( const Ogre::String& name ) const
 ConfigVarManager::Find( const Ogre::String& name ) const
 {
 {
@@ -36,7 +33,6 @@ ConfigVarManager::Find( const Ogre::String& name ) const
 }
 }
 
 
 
 
-
 unsigned int
 unsigned int
 ConfigVarManager::GetConfigVarNumber() const
 ConfigVarManager::GetConfigVarNumber() const
 {
 {
@@ -44,7 +40,6 @@ ConfigVarManager::GetConfigVarNumber() const
 }
 }
 
 
 
 
-
 ConfigVar*
 ConfigVar*
 ConfigVarManager::GetConfigVar( const unsigned int i ) const
 ConfigVarManager::GetConfigVar( const unsigned int i ) const
 {
 {

+ 1 - 23
QGearsMain/src/core/Console.cpp

@@ -1,10 +1,9 @@
-#include "core/Console.h"
-
 #include <OgreRenderWindow.h>
 #include <OgreRenderWindow.h>
 
 
 #include "common/QGearsApplication.h"
 #include "common/QGearsApplication.h"
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigVarManager.h"
 #include "core/ConfigVarManager.h"
+#include "core/Console.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
@@ -14,13 +13,9 @@
 
 
 
 
 template<>Console *Ogre::Singleton< Console >::msSingleton = NULL;
 template<>Console *Ogre::Singleton< Console >::msSingleton = NULL;
-
-
-
 ConfigVar cv_console_notification( "console_notification", "Draw console strings even when console is hided", "false" );
 ConfigVar cv_console_notification( "console_notification", "Draw console strings even when console is hided", "false" );
 
 
 
 
-
 Console::Console():
 Console::Console():
     m_ToVisible( false ),
     m_ToVisible( false ),
     m_Visible( false ),
     m_Visible( false ),
@@ -61,7 +56,6 @@ Console::Console():
 }
 }
 
 
 
 
-
 Console::~Console()
 Console::~Console()
 {
 {
     // remove as listner
     // remove as listner
@@ -69,7 +63,6 @@ Console::~Console()
 }
 }
 
 
 
 
-
 void
 void
 Console::Input(const QGears::Event& event)
 Console::Input(const QGears::Event& event)
 {
 {
@@ -282,7 +275,6 @@ Console::Input(const QGears::Event& event)
 }
 }
 
 
 
 
-
 void
 void
 Console::Update()
 Console::Update()
 {
 {
@@ -319,7 +311,6 @@ Console::Update()
 }
 }
 
 
 
 
-
 void
 void
 Console::UpdateDraw()
 Console::UpdateDraw()
 {
 {
@@ -392,7 +383,6 @@ Console::UpdateDraw()
 }
 }
 
 
 
 
-
 void
 void
 Console::UpdateNotification()
 Console::UpdateNotification()
 {
 {
@@ -421,7 +411,6 @@ Console::UpdateNotification()
 }
 }
 
 
 
 
-
 void
 void
 Console::OnResize()
 Console::OnResize()
 {
 {
@@ -438,7 +427,6 @@ Console::OnResize()
 }
 }
 
 
 
 
-
 void
 void
 Console::SetToVisible()
 Console::SetToVisible()
 {
 {
@@ -447,7 +435,6 @@ Console::SetToVisible()
 }
 }
 
 
 
 
-
 void
 void
 Console::SetToHide()
 Console::SetToHide()
 {
 {
@@ -455,7 +442,6 @@ Console::SetToHide()
 }
 }
 
 
 
 
-
 bool
 bool
 Console::IsVisible() const
 Console::IsVisible() const
 {
 {
@@ -463,7 +449,6 @@ Console::IsVisible() const
 }
 }
 
 
 
 
-
 void
 void
 Console::AddTextToOutput( const Ogre::String& text, const Ogre::ColourValue& colour )
 Console::AddTextToOutput( const Ogre::String& text, const Ogre::ColourValue& colour )
 {
 {
@@ -536,7 +521,6 @@ Console::AddTextToOutput( const Ogre::String& text, const Ogre::ColourValue& col
 }
 }
 
 
 
 
-
 void
 void
 Console::ExecuteCommand( const Ogre::String& command )
 Console::ExecuteCommand( const Ogre::String& command )
 {
 {
@@ -582,7 +566,6 @@ Console::ExecuteCommand( const Ogre::String& command )
 }
 }
 
 
 
 
-
 void
 void
 Console::ExecuteScript()
 Console::ExecuteScript()
 {
 {
@@ -590,7 +573,6 @@ Console::ExecuteScript()
 }
 }
 
 
 
 
-
 void
 void
 Console::CompleteInput()
 Console::CompleteInput()
 {
 {
@@ -745,7 +727,6 @@ Console::CompleteInput()
 }
 }
 
 
 
 
-
 void
 void
 Console::ResetAutoCompletion()
 Console::ResetAutoCompletion()
 {
 {
@@ -754,7 +735,6 @@ Console::ResetAutoCompletion()
 }
 }
 
 
 
 
-
 void
 void
 Console::AddInputToHistory()
 Console::AddInputToHistory()
 {
 {
@@ -767,7 +747,6 @@ Console::AddInputToHistory()
 }
 }
 
 
 
 
-
 void
 void
 Console::SetInputLineFromHistory()
 Console::SetInputLineFromHistory()
 {
 {
@@ -786,7 +765,6 @@ Console::SetInputLineFromHistory()
 }
 }
 
 
 
 
-
 void
 void
 Console::messageLogged( const Ogre::String& message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String& logName, bool& skipThisMessage )
 Console::messageLogged( const Ogre::String& message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String& logName, bool& skipThisMessage )
 {
 {

+ 1 - 24
QGearsMain/src/core/DebugDraw.cpp

@@ -1,19 +1,17 @@
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
-
 #include <OgreFontManager.h>
 #include <OgreFontManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreMaterialManager.h>
 
 
 #include "core/CameraManager.h"
 #include "core/CameraManager.h"
+#include "core/DebugDraw.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/UiTextArea.h"
 #include "core/UiTextArea.h"
 
 
 
 
-
 template<>DebugDraw *Ogre::Singleton< DebugDraw >::msSingleton = NULL;
 template<>DebugDraw *Ogre::Singleton< DebugDraw >::msSingleton = NULL;
 
 
 
 
-
 DebugDraw::DebugDraw():
 DebugDraw::DebugDraw():
     m_Colour( 1, 1, 1, 1 ),
     m_Colour( 1, 1, 1, 1 ),
     m_ScreenSpace( true ),
     m_ScreenSpace( true ),
@@ -76,7 +74,6 @@ DebugDraw::DebugDraw():
 }
 }
 
 
 
 
-
 DebugDraw::~DebugDraw()
 DebugDraw::~DebugDraw()
 {
 {
     m_SceneManager->removeRenderQueueListener( this );
     m_SceneManager->removeRenderQueueListener( this );
@@ -89,7 +86,6 @@ DebugDraw::~DebugDraw()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::SetColour( const Ogre::ColourValue& colour )
 DebugDraw::SetColour( const Ogre::ColourValue& colour )
 {
 {
@@ -97,7 +93,6 @@ DebugDraw::SetColour( const Ogre::ColourValue& colour )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::SetScreenSpace( const bool screen_space )
 DebugDraw::SetScreenSpace( const bool screen_space )
 {
 {
@@ -105,7 +100,6 @@ DebugDraw::SetScreenSpace( const bool screen_space )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::SetZ( const float z )
 DebugDraw::SetZ( const float z )
 {
 {
@@ -113,7 +107,6 @@ DebugDraw::SetZ( const float z )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::SetFadeDistance( const float fade_s, const float fade_e )
 DebugDraw::SetFadeDistance( const float fade_s, const float fade_e )
 {
 {
@@ -122,7 +115,6 @@ DebugDraw::SetFadeDistance( const float fade_s, const float fade_e )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::SetTextAlignment( TextAlignment alignment )
 DebugDraw::SetTextAlignment( TextAlignment alignment )
 {
 {
@@ -130,7 +122,6 @@ DebugDraw::SetTextAlignment( TextAlignment alignment )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Line( const float x1, const float y1, const float x2, const float y2 )
 DebugDraw::Line( const float x1, const float y1, const float x2, const float y2 )
 {
 {
@@ -174,7 +165,6 @@ DebugDraw::Line( const float x1, const float y1, const float x2, const float y2
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Line3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2 )
 DebugDraw::Line3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2 )
 {
 {
@@ -209,7 +199,6 @@ DebugDraw::Line3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2 )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Triangle3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2, const Ogre::Vector3& point3 )
 DebugDraw::Triangle3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2, const Ogre::Vector3& point3 )
 {
 {
@@ -252,7 +241,6 @@ DebugDraw::Triangle3d( const Ogre::Vector3& point1, const Ogre::Vector3& point2,
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Quad( const float x1, const float y1, const float x2, const float y2, const float x3, const float y3, const float x4, const float y4 )
 DebugDraw::Quad( const float x1, const float y1, const float x2, const float y2, const float x3, const float y3, const float x4, const float y4 )
 {
 {
@@ -332,7 +320,6 @@ DebugDraw::Quad( const float x1, const float y1, const float x2, const float y2,
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Text( const float x, const float y, const Ogre::String& text )
 DebugDraw::Text( const float x, const float y, const Ogre::String& text )
 {
 {
@@ -408,7 +395,6 @@ DebugDraw::Text( const float x, const float y, const Ogre::String& text )
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::Text( const Ogre::Vector3& point, const float x, const float y, const Ogre::String& text )
 DebugDraw::Text( const Ogre::Vector3& point, const float x, const float y, const Ogre::String& text )
 {
 {
@@ -430,7 +416,6 @@ DebugDraw::Text( const Ogre::Vector3& point, const float x, const float y, const
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation )
 DebugDraw::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation )
 {
 {
@@ -485,7 +470,6 @@ DebugDraw::renderQueueEnded( Ogre::uint8 queueGroupId, const Ogre::String& invoc
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::CreateLineVertexBuffer()
 DebugDraw::CreateLineVertexBuffer()
 {
 {
@@ -508,7 +492,6 @@ DebugDraw::CreateLineVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::DestroyLineVertexBuffer()
 DebugDraw::DestroyLineVertexBuffer()
 {
 {
@@ -519,7 +502,6 @@ DebugDraw::DestroyLineVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::CreateLine3dVertexBuffer()
 DebugDraw::CreateLine3dVertexBuffer()
 {
 {
@@ -552,7 +534,6 @@ DebugDraw::DestroyLine3dVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::CreateTriangle3dVertexBuffer()
 DebugDraw::CreateTriangle3dVertexBuffer()
 {
 {
@@ -585,7 +566,6 @@ DebugDraw::DestroyTriangle3dVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::CreateQuadVertexBuffer()
 DebugDraw::CreateQuadVertexBuffer()
 {
 {
@@ -608,7 +588,6 @@ DebugDraw::CreateQuadVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::DestroyQuadVertexBuffer()
 DebugDraw::DestroyQuadVertexBuffer()
 {
 {
@@ -619,7 +598,6 @@ DebugDraw::DestroyQuadVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::CreateTextVertexBuffer()
 DebugDraw::CreateTextVertexBuffer()
 {
 {
@@ -644,7 +622,6 @@ DebugDraw::CreateTextVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 DebugDraw::DestroyTextVertexBuffer()
 DebugDraw::DestroyTextVertexBuffer()
 {
 {

+ 11 - 111
QGearsMain/src/core/Entity.cpp

@@ -1,17 +1,14 @@
-#include "core/Entity.h"
-
 #include <OgreSceneNode.h>
 #include <OgreSceneNode.h>
 
 
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
+#include "core/Entity.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 
 
 
 
-
 ConfigVar cv_debug_entity( "debug_entity", "Draw entity debug info", "0" );
 ConfigVar cv_debug_entity( "debug_entity", "Draw entity debug info", "0" );
 
 
 
 
-
 Entity::Entity( const Ogre::String& name, Ogre::SceneNode* node ):
 Entity::Entity( const Ogre::String& name, Ogre::SceneNode* node ):
     m_Name( name ),
     m_Name( name ),
     m_SceneNode( node ),
     m_SceneNode( node ),
@@ -94,7 +91,6 @@ Entity::Entity( const Ogre::String& name, Ogre::SceneNode* node ):
 }
 }
 
 
 
 
-
 Entity::~Entity()
 Entity::~Entity()
 {
 {
     delete m_SolidCollision;
     delete m_SolidCollision;
@@ -106,7 +102,6 @@ Entity::~Entity()
 }
 }
 
 
 
 
-
 void
 void
 Entity::Update()
 Entity::Update()
 {
 {
@@ -116,8 +111,6 @@ Entity::Update()
         m_MoveStopDistance = GetSolidRadius() + m_MoveEntity->GetSolidRadius();
         m_MoveStopDistance = GetSolidRadius() + m_MoveEntity->GetSolidRadius();
     }
     }
 
 
-
-
     if( m_TurnEntity != NULL )
     if( m_TurnEntity != NULL )
     {
     {
         Ogre::Degree angle = GetDirectionToEntity( m_TurnEntity );
         Ogre::Degree angle = GetDirectionToEntity( m_TurnEntity );
@@ -129,7 +122,6 @@ Entity::Update()
 }
 }
 
 
 
 
-
 void
 void
 Entity::UpdateDebug()
 Entity::UpdateDebug()
 {
 {
@@ -205,7 +197,6 @@ Entity::UpdateDebug()
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 Entity::GetName() const
 Entity::GetName() const
 {
 {
@@ -213,7 +204,6 @@ Entity::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetPosition( const Ogre::Vector3& position )
 Entity::SetPosition( const Ogre::Vector3& position )
 {
 {
@@ -221,7 +211,6 @@ Entity::SetPosition( const Ogre::Vector3& position )
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptSetPosition( const float x, const float y, const float z )
 Entity::ScriptSetPosition( const float x, const float y, const float z )
 {
 {
@@ -231,7 +220,6 @@ Entity::ScriptSetPosition( const float x, const float y, const float z )
 }
 }
 
 
 
 
-
 const Ogre::Vector3
 const Ogre::Vector3
 Entity::GetPosition() const
 Entity::GetPosition() const
 {
 {
@@ -239,7 +227,6 @@ Entity::GetPosition() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptGetPosition() const
 Entity::ScriptGetPosition() const
 {
 {
@@ -250,7 +237,6 @@ Entity::ScriptGetPosition() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetOffset( const Ogre::Vector3& position )
 Entity::SetOffset( const Ogre::Vector3& position )
 {
 {
@@ -259,7 +245,6 @@ Entity::SetOffset( const Ogre::Vector3& position )
 }
 }
 
 
 
 
-
 const Ogre::Vector3
 const Ogre::Vector3
 Entity::GetOffset() const
 Entity::GetOffset() const
 {
 {
@@ -268,7 +253,6 @@ Entity::GetOffset() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetRotation( const Ogre::Degree& rotation )
 Entity::SetRotation( const Ogre::Degree& rotation )
 {
 {
@@ -288,7 +272,6 @@ Entity::SetRotation( const Ogre::Degree& rotation )
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptSetRotation( const float rotation )
 Entity::ScriptSetRotation( const float rotation )
 {
 {
@@ -296,7 +279,6 @@ Entity::ScriptSetRotation( const float rotation )
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 Entity::GetRotation() const
 Entity::GetRotation() const
 {
 {
@@ -310,29 +292,25 @@ Entity::GetRotation() const
 }
 }
 
 
 
 
-
 float
 float
 Entity::ScriptGetRotation() const
 Entity::ScriptGetRotation() const
 {
 {
     return GetRotation().valueDegrees();
     return GetRotation().valueDegrees();
 }
 }
 
 
-    //--------------------------------------------------------------------------
-    void Entity::setScale(const Ogre::Vector3 &scale)
-    {
-        assert(m_model_root_node);
-        m_model_root_node->setScale( scale );
-    }
 
 
-    //--------------------------------------------------------------------------
-    void Entity::setRootOrientation(const Ogre::Quaternion &root_orientation)
-    {
-        assert(m_ModelNode);
-        m_ModelNode->setOrientation( root_orientation );
-    }
+void Entity::setScale(const Ogre::Vector3 &scale)
+{
+    assert(m_model_root_node);
+    m_model_root_node->setScale( scale );
+}
 
 
-    //--------------------------------------------------------------------------
 
 
+void Entity::setRootOrientation(const Ogre::Quaternion &root_orientation)
+{
+    assert(m_ModelNode);
+    m_ModelNode->setOrientation( root_orientation );
+}
 
 
 
 
 float
 float
@@ -342,7 +320,6 @@ Entity::GetHeight() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetSolidRadius( const float radius )
 Entity::SetSolidRadius( const float radius )
 {
 {
@@ -351,7 +328,6 @@ Entity::SetSolidRadius( const float radius )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetSolidRadius() const
 Entity::GetSolidRadius() const
 {
 {
@@ -359,7 +335,6 @@ Entity::GetSolidRadius() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetSolid( const bool solid )
 Entity::SetSolid( const bool solid )
 {
 {
@@ -367,7 +342,6 @@ Entity::SetSolid( const bool solid )
 }
 }
 
 
 
 
-
 bool
 bool
 Entity::IsSolid() const
 Entity::IsSolid() const
 {
 {
@@ -375,7 +349,6 @@ Entity::IsSolid() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetTalkRadius( const float radius )
 Entity::SetTalkRadius( const float radius )
 {
 {
@@ -384,7 +357,6 @@ Entity::SetTalkRadius( const float radius )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetTalkRadius() const
 Entity::GetTalkRadius() const
 {
 {
@@ -392,7 +364,6 @@ Entity::GetTalkRadius() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetTalkable( const bool talkable )
 Entity::SetTalkable( const bool talkable )
 {
 {
@@ -400,7 +371,6 @@ Entity::SetTalkable( const bool talkable )
 }
 }
 
 
 
 
-
 bool
 bool
 Entity::IsTalkable() const
 Entity::IsTalkable() const
 {
 {
@@ -408,7 +378,6 @@ Entity::IsTalkable() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetState( const Entity::State state )
 Entity::SetState( const Entity::State state )
 {
 {
@@ -416,7 +385,6 @@ Entity::SetState( const Entity::State state )
 }
 }
 
 
 
 
-
 Entity::State
 Entity::State
 Entity::GetState() const
 Entity::GetState() const
 {
 {
@@ -424,7 +392,6 @@ Entity::GetState() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveAutoSpeed( const float speed )
 Entity::SetMoveAutoSpeed( const float speed )
 {
 {
@@ -432,7 +399,6 @@ Entity::SetMoveAutoSpeed( const float speed )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetMoveAutoSpeed() const
 Entity::GetMoveAutoSpeed() const
 {
 {
@@ -440,7 +406,6 @@ Entity::GetMoveAutoSpeed() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveWalkSpeed( const float speed )
 Entity::SetMoveWalkSpeed( const float speed )
 {
 {
@@ -448,7 +413,6 @@ Entity::SetMoveWalkSpeed( const float speed )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetMoveWalkSpeed() const
 Entity::GetMoveWalkSpeed() const
 {
 {
@@ -456,7 +420,6 @@ Entity::GetMoveWalkSpeed() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveRunSpeed( const float speed )
 Entity::SetMoveRunSpeed( const float speed )
 {
 {
@@ -464,7 +427,6 @@ Entity::SetMoveRunSpeed( const float speed )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetMoveRunSpeed() const
 Entity::GetMoveRunSpeed() const
 {
 {
@@ -472,7 +434,6 @@ Entity::GetMoveRunSpeed() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMovePosition( const Ogre::Vector3& target )
 Entity::SetMovePosition( const Ogre::Vector3& target )
 {
 {
@@ -480,7 +441,6 @@ Entity::SetMovePosition( const Ogre::Vector3& target )
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetMovePosition() const
 Entity::GetMovePosition() const
 {
 {
@@ -488,7 +448,6 @@ Entity::GetMovePosition() const
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetMoveStopDistance() const
 Entity::GetMoveStopDistance() const
 {
 {
@@ -496,7 +455,6 @@ Entity::GetMoveStopDistance() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveTriangleId( const int triangle )
 Entity::SetMoveTriangleId( const int triangle )
 {
 {
@@ -504,7 +462,6 @@ Entity::SetMoveTriangleId( const int triangle )
 }
 }
 
 
 
 
-
 int
 int
 Entity::GetMoveTriangleId() const
 Entity::GetMoveTriangleId() const
 {
 {
@@ -512,7 +469,6 @@ Entity::GetMoveTriangleId() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveAutoRotation( const bool rotate )
 Entity::SetMoveAutoRotation( const bool rotate )
 {
 {
@@ -520,7 +476,6 @@ Entity::SetMoveAutoRotation( const bool rotate )
 }
 }
 
 
 
 
-
 bool
 bool
 Entity::GetMoveAutoRotation() const
 Entity::GetMoveAutoRotation() const
 {
 {
@@ -528,7 +483,6 @@ Entity::GetMoveAutoRotation() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetMoveAutoAnimation( const bool animate )
 Entity::SetMoveAutoAnimation( const bool animate )
 {
 {
@@ -536,7 +490,6 @@ Entity::SetMoveAutoAnimation( const bool animate )
 }
 }
 
 
 
 
-
 bool
 bool
 Entity::GetMoveAutoAnimation() const
 Entity::GetMoveAutoAnimation() const
 {
 {
@@ -544,7 +497,6 @@ Entity::GetMoveAutoAnimation() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 Entity::GetMoveAnimationWalkName() const
 Entity::GetMoveAnimationWalkName() const
 {
 {
@@ -552,7 +504,6 @@ Entity::GetMoveAnimationWalkName() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 Entity::GetMoveAnimationRunName() const
 Entity::GetMoveAnimationRunName() const
 {
 {
@@ -560,7 +511,6 @@ Entity::GetMoveAnimationRunName() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptMoveToPosition( const float x, const float y )
 Entity::ScriptMoveToPosition( const float x, const float y )
 {
 {
@@ -573,7 +523,6 @@ Entity::ScriptMoveToPosition( const float x, const float y )
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptMoveToEntity( Entity* entity )
 Entity::ScriptMoveToEntity( Entity* entity )
 {
 {
@@ -586,7 +535,6 @@ Entity::ScriptMoveToEntity( Entity* entity )
 }
 }
 
 
 
 
-
 int
 int
 Entity::ScriptMoveSync()
 Entity::ScriptMoveSync()
 {
 {
@@ -599,7 +547,6 @@ Entity::ScriptMoveSync()
 }
 }
 
 
 
 
-
 void
 void
 Entity::UnsetMove()
 Entity::UnsetMove()
 {
 {
@@ -616,7 +563,6 @@ Entity::UnsetMove()
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptLinearToPosition( const float x, const float y, const float z, const LinearMovement movement, const char* animation )
 Entity::ScriptLinearToPosition( const float x, const float y, const float z, const LinearMovement movement, const char* animation )
 {
 {
@@ -627,7 +573,6 @@ Entity::ScriptLinearToPosition( const float x, const float y, const float z, con
 }
 }
 
 
 
 
-
 int
 int
 Entity::ScriptLinearSync()
 Entity::ScriptLinearSync()
 {
 {
@@ -640,7 +585,6 @@ Entity::ScriptLinearSync()
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetLinear( const Ogre::Vector3& end, const LinearMovement movement, const Ogre::String& animation )
 Entity::SetLinear( const Ogre::Vector3& end, const LinearMovement movement, const Ogre::String& animation )
 {
 {
@@ -658,7 +602,6 @@ Entity::SetLinear( const Ogre::Vector3& end, const LinearMovement movement, cons
 }
 }
 
 
 
 
-
 void
 void
 Entity::UnsetLinear()
 Entity::UnsetLinear()
 {
 {
@@ -675,7 +618,6 @@ Entity::UnsetLinear()
 }
 }
 
 
 
 
-
 LinearMovement
 LinearMovement
 Entity::GetLinearMovement() const
 Entity::GetLinearMovement() const
 {
 {
@@ -683,7 +625,6 @@ Entity::GetLinearMovement() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetLinearStart() const
 Entity::GetLinearStart() const
 {
 {
@@ -691,7 +632,6 @@ Entity::GetLinearStart() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetLinearEnd() const
 Entity::GetLinearEnd() const
 {
 {
@@ -699,7 +639,6 @@ Entity::GetLinearEnd() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptJumpToPosition( const float x, const float y, const float z, const float seconds )
 Entity::ScriptJumpToPosition( const float x, const float y, const float z, const float seconds )
 {
 {
@@ -722,7 +661,6 @@ Entity::ScriptJumpSync()
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetJump( const Ogre::Vector3& jump_to, const float seconds )
 Entity::SetJump( const Ogre::Vector3& jump_to, const float seconds )
 {
 {
@@ -737,7 +675,6 @@ Entity::SetJump( const Ogre::Vector3& jump_to, const float seconds )
 }
 }
 
 
 
 
-
 void
 void
 Entity::UnsetJump()
 Entity::UnsetJump()
 {
 {
@@ -751,7 +688,6 @@ Entity::UnsetJump()
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetJumpStart() const
 Entity::GetJumpStart() const
 {
 {
@@ -759,7 +695,6 @@ Entity::GetJumpStart() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetJumpEnd() const
 Entity::GetJumpEnd() const
 {
 {
@@ -767,7 +702,6 @@ Entity::GetJumpEnd() const
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetJumpSeconds() const
 Entity::GetJumpSeconds() const
 {
 {
@@ -775,7 +709,6 @@ Entity::GetJumpSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetJumpCurrentSeconds( const float seconds )
 Entity::SetJumpCurrentSeconds( const float seconds )
 {
 {
@@ -783,7 +716,6 @@ Entity::SetJumpCurrentSeconds( const float seconds )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetJumpCurrentSeconds() const
 Entity::GetJumpCurrentSeconds() const
 {
 {
@@ -791,7 +723,6 @@ Entity::GetJumpCurrentSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptOffsetToPosition( const float x, const float y, const float z, const ActionType type, const float seconds )
 Entity::ScriptOffsetToPosition( const float x, const float y, const float z, const ActionType type, const float seconds )
 {
 {
@@ -813,7 +744,6 @@ Entity::ScriptOffsetToPosition( const float x, const float y, const float z, con
 }
 }
 
 
 
 
-
 int
 int
 Entity::ScriptOffsetSync()
 Entity::ScriptOffsetSync()
 {
 {
@@ -826,7 +756,6 @@ Entity::ScriptOffsetSync()
 }
 }
 
 
 
 
-
 void
 void
 Entity::UnsetOffset()
 Entity::UnsetOffset()
 {
 {
@@ -840,7 +769,6 @@ Entity::UnsetOffset()
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetOffsetPositionStart() const
 Entity::GetOffsetPositionStart() const
 {
 {
@@ -848,7 +776,6 @@ Entity::GetOffsetPositionStart() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Entity::GetOffsetPositionEnd() const
 Entity::GetOffsetPositionEnd() const
 {
 {
@@ -856,7 +783,6 @@ Entity::GetOffsetPositionEnd() const
 }
 }
 
 
 
 
-
 ActionType
 ActionType
 Entity::GetOffsetType() const
 Entity::GetOffsetType() const
 {
 {
@@ -864,7 +790,6 @@ Entity::GetOffsetType() const
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetOffsetSeconds() const
 Entity::GetOffsetSeconds() const
 {
 {
@@ -872,7 +797,6 @@ Entity::GetOffsetSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetOffsetCurrentSeconds( const float seconds )
 Entity::SetOffsetCurrentSeconds( const float seconds )
 {
 {
@@ -880,7 +804,6 @@ Entity::SetOffsetCurrentSeconds( const float seconds )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetOffsetCurrentSeconds() const
 Entity::GetOffsetCurrentSeconds() const
 {
 {
@@ -888,7 +811,6 @@ Entity::GetOffsetCurrentSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptTurnToDirection( const float direction, const TurnDirection turn_direction, const ActionType turn_type, const float seconds )
 Entity::ScriptTurnToDirection( const float direction, const TurnDirection turn_direction, const ActionType turn_type, const float seconds )
 {
 {
@@ -897,7 +819,6 @@ Entity::ScriptTurnToDirection( const float direction, const TurnDirection turn_d
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptTurnToEntity( Entity* entity, const TurnDirection turn_direction, const float seconds )
 Entity::ScriptTurnToEntity( Entity* entity, const TurnDirection turn_direction, const float seconds )
 {
 {
@@ -913,7 +834,6 @@ Entity::ScriptTurnToEntity( Entity* entity, const TurnDirection turn_direction,
 }
 }
 
 
 
 
-
 int
 int
 Entity::ScriptTurnSync()
 Entity::ScriptTurnSync()
 {
 {
@@ -926,7 +846,6 @@ Entity::ScriptTurnSync()
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetTurn( const Ogre::Degree& direction_to, Entity* entity, const TurnDirection turn_direction, const ActionType turn_type, const float seconds )
 Entity::SetTurn( const Ogre::Degree& direction_to, Entity* entity, const TurnDirection turn_direction, const ActionType turn_type, const float seconds )
 {
 {
@@ -950,7 +869,6 @@ Entity::SetTurn( const Ogre::Degree& direction_to, Entity* entity, const TurnDir
 }
 }
 
 
 
 
-
 void
 void
 Entity::UnsetTurn()
 Entity::UnsetTurn()
 {
 {
@@ -964,7 +882,6 @@ Entity::UnsetTurn()
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 Entity::CalculateTurnAngle( const Ogre::Degree& start, const Ogre::Degree& end ) const
 Entity::CalculateTurnAngle( const Ogre::Degree& start, const Ogre::Degree& end ) const
 {
 {
@@ -1015,7 +932,6 @@ Entity::CalculateTurnAngle( const Ogre::Degree& start, const Ogre::Degree& end )
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 Entity::GetTurnDirectionStart() const
 Entity::GetTurnDirectionStart() const
 {
 {
@@ -1023,7 +939,6 @@ Entity::GetTurnDirectionStart() const
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 Entity::GetTurnDirectionEnd() const
 Entity::GetTurnDirectionEnd() const
 {
 {
@@ -1031,7 +946,6 @@ Entity::GetTurnDirectionEnd() const
 }
 }
 
 
 
 
-
 ActionType
 ActionType
 Entity::GetTurnType() const
 Entity::GetTurnType() const
 {
 {
@@ -1039,7 +953,6 @@ Entity::GetTurnType() const
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetTurnSeconds() const
 Entity::GetTurnSeconds() const
 {
 {
@@ -1047,7 +960,6 @@ Entity::GetTurnSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::SetTurnCurrentSeconds( const float seconds )
 Entity::SetTurnCurrentSeconds( const float seconds )
 {
 {
@@ -1055,7 +967,6 @@ Entity::SetTurnCurrentSeconds( const float seconds )
 }
 }
 
 
 
 
-
 float
 float
 Entity::GetTurnCurrentSeconds() const
 Entity::GetTurnCurrentSeconds() const
 {
 {
@@ -1063,7 +974,6 @@ Entity::GetTurnCurrentSeconds() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptSetAnimationSpeed( const float speed )
 Entity::ScriptSetAnimationSpeed( const float speed )
 {
 {
@@ -1071,7 +981,6 @@ Entity::ScriptSetAnimationSpeed( const float speed )
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 Entity::GetDefaultAnimationName() const
 Entity::GetDefaultAnimationName() const
 {
 {
@@ -1079,7 +988,6 @@ Entity::GetDefaultAnimationName() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 Entity::GetCurrentAnimationName() const
 Entity::GetCurrentAnimationName() const
 {
 {
@@ -1087,7 +995,6 @@ Entity::GetCurrentAnimationName() const
 }
 }
 
 
 
 
-
 Entity::AnimationState
 Entity::AnimationState
 Entity::GetAnimationState() const
 Entity::GetAnimationState() const
 {
 {
@@ -1095,7 +1002,6 @@ Entity::GetAnimationState() const
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptPlayAnimation( const char* name )
 Entity::ScriptPlayAnimation( const char* name )
 {
 {
@@ -1103,7 +1009,6 @@ Entity::ScriptPlayAnimation( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptPlayAnimationStop( const char* name )
 Entity::ScriptPlayAnimationStop( const char* name )
 {
 {
@@ -1111,7 +1016,6 @@ Entity::ScriptPlayAnimationStop( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptPlayAnimation( const char* name, const float start, const float end )
 Entity::ScriptPlayAnimation( const char* name, const float start, const float end )
 {
 {
@@ -1119,7 +1023,6 @@ Entity::ScriptPlayAnimation( const char* name, const float start, const float en
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptPlayAnimationStop( const char* name, const float start, const float end )
 Entity::ScriptPlayAnimationStop( const char* name, const float start, const float end )
 {
 {
@@ -1127,7 +1030,6 @@ Entity::ScriptPlayAnimationStop( const char* name, const float start, const floa
 }
 }
 
 
 
 
-
 void
 void
 Entity::ScriptSetDefaultAnimation( const char* animation )
 Entity::ScriptSetDefaultAnimation( const char* animation )
 {
 {
@@ -1135,7 +1037,6 @@ Entity::ScriptSetDefaultAnimation( const char* animation )
 }
 }
 
 
 
 
-
 int
 int
 Entity::ScriptAnimationSync()
 Entity::ScriptAnimationSync()
 {
 {
@@ -1148,7 +1049,6 @@ Entity::ScriptAnimationSync()
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 Entity::GetDirectionToEntity( Entity* entity ) const
 Entity::GetDirectionToEntity( Entity* entity ) const
 {
 {

+ 2 - 5
QGearsMain/src/core/EntityCollision.cpp

@@ -1,7 +1,7 @@
-#include "core/EntityCollision.h"
-
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 
 
+#include "core/EntityCollision.h"
+
 
 
 EntityCollision::EntityCollision()
 EntityCollision::EntityCollision()
 {
 {
@@ -120,14 +120,12 @@ EntityCollision::EntityCollision()
 }
 }
 
 
 
 
-
 EntityCollision::~EntityCollision()
 EntityCollision::~EntityCollision()
 {
 {
     delete mRenderOp.vertexData;
     delete mRenderOp.vertexData;
 }
 }
 
 
 
 
-
 Ogre::Real
 Ogre::Real
 EntityCollision::getSquaredViewDepth( const Ogre::Camera* cam ) const
 EntityCollision::getSquaredViewDepth( const Ogre::Camera* cam ) const
 {
 {
@@ -135,7 +133,6 @@ EntityCollision::getSquaredViewDepth( const Ogre::Camera* cam ) const
 }
 }
 
 
 
 
-
 Ogre::Real
 Ogre::Real
 EntityCollision::getBoundingRadius() const
 EntityCollision::getBoundingRadius() const
 {
 {

+ 1 - 5
QGearsMain/src/core/EntityDirection.cpp

@@ -1,7 +1,6 @@
-#include "core/EntityDirection.h"
-
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 
 
+#include "core/EntityDirection.h"
 
 
 
 
 EntityDirection::EntityDirection()
 EntityDirection::EntityDirection()
@@ -37,14 +36,12 @@ EntityDirection::EntityDirection()
 }
 }
 
 
 
 
-
 EntityDirection::~EntityDirection()
 EntityDirection::~EntityDirection()
 {
 {
     delete mRenderOp.vertexData;
     delete mRenderOp.vertexData;
 }
 }
 
 
 
 
-
 Ogre::Real
 Ogre::Real
 EntityDirection::getSquaredViewDepth( const Ogre::Camera* cam ) const
 EntityDirection::getSquaredViewDepth( const Ogre::Camera* cam ) const
 {
 {
@@ -52,7 +49,6 @@ EntityDirection::getSquaredViewDepth( const Ogre::Camera* cam ) const
 }
 }
 
 
 
 
-
 Ogre::Real
 Ogre::Real
 EntityDirection::getBoundingRadius() const
 EntityDirection::getBoundingRadius() const
 {
 {

+ 20 - 124
QGearsMain/src/core/EntityManager.cpp

@@ -1,11 +1,10 @@
-#include "core/EntityManager.h"
-
 #include <OgreEntity.h>
 #include <OgreEntity.h>
 #include <OgreRoot.h>
 #include <OgreRoot.h>
 
 
 #include "core/CameraManager.h"
 #include "core/CameraManager.h"
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
+#include "core/EntityManager.h"
 #include "core/EntityModel.h"
 #include "core/EntityModel.h"
 #include "core/InputManager.h"
 #include "core/InputManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
@@ -13,16 +12,11 @@
 #include "core/Timer.h"
 #include "core/Timer.h"
 
 
 
 
-
 template<>EntityManager *Ogre::Singleton< EntityManager >::msSingleton = NULL;
 template<>EntityManager *Ogre::Singleton< EntityManager >::msSingleton = NULL;
-
-
-
 ConfigVar cv_debug_grid( "debug_grid", "Draw debug grid", "false" );
 ConfigVar cv_debug_grid( "debug_grid", "Draw debug grid", "false" );
 ConfigVar cv_debug_axis( "debug_axis", "Draw debug axis", "false" );
 ConfigVar cv_debug_axis( "debug_axis", "Draw debug axis", "false" );
 
 
 
 
-
 float
 float
 PointElevation( const Ogre::Vector2& point, const Ogre::Vector3& A, const Ogre::Vector3& B, const Ogre::Vector3& C )
 PointElevation( const Ogre::Vector2& point, const Ogre::Vector3& A, const Ogre::Vector3& B, const Ogre::Vector3& C )
 {
 {
@@ -35,7 +29,6 @@ PointElevation( const Ogre::Vector2& point, const Ogre::Vector3& A, const Ogre::
 }
 }
 
 
 
 
-
 float
 float
 SideOfVector( const Ogre::Vector2& point, const Ogre::Vector2& p1, const Ogre::Vector2& p2 )
 SideOfVector( const Ogre::Vector2& point, const Ogre::Vector2& p1, const Ogre::Vector2& p2 )
 {
 {
@@ -45,7 +38,6 @@ SideOfVector( const Ogre::Vector2& point, const Ogre::Vector2& p1, const Ogre::V
 }
 }
 
 
 
 
-
 float
 float
 SquareDistanceToLine( const Ogre::Vector3& p, const Ogre::Vector3& p1, const Ogre::Vector3& p2, Ogre::Vector3& proj )
 SquareDistanceToLine( const Ogre::Vector3& p, const Ogre::Vector3& p1, const Ogre::Vector3& p2, Ogre::Vector3& proj )
 {
 {
@@ -65,7 +57,6 @@ SquareDistanceToLine( const Ogre::Vector3& p, const Ogre::Vector3& p1, const Ogr
 }
 }
 
 
 
 
-
 Ogre::Degree
 Ogre::Degree
 GetDirectionToPoint( const Ogre::Vector3& current_point, const Ogre::Vector3& direction_point )
 GetDirectionToPoint( const Ogre::Vector3& current_point, const Ogre::Vector3& direction_point )
 {
 {
@@ -77,7 +68,6 @@ GetDirectionToPoint( const Ogre::Vector3& current_point, const Ogre::Vector3& di
 }
 }
 
 
 
 
-
 EntityManager::EntityManager():
 EntityManager::EntityManager():
     m_Paused( false ),
     m_Paused( false ),
     m_PlayerEntity( NULL ),
     m_PlayerEntity( NULL ),
@@ -96,7 +86,6 @@ EntityManager::EntityManager():
 }
 }
 
 
 
 
-
 EntityManager::~EntityManager()
 EntityManager::~EntityManager()
 {
 {
     if( m_Grid != NULL )
     if( m_Grid != NULL )
@@ -116,21 +105,16 @@ EntityManager::~EntityManager()
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::Input(const QGears::Event& event)
 EntityManager::Input(const QGears::Event& event)
 {
 {
     m_Background2D.InputDebug( event );
     m_Background2D.InputDebug( event );
 
 
-
-
     if( m_Paused == true )
     if( m_Paused == true )
     {
     {
         return;
         return;
     }
     }
 
 
-
-
     if( m_PlayerEntity != NULL && m_PlayerLock == false )
     if( m_PlayerEntity != NULL && m_PlayerLock == false )
     {
     {
         if ((event.type == QGears::ET_KEY_IMPULSE) && (event.param1 == OIS::KC_LEFT))
         if ((event.type == QGears::ET_KEY_IMPULSE) && (event.param1 == OIS::KC_LEFT))
@@ -160,26 +144,19 @@ EntityManager::Input(const QGears::Event& event)
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::Update()
 EntityManager::Update()
 {
 {
     UpdateDebug();
     UpdateDebug();
 
 
-
-
     if( m_Paused == true )
     if( m_Paused == true )
     {
     {
         return;
         return;
     }
     }
 
 
-
-
     // update all entity scripts
     // update all entity scripts
     ScriptManager::getSingleton().Update( ScriptManager::ENTITY );
     ScriptManager::getSingleton().Update( ScriptManager::ENTITY );
 
 
-
-
     // set move point for player entity
     // set move point for player entity
     if( m_PlayerEntity != NULL && m_PlayerMove != Ogre::Vector3::ZERO )
     if( m_PlayerEntity != NULL && m_PlayerMove != Ogre::Vector3::ZERO )
     {
     {
@@ -192,8 +169,6 @@ EntityManager::Update()
         }
         }
     }
     }
 
 
-
-
     for( unsigned int i = 0; i < m_Entity.size(); ++i )
     for( unsigned int i = 0; i < m_Entity.size(); ++i )
     {
     {
         m_Entity[ i ]->Update();
         m_Entity[ i ]->Update();
@@ -204,8 +179,6 @@ EntityManager::Update()
             continue;
             continue;
         }
         }
 
 
-
-
         // update screen scroll
         // update screen scroll
         Entity* scroll_entity = m_Background2D.GetAutoScrollEntity();
         Entity* scroll_entity = m_Background2D.GetAutoScrollEntity();
         if( scroll_entity == m_Entity[ i ] )
         if( scroll_entity == m_Entity[ i ] )
@@ -221,24 +194,18 @@ EntityManager::Update()
             m_Background2D.SetScreenScroll( Ogre::Vector2( -view.x, -view.y ) );
             m_Background2D.SetScreenScroll( Ogre::Vector2( -view.x, -view.y ) );
         }
         }
 
 
-
-
         // update offseting
         // update offseting
         if( m_Entity[ i ]->GetOffsetType() != AT_NONE )
         if( m_Entity[ i ]->GetOffsetType() != AT_NONE )
         {
         {
             SetNextOffsetStep( m_Entity[ i ] );
             SetNextOffsetStep( m_Entity[ i ] );
         }
         }
 
 
-
-
         // update turning
         // update turning
         if( m_Entity[ i ]->GetTurnType() != AT_NONE )
         if( m_Entity[ i ]->GetTurnType() != AT_NONE )
         {
         {
             SetNextTurnStep( m_Entity[ i ] );
             SetNextTurnStep( m_Entity[ i ] );
         }
         }
 
 
-
-
         // update movement
         // update movement
         switch( m_Entity[ i ]->GetState() )
         switch( m_Entity[ i ]->GetState() )
         {
         {
@@ -298,24 +265,18 @@ EntityManager::Update()
             }
             }
             break;
             break;
 
 
-
-
             case Entity::LINEAR:
             case Entity::LINEAR:
             {
             {
                 SetNextLinearStep( m_Entity[ i ] );
                 SetNextLinearStep( m_Entity[ i ] );
             }
             }
             break;
             break;
 
 
-
-
             case Entity::JUMP:
             case Entity::JUMP:
             {
             {
                 SetNextJumpStep( m_Entity[ i ] );
                 SetNextJumpStep( m_Entity[ i ] );
             }
             }
             break;
             break;
 
 
-
-
             case Entity::NONE:
             case Entity::NONE:
             {
             {
                 if( m_Entity[ i ]->GetAnimationState() != Entity::REQUESTED_ANIMATION )
                 if( m_Entity[ i ]->GetAnimationState() != Entity::REQUESTED_ANIMATION )
@@ -327,13 +288,9 @@ EntityManager::Update()
         }
         }
     }
     }
 
 
-
-
     // reset player move. It already must be handled in update
     // reset player move. It already must be handled in update
     m_PlayerMove = Ogre::Vector3::ZERO;
     m_PlayerMove = Ogre::Vector3::ZERO;
 
 
-
-
     if( m_Background2D.GetScrollType() != Background2D::NONE )
     if( m_Background2D.GetScrollType() != Background2D::NONE )
     {
     {
         SetNextScrollStep();
         SetNextScrollStep();
@@ -342,43 +299,32 @@ EntityManager::Update()
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::UpdateDebug()
 EntityManager::UpdateDebug()
 {
 {
     m_Grid->setVisible( cv_debug_grid.GetB() );
     m_Grid->setVisible( cv_debug_grid.GetB() );
     m_Axis->setVisible( cv_debug_axis.GetB() );
     m_Axis->setVisible( cv_debug_axis.GetB() );
 
 
-
-
     for( unsigned int i = 0; i < m_Entity.size(); ++i )
     for( unsigned int i = 0; i < m_Entity.size(); ++i )
     {
     {
         m_Entity[ i ]->UpdateDebug();
         m_Entity[ i ]->UpdateDebug();
     }
     }
 
 
-
-
-
     for( unsigned int i = 0; i < m_EntityTriggers.size(); ++i )
     for( unsigned int i = 0; i < m_EntityTriggers.size(); ++i )
     {
     {
         m_EntityTriggers[ i ]->UpdateDebug();
         m_EntityTriggers[ i ]->UpdateDebug();
     }
     }
 
 
-
-
     for( unsigned int i = 0; i < m_EntityPoints.size(); ++i )
     for( unsigned int i = 0; i < m_EntityPoints.size(); ++i )
     {
     {
         m_EntityPoints[ i ]->UpdateDebug();
         m_EntityPoints[ i ]->UpdateDebug();
     }
     }
 
 
-
-
     m_Walkmesh.UpdateDebug();
     m_Walkmesh.UpdateDebug();
     m_Background2D.UpdateDebug();
     m_Background2D.UpdateDebug();
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::OnResize()
 EntityManager::OnResize()
 {
 {
@@ -386,7 +332,6 @@ EntityManager::OnResize()
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::Clear()
 EntityManager::Clear()
 {
 {
@@ -427,7 +372,6 @@ EntityManager::Clear()
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::ScriptSetPaused( const bool paused )
 EntityManager::ScriptSetPaused( const bool paused )
 {
 {
@@ -435,7 +379,6 @@ EntityManager::ScriptSetPaused( const bool paused )
 }
 }
 
 
 
 
-
 Walkmesh*
 Walkmesh*
 EntityManager::GetWalkmesh()
 EntityManager::GetWalkmesh()
 {
 {
@@ -443,7 +386,6 @@ EntityManager::GetWalkmesh()
 }
 }
 
 
 
 
-
 Background2D*
 Background2D*
 EntityManager::GetBackground2D()
 EntityManager::GetBackground2D()
 {
 {
@@ -451,30 +393,29 @@ EntityManager::GetBackground2D()
 }
 }
 
 
 
 
-    //--------------------------------------------------------------------------
-    void
-    EntityManager::AddEntity( const Ogre::String& name, const Ogre::String& file_name, const Ogre::Vector3& position, const Ogre::Degree& rotation )
-    {
-        AddEntity( name, file_name, position, rotation, Ogre::Vector3::UNIT_SCALE, Ogre::Quaternion::IDENTITY );
-    }
+void
+EntityManager::AddEntity( const Ogre::String& name, const Ogre::String& file_name, const Ogre::Vector3& position, const Ogre::Degree& rotation )
+{
+    AddEntity( name, file_name, position, rotation, Ogre::Vector3::UNIT_SCALE, Ogre::Quaternion::IDENTITY );
+}
 
 
-    //--------------------------------------------------------------------------
-    void
-    EntityManager::AddEntity( const Ogre::String& name, const Ogre::String& file_name, const Ogre::Vector3& position, const Ogre::Degree& rotation, const Ogre::Vector3& scale, const Ogre::Quaternion& root_orientation )
-    {
-        Ogre::SceneNode* node = m_SceneNode->createChildSceneNode( "Model_" + name );
-        EntityModel* entity = new EntityModel( name, file_name, node );
-        entity->SetPosition( position );
-        entity->SetRotation( rotation );
-        entity->setScale( scale );
-        entity->setRootOrientation( root_orientation );
 
 
-        m_Entity.push_back( entity );
+void
+EntityManager::AddEntity( const Ogre::String& name, const Ogre::String& file_name, const Ogre::Vector3& position, const Ogre::Degree& rotation, const Ogre::Vector3& scale, const Ogre::Quaternion& root_orientation )
+{
+    Ogre::SceneNode* node = m_SceneNode->createChildSceneNode( "Model_" + name );
+    EntityModel* entity = new EntityModel( name, file_name, node );
+    entity->SetPosition( position );
+    entity->SetRotation( rotation );
+    entity->setScale( scale );
+    entity->setRootOrientation( root_orientation );
+
+    m_Entity.push_back( entity );
+
+    ScriptManager::getSingleton().AddEntity( ScriptManager::ENTITY, entity->GetName(), entity );
+}
 
 
-        ScriptManager::getSingleton().AddEntity( ScriptManager::ENTITY, entity->GetName(), entity );
-    }
 
 
-//--------------------------------------------------------------------------
 void
 void
 EntityManager::ScriptAddEntity( const char* name, const char* file_name, const float x, const float y, const float z, const float rotation )
 EntityManager::ScriptAddEntity( const char* name, const char* file_name, const float x, const float y, const float z, const float rotation )
 {
 {
@@ -482,7 +423,6 @@ EntityManager::ScriptAddEntity( const char* name, const char* file_name, const f
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::AddEntityTrigger( const Ogre::String& name, const Ogre::Vector3& point1, const Ogre::Vector3& point2, const bool enabled )
 EntityManager::AddEntityTrigger( const Ogre::String& name, const Ogre::Vector3& point1, const Ogre::Vector3& point2, const bool enabled )
 {
 {
@@ -495,7 +435,6 @@ EntityManager::AddEntityTrigger( const Ogre::String& name, const Ogre::Vector3&
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::AddEntityPoint( const Ogre::String& name, const Ogre::Vector3& position, const float rotation )
 EntityManager::AddEntityPoint( const Ogre::String& name, const Ogre::Vector3& position, const float rotation )
 {
 {
@@ -506,7 +445,6 @@ EntityManager::AddEntityPoint( const Ogre::String& name, const Ogre::Vector3& po
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::AddEntityScript( const Ogre::String& name )
 EntityManager::AddEntityScript( const Ogre::String& name )
 {
 {
@@ -515,7 +453,6 @@ EntityManager::AddEntityScript( const Ogre::String& name )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::ScriptAddEntityScript( const char* name )
 EntityManager::ScriptAddEntityScript( const char* name )
 {
 {
@@ -523,7 +460,6 @@ EntityManager::ScriptAddEntityScript( const char* name )
 }
 }
 
 
 
 
-
 Entity*
 Entity*
 EntityManager::GetEntity( const Ogre::String& name ) const
 EntityManager::GetEntity( const Ogre::String& name ) const
 {
 {
@@ -539,7 +475,6 @@ EntityManager::GetEntity( const Ogre::String& name ) const
 }
 }
 
 
 
 
-
 Entity*
 Entity*
 EntityManager::ScriptGetEntity( const char* name ) const
 EntityManager::ScriptGetEntity( const char* name ) const
 {
 {
@@ -547,7 +482,6 @@ EntityManager::ScriptGetEntity( const char* name ) const
 }
 }
 
 
 
 
-
 EntityPoint*
 EntityPoint*
 EntityManager::ScriptGetEntityPoint( const char* name ) const
 EntityManager::ScriptGetEntityPoint( const char* name ) const
 {
 {
@@ -563,7 +497,6 @@ EntityManager::ScriptGetEntityPoint( const char* name ) const
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::ScriptSetPlayerEntity( const char* name )
 EntityManager::ScriptSetPlayerEntity( const char* name )
 {
 {
@@ -577,7 +510,6 @@ EntityManager::ScriptSetPlayerEntity( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::ScriptUnsetPlayerEntity()
 EntityManager::ScriptUnsetPlayerEntity()
 {
 {
@@ -585,7 +517,6 @@ EntityManager::ScriptUnsetPlayerEntity()
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::ScriptPlayerLock( const bool lock )
 EntityManager::ScriptPlayerLock( const bool lock )
 {
 {
@@ -597,7 +528,6 @@ EntityManager::ScriptPlayerLock( const bool lock )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetPlayerMoveRotation( const Ogre::Radian rotation )
 EntityManager::SetPlayerMoveRotation( const Ogre::Radian rotation )
 {
 {
@@ -605,7 +535,6 @@ EntityManager::SetPlayerMoveRotation( const Ogre::Radian rotation )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityManager::SetEntityOnWalkmesh( Entity* entity )
 EntityManager::SetEntityOnWalkmesh( Entity* entity )
 {
 {
@@ -633,8 +562,6 @@ EntityManager::SetEntityOnWalkmesh( Entity* entity )
         }
         }
     }
     }
 
 
-
-
     // if our coords doesn't match any triangle
     // if our coords doesn't match any triangle
     if( triangles.size() == 0 )
     if( triangles.size() == 0 )
     {
     {
@@ -642,7 +569,6 @@ EntityManager::SetEntityOnWalkmesh( Entity* entity )
         return false;
         return false;
     }
     }
 
 
-
 /*
 /*
     int triangle = m_Models[entity_id]->GetTriangle();
     int triangle = m_Models[entity_id]->GetTriangle();
     if (triangle != -1)
     if (triangle != -1)
@@ -658,8 +584,6 @@ EntityManager::SetEntityOnWalkmesh( Entity* entity )
     }
     }
 */
 */
 
 
-
-
     // place entity on fount triangles
     // place entity on fount triangles
     // first try to set on top triangle less than current pos of entity
     // first try to set on top triangle less than current pos of entity
     float pos_z = position3.z;
     float pos_z = position3.z;
@@ -691,7 +615,6 @@ EntityManager::SetEntityOnWalkmesh( Entity* entity )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
 EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
 {
 {
@@ -762,12 +685,8 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
         entity->SetRotation( Ogre::Degree( angle ) );
         entity->SetRotation( Ogre::Degree( angle ) );
     }
     }
 
 
-
-
     float solid = ( entity->IsSolid() == true ) ? entity->GetSolidRadius() : 0.01f;
     float solid = ( entity->IsSolid() == true ) ? entity->GetSolidRadius() : 0.01f;
 
 
-
-
     // get ending point
     // get ending point
     end_point.z = start_point.z;
     end_point.z = start_point.z;
     //LOG_TRIVIAL( "End point: (" + Ogre::StringConverter::toString( end_point ) + ")." );
     //LOG_TRIVIAL( "End point: (" + Ogre::StringConverter::toString( end_point ) + ")." );
@@ -864,8 +783,6 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
                     direction.y = rotation.y;
                     direction.y = rotation.y;
                 }
                 }
 
 
-
-
                 // if not both left and right check was fail
                 // if not both left and right check was fail
                 if( first_triangle_check == false || second_triangle_check == false )
                 if( first_triangle_check == false || second_triangle_check == false )
                 {
                 {
@@ -926,10 +843,8 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
                             direction.y = rotation.y;
                             direction.y = rotation.y;
                             //LOG_TRIVIAL( "Entity \"" + entity->GetName() + "\" new move vector: " + Ogre::StringConverter::toString( direction.x ) + " " + Ogre::StringConverter::toString( direction.y ) + "." );
                             //LOG_TRIVIAL( "Entity \"" + entity->GetName() + "\" new move vector: " + Ogre::StringConverter::toString( direction.x ) + " " + Ogre::StringConverter::toString( direction.y ) + "." );
                         }
                         }
-
                         continue;
                         continue;
                     }
                     }
-
                     break;
                     break;
                 }
                 }
             }
             }
@@ -938,8 +853,6 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
 
 
     //LOG_TRIVIAL( "Stop cycle." );
     //LOG_TRIVIAL( "Stop cycle." );
 
 
-
-
     // set new X, Y and Z
     // set new X, Y and Z
     last_triangle_check = WalkmeshBorderCross( entity, end_point, direction );
     last_triangle_check = WalkmeshBorderCross( entity, end_point, direction );
 
 
@@ -950,17 +863,10 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
         return false;
         return false;
     }
     }
 
 
-
-
     // check triggers before set entity position because we check move line
     // check triggers before set entity position because we check move line
     CheckTriggers( entity, end_point );
     CheckTriggers( entity, end_point );
-
-
-
     entity->SetPosition( end_point );
     entity->SetPosition( end_point );
 
 
-
-
     // if we come to destination point - finish movement
     // if we come to destination point - finish movement
     Ogre::Vector3 final = entity->GetMovePosition() - end_point;
     Ogre::Vector3 final = entity->GetMovePosition() - end_point;
     if( Ogre::Vector2( final.x, final.y ).length() <= entity->GetMoveStopDistance() + speed / 10 )
     if( Ogre::Vector2( final.x, final.y ).length() <= entity->GetMoveStopDistance() + speed / 10 )
@@ -972,7 +878,6 @@ EntityManager::PerformWalkmeshMove( Entity* entity, const float speed )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityManager::WalkmeshBorderCross( Entity* entity, Ogre::Vector3& position, const Ogre::Vector2& move_vector)
 EntityManager::WalkmeshBorderCross( Entity* entity, Ogre::Vector3& position, const Ogre::Vector2& move_vector)
 {
 {
@@ -1047,7 +952,6 @@ EntityManager::WalkmeshBorderCross( Entity* entity, Ogre::Vector3& position, con
 }
 }
 
 
 
 
-
 bool
 bool
 EntityManager::CheckSolidCollisions( Entity* entity, Ogre::Vector3& position )
 EntityManager::CheckSolidCollisions( Entity* entity, Ogre::Vector3& position )
 {
 {
@@ -1103,7 +1007,6 @@ EntityManager::CheckSolidCollisions( Entity* entity, Ogre::Vector3& position )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::CheckTriggers( Entity* entity, Ogre::Vector3& position )
 EntityManager::CheckTriggers( Entity* entity, Ogre::Vector3& position )
 {
 {
@@ -1199,7 +1102,6 @@ EntityManager::CheckTriggers( Entity* entity, Ogre::Vector3& position )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetNextOffsetStep( Entity* entity )
 EntityManager::SetNextOffsetStep( Entity* entity )
 {
 {
@@ -1230,7 +1132,6 @@ EntityManager::SetNextOffsetStep( Entity* entity )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetNextTurnStep( Entity* entity )
 EntityManager::SetNextTurnStep( Entity* entity )
 {
 {
@@ -1261,7 +1162,6 @@ EntityManager::SetNextTurnStep( Entity* entity )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetNextLinearStep( Entity* entity )
 EntityManager::SetNextLinearStep( Entity* entity )
 {
 {
@@ -1310,8 +1210,6 @@ EntityManager::SetNextLinearStep( Entity* entity )
         is_move = true;
         is_move = true;
     }
     }
 
 
-
-
     if( is_move == true )
     if( is_move == true )
     {
     {
         Ogre::Vector3 position;
         Ogre::Vector3 position;
@@ -1355,7 +1253,6 @@ EntityManager::SetNextLinearStep( Entity* entity )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetNextJumpStep( Entity* entity )
 EntityManager::SetNextJumpStep( Entity* entity )
 {
 {
@@ -1384,7 +1281,6 @@ EntityManager::SetNextJumpStep( Entity* entity )
 }
 }
 
 
 
 
-
 void
 void
 EntityManager::SetNextScrollStep()
 EntityManager::SetNextScrollStep()
 {
 {

+ 1 - 10
QGearsMain/src/core/EntityModel.cpp

@@ -1,13 +1,11 @@
-#include "core/EntityModel.h"
-
 #include <OgreEntity.h>
 #include <OgreEntity.h>
 #include <OgreRoot.h>
 #include <OgreRoot.h>
 
 
+#include "core/EntityModel.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/Timer.h"
 #include "core/Timer.h"
 
 
 
 
-
 EntityModel::EntityModel( const Ogre::String& name, const Ogre::String file_name, Ogre::SceneNode* node ):
 EntityModel::EntityModel( const Ogre::String& name, const Ogre::String file_name, Ogre::SceneNode* node ):
     Entity( name, node ),
     Entity( name, node ),
     m_AnimationCurrent( NULL )
     m_AnimationCurrent( NULL )
@@ -23,14 +21,12 @@ EntityModel::EntityModel( const Ogre::String& name, const Ogre::String file_name
 }
 }
 
 
 
 
-
 EntityModel::~EntityModel()
 EntityModel::~EntityModel()
 {
 {
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->destroyEntity( m_Model );
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->destroyEntity( m_Model );
 }
 }
 
 
 
 
-
 void
 void
 EntityModel::Update()
 EntityModel::Update()
 {
 {
@@ -43,7 +39,6 @@ EntityModel::Update()
 }
 }
 
 
 
 
-
 void
 void
 EntityModel::SetVisible( const bool visible )
 EntityModel::SetVisible( const bool visible )
 {
 {
@@ -51,7 +46,6 @@ EntityModel::SetVisible( const bool visible )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityModel::IsVisible() const
 EntityModel::IsVisible() const
 {
 {
@@ -59,7 +53,6 @@ EntityModel::IsVisible() const
 }
 }
 
 
 
 
-
 void
 void
 EntityModel::PlayAnimation( const Ogre::String& animation, Entity::AnimationState state, Entity::AnimationPlayType play_type, const float start, const float end )
 EntityModel::PlayAnimation( const Ogre::String& animation, Entity::AnimationState state, Entity::AnimationPlayType play_type, const float start, const float end )
 {
 {
@@ -87,7 +80,6 @@ EntityModel::PlayAnimation( const Ogre::String& animation, Entity::AnimationStat
 }
 }
 
 
 
 
-
 void
 void
 EntityModel::PlayAnimationContinue( const Ogre::String& animation )
 EntityModel::PlayAnimationContinue( const Ogre::String& animation )
 {
 {
@@ -101,7 +93,6 @@ EntityModel::PlayAnimationContinue( const Ogre::String& animation )
 }
 }
 
 
 
 
-
 void
 void
 EntityModel::UpdateAnimation( const float delta )
 EntityModel::UpdateAnimation( const float delta )
 {
 {

+ 1 - 13
QGearsMain/src/core/EntityPoint.cpp

@@ -1,15 +1,12 @@
-#include "core/EntityPoint.h"
-
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
+#include "core/EntityPoint.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
 
 
 
 
-
 ConfigVar cv_debug_point( "debug_point", "Draw point debug info", "false" );
 ConfigVar cv_debug_point( "debug_point", "Draw point debug info", "false" );
 
 
 
 
-
 EntityPoint::EntityPoint( const Ogre::String& name ):
 EntityPoint::EntityPoint( const Ogre::String& name ):
     m_Name( name ),
     m_Name( name ),
     m_Position( Ogre::Vector3::ZERO ),
     m_Position( Ogre::Vector3::ZERO ),
@@ -18,13 +15,11 @@ EntityPoint::EntityPoint( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 EntityPoint::~EntityPoint()
 EntityPoint::~EntityPoint()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 EntityPoint::UpdateDebug()
 EntityPoint::UpdateDebug()
 {
 {
@@ -43,7 +38,6 @@ EntityPoint::UpdateDebug()
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 EntityPoint::GetName() const
 EntityPoint::GetName() const
 {
 {
@@ -51,7 +45,6 @@ EntityPoint::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 EntityPoint::SetPosition( const Ogre::Vector3& point )
 EntityPoint::SetPosition( const Ogre::Vector3& point )
 {
 {
@@ -60,7 +53,6 @@ EntityPoint::SetPosition( const Ogre::Vector3& point )
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 EntityPoint::GetPosition() const
 EntityPoint::GetPosition() const
 {
 {
@@ -68,7 +60,6 @@ EntityPoint::GetPosition() const
 }
 }
 
 
 
 
-
 void
 void
 EntityPoint::ScriptGetPosition() const
 EntityPoint::ScriptGetPosition() const
 {
 {
@@ -78,7 +69,6 @@ EntityPoint::ScriptGetPosition() const
 }
 }
 
 
 
 
-
 void
 void
 EntityPoint::SetRotation( const float rotation )
 EntityPoint::SetRotation( const float rotation )
 {
 {
@@ -86,7 +76,6 @@ EntityPoint::SetRotation( const float rotation )
 }
 }
 
 
 
 
-
 float
 float
 EntityPoint::GetRotation() const
 EntityPoint::GetRotation() const
 {
 {
@@ -94,7 +83,6 @@ EntityPoint::GetRotation() const
 }
 }
 
 
 
 
-
 float
 float
 EntityPoint::ScriptGetRotation() const
 EntityPoint::ScriptGetRotation() const
 {
 {

+ 1 - 14
QGearsMain/src/core/EntityTrigger.cpp

@@ -1,15 +1,13 @@
-#include "core/EntityTrigger.h"
 
 
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
 #include "core/Entity.h"
 #include "core/Entity.h"
+#include "core/EntityTrigger.h"
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 
 
 
 
-
 ConfigVar cv_debug_trigger( "debug_trigger", "Draw entity trigger debug info", "0" );
 ConfigVar cv_debug_trigger( "debug_trigger", "Draw entity trigger debug info", "0" );
 
 
 
 
-
 EntityTrigger::EntityTrigger( const Ogre::String& name ):
 EntityTrigger::EntityTrigger( const Ogre::String& name ):
     m_Name(name),
     m_Name(name),
     m_Enabled( false ),
     m_Enabled( false ),
@@ -19,13 +17,11 @@ EntityTrigger::EntityTrigger( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 EntityTrigger::~EntityTrigger()
 EntityTrigger::~EntityTrigger()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 EntityTrigger::UpdateDebug()
 EntityTrigger::UpdateDebug()
 {
 {
@@ -63,7 +59,6 @@ EntityTrigger::UpdateDebug()
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 EntityTrigger::GetName() const
 EntityTrigger::GetName() const
 {
 {
@@ -71,7 +66,6 @@ EntityTrigger::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 EntityTrigger::SetEnabled( const bool enabled )
 EntityTrigger::SetEnabled( const bool enabled )
 {
 {
@@ -84,7 +78,6 @@ EntityTrigger::SetEnabled( const bool enabled )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityTrigger::IsEnabled() const
 EntityTrigger::IsEnabled() const
 {
 {
@@ -92,7 +85,6 @@ EntityTrigger::IsEnabled() const
 }
 }
 
 
 
 
-
 void
 void
 EntityTrigger::AddActivator( Entity* activator )
 EntityTrigger::AddActivator( Entity* activator )
 {
 {
@@ -112,7 +104,6 @@ EntityTrigger::AddActivator( Entity* activator )
 }
 }
 
 
 
 
-
 void
 void
 EntityTrigger::RemoveActivator( Entity* activator )
 EntityTrigger::RemoveActivator( Entity* activator )
 {
 {
@@ -127,7 +118,6 @@ EntityTrigger::RemoveActivator( Entity* activator )
 }
 }
 
 
 
 
-
 bool
 bool
 EntityTrigger::IsActivator( Entity* activator )
 EntityTrigger::IsActivator( Entity* activator )
 {
 {
@@ -143,7 +133,6 @@ EntityTrigger::IsActivator( Entity* activator )
 }
 }
 
 
 
 
-
 void
 void
 EntityTrigger::SetPoints( const Ogre::Vector3& point1, const Ogre::Vector3& point2 )
 EntityTrigger::SetPoints( const Ogre::Vector3& point1, const Ogre::Vector3& point2 )
 {
 {
@@ -152,7 +141,6 @@ EntityTrigger::SetPoints( const Ogre::Vector3& point1, const Ogre::Vector3& poin
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 EntityTrigger::GetPoint1() const
 EntityTrigger::GetPoint1() const
 {
 {
@@ -160,7 +148,6 @@ EntityTrigger::GetPoint1() const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 EntityTrigger::GetPoint2() const
 EntityTrigger::GetPoint2() const
 {
 {

+ 1 - 17
QGearsMain/src/core/GameFrameListner.cpp

@@ -1,5 +1,3 @@
-#include "core/GameFrameListner.h"
-
 #include <OgreStringConverter.h>
 #include <OgreStringConverter.h>
 
 
 #include "QGearsGameState.h"
 #include "QGearsGameState.h"
@@ -8,6 +6,7 @@
 #include "core/Console.h"
 #include "core/Console.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
 #include "core/EntityManager.h"
 #include "core/EntityManager.h"
+#include "core/GameFrameListner.h"
 #include "core/InputManager.h"
 #include "core/InputManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
@@ -15,11 +14,9 @@
 #include "core/UiManager.h"
 #include "core/UiManager.h"
 
 
 
 
-
 ConfigVar cv_debug_fps( "debug_fps", "Debug FPS", "false" );
 ConfigVar cv_debug_fps( "debug_fps", "Debug FPS", "false" );
 
 
 
 
-
 GameFrameListener::GameFrameListener( Ogre::RenderWindow* win ):
 GameFrameListener::GameFrameListener( Ogre::RenderWindow* win ):
     m_Window( win ),
     m_Window( win ),
 
 
@@ -57,7 +54,6 @@ GameFrameListener::GameFrameListener( Ogre::RenderWindow* win ):
 }
 }
 
 
 
 
-
 GameFrameListener::~GameFrameListener()
 GameFrameListener::~GameFrameListener()
 {
 {
     m_InputManager->destroyInputObject( m_Keyboard );
     m_InputManager->destroyInputObject( m_Keyboard );
@@ -71,7 +67,6 @@ GameFrameListener::~GameFrameListener()
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::frameStarted( const Ogre::FrameEvent& evt )
 GameFrameListener::frameStarted( const Ogre::FrameEvent& evt )
 {
 {
@@ -87,7 +82,6 @@ GameFrameListener::frameStarted( const Ogre::FrameEvent& evt )
        m_Keyboard->capture();
        m_Keyboard->capture();
     }
     }
 
 
-
     if( m_Mouse )
     if( m_Mouse )
     {
     {
        m_Mouse->capture();
        m_Mouse->capture();
@@ -125,7 +119,6 @@ GameFrameListener::frameStarted( const Ogre::FrameEvent& evt )
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::frameEnded( const Ogre::FrameEvent& evt )
 GameFrameListener::frameEnded( const Ogre::FrameEvent& evt )
 {
 {
@@ -142,14 +135,12 @@ GameFrameListener::frameEnded( const Ogre::FrameEvent& evt )
 }
 }
 
 
 
 
-
 void
 void
 GameFrameListener::windowMoved( Ogre::RenderWindow* rw )
 GameFrameListener::windowMoved( Ogre::RenderWindow* rw )
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 GameFrameListener::windowResized( Ogre::RenderWindow *rw )
 GameFrameListener::windowResized( Ogre::RenderWindow *rw )
 {
 {
@@ -167,7 +158,6 @@ GameFrameListener::windowResized( Ogre::RenderWindow *rw )
 }
 }
 
 
 
 
-
 void
 void
 GameFrameListener::windowClosed( Ogre::RenderWindow* rw )
 GameFrameListener::windowClosed( Ogre::RenderWindow* rw )
 {
 {
@@ -175,14 +165,12 @@ GameFrameListener::windowClosed( Ogre::RenderWindow* rw )
 }
 }
 
 
 
 
-
 void
 void
 GameFrameListener::windowFocusChange( Ogre::RenderWindow* rw )
 GameFrameListener::windowFocusChange( Ogre::RenderWindow* rw )
 {
 {
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::keyPressed( const OIS::KeyEvent& event )
 GameFrameListener::keyPressed( const OIS::KeyEvent& event )
 {
 {
@@ -192,7 +180,6 @@ GameFrameListener::keyPressed( const OIS::KeyEvent& event )
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::keyReleased( const OIS::KeyEvent& event )
 GameFrameListener::keyReleased( const OIS::KeyEvent& event )
 {
 {
@@ -202,7 +189,6 @@ GameFrameListener::keyReleased( const OIS::KeyEvent& event )
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::mouseMoved( const OIS::MouseEvent& e )
 GameFrameListener::mouseMoved( const OIS::MouseEvent& e )
 {
 {
@@ -219,7 +205,6 @@ GameFrameListener::mouseMoved( const OIS::MouseEvent& e )
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::mousePressed( const OIS::MouseEvent& e, OIS::MouseButtonID id )
 GameFrameListener::mousePressed( const OIS::MouseEvent& e, OIS::MouseButtonID id )
 {
 {
@@ -229,7 +214,6 @@ GameFrameListener::mousePressed( const OIS::MouseEvent& e, OIS::MouseButtonID id
 }
 }
 
 
 
 
-
 bool
 bool
 GameFrameListener::mouseReleased( const OIS::MouseEvent& e, OIS::MouseButtonID id )
 GameFrameListener::mouseReleased( const OIS::MouseEvent& e, OIS::MouseButtonID id )
 {
 {

+ 2 - 16
QGearsMain/src/core/InputManager.cpp

@@ -1,17 +1,14 @@
-#include "core/InputManager.h"
-#include "core/InputManagerCommands.h"
-
 #include "core/ConfigCmdManager.h"
 #include "core/ConfigCmdManager.h"
 #include "core/Console.h"
 #include "core/Console.h"
+#include "core/InputManager.h"
+#include "core/InputManagerCommands.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/Timer.h"
 #include "core/Timer.h"
 
 
 
 
-
 template<>InputManager *Ogre::Singleton< InputManager >::msSingleton = NULL;
 template<>InputManager *Ogre::Singleton< InputManager >::msSingleton = NULL;
 
 
 
 
-
 InputManager::InputManager():
 InputManager::InputManager():
     m_RepeatFirstWait( true ),
     m_RepeatFirstWait( true ),
     m_RepeatTimer( 0 )
     m_RepeatTimer( 0 )
@@ -22,13 +19,11 @@ InputManager::InputManager():
 }
 }
 
 
 
 
-
 InputManager::~InputManager()
 InputManager::~InputManager()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 InputManager::Reset()
 InputManager::Reset()
 {
 {
@@ -39,7 +34,6 @@ InputManager::Reset()
 }
 }
 
 
 
 
-
 void
 void
 InputManager::ButtonPressed( int button, char text, bool down )
 InputManager::ButtonPressed( int button, char text, bool down )
 {
 {
@@ -61,7 +55,6 @@ InputManager::ButtonPressed( int button, char text, bool down )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::MousePressed( int button, bool down )
 InputManager::MousePressed( int button, bool down )
 {
 {
@@ -69,7 +62,6 @@ InputManager::MousePressed( int button, bool down )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::MouseMoved( int x, int y )
 InputManager::MouseMoved( int x, int y )
 {
 {
@@ -77,7 +69,6 @@ InputManager::MouseMoved( int x, int y )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::MouseScrolled( int value )
 InputManager::MouseScrolled( int value )
 {
 {
@@ -85,7 +76,6 @@ InputManager::MouseScrolled( int value )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::Update()
 InputManager::Update()
 {
 {
@@ -116,7 +106,6 @@ InputManager::Update()
 }
 }
 
 
 
 
-
 bool
 bool
 InputManager::IsButtonPressed( int button ) const
 InputManager::IsButtonPressed( int button ) const
 {
 {
@@ -124,7 +113,6 @@ InputManager::IsButtonPressed( int button ) const
 }
 }
 
 
 
 
-
 void
 void
 InputManager::GetInputEvents( InputEventArray& input_events )
 InputManager::GetInputEvents( InputEventArray& input_events )
 {
 {
@@ -134,7 +122,6 @@ InputManager::GetInputEvents( InputEventArray& input_events )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::BindCommand( const Ogre::String& cmd, const ButtonList& buttons )
 InputManager::BindCommand( const Ogre::String& cmd, const ButtonList& buttons )
 {
 {
@@ -143,7 +130,6 @@ InputManager::BindCommand( const Ogre::String& cmd, const ButtonList& buttons )
 }
 }
 
 
 
 
-
 void
 void
 InputManager::ActivateBinds( int button )
 InputManager::ActivateBinds( int button )
 {
 {

+ 5 - 33
QGearsMain/src/core/ScriptManager.cpp

@@ -1,10 +1,9 @@
-#include "core/ScriptManager.h"
-#include "core/ScriptManagerBinds.h"
-#include "core/ScriptManagerCommands.h"
-
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
+#include "core/ScriptManager.h"
+#include "core/ScriptManagerBinds.h"
+#include "core/ScriptManagerCommands.h"
 #include "core/Timer.h"
 #include "core/Timer.h"
 #include "core/Utilites.h"
 #include "core/Utilites.h"
 #include "core/XmlScriptsFile.h"
 #include "core/XmlScriptsFile.h"
@@ -12,9 +11,10 @@
 
 
 
 
 ConfigVar cv_debug_script( "debug_script", "Debug script flags. 0x01 - System, 0x02 - Entity, 0x04 - Ui.", "0" );
 ConfigVar cv_debug_script( "debug_script", "Debug script flags. 0x01 - System, 0x02 - Entity, 0x04 - Ui.", "0" );
-
+template<>ScriptManager *Ogre::Singleton< ScriptManager >::msSingleton = NULL;
 Ogre::String script_entity_type[] = { "SYSTEM", "ENTITY", "UI" };
 Ogre::String script_entity_type[] = { "SYSTEM", "ENTITY", "UI" };
 
 
+
 bool
 bool
 priority_queue_compare( QueueScript a, QueueScript b )
 priority_queue_compare( QueueScript a, QueueScript b )
 {
 {
@@ -22,11 +22,6 @@ priority_queue_compare( QueueScript a, QueueScript b )
 }
 }
 
 
 
 
-
-template<>ScriptManager *Ogre::Singleton< ScriptManager >::msSingleton = NULL;
-
-
-
 ScriptManager::ScriptManager():
 ScriptManager::ScriptManager():
     m_SystemTableName( "System" ),
     m_SystemTableName( "System" ),
     m_EntityTableName( "EntityContainer" ),
     m_EntityTableName( "EntityContainer" ),
@@ -51,7 +46,6 @@ ScriptManager::ScriptManager():
 }
 }
 
 
 
 
-
 ScriptManager::~ScriptManager()
 ScriptManager::~ScriptManager()
 {
 {
     lua_close( m_LuaState );
     lua_close( m_LuaState );
@@ -60,7 +54,6 @@ ScriptManager::~ScriptManager()
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::Input(const QGears::Event& event)
 ScriptManager::Input(const QGears::Event& event)
 {
 {
@@ -93,7 +86,6 @@ ScriptManager::Input(const QGears::Event& event)
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::Update( const ScriptManager::Type type )
 ScriptManager::Update( const ScriptManager::Type type )
 {
 {
@@ -113,8 +105,6 @@ ScriptManager::Update( const ScriptManager::Type type )
         }
         }
     }
     }
 
 
-
-
     // draw debug before update. This way it will be posible to see scripts that run once
     // draw debug before update. This way it will be posible to see scripts that run once
     int debug = cv_debug_script.GetI();
     int debug = cv_debug_script.GetI();
     if( debug != 0 )
     if( debug != 0 )
@@ -172,8 +162,6 @@ ScriptManager::Update( const ScriptManager::Type type )
         }
         }
     }
     }
 
 
-
-
     for( unsigned int i = 0; i < m_ScriptEntity.size(); ++i )
     for( unsigned int i = 0; i < m_ScriptEntity.size(); ++i )
     {
     {
         if( m_ScriptEntity[ i ].type == type )
         if( m_ScriptEntity[ i ].type == type )
@@ -293,7 +281,6 @@ ScriptManager::Update( const ScriptManager::Type type )
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::RunString( const Ogre::String& lua )
 ScriptManager::RunString( const Ogre::String& lua )
 {
 {
@@ -304,7 +291,6 @@ ScriptManager::RunString( const Ogre::String& lua )
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::RunFile( const Ogre::String& file )
 ScriptManager::RunFile( const Ogre::String& file )
 {
 {
@@ -315,7 +301,6 @@ ScriptManager::RunFile( const Ogre::String& file )
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::AddEntity( const ScriptManager::Type type, const Ogre::String& entity_name, Entity* entity )
 ScriptManager::AddEntity( const ScriptManager::Type type, const Ogre::String& entity_name, Entity* entity )
 {
 {
@@ -377,7 +362,6 @@ ScriptManager::AddEntity( const ScriptManager::Type type, const Ogre::String& en
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::RemoveEntity( const ScriptManager::Type type, const Ogre::String& entity_name )
 ScriptManager::RemoveEntity( const ScriptManager::Type type, const Ogre::String& entity_name )
 {
 {
@@ -398,7 +382,6 @@ ScriptManager::RemoveEntity( const ScriptManager::Type type, const Ogre::String&
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::RemoveEntityTopScript( ScriptEntity& entity )
 ScriptManager::RemoveEntityTopScript( ScriptEntity& entity )
 {
 {
@@ -418,7 +401,6 @@ ScriptManager::RemoveEntityTopScript( ScriptEntity& entity )
 }
 }
 
 
 
 
-
 luabind::object
 luabind::object
 ScriptManager::GetTableByEntityName( const ScriptManager::Type type, const Ogre::String& name, lua_State* state ) const
 ScriptManager::GetTableByEntityName( const ScriptManager::Type type, const Ogre::String& name, lua_State* state ) const
 {
 {
@@ -451,7 +433,6 @@ ScriptManager::GetTableByEntityName( const ScriptManager::Type type, const Ogre:
 }
 }
 
 
 
 
-
 QueueScript*
 QueueScript*
 ScriptManager::GetScriptByScriptId( const ScriptId& script ) const
 ScriptManager::GetScriptByScriptId( const ScriptId& script ) const
 {
 {
@@ -475,7 +456,6 @@ ScriptManager::GetScriptByScriptId( const ScriptId& script ) const
 }
 }
 
 
 
 
-
 ScriptEntity*
 ScriptEntity*
 ScriptManager::GetScriptEntityByName( const Type type, const Ogre::String& entity_name ) const
 ScriptManager::GetScriptEntityByName( const Type type, const Ogre::String& entity_name ) const
 {
 {
@@ -491,7 +471,6 @@ ScriptManager::GetScriptEntityByName( const Type type, const Ogre::String& entit
 }
 }
 
 
 
 
-
 const ScriptId
 const ScriptId
 ScriptManager::GetCurrentScriptId() const
 ScriptManager::GetCurrentScriptId() const
 {
 {
@@ -499,7 +478,6 @@ ScriptManager::GetCurrentScriptId() const
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::ContinueScriptExecution( const ScriptId& script )
 ScriptManager::ContinueScriptExecution( const ScriptId& script )
 {
 {
@@ -515,7 +493,6 @@ ScriptManager::ContinueScriptExecution( const ScriptId& script )
 }
 }
 
 
 
 
-
 int
 int
 ScriptManager::ScriptWait( const float seconds )
 ScriptManager::ScriptWait( const float seconds )
 {
 {
@@ -540,7 +517,6 @@ ScriptManager::ScriptWait( const float seconds )
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::ScriptRequest( const Type type, const char* entity, const char* function, const int priority )
 ScriptManager::ScriptRequest( const Type type, const char* entity, const char* function, const int priority )
 {
 {
@@ -563,7 +539,6 @@ ScriptManager::ScriptRequest( const Type type, const char* entity, const char* f
 }
 }
 
 
 
 
-
 int
 int
 ScriptManager::ScriptRequestStartSync( const Type type, const char* entity, const char* function, const int priority )
 ScriptManager::ScriptRequestStartSync( const Type type, const char* entity, const char* function, const int priority )
 {
 {
@@ -589,7 +564,6 @@ ScriptManager::ScriptRequestStartSync( const Type type, const char* entity, cons
 }
 }
 
 
 
 
-
 int
 int
 ScriptManager::ScriptRequestEndSync( const Type type, const char* entity, const char* function, const int priority )
 ScriptManager::ScriptRequestEndSync( const Type type, const char* entity, const char* function, const int priority )
 {
 {
@@ -615,7 +589,6 @@ ScriptManager::ScriptRequestEndSync( const Type type, const char* entity, const
 }
 }
 
 
 
 
-
 bool
 bool
 ScriptManager::ScriptRequest( ScriptEntity* script_entity, const Ogre::String& function, const int priority, const Ogre::String& argument1, const Ogre::String& argument2, bool start_sync, bool end_sync )
 ScriptManager::ScriptRequest( ScriptEntity* script_entity, const Ogre::String& function, const int priority, const Ogre::String& argument1, const Ogre::String& argument2, bool start_sync, bool end_sync )
 {
 {
@@ -651,7 +624,6 @@ ScriptManager::ScriptRequest( ScriptEntity* script_entity, const Ogre::String& f
 }
 }
 
 
 
 
-
 void
 void
 ScriptManager::AddValueToStack( const float value )
 ScriptManager::AddValueToStack( const float value )
 {
 {

+ 1 - 12
QGearsMain/src/core/Timer.cpp

@@ -1,17 +1,11 @@
-#include "core/Timer.h"
-
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
-
+#include "core/Timer.h"
 
 
 
 
 ConfigVar cv_timer_scale_game( "timer_scale_game", "Timer speed for game related things", "1" );
 ConfigVar cv_timer_scale_game( "timer_scale_game", "Timer speed for game related things", "1" );
-
-
-
 template<>Timer *Ogre::Singleton< Timer >::msSingleton = NULL;
 template<>Timer *Ogre::Singleton< Timer >::msSingleton = NULL;
 
 
 
 
-
 Timer::Timer():
 Timer::Timer():
     m_SystemTimeTotal( 0 ),
     m_SystemTimeTotal( 0 ),
     m_SystemTimeDelta( 0 ),
     m_SystemTimeDelta( 0 ),
@@ -21,7 +15,6 @@ Timer::Timer():
 }
 }
 
 
 
 
-
 float
 float
 Timer::GetSystemTimeTotal()
 Timer::GetSystemTimeTotal()
 {
 {
@@ -29,7 +22,6 @@ Timer::GetSystemTimeTotal()
 }
 }
 
 
 
 
-
 float
 float
 Timer::GetSystemTimeDelta()
 Timer::GetSystemTimeDelta()
 {
 {
@@ -37,7 +29,6 @@ Timer::GetSystemTimeDelta()
 }
 }
 
 
 
 
-
 float
 float
 Timer::GetGameTimeTotal()
 Timer::GetGameTimeTotal()
 {
 {
@@ -45,7 +36,6 @@ Timer::GetGameTimeTotal()
 }
 }
 
 
 
 
-
 float
 float
 Timer::GetGameTimeDelta()
 Timer::GetGameTimeDelta()
 {
 {
@@ -53,7 +43,6 @@ Timer::GetGameTimeDelta()
 }
 }
 
 
 
 
-
 void
 void
 Timer::AddTime( float time )
 Timer::AddTime( float time )
 {
 {

+ 1 - 25
QGearsMain/src/core/UiAnimation.cpp

@@ -1,11 +1,9 @@
-#include "core/UiAnimation.h"
-
 #include <OgreVector2.h>
 #include <OgreVector2.h>
 
 
+#include "core/UiAnimation.h"
 #include "core/UiWidget.h"
 #include "core/UiWidget.h"
 
 
 
 
-
 UiAnimation::UiAnimation( const Ogre::String& name, UiWidget* widget ):
 UiAnimation::UiAnimation( const Ogre::String& name, UiWidget* widget ):
     m_Name( name ),
     m_Name( name ),
     m_Widget( widget ),
     m_Widget( widget ),
@@ -15,13 +13,11 @@ UiAnimation::UiAnimation( const Ogre::String& name, UiWidget* widget ):
 }
 }
 
 
 
 
-
 UiAnimation::~UiAnimation()
 UiAnimation::~UiAnimation()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddTime( const float time )
 UiAnimation::AddTime( const float time )
 {
 {
@@ -31,8 +27,6 @@ UiAnimation::AddTime( const float time )
         m_Time = m_Length;
         m_Time = m_Length;
     }
     }
 
 
-
-
     // update all
     // update all
     if( m_Scale.size() > 0 )
     if( m_Scale.size() > 0 )
     {
     {
@@ -70,8 +64,6 @@ UiAnimation::AddTime( const float time )
         m_Widget->SetScale( value );
         m_Widget->SetScale( value );
     }
     }
 
 
-
-
     if( m_X.size() > 0 )
     if( m_X.size() > 0 )
     {
     {
         Ogre::Vector2 min_value = m_X[ 0 ].value;
         Ogre::Vector2 min_value = m_X[ 0 ].value;
@@ -108,8 +100,6 @@ UiAnimation::AddTime( const float time )
         m_Widget->SetX( value.x, value.y );
         m_Widget->SetX( value.x, value.y );
     }
     }
 
 
-
-
     if( m_Y.size() > 0 )
     if( m_Y.size() > 0 )
     {
     {
         Ogre::Vector2 min_value = m_Y[ 0 ].value;
         Ogre::Vector2 min_value = m_Y[ 0 ].value;
@@ -146,8 +136,6 @@ UiAnimation::AddTime( const float time )
         m_Widget->SetY( value.x, value.y );
         m_Widget->SetY( value.x, value.y );
     }
     }
 
 
-
-
     if( m_Rotation.size() > 0 )
     if( m_Rotation.size() > 0 )
     {
     {
         float min_value = m_Rotation[ 0 ].value;
         float min_value = m_Rotation[ 0 ].value;
@@ -184,8 +172,6 @@ UiAnimation::AddTime( const float time )
         m_Widget->SetRotation( value );
         m_Widget->SetRotation( value );
     }
     }
 
 
-
-
     if( m_Alpha.size() > 0 )
     if( m_Alpha.size() > 0 )
     {
     {
         float min_value = m_Alpha[ 0 ].value;
         float min_value = m_Alpha[ 0 ].value;
@@ -224,7 +210,6 @@ UiAnimation::AddTime( const float time )
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 UiAnimation::GetName() const
 UiAnimation::GetName() const
 {
 {
@@ -232,7 +217,6 @@ UiAnimation::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::SetTime( const float time )
 UiAnimation::SetTime( const float time )
 {
 {
@@ -240,7 +224,6 @@ UiAnimation::SetTime( const float time )
 }
 }
 
 
 
 
-
 float
 float
 UiAnimation::GetTime() const
 UiAnimation::GetTime() const
 {
 {
@@ -248,7 +231,6 @@ UiAnimation::GetTime() const
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::SetLength( const float time )
 UiAnimation::SetLength( const float time )
 {
 {
@@ -256,7 +238,6 @@ UiAnimation::SetLength( const float time )
 }
 }
 
 
 
 
-
 float
 float
 UiAnimation::GetLength() const
 UiAnimation::GetLength() const
 {
 {
@@ -264,7 +245,6 @@ UiAnimation::GetLength() const
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddScaleKeyFrame( const UiKeyFrameVector2& key_frame )
 UiAnimation::AddScaleKeyFrame( const UiKeyFrameVector2& key_frame )
 {
 {
@@ -272,7 +252,6 @@ UiAnimation::AddScaleKeyFrame( const UiKeyFrameVector2& key_frame )
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddXKeyFrame( const UiKeyFrameVector2& key_frame )
 UiAnimation::AddXKeyFrame( const UiKeyFrameVector2& key_frame )
 {
 {
@@ -280,7 +259,6 @@ UiAnimation::AddXKeyFrame( const UiKeyFrameVector2& key_frame )
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddYKeyFrame( const UiKeyFrameVector2& key_frame )
 UiAnimation::AddYKeyFrame( const UiKeyFrameVector2& key_frame )
 {
 {
@@ -288,7 +266,6 @@ UiAnimation::AddYKeyFrame( const UiKeyFrameVector2& key_frame )
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddRotationKeyFrame( const UiKeyFrameFloat& key_frame )
 UiAnimation::AddRotationKeyFrame( const UiKeyFrameFloat& key_frame )
 {
 {
@@ -296,7 +273,6 @@ UiAnimation::AddRotationKeyFrame( const UiKeyFrameFloat& key_frame )
 }
 }
 
 
 
 
-
 void
 void
 UiAnimation::AddAlphaKeyFrame( const UiKeyFrameFloat& key_frame )
 UiAnimation::AddAlphaKeyFrame( const UiKeyFrameFloat& key_frame )
 {
 {

+ 1 - 13
QGearsMain/src/core/UiFont.cpp

@@ -1,7 +1,5 @@
-#include "core/UiFont.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
-
+#include "core/UiFont.h"
 
 
 
 
 UiFont::UiFont( const Ogre::String& name ):
 UiFont::UiFont( const Ogre::String& name ):
@@ -14,13 +12,11 @@ UiFont::UiFont( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 UiFont::~UiFont()
 UiFont::~UiFont()
 {
 {
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 UiFont::GetName() const
 UiFont::GetName() const
 {
 {
@@ -28,7 +24,6 @@ UiFont::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 UiFont::SetImage( const Ogre::String& image, const int width, const int height )
 UiFont::SetImage( const Ogre::String& image, const int width, const int height )
 {
 {
@@ -38,7 +33,6 @@ UiFont::SetImage( const Ogre::String& image, const int width, const int height )
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 UiFont::GetImageName() const
 UiFont::GetImageName() const
 {
 {
@@ -46,7 +40,6 @@ UiFont::GetImageName() const
 }
 }
 
 
 
 
-
 int
 int
 UiFont::GetImageWidth() const
 UiFont::GetImageWidth() const
 {
 {
@@ -54,7 +47,6 @@ UiFont::GetImageWidth() const
 }
 }
 
 
 
 
-
 int
 int
 UiFont::GetImageHeight() const
 UiFont::GetImageHeight() const
 {
 {
@@ -62,7 +54,6 @@ UiFont::GetImageHeight() const
 }
 }
 
 
 
 
-
 void
 void
 UiFont::SetHeight( const int height )
 UiFont::SetHeight( const int height )
 {
 {
@@ -70,7 +61,6 @@ UiFont::SetHeight( const int height )
 }
 }
 
 
 
 
-
 int
 int
 UiFont::GetHeight() const
 UiFont::GetHeight() const
 {
 {
@@ -78,7 +68,6 @@ UiFont::GetHeight() const
 }
 }
 
 
 
 
-
 void
 void
 UiFont::AddCharData( const UiCharData& data )
 UiFont::AddCharData( const UiCharData& data )
 {
 {
@@ -86,7 +75,6 @@ UiFont::AddCharData( const UiCharData& data )
 }
 }
 
 
 
 
-
 UiCharData
 UiCharData
 UiFont::GetCharData( const int char_code ) const
 UiFont::GetCharData( const int char_code ) const
 {
 {

+ 1 - 23
QGearsMain/src/core/UiManager.cpp

@@ -1,10 +1,9 @@
-#include "core/UiManager.h"
-
 #include <OgreRoot.h>
 #include <OgreRoot.h>
 #include <OgreStringVector.h>
 #include <OgreStringVector.h>
 
 
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
+#include "core/UiManager.h"
 #include "core/Utilites.h"
 #include "core/Utilites.h"
 #include "core/XmlFontsFile.h"
 #include "core/XmlFontsFile.h"
 #include "core/XmlPrototypesFile.h"
 #include "core/XmlPrototypesFile.h"
@@ -12,18 +11,15 @@
 #include "core/XmlTextsFile.h"
 #include "core/XmlTextsFile.h"
 
 
 
 
-
 template<>UiManager *Ogre::Singleton< UiManager >::msSingleton = NULL;
 template<>UiManager *Ogre::Singleton< UiManager >::msSingleton = NULL;
 
 
 
 
-
 UiManager::UiManager()
 UiManager::UiManager()
 {
 {
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->addRenderQueueListener( this );
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->addRenderQueueListener( this );
 }
 }
 
 
 
 
-
 UiManager::~UiManager()
 UiManager::~UiManager()
 {
 {
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->removeRenderQueueListener( this );
     Ogre::Root::getSingleton().getSceneManager( "Scene" )->removeRenderQueueListener( this );
@@ -42,7 +38,6 @@ UiManager::~UiManager()
 }
 }
 
 
 
 
-
 void
 void
 UiManager::Initialise()
 UiManager::Initialise()
 {
 {
@@ -57,15 +52,11 @@ UiManager::Initialise()
 }
 }
 
 
 
 
-
 void
 void
 UiManager::Update()
 UiManager::Update()
 {
 {
     // update all ui scripts
     // update all ui scripts
     ScriptManager::getSingleton().Update( ScriptManager::UI );
     ScriptManager::getSingleton().Update( ScriptManager::UI );
-
-
-
     for( unsigned int i = 0; i < m_Widgets.size(); ++i )
     for( unsigned int i = 0; i < m_Widgets.size(); ++i )
     {
     {
         m_Widgets[ i ]->Update();
         m_Widgets[ i ]->Update();
@@ -73,7 +64,6 @@ UiManager::Update()
 }
 }
 
 
 
 
-
 void
 void
 UiManager::OnResize()
 UiManager::OnResize()
 {
 {
@@ -84,7 +74,6 @@ UiManager::OnResize()
 }
 }
 
 
 
 
-
 void
 void
 UiManager::SetLanguage( const Ogre::String& language )
 UiManager::SetLanguage( const Ogre::String& language )
 {
 {
@@ -95,7 +84,6 @@ UiManager::SetLanguage( const Ogre::String& language )
 }
 }
 
 
 
 
-
 void
 void
 UiManager::AddText( const Ogre::String& name, TiXmlNode* text )
 UiManager::AddText( const Ogre::String& name, TiXmlNode* text )
 {
 {
@@ -106,7 +94,6 @@ UiManager::AddText( const Ogre::String& name, TiXmlNode* text )
 }
 }
 
 
 
 
-
 void
 void
 UiManager::UnloadTexts()
 UiManager::UnloadTexts()
 {
 {
@@ -118,7 +105,6 @@ UiManager::UnloadTexts()
 }
 }
 
 
 
 
-
 TiXmlNode*
 TiXmlNode*
 UiManager::GetText( const Ogre::String& name ) const
 UiManager::GetText( const Ogre::String& name ) const
 {
 {
@@ -134,7 +120,6 @@ UiManager::GetText( const Ogre::String& name ) const
 }
 }
 
 
 
 
-
 void
 void
 UiManager::AddFont( UiFont* font )
 UiManager::AddFont( UiFont* font )
 {
 {
@@ -142,7 +127,6 @@ UiManager::AddFont( UiFont* font )
 }
 }
 
 
 
 
-
 UiFont*
 UiFont*
 UiManager::GetFont( const Ogre::String& name )
 UiManager::GetFont( const Ogre::String& name )
 {
 {
@@ -158,7 +142,6 @@ UiManager::GetFont( const Ogre::String& name )
 }
 }
 
 
 
 
-
 void
 void
 UiManager::AddPrototype( const Ogre::String& name, TiXmlNode* prototype )
 UiManager::AddPrototype( const Ogre::String& name, TiXmlNode* prototype )
 {
 {
@@ -169,7 +152,6 @@ UiManager::AddPrototype( const Ogre::String& name, TiXmlNode* prototype )
 }
 }
 
 
 
 
-
 TiXmlNode*
 TiXmlNode*
 UiManager::GetPrototype( const Ogre::String& name ) const
 UiManager::GetPrototype( const Ogre::String& name ) const
 {
 {
@@ -185,7 +167,6 @@ UiManager::GetPrototype( const Ogre::String& name ) const
 }
 }
 
 
 
 
-
 void
 void
 UiManager::AddWidget( UiWidget* widget )
 UiManager::AddWidget( UiWidget* widget )
 {
 {
@@ -193,7 +174,6 @@ UiManager::AddWidget( UiWidget* widget )
 }
 }
 
 
 
 
-
 UiWidget*
 UiWidget*
 UiManager::GetWidget( const Ogre::String& name )
 UiManager::GetWidget( const Ogre::String& name )
 {
 {
@@ -221,7 +201,6 @@ UiManager::GetWidget( const Ogre::String& name )
 }
 }
 
 
 
 
-
 UiWidget*
 UiWidget*
 UiManager::ScriptGetWidget( const char* name )
 UiManager::ScriptGetWidget( const char* name )
 {
 {
@@ -229,7 +208,6 @@ UiManager::ScriptGetWidget( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 UiManager::renderQueueStarted( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation )
 UiManager::renderQueueStarted( Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation )
 {
 {

+ 1 - 15
QGearsMain/src/core/UiSprite.cpp

@@ -1,10 +1,8 @@
-#include "core/UiSprite.h"
-
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreMaterialManager.h>
 
 
 #include "core/Logger.h"
 #include "core/Logger.h"
-
+#include "core/UiSprite.h"
 
 
 
 
 UiSprite::UiSprite( const Ogre::String& name ):
 UiSprite::UiSprite( const Ogre::String& name ):
@@ -14,7 +12,6 @@ UiSprite::UiSprite( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 UiSprite::UiSprite( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
 UiSprite::UiSprite( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
     UiWidget( name, path_name, parent )
     UiWidget( name, path_name, parent )
 {
 {
@@ -22,14 +19,12 @@ UiSprite::UiSprite( const Ogre::String& name, const Ogre::String& path_name, UiW
 }
 }
 
 
 
 
-
 UiSprite::~UiSprite()
 UiSprite::~UiSprite()
 {
 {
     DestroyVertexBuffer();
     DestroyVertexBuffer();
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::Initialise()
 UiSprite::Initialise()
 {
 {
@@ -56,7 +51,6 @@ UiSprite::Initialise()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::Update()
 UiSprite::Update()
 {
 {
@@ -64,7 +58,6 @@ UiSprite::Update()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::Render()
 UiSprite::Render()
 {
 {
@@ -88,7 +81,6 @@ UiSprite::Render()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::UpdateTransformation()
 UiSprite::UpdateTransformation()
 {
 {
@@ -97,7 +89,6 @@ UiSprite::UpdateTransformation()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::SetImage( const Ogre::String& image )
 UiSprite::SetImage( const Ogre::String& image )
 {
 {
@@ -107,7 +98,6 @@ UiSprite::SetImage( const Ogre::String& image )
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::SetVertexShader( const Ogre::String& shader )
 UiSprite::SetVertexShader( const Ogre::String& shader )
 {
 {
@@ -117,7 +107,6 @@ UiSprite::SetVertexShader( const Ogre::String& shader )
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::SetFragmentShader( const Ogre::String& shader )
 UiSprite::SetFragmentShader( const Ogre::String& shader )
 {
 {
@@ -127,7 +116,6 @@ UiSprite::SetFragmentShader( const Ogre::String& shader )
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::UpdateGeometry()
 UiSprite::UpdateGeometry()
 {
 {
@@ -252,7 +240,6 @@ UiSprite::UpdateGeometry()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::CreateVertexBuffer()
 UiSprite::CreateVertexBuffer()
 {
 {
@@ -276,7 +263,6 @@ UiSprite::CreateVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 UiSprite::DestroyVertexBuffer()
 UiSprite::DestroyVertexBuffer()
 {
 {

+ 1 - 22
QGearsMain/src/core/UiTextArea.cpp

@@ -1,12 +1,10 @@
-#include "core/UiTextArea.h"
-
 #include <OgreFontManager.h>
 #include <OgreFontManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreHardwareBufferManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreMaterialManager.h>
 
 
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/UiManager.h"
 #include "core/UiManager.h"
-
+#include "core/UiTextArea.h"
 
 
 
 
 UiTextArea::UiTextArea( const Ogre::String& name ):
 UiTextArea::UiTextArea( const Ogre::String& name ):
@@ -16,7 +14,6 @@ UiTextArea::UiTextArea( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 UiTextArea::UiTextArea( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
 UiTextArea::UiTextArea( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
     UiWidget( name, path_name, parent )
     UiWidget( name, path_name, parent )
 {
 {
@@ -24,14 +21,12 @@ UiTextArea::UiTextArea( const Ogre::String& name, const Ogre::String& path_name,
 }
 }
 
 
 
 
-
 UiTextArea::~UiTextArea()
 UiTextArea::~UiTextArea()
 {
 {
     DestroyVertexBuffer();
     DestroyVertexBuffer();
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::Initialise()
 UiTextArea::Initialise()
 {
 {
@@ -48,7 +43,6 @@ UiTextArea::Initialise()
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::Update()
 UiTextArea::Update()
 {
 {
@@ -56,7 +50,6 @@ UiTextArea::Update()
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::Render()
 UiTextArea::Render()
 {
 {
@@ -80,7 +73,6 @@ UiTextArea::Render()
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::UpdateTransformation()
 UiTextArea::UpdateTransformation()
 {
 {
@@ -89,7 +81,6 @@ UiTextArea::UpdateTransformation()
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetTextAlign( const TextAlign align )
 UiTextArea::SetTextAlign( const TextAlign align )
 {
 {
@@ -97,7 +88,6 @@ UiTextArea::SetTextAlign( const TextAlign align )
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetText( const Ogre::UTFString& text )
 UiTextArea::SetText( const Ogre::UTFString& text )
 {
 {
@@ -105,7 +95,6 @@ UiTextArea::SetText( const Ogre::UTFString& text )
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetText( TiXmlNode* text )
 UiTextArea::SetText( TiXmlNode* text )
 {
 {
@@ -113,7 +102,6 @@ UiTextArea::SetText( TiXmlNode* text )
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetFont( const Ogre::String& font )
 UiTextArea::SetFont( const Ogre::String& font )
 {
 {
@@ -143,7 +131,6 @@ UiTextArea::SetFont( const Ogre::String& font )
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::UpdateGeometry()
 UiTextArea::UpdateGeometry()
 {
 {
@@ -177,8 +164,6 @@ UiTextArea::UpdateGeometry()
         }
         }
     }
     }
 
 
-
-
     TextBlockData data;
     TextBlockData data;
     data.local_x1 = -m_FinalOrigin.x - length;
     data.local_x1 = -m_FinalOrigin.x - length;
     data.local_y1 = -m_FinalOrigin.y;
     data.local_y1 = -m_FinalOrigin.y;
@@ -198,7 +183,6 @@ UiTextArea::UpdateGeometry()
 }
 }
 
 
 
 
-
 float
 float
 UiTextArea::GetTextLengthFromNode( TiXmlNode* node ) const
 UiTextArea::GetTextLengthFromNode( TiXmlNode* node ) const
 {
 {
@@ -232,7 +216,6 @@ UiTextArea::GetTextLengthFromNode( TiXmlNode* node ) const
 }
 }
 
 
 
 
-
 float
 float
 UiTextArea::GetTextLength( const Ogre::UTFString& text ) const
 UiTextArea::GetTextLength( const Ogre::UTFString& text ) const
 {
 {
@@ -247,7 +230,6 @@ UiTextArea::GetTextLength( const Ogre::UTFString& text ) const
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetTextGeometryFromNode( TiXmlNode* node, TextBlockData& data, const TextStyle& style )
 UiTextArea::SetTextGeometryFromNode( TiXmlNode* node, TextBlockData& data, const TextStyle& style )
 {
 {
@@ -287,7 +269,6 @@ UiTextArea::SetTextGeometryFromNode( TiXmlNode* node, TextBlockData& data, const
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::SetTextGeometry( const Ogre::UTFString& text, TextBlockData& data, const TextStyle& style )
 UiTextArea::SetTextGeometry( const Ogre::UTFString& text, TextBlockData& data, const TextStyle& style )
 {
 {
@@ -369,7 +350,6 @@ UiTextArea::SetTextGeometry( const Ogre::UTFString& text, TextBlockData& data, c
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::CreateVertexBuffer()
 UiTextArea::CreateVertexBuffer()
 {
 {
@@ -394,7 +374,6 @@ UiTextArea::CreateVertexBuffer()
 }
 }
 
 
 
 
-
 void
 void
 UiTextArea::DestroyVertexBuffer()
 UiTextArea::DestroyVertexBuffer()
 {
 {

+ 1 - 68
QGearsMain/src/core/UiWidget.cpp

@@ -1,5 +1,3 @@
-#include "core/UiWidget.h"
-
 #include <OgreMath.h>
 #include <OgreMath.h>
 #include <OgreRoot.h>
 #include <OgreRoot.h>
 
 
@@ -9,13 +7,12 @@
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
 #include "core/Timer.h"
 #include "core/Timer.h"
-
+#include "core/UiWidget.h"
 
 
 
 
 ConfigVar cv_debug_ui( "debug_ui", "Draw ui debug info", "0" );
 ConfigVar cv_debug_ui( "debug_ui", "Draw ui debug info", "0" );
 
 
 
 
-
 UiWidget::UiWidget( const Ogre::String& name ):
 UiWidget::UiWidget( const Ogre::String& name ):
     m_Name( name ),
     m_Name( name ),
     m_PathName( name ),
     m_PathName( name ),
@@ -25,7 +22,6 @@ UiWidget::UiWidget( const Ogre::String& name ):
 }
 }
 
 
 
 
-
 UiWidget::UiWidget( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
 UiWidget::UiWidget( const Ogre::String& name, const Ogre::String& path_name, UiWidget* parent ):
     m_Name( name ),
     m_Name( name ),
     m_PathName( path_name ),
     m_PathName( path_name ),
@@ -35,7 +31,6 @@ UiWidget::UiWidget( const Ogre::String& name, const Ogre::String& path_name, UiW
 }
 }
 
 
 
 
-
 UiWidget::~UiWidget()
 UiWidget::~UiWidget()
 {
 {
     for( unsigned int i = 0; i < m_Animations.size(); ++i )
     for( unsigned int i = 0; i < m_Animations.size(); ++i )
@@ -49,7 +44,6 @@ UiWidget::~UiWidget()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::Initialise()
 UiWidget::Initialise()
 {
 {
@@ -105,7 +99,6 @@ UiWidget::Initialise()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::Update()
 UiWidget::Update()
 {
 {
@@ -150,21 +143,16 @@ UiWidget::Update()
         PlayAnimation( m_AnimationDefault, UiAnimation::DEFAULT, 0, -1 );
         PlayAnimation( m_AnimationDefault, UiAnimation::DEFAULT, 0, -1 );
     }
     }
 
 
-
-
     for( size_t i = 0; i < m_Children.size(); ++i )
     for( size_t i = 0; i < m_Children.size(); ++i )
     {
     {
         m_Children[ i ]->Update();
         m_Children[ i ]->Update();
     }
     }
 
 
-
-
     if( m_UpdateTransformation == true )
     if( m_UpdateTransformation == true )
     {
     {
         UpdateTransformation();
         UpdateTransformation();
     }
     }
 
 
-
     // debug output
     // debug output
     if( cv_debug_ui.GetI() >= 1 )
     if( cv_debug_ui.GetI() >= 1 )
     {
     {
@@ -236,7 +224,6 @@ UiWidget::Update()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::OnResize()
 UiWidget::OnResize()
 {
 {
@@ -253,7 +240,6 @@ UiWidget::OnResize()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::Render()
 UiWidget::Render()
 {
 {
@@ -267,7 +253,6 @@ UiWidget::Render()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetVisible( const bool visible )
 UiWidget::SetVisible( const bool visible )
 {
 {
@@ -275,7 +260,6 @@ UiWidget::SetVisible( const bool visible )
 }
 }
 
 
 
 
-
 bool
 bool
 UiWidget::IsVisible() const
 UiWidget::IsVisible() const
 {
 {
@@ -283,7 +267,6 @@ UiWidget::IsVisible() const
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 UiWidget::GetName() const
 UiWidget::GetName() const
 {
 {
@@ -291,7 +274,6 @@ UiWidget::GetName() const
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::AddChild( UiWidget *widget )
 UiWidget::AddChild( UiWidget *widget )
 {
 {
@@ -299,7 +281,6 @@ UiWidget::AddChild( UiWidget *widget )
 }
 }
 
 
 
 
-
 UiWidget*
 UiWidget*
 UiWidget::GetChild( const Ogre::String& name )
 UiWidget::GetChild( const Ogre::String& name )
 {
 {
@@ -315,7 +296,6 @@ UiWidget::GetChild( const Ogre::String& name )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::RemoveAllChildren()
 UiWidget::RemoveAllChildren()
 {
 {
@@ -327,7 +307,6 @@ UiWidget::RemoveAllChildren()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::AddAnimation( UiAnimation* animation )
 UiWidget::AddAnimation( UiAnimation* animation )
 {
 {
@@ -335,7 +314,6 @@ UiWidget::AddAnimation( UiAnimation* animation )
 }
 }
 
 
 
 
-
 const Ogre::String&
 const Ogre::String&
 UiWidget::GetCurrentAnimationName() const
 UiWidget::GetCurrentAnimationName() const
 {
 {
@@ -348,7 +326,6 @@ UiWidget::GetCurrentAnimationName() const
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::PlayAnimation( const Ogre::String& animation, UiAnimation::State state, const float start, const float end )
 UiWidget::PlayAnimation( const Ogre::String& animation, UiAnimation::State state, const float start, const float end )
 {
 {
@@ -372,7 +349,6 @@ UiWidget::PlayAnimation( const Ogre::String& animation, UiAnimation::State state
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::ScriptPlayAnimation( const char* name )
 UiWidget::ScriptPlayAnimation( const char* name )
 {
 {
@@ -380,7 +356,6 @@ UiWidget::ScriptPlayAnimation( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::ScriptPlayAnimationStop( const char* name )
 UiWidget::ScriptPlayAnimationStop( const char* name )
 {
 {
@@ -388,7 +363,6 @@ UiWidget::ScriptPlayAnimationStop( const char* name )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::ScriptPlayAnimation( const char* name, const float start, const float end )
 UiWidget::ScriptPlayAnimation( const char* name, const float start, const float end )
 {
 {
@@ -396,7 +370,6 @@ UiWidget::ScriptPlayAnimation( const char* name, const float start, const float
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::ScriptPlayAnimationStop( const char* name, const float start, const float end )
 UiWidget::ScriptPlayAnimationStop( const char* name, const float start, const float end )
 {
 {
@@ -404,7 +377,6 @@ UiWidget::ScriptPlayAnimationStop( const char* name, const float start, const fl
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::ScriptSetDefaultAnimation( const char* animation )
 UiWidget::ScriptSetDefaultAnimation( const char* animation )
 {
 {
@@ -413,7 +385,6 @@ UiWidget::ScriptSetDefaultAnimation( const char* animation )
 }
 }
 
 
 
 
-
 int
 int
 UiWidget::ScriptAnimationSync()
 UiWidget::ScriptAnimationSync()
 {
 {
@@ -423,7 +394,6 @@ UiWidget::ScriptAnimationSync()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::UpdateTransformation()
 UiWidget::UpdateTransformation()
 {
 {
@@ -447,8 +417,6 @@ UiWidget::UpdateTransformation()
         y = local_x * sin + local_y * cos;
         y = local_x * sin + local_y * cos;
     }
     }
 
 
-
-
     m_FinalTranslate.x = area_translate.x;
     m_FinalTranslate.x = area_translate.x;
     if( m_Align == RIGHT )
     if( m_Align == RIGHT )
     {
     {
@@ -460,8 +428,6 @@ UiWidget::UpdateTransformation()
     }
     }
     m_FinalTranslate.x += x;
     m_FinalTranslate.x += x;
 
 
-
-
     m_FinalTranslate.y = area_translate.y;
     m_FinalTranslate.y = area_translate.y;
     if( m_VerticalAlign == BOTTOM )
     if( m_VerticalAlign == BOTTOM )
     {
     {
@@ -473,8 +439,6 @@ UiWidget::UpdateTransformation()
     }
     }
     m_FinalTranslate.y += y;
     m_FinalTranslate.y += y;
 
 
-
-
     m_FinalZ = ( m_Parent != NULL ) ? m_Parent->GetFinalZ() + m_Z : m_Z;
     m_FinalZ = ( m_Parent != NULL ) ? m_Parent->GetFinalZ() + m_Z : m_Z;
     m_FinalScale = area_scale * m_Scale;
     m_FinalScale = area_scale * m_Scale;
     m_FinalSize.x = ( area_size.x * m_WidthPercent * m_Scale.x ) / 100.0f + ( m_Width * m_ScreenHeight / 720.0f ) * m_FinalScale.x;
     m_FinalSize.x = ( area_size.x * m_WidthPercent * m_Scale.x ) / 100.0f + ( m_Width * m_ScreenHeight / 720.0f ) * m_FinalScale.x;
@@ -483,8 +447,6 @@ UiWidget::UpdateTransformation()
     m_FinalOrigin.y = ( m_FinalSize.y * m_OriginYPercent ) / 100.0f + m_OriginY * m_ScreenHeight * m_FinalScale.y / 720.0f;
     m_FinalOrigin.y = ( m_FinalSize.y * m_OriginYPercent ) / 100.0f + m_OriginY * m_ScreenHeight * m_FinalScale.y / 720.0f;
     m_FinalRotation = area_rotation + m_Rotation;
     m_FinalRotation = area_rotation + m_Rotation;
 
 
-
-
     // scissor update
     // scissor update
     m_ScissorTop = ( m_Parent != NULL ) ? m_Parent->GetScissorTop() : 0;
     m_ScissorTop = ( m_Parent != NULL ) ? m_Parent->GetScissorTop() : 0;
     m_ScissorBottom = ( m_Parent != NULL ) ? m_Parent->GetScissorBottom() : static_cast<int>(m_ScreenHeight);
     m_ScissorBottom = ( m_Parent != NULL ) ? m_Parent->GetScissorBottom() : static_cast<int>(m_ScreenHeight);
@@ -534,12 +496,8 @@ UiWidget::UpdateTransformation()
         m_ScissorRight = std::min( m_ScissorRight, std::max( std::max( x1 , x2 ), std::max( x3 , x4 ) ) );
         m_ScissorRight = std::min( m_ScissorRight, std::max( std::max( x1 , x2 ), std::max( x3 , x4 ) ) );
     }
     }
 
 
-
-
     m_UpdateTransformation = false;
     m_UpdateTransformation = false;
 
 
-
-
     for( size_t i = 0; i < m_Children.size(); ++i )
     for( size_t i = 0; i < m_Children.size(); ++i )
     {
     {
         m_Children[ i ]->UpdateTransformation();
         m_Children[ i ]->UpdateTransformation();
@@ -547,7 +505,6 @@ UiWidget::UpdateTransformation()
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetAlign( const UiWidget::Align align )
 UiWidget::SetAlign( const UiWidget::Align align )
 {
 {
@@ -555,7 +512,6 @@ UiWidget::SetAlign( const UiWidget::Align align )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetVerticalAlign( const UiWidget::VerticalAlign valign )
 UiWidget::SetVerticalAlign( const UiWidget::VerticalAlign valign )
 {
 {
@@ -563,7 +519,6 @@ UiWidget::SetVerticalAlign( const UiWidget::VerticalAlign valign )
 }
 }
 
 
 
 
-
 float
 float
 UiWidget::GetFinalZ() const
 UiWidget::GetFinalZ() const
 {
 {
@@ -571,7 +526,6 @@ UiWidget::GetFinalZ() const
 }
 }
 
 
 
 
-
 Ogre::Vector2
 Ogre::Vector2
 UiWidget::GetFinalOrigin() const
 UiWidget::GetFinalOrigin() const
 {
 {
@@ -579,7 +533,6 @@ UiWidget::GetFinalOrigin() const
 }
 }
 
 
 
 
-
 Ogre::Vector2
 Ogre::Vector2
 UiWidget::GetFinalTranslate() const
 UiWidget::GetFinalTranslate() const
 {
 {
@@ -587,7 +540,6 @@ UiWidget::GetFinalTranslate() const
 }
 }
 
 
 
 
-
 Ogre::Vector2
 Ogre::Vector2
 UiWidget::GetFinalSize() const
 UiWidget::GetFinalSize() const
 {
 {
@@ -595,7 +547,6 @@ UiWidget::GetFinalSize() const
 }
 }
 
 
 
 
-
 Ogre::Vector2
 Ogre::Vector2
 UiWidget::GetFinalScale() const
 UiWidget::GetFinalScale() const
 {
 {
@@ -603,7 +554,6 @@ UiWidget::GetFinalScale() const
 }
 }
 
 
 
 
-
 float
 float
 UiWidget::GetFinalRotation() const
 UiWidget::GetFinalRotation() const
 {
 {
@@ -611,7 +561,6 @@ UiWidget::GetFinalRotation() const
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetOriginX( const float percent, const float x )
 UiWidget::SetOriginX( const float percent, const float x )
 {
 {
@@ -621,7 +570,6 @@ UiWidget::SetOriginX( const float percent, const float x )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetOriginY( const float percent, const float y )
 UiWidget::SetOriginY( const float percent, const float y )
 {
 {
@@ -631,7 +579,6 @@ UiWidget::SetOriginY( const float percent, const float y )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetX( const float percent, const float x )
 UiWidget::SetX( const float percent, const float x )
 {
 {
@@ -641,7 +588,6 @@ UiWidget::SetX( const float percent, const float x )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetY( const float percent, const float y )
 UiWidget::SetY( const float percent, const float y )
 {
 {
@@ -651,7 +597,6 @@ UiWidget::SetY( const float percent, const float y )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetZ( const float z )
 UiWidget::SetZ( const float z )
 {
 {
@@ -660,7 +605,6 @@ UiWidget::SetZ( const float z )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetWidth( const float percent, const float width )
 UiWidget::SetWidth( const float percent, const float width )
 {
 {
@@ -670,7 +614,6 @@ UiWidget::SetWidth( const float percent, const float width )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetHeight( const float percent, const float height )
 UiWidget::SetHeight( const float percent, const float height )
 {
 {
@@ -680,7 +623,6 @@ UiWidget::SetHeight( const float percent, const float height )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetScale( const Ogre::Vector2& scale )
 UiWidget::SetScale( const Ogre::Vector2& scale )
 {
 {
@@ -689,7 +631,6 @@ UiWidget::SetScale( const Ogre::Vector2& scale )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetRotation( const float degree )
 UiWidget::SetRotation( const float degree )
 {
 {
@@ -698,7 +639,6 @@ UiWidget::SetRotation( const float degree )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetScissor( bool scissor )
 UiWidget::SetScissor( bool scissor )
 {
 {
@@ -707,7 +647,6 @@ UiWidget::SetScissor( bool scissor )
 }
 }
 
 
 
 
-
 int
 int
 UiWidget::GetScissorTop() const
 UiWidget::GetScissorTop() const
 {
 {
@@ -715,7 +654,6 @@ UiWidget::GetScissorTop() const
 }
 }
 
 
 
 
-
 int
 int
 UiWidget::GetScissorBottom() const
 UiWidget::GetScissorBottom() const
 {
 {
@@ -723,7 +661,6 @@ UiWidget::GetScissorBottom() const
 }
 }
 
 
 
 
-
 int
 int
 UiWidget::GetScissorLeft() const
 UiWidget::GetScissorLeft() const
 {
 {
@@ -731,7 +668,6 @@ UiWidget::GetScissorLeft() const
 }
 }
 
 
 
 
-
 int
 int
 UiWidget::GetScissorRight() const
 UiWidget::GetScissorRight() const
 {
 {
@@ -739,7 +675,6 @@ UiWidget::GetScissorRight() const
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetColour( const float r, const float g, const float b )
 UiWidget::SetColour( const float r, const float g, const float b )
 {
 {
@@ -751,7 +686,6 @@ UiWidget::SetColour( const float r, const float g, const float b )
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetColours( const float r1, const float g1, const float b1, const float r2, const float g2, const float b2, const float r3, const float g3, const float b3, const float r4, const float g4, const float b4 )
 UiWidget::SetColours( const float r1, const float g1, const float b1, const float r2, const float g2, const float b2, const float r3, const float g3, const float b3, const float r4, const float g4, const float b4 )
 {
 {
@@ -763,7 +697,6 @@ UiWidget::SetColours( const float r1, const float g1, const float b1, const floa
 }
 }
 
 
 
 
-
 void
 void
 UiWidget::SetAlpha( const float a )
 UiWidget::SetAlpha( const float a )
 {
 {

+ 2 - 6
QGearsMain/src/core/Utilites.cpp

@@ -1,7 +1,6 @@
-#include "core/Utilites.h"
-
 #include <OgreStringConverter.h>
 #include <OgreStringConverter.h>
 
 
+#include "core/Utilites.h"
 
 
 
 
 const Ogre::String
 const Ogre::String
@@ -12,13 +11,13 @@ CreateAutoName(const Ogre::String prefix)
 }
 }
 
 
 
 
-
 struct KeyName
 struct KeyName
 {
 {
     Ogre::String name;
     Ogre::String name;
     OIS::KeyCode key;
     OIS::KeyCode key;
 };
 };
 
 
+
 KeyName key_names[] =
 KeyName key_names[] =
 {
 {
     { "Enter", OIS::KC_RETURN },
     { "Enter", OIS::KC_RETURN },
@@ -109,7 +108,6 @@ KeyName key_names[] =
 };
 };
 
 
 
 
-
 Ogre::String
 Ogre::String
 KeyToString( OIS::KeyCode key )
 KeyToString( OIS::KeyCode key )
 {
 {
@@ -126,7 +124,6 @@ KeyToString( OIS::KeyCode key )
 }
 }
 
 
 
 
-
 OIS::KeyCode
 OIS::KeyCode
 StringToKey( const Ogre::String& str )
 StringToKey( const Ogre::String& str )
 {
 {
@@ -148,7 +145,6 @@ StringToKey( const Ogre::String& str )
 }
 }
 
 
 
 
-
 Ogre::StringVector
 Ogre::StringVector
 StringTokenise( const Ogre::String& str, const Ogre::String& delimiters, const Ogre::String& delimiters_preserve, const Ogre::String& quote, const Ogre::String& esc )
 StringTokenise( const Ogre::String& str, const Ogre::String& delimiters, const Ogre::String& delimiters_preserve, const Ogre::String& quote, const Ogre::String& esc )
 {
 {

+ 2 - 17
QGearsMain/src/core/Walkmesh.cpp

@@ -1,8 +1,7 @@
-#include "core/Walkmesh.h"
-
 #include "core/ConfigVar.h"
 #include "core/ConfigVar.h"
 #include "core/DebugDraw.h"
 #include "core/DebugDraw.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
+#include "core/Walkmesh.h"
 #include "map/QGearsWalkmeshFile.h"
 #include "map/QGearsWalkmeshFile.h"
 
 
 
 
@@ -10,19 +9,16 @@ ConfigVar cv_debug_walkmesh( "debug_walkmesh", "Draw walkmesh and walkmesh debug
 
 
 
 
 
 
-
 Walkmesh::Walkmesh()
 Walkmesh::Walkmesh()
 {
 {
 }
 }
 
 
 
 
-
 Walkmesh::~Walkmesh()
 Walkmesh::~Walkmesh()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 Walkmesh::UpdateDebug()
 Walkmesh::UpdateDebug()
 {
 {
@@ -84,7 +80,6 @@ Walkmesh::UpdateDebug()
 }
 }
 
 
 
 
-
 void
 void
 Walkmesh::Clear()
 Walkmesh::Clear()
 {
 {
@@ -92,7 +87,6 @@ Walkmesh::Clear()
 }
 }
 
 
 
 
-
 void
 void
 Walkmesh::AddTriangle( const WalkmeshTriangle& triangle )
 Walkmesh::AddTriangle( const WalkmeshTriangle& triangle )
 {
 {
@@ -100,7 +94,6 @@ Walkmesh::AddTriangle( const WalkmeshTriangle& triangle )
 }
 }
 
 
 
 
-
 int
 int
 Walkmesh::GetAccessSide( unsigned int triangle_id, unsigned char side ) const
 Walkmesh::GetAccessSide( unsigned int triangle_id, unsigned char side ) const
 {
 {
@@ -120,7 +113,6 @@ Walkmesh::GetAccessSide( unsigned int triangle_id, unsigned char side ) const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Walkmesh::GetA( unsigned int triangle_id ) const
 Walkmesh::GetA( unsigned int triangle_id ) const
 {
 {
@@ -134,7 +126,6 @@ Walkmesh::GetA( unsigned int triangle_id ) const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Walkmesh::GetB( unsigned int triangle_id ) const
 Walkmesh::GetB( unsigned int triangle_id ) const
 {
 {
@@ -148,7 +139,6 @@ Walkmesh::GetB( unsigned int triangle_id ) const
 }
 }
 
 
 
 
-
 const Ogre::Vector3&
 const Ogre::Vector3&
 Walkmesh::GetC( unsigned int triangle_id ) const
 Walkmesh::GetC( unsigned int triangle_id ) const
 {
 {
@@ -162,7 +152,6 @@ Walkmesh::GetC( unsigned int triangle_id ) const
 }
 }
 
 
 
 
-
 int
 int
 Walkmesh::GetNumberOfTriangles() const
 Walkmesh::GetNumberOfTriangles() const
 {
 {
@@ -170,7 +159,6 @@ Walkmesh::GetNumberOfTriangles() const
 }
 }
 
 
 
 
-
 void
 void
 Walkmesh::LockWalkmesh( unsigned int triangle_id, bool lock )
 Walkmesh::LockWalkmesh( unsigned int triangle_id, bool lock )
 {
 {
@@ -184,7 +172,6 @@ Walkmesh::LockWalkmesh( unsigned int triangle_id, bool lock )
 }
 }
 
 
 
 
-
 bool
 bool
 Walkmesh::IsLocked( unsigned int triangle_id ) const
 Walkmesh::IsLocked( unsigned int triangle_id ) const
 {
 {
@@ -197,7 +184,7 @@ Walkmesh::IsLocked( unsigned int triangle_id ) const
     return m_Triangles[ triangle_id ].locked;
     return m_Triangles[ triangle_id ].locked;
 }
 }
 
 
-//------------------------------------------------------------------------------
+
 void Walkmesh::load(const QGears::WalkmeshFilePtr &walkmesh)
 void Walkmesh::load(const QGears::WalkmeshFilePtr &walkmesh)
 {
 {
     QGears::WalkmeshFile::TriangleList &triangles( walkmesh->getTriangles() );
     QGears::WalkmeshFile::TriangleList &triangles( walkmesh->getTriangles() );
@@ -209,5 +196,3 @@ void Walkmesh::load(const QGears::WalkmeshFilePtr &walkmesh)
         ++it;
         ++it;
     }
     }
 }
 }
-
-//------------------------------------------------------------------------------

+ 1 - 6
QGearsMain/src/core/XmlBackground2DFile.cpp

@@ -1,12 +1,9 @@
-#include "core/XmlBackground2DFile.h"
-
 #include "core/Background2D.h"
 #include "core/Background2D.h"
 #include "core/Background2DAnimation.h"
 #include "core/Background2DAnimation.h"
 #include "core/CameraManager.h"
 #include "core/CameraManager.h"
 #include "core/EntityManager.h"
 #include "core/EntityManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
-
-
+#include "core/XmlBackground2DFile.h"
 
 
 
 
 XmlBackground2DFile::XmlBackground2DFile( const Ogre::String& file ):
 XmlBackground2DFile::XmlBackground2DFile( const Ogre::String& file ):
@@ -15,13 +12,11 @@ XmlBackground2DFile::XmlBackground2DFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlBackground2DFile::~XmlBackground2DFile()
 XmlBackground2DFile::~XmlBackground2DFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlBackground2DFile::Load()
 XmlBackground2DFile::Load()
 {
 {

+ 1 - 15
QGearsMain/src/core/XmlFile.cpp

@@ -1,9 +1,7 @@
-#include "core/XmlFile.h"
-
 #include <OgreStringConverter.h>
 #include <OgreStringConverter.h>
 
 
 #include "core/Logger.h"
 #include "core/Logger.h"
-
+#include "core/XmlFile.h"
 
 
 
 
 XmlFile::XmlFile( const Ogre::String& file ):
 XmlFile::XmlFile( const Ogre::String& file ):
@@ -19,13 +17,11 @@ XmlFile::XmlFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlFile::~XmlFile()
 XmlFile::~XmlFile()
 {
 {
 }
 }
 
 
 
 
-
 bool
 bool
 XmlFile::GetBool( TiXmlNode* node, const Ogre::String& tag, bool def ) const
 XmlFile::GetBool( TiXmlNode* node, const Ogre::String& tag, bool def ) const
 {
 {
@@ -44,7 +40,6 @@ XmlFile::GetBool( TiXmlNode* node, const Ogre::String& tag, bool def ) const
 }
 }
 
 
 
 
-
 int
 int
 XmlFile::GetInt( TiXmlNode* node, const Ogre::String& tag, int def ) const
 XmlFile::GetInt( TiXmlNode* node, const Ogre::String& tag, int def ) const
 {
 {
@@ -63,7 +58,6 @@ XmlFile::GetInt( TiXmlNode* node, const Ogre::String& tag, int def ) const
 }
 }
 
 
 
 
-
 float
 float
 XmlFile::GetFloat( TiXmlNode* node, const Ogre::String& tag, float def ) const
 XmlFile::GetFloat( TiXmlNode* node, const Ogre::String& tag, float def ) const
 {
 {
@@ -82,7 +76,6 @@ XmlFile::GetFloat( TiXmlNode* node, const Ogre::String& tag, float def ) const
 }
 }
 
 
 
 
-
 const Ogre::String
 const Ogre::String
 XmlFile::GetString( TiXmlNode* node, const Ogre::String& tag, const Ogre::String& def ) const
 XmlFile::GetString( TiXmlNode* node, const Ogre::String& tag, const Ogre::String& def ) const
 {
 {
@@ -101,7 +94,6 @@ XmlFile::GetString( TiXmlNode* node, const Ogre::String& tag, const Ogre::String
 }
 }
 
 
 
 
-
 const Ogre::UTFString
 const Ogre::UTFString
 XmlFile::GetUTFString( TiXmlNode* node, const Ogre::String& tag, const Ogre::UTFString& def ) const
 XmlFile::GetUTFString( TiXmlNode* node, const Ogre::String& tag, const Ogre::UTFString& def ) const
 {
 {
@@ -120,7 +112,6 @@ XmlFile::GetUTFString( TiXmlNode* node, const Ogre::String& tag, const Ogre::UTF
 }
 }
 
 
 
 
-
 const Ogre::Vector2
 const Ogre::Vector2
 XmlFile::GetVector2( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector2& def ) const
 XmlFile::GetVector2( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector2& def ) const
 {
 {
@@ -139,7 +130,6 @@ XmlFile::GetVector2( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vecto
 }
 }
 
 
 
 
-
 const Ogre::Vector3
 const Ogre::Vector3
 XmlFile::GetVector3( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector3& def ) const
 XmlFile::GetVector3( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector3& def ) const
 {
 {
@@ -158,7 +148,6 @@ XmlFile::GetVector3( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vecto
 }
 }
 
 
 
 
-
 const Ogre::Vector4
 const Ogre::Vector4
 XmlFile::GetVector4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector4& def ) const
 XmlFile::GetVector4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vector4& def ) const
 {
 {
@@ -177,7 +166,6 @@ XmlFile::GetVector4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Vecto
 }
 }
 
 
 
 
-
 const Ogre::Matrix4
 const Ogre::Matrix4
 XmlFile::GetMatrix4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Matrix4& def ) const
 XmlFile::GetMatrix4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Matrix4& def ) const
 {
 {
@@ -196,7 +184,6 @@ XmlFile::GetMatrix4( TiXmlNode* node, const Ogre::String& tag, const Ogre::Matri
 }
 }
 
 
 
 
-
 const Ogre::Quaternion
 const Ogre::Quaternion
 XmlFile::GetQuaternion( TiXmlNode* node, const Ogre::String& tag, const Ogre::Quaternion& def ) const
 XmlFile::GetQuaternion( TiXmlNode* node, const Ogre::String& tag, const Ogre::Quaternion& def ) const
 {
 {
@@ -215,7 +202,6 @@ XmlFile::GetQuaternion( TiXmlNode* node, const Ogre::String& tag, const Ogre::Qu
 }
 }
 
 
 
 
-
 const Ogre::ColourValue
 const Ogre::ColourValue
 XmlFile::GetColourValue( TiXmlNode* node, const Ogre::String& tag, const Ogre::ColourValue& def ) const
 XmlFile::GetColourValue( TiXmlNode* node, const Ogre::String& tag, const Ogre::ColourValue& def ) const
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlFontFile.cpp

@@ -1,9 +1,7 @@
-#include "core/XmlFontFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/UiManager.h"
 #include "core/UiManager.h"
 #include "core/UiFont.h"
 #include "core/UiFont.h"
-
+#include "core/XmlFontFile.h"
 
 
 
 
 XmlFontFile::XmlFontFile( const Ogre::String& file ):
 XmlFontFile::XmlFontFile( const Ogre::String& file ):
@@ -12,13 +10,11 @@ XmlFontFile::XmlFontFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlFontFile::~XmlFontFile()
 XmlFontFile::~XmlFontFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlFontFile::LoadFont()
 XmlFontFile::LoadFont()
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlFontsFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlFontsFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/XmlFontFile.h"
 #include "core/XmlFontFile.h"
-
+#include "core/XmlFontsFile.h"
 
 
 
 
 XmlFontsFile::XmlFontsFile( const Ogre::String& file ):
 XmlFontsFile::XmlFontsFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlFontsFile::XmlFontsFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlFontsFile::~XmlFontsFile()
 XmlFontsFile::~XmlFontsFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlFontsFile::LoadFonts()
 XmlFontsFile::LoadFonts()
 {
 {

+ 1 - 4
QGearsMain/src/core/XmlMapFile.cpp

@@ -1,9 +1,8 @@
-#include "core/XmlMapFile.h"
-
 #include "core/EntityManager.h"
 #include "core/EntityManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
 #include "core/XmlBackground2DFile.h"
 #include "core/XmlBackground2DFile.h"
+#include "core/XmlMapFile.h"
 
 
 #include "map/QGearsBackground2DFileManager.h"
 #include "map/QGearsBackground2DFileManager.h"
 #include "map/QGearsWalkmeshFileManager.h"
 #include "map/QGearsWalkmeshFileManager.h"
@@ -15,13 +14,11 @@ XmlMapFile::XmlMapFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlMapFile::~XmlMapFile()
 XmlMapFile::~XmlMapFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlMapFile::LoadMap()
 XmlMapFile::LoadMap()
 {
 {

+ 1 - 6
QGearsMain/src/core/XmlMapsFile.cpp

@@ -1,7 +1,5 @@
-#include "core/XmlMapsFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
-
+#include "core/XmlMapsFile.h"
 
 
 
 
 XmlMapsFile::XmlMapsFile( const Ogre::String& file ):
 XmlMapsFile::XmlMapsFile( const Ogre::String& file ):
@@ -10,13 +8,11 @@ XmlMapsFile::XmlMapsFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlMapsFile::~XmlMapsFile()
 XmlMapsFile::~XmlMapsFile()
 {
 {
 }
 }
 
 
 
 
-
 const Ogre::String
 const Ogre::String
 XmlMapsFile::GetMapFileNameByName( const Ogre::String& name )
 XmlMapsFile::GetMapFileNameByName( const Ogre::String& name )
 {
 {
@@ -46,7 +42,6 @@ XmlMapsFile::GetMapFileNameByName( const Ogre::String& name )
 }
 }
 
 
 
 
-
 void
 void
 XmlMapsFile::GetMapNames( Ogre::StringVector& complete_params )
 XmlMapsFile::GetMapNames( Ogre::StringVector& complete_params )
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlMusicsFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlMusicsFile.h"
-
 #include "core/AudioManager.h"
 #include "core/AudioManager.h"
 #include "core/Logger.h"
 #include "core/Logger.h"
-
+#include "core/XmlMusicsFile.h"
 
 
 
 
 XmlMusicsFile::XmlMusicsFile( const Ogre::String& file ):
 XmlMusicsFile::XmlMusicsFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlMusicsFile::XmlMusicsFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlMusicsFile::~XmlMusicsFile()
 XmlMusicsFile::~XmlMusicsFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlMusicsFile::LoadMusics()
 XmlMusicsFile::LoadMusics()
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlPrototypesFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlPrototypesFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/UiManager.h"
 #include "core/UiManager.h"
-
+#include "core/XmlPrototypesFile.h"
 
 
 
 
 XmlPrototypesFile::XmlPrototypesFile( const Ogre::String& file ):
 XmlPrototypesFile::XmlPrototypesFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlPrototypesFile::XmlPrototypesFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlPrototypesFile::~XmlPrototypesFile()
 XmlPrototypesFile::~XmlPrototypesFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlPrototypesFile::LoadPrototypes()
 XmlPrototypesFile::LoadPrototypes()
 {
 {

+ 1 - 56
QGearsMain/src/core/XmlScreenFile.cpp

@@ -1,12 +1,10 @@
-#include "core/XmlScreenFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
 #include "core/UiManager.h"
 #include "core/UiManager.h"
 #include "core/UiSprite.h"
 #include "core/UiSprite.h"
 #include "core/UiTextArea.h"
 #include "core/UiTextArea.h"
 #include "core/UiWidget.h"
 #include "core/UiWidget.h"
-
+#include "core/XmlScreenFile.h"
 
 
 
 
 XmlScreenFile::XmlScreenFile( const Ogre::String& file ):
 XmlScreenFile::XmlScreenFile( const Ogre::String& file ):
@@ -15,13 +13,11 @@ XmlScreenFile::XmlScreenFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlScreenFile::~XmlScreenFile()
 XmlScreenFile::~XmlScreenFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlScreenFile::LoadScreen()
 XmlScreenFile::LoadScreen()
 {
 {
@@ -53,7 +49,6 @@ XmlScreenFile::LoadScreen()
 }
 }
 
 
 
 
-
 void
 void
 XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_name, UiWidget* widget )
 XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_name, UiWidget* widget )
 {
 {
@@ -119,8 +114,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         }
                         }
                     }
                     }
 
 
-
-
                     if( node->ValueStr() == "text_area" )
                     if( node->ValueStr() == "text_area" )
                     {
                     {
                         Ogre::String text = GetString( node, "text_name", "" );
                         Ogre::String text = GetString( node, "text_name", "" );
@@ -143,8 +136,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         }
                         }
                     }
                     }
 
 
-
-
                     Ogre::String colours = GetString( node, "colours", "" );
                     Ogre::String colours = GetString( node, "colours", "" );
                     if( colours != "" )
                     if( colours != "" )
                     {
                     {
@@ -163,30 +154,21 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetColour( colour.x, colour.y, colour.z );
                         widget2->SetColour( colour.x, colour.y, colour.z );
                     }
                     }
 
 
-
-
                     float alpha = GetFloat( node, "alpha", 1 );
                     float alpha = GetFloat( node, "alpha", 1 );
                     widget2->SetAlpha( alpha );
                     widget2->SetAlpha( alpha );
 
 
-
-
-
                     Ogre::String align = GetString( node, "align" );
                     Ogre::String align = GetString( node, "align" );
                     if( align != "" )
                     if( align != "" )
                     {
                     {
                         widget2->SetAlign( ( align == "center" ) ? UiWidget::CENTER : ( ( align == "right" ) ? UiWidget::RIGHT : UiWidget::LEFT ) );
                         widget2->SetAlign( ( align == "center" ) ? UiWidget::CENTER : ( ( align == "right" ) ? UiWidget::RIGHT : UiWidget::LEFT ) );
                     }
                     }
 
 
-
-
                     Ogre::String valign = GetString( node, "valign" );
                     Ogre::String valign = GetString( node, "valign" );
                     if( valign != "" )
                     if( valign != "" )
                     {
                     {
                         widget2->SetVerticalAlign( ( valign == "middle" ) ? UiWidget::MIDDLE : ( ( valign == "bottom" ) ? UiWidget::BOTTOM : UiWidget::TOP ) );
                         widget2->SetVerticalAlign( ( valign == "middle" ) ? UiWidget::MIDDLE : ( ( valign == "bottom" ) ? UiWidget::BOTTOM : UiWidget::TOP ) );
                     }
                     }
 
 
-
-
                     Ogre::String origin_x_str = GetString( node, "origin_x" );
                     Ogre::String origin_x_str = GetString( node, "origin_x" );
                     if( origin_x_str != "" )
                     if( origin_x_str != "" )
                     {
                     {
@@ -196,8 +178,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetOriginX( x_percent, x );
                         widget2->SetOriginX( x_percent, x );
                     }
                     }
 
 
-
-
                     Ogre::String origin_y_str = GetString( node, "origin_y" );
                     Ogre::String origin_y_str = GetString( node, "origin_y" );
                     if( origin_y_str != "" )
                     if( origin_y_str != "" )
                     {
                     {
@@ -207,8 +187,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetOriginY( y_percent, y );
                         widget2->SetOriginY( y_percent, y );
                     }
                     }
 
 
-
-
                     Ogre::String x_str = GetString( node, "x" );
                     Ogre::String x_str = GetString( node, "x" );
                     if( x_str != "" )
                     if( x_str != "" )
                     {
                     {
@@ -218,8 +196,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetX( x_percent, x );
                         widget2->SetX( x_percent, x );
                     }
                     }
 
 
-
-
                     Ogre::String y_str = GetString( node, "y" );
                     Ogre::String y_str = GetString( node, "y" );
                     if( y_str != "" )
                     if( y_str != "" )
                     {
                     {
@@ -229,8 +205,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetY( y_percent, y );
                         widget2->SetY( y_percent, y );
                     }
                     }
 
 
-
-
                     Ogre::String width_str = GetString( node, "width" );
                     Ogre::String width_str = GetString( node, "width" );
                     if( width_str != "" )
                     if( width_str != "" )
                     {
                     {
@@ -240,8 +214,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetWidth( width_percent, width );
                         widget2->SetWidth( width_percent, width );
                     }
                     }
 
 
-
-
                     Ogre::String height_str  = GetString( node, "height" );
                     Ogre::String height_str  = GetString( node, "height" );
                     if( height_str != "" )
                     if( height_str != "" )
                     {
                     {
@@ -251,25 +223,12 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         widget2->SetHeight( height_percent, height );
                         widget2->SetHeight( height_percent, height );
                     }
                     }
 
 
-
-
                     Ogre::Vector2 scale = GetVector2( node, "scale", Ogre::Vector2( 1.0f, 1.0f ) );
                     Ogre::Vector2 scale = GetVector2( node, "scale", Ogre::Vector2( 1.0f, 1.0f ) );
                     widget2->SetScale( scale );
                     widget2->SetScale( scale );
-
-
-
                     widget2->SetRotation( GetFloat( node, "rotation", 0.0f ) );
                     widget2->SetRotation( GetFloat( node, "rotation", 0.0f ) );
-
-
-
                     widget2->SetScissor( GetBool( node, "scissor", false ) );
                     widget2->SetScissor( GetBool( node, "scissor", false ) );
-
-
-
                     widget2->SetVisible( GetBool( node, "visible", false ) );
                     widget2->SetVisible( GetBool( node, "visible", false ) );
 
 
-
-
                     if( node->ValueStr() == "sprite" )
                     if( node->ValueStr() == "sprite" )
                     {
                     {
                         ( ( UiSprite* )widget2 )->UpdateGeometry();
                         ( ( UiSprite* )widget2 )->UpdateGeometry();
@@ -279,8 +238,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         ( ( UiTextArea* )widget2 )->UpdateGeometry();
                         ( ( UiTextArea* )widget2 )->UpdateGeometry();
                     }
                     }
 
 
-
-
                     widget->AddChild( widget2 );
                     widget->AddChild( widget2 );
 
 
                     TiXmlNode* node2 = node->FirstChild();
                     TiXmlNode* node2 = node->FirstChild();
@@ -324,8 +281,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                     }
                     }
                 }
                 }
 
 
-
-
                 Ogre::String x = GetString( node, "x", "" );
                 Ogre::String x = GetString( node, "x", "" );
                 if( x != "" )
                 if( x != "" )
                 {
                 {
@@ -345,8 +300,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                     }
                     }
                 }
                 }
 
 
-
-
                 Ogre::String y = GetString( node, "y", "" );
                 Ogre::String y = GetString( node, "y", "" );
                 if( y != "" )
                 if( y != "" )
                 {
                 {
@@ -366,8 +319,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                     }
                     }
                 }
                 }
 
 
-
-
                 Ogre::String rotation = GetString( node, "rotation", "" );
                 Ogre::String rotation = GetString( node, "rotation", "" );
                 if( rotation != "" )
                 if( rotation != "" )
                 {
                 {
@@ -387,8 +338,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                     }
                     }
                 }
                 }
 
 
-
-
                 Ogre::String alpha = GetString( node, "alpha", "" );
                 Ogre::String alpha = GetString( node, "alpha", "" );
                 if( alpha != "" )
                 if( alpha != "" )
                 {
                 {
@@ -407,9 +356,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
                         }
                         }
                     }
                     }
                 }
                 }
-
-
-
                 widget->AddAnimation( animation );
                 widget->AddAnimation( animation );
             }
             }
         }
         }
@@ -418,7 +364,6 @@ XmlScreenFile::LoadScreenRecursive( TiXmlNode* node, const Ogre::String& base_na
 }
 }
 
 
 
 
-
 void
 void
 XmlScreenFile::ParsePersent( float& value_percent, float& value, const Ogre::String& string )
 XmlScreenFile::ParsePersent( float& value_percent, float& value, const Ogre::String& string )
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlScreensFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlScreensFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/XmlScreenFile.h"
 #include "core/XmlScreenFile.h"
-
+#include "core/XmlScreensFile.h"
 
 
 
 
 XmlScreensFile::XmlScreensFile( const Ogre::String& file ):
 XmlScreensFile::XmlScreensFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlScreensFile::XmlScreensFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlScreensFile::~XmlScreensFile()
 XmlScreensFile::~XmlScreensFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlScreensFile::LoadScreens()
 XmlScreensFile::LoadScreens()
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlScriptsFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlScriptsFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/ScriptManager.h"
 #include "core/ScriptManager.h"
-
+#include "core/XmlScriptsFile.h"
 
 
 
 
 XmlScriptsFile::XmlScriptsFile( const Ogre::String& file ):
 XmlScriptsFile::XmlScriptsFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlScriptsFile::XmlScriptsFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlScriptsFile::~XmlScriptsFile()
 XmlScriptsFile::~XmlScriptsFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlScriptsFile::LoadScripts()
 XmlScriptsFile::LoadScripts()
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlTextFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlTextFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/UiManager.h"
 #include "core/UiManager.h"
-
+#include "core/XmlTextFile.h"
 
 
 
 
 XmlTextFile::XmlTextFile( const Ogre::String& file ):
 XmlTextFile::XmlTextFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlTextFile::XmlTextFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlTextFile::~XmlTextFile()
 XmlTextFile::~XmlTextFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlTextFile::LoadText()
 XmlTextFile::LoadText()
 {
 {

+ 1 - 5
QGearsMain/src/core/XmlTextsFile.cpp

@@ -1,8 +1,6 @@
-#include "core/XmlTextsFile.h"
-
 #include "core/Logger.h"
 #include "core/Logger.h"
 #include "core/XmlTextFile.h"
 #include "core/XmlTextFile.h"
-
+#include "core/XmlTextsFile.h"
 
 
 
 
 XmlTextsFile::XmlTextsFile( const Ogre::String& file ):
 XmlTextsFile::XmlTextsFile( const Ogre::String& file ):
@@ -11,13 +9,11 @@ XmlTextsFile::XmlTextsFile( const Ogre::String& file ):
 }
 }
 
 
 
 
-
 XmlTextsFile::~XmlTextsFile()
 XmlTextsFile::~XmlTextsFile()
 {
 {
 }
 }
 
 
 
 
-
 void
 void
 XmlTextsFile::LoadTexts( const Ogre::String& language )
 XmlTextsFile::LoadTexts( const Ogre::String& language )
 {
 {