EnemyFile.h 911 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef ENEMY_FILE_H
  2. #define ENEMY_FILE_H
  3. #include "MeshExtractor.h"
  4. #include "common/LzsFile.h"
  5. #include "../../common/Vram.h"
  6. #include "../../common/OgreGenUtilites.h"
  7. struct EnemyInfo
  8. {
  9. MeshData data;
  10. Ogre::String file_name;
  11. std::vector<Ogre::String> animations;
  12. };
  13. struct Bone
  14. {
  15. int length;
  16. int parent_id;
  17. int offset;
  18. float tx, ty, tz;
  19. float rx, ry, rz;
  20. };
  21. typedef std::vector<Bone> Skeleton;
  22. class EnemyFile : public LzsFile
  23. {
  24. public:
  25. EnemyFile(const Ogre::String& file);
  26. EnemyFile(File* pFile);
  27. EnemyFile(File* pFile, u32 offset, u32 length);
  28. EnemyFile(u8* pBuffer, u32 offset, u32 length);
  29. virtual ~EnemyFile();
  30. Ogre::Entity* GetModel(const EnemyInfo& info);
  31. void DumpSettings(const Ogre::String& file);
  32. private:
  33. Skeleton m_Skeleton;
  34. bool m_WithWeapon;
  35. };
  36. #endif // BSX_FILE_h