FF7ModelListFile.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. -----------------------------------------------------------------------------
  3. Copyright (c) 07.10.2013 Tobias Peters <tobias.peters@kreativeffekt.at>
  4. This file is part of Q-Gears
  5. Q-Gears is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, version 2.0 (GPLv2) of the License.
  8. Q-Gears is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. -----------------------------------------------------------------------------
  13. */
  14. #ifndef __FF7ModelListFile_H__
  15. #define __FF7ModelListFile_H__
  16. #include <OgreColourValue.h>
  17. #include "common/QGearsResource.h"
  18. namespace QGears
  19. {
  20. namespace FF7
  21. {
  22. class ModelListFile : public Resource
  23. {
  24. public:
  25. ModelListFile( Ogre::ResourceManager *creator, const String &name
  26. ,Ogre::ResourceHandle handle, const String &group
  27. ,bool isManual = false, Ogre::ManualResourceLoader *loader = NULL );
  28. virtual ~ModelListFile();
  29. static const String RESOURCE_TYPE;
  30. struct AnimationDescription
  31. {
  32. String name;
  33. uint16 unknown;
  34. };
  35. typedef std::vector<AnimationDescription> AnimationList;
  36. enum ModelType
  37. {
  38. PLAYER = 0
  39. ,NPC = 1
  40. ,UNKNOWN
  41. };
  42. struct ModelDescription
  43. {
  44. String name;
  45. ModelType type;
  46. String hrc_name;
  47. String scale;
  48. Ogre::ColourValue light_colors[10];
  49. AnimationList animations;
  50. };
  51. typedef std::vector<ModelDescription> ModelList;
  52. virtual uint16 getScale( void ) const;
  53. virtual void setScale( uint16 scale );
  54. virtual ModelList& getModels( void );
  55. protected:
  56. virtual void loadImpl( void );
  57. virtual void unloadImpl( void );
  58. virtual size_t calculateSize( void ) const;
  59. private:
  60. uint16 m_scale;
  61. ModelList m_models;
  62. };
  63. typedef Ogre::SharedPtr<ModelListFile> ModelListFilePtr;
  64. }
  65. }
  66. #endif // __FF7ModelListFile_H__