ISOFile.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Copyright 2008 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <string>
  6. #include <utility>
  7. #include <vector>
  8. #include "Common/Common.h"
  9. #include "DiscIO/Volume.h"
  10. #if defined(HAVE_WX) && HAVE_WX
  11. #include <wx/image.h>
  12. #include <wx/bitmap.h>
  13. #endif
  14. class PointerWrap;
  15. class GameListItem : NonCopyable
  16. {
  17. public:
  18. GameListItem(const std::string& _rFileName);
  19. ~GameListItem();
  20. bool IsValid() const {return m_Valid;}
  21. const std::string& GetFileName() const {return m_FileName;}
  22. std::string GetName(DiscIO::IVolume::ELanguage language) const;
  23. std::string GetName() const;
  24. std::string GetDescription(DiscIO::IVolume::ELanguage language) const;
  25. std::string GetDescription() const;
  26. std::vector<DiscIO::IVolume::ELanguage> GetLanguages() const;
  27. std::string GetCompany() const;
  28. u16 GetRevision() const { return m_Revision; }
  29. const std::string& GetUniqueID() const {return m_UniqueID;}
  30. const std::string GetWiiFSPath() const;
  31. DiscIO::IVolume::ECountry GetCountry() const {return m_Country;}
  32. DiscIO::IVolume::EPlatform GetPlatform() const { return m_Platform; }
  33. const std::string& GetIssues() const { return m_issues; }
  34. int GetEmuState() const { return m_emu_state; }
  35. bool IsCompressed() const {return m_BlobCompressed;}
  36. u64 GetFileSize() const {return m_FileSize;}
  37. u64 GetVolumeSize() const {return m_VolumeSize;}
  38. // 0 is the first disc, 1 is the second disc
  39. u8 GetDiscNumber() const {return m_disc_number;}
  40. #if defined(HAVE_WX) && HAVE_WX
  41. const wxBitmap& GetBitmap() const {return m_Bitmap;}
  42. #endif
  43. void DoState(PointerWrap &p);
  44. private:
  45. std::string m_FileName;
  46. std::map<DiscIO::IVolume::ELanguage, std::string> m_names;
  47. std::map<DiscIO::IVolume::ELanguage, std::string> m_descriptions;
  48. std::string m_company;
  49. std::string m_UniqueID;
  50. std::string m_issues;
  51. int m_emu_state;
  52. u64 m_FileSize;
  53. u64 m_VolumeSize;
  54. DiscIO::IVolume::ECountry m_Country;
  55. DiscIO::IVolume::EPlatform m_Platform;
  56. u16 m_Revision;
  57. #if defined(HAVE_WX) && HAVE_WX
  58. wxBitmap m_Bitmap;
  59. #endif
  60. bool m_Valid;
  61. bool m_BlobCompressed;
  62. std::vector<u8> m_pImage;
  63. int m_ImageWidth, m_ImageHeight;
  64. u8 m_disc_number;
  65. bool LoadFromCache();
  66. void SaveToCache();
  67. std::string CreateCacheFilename();
  68. };