QGearsFLevelBackground2DLoader.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. -----------------------------------------------------------------------------
  3. The MIT License (MIT)
  4. Copyright (c) 2013-08-29 Tobias Peters <tobias.peters@kreativeffekt.at>
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in
  12. all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. -----------------------------------------------------------------------------
  21. */
  22. #ifndef __QGearsFLevelBackground2DLoader_H__
  23. #define __QGearsFLevelBackground2DLoader_H__
  24. #include <OgreResource.h>
  25. #include "data/QGearsBackgroundFile.h"
  26. #include "map/QGearsBackground2DFile.h"
  27. namespace QGears
  28. {
  29. class FLevelFile;
  30. class FLevelBackground2DLoader : public Ogre::ManualResourceLoader
  31. {
  32. public:
  33. explicit FLevelBackground2DLoader( FLevelFile& flevel_file );
  34. virtual ~FLevelBackground2DLoader();
  35. virtual void loadResource( Ogre::Resource *resource );
  36. protected:
  37. typedef Background2DFile::TileList TileList;
  38. typedef BackgroundFile::Layer Layer;
  39. typedef BackgroundFile::SpriteData SpriteData;
  40. typedef BackgroundFile::SpriteList SpriteList;
  41. private:
  42. FLevelFile &m_flevel_file;
  43. };
  44. }
  45. #endif // __QGearsFLevelBackground2DLoader_H__