MediaDataInstaller.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #pragma once
  16. #include "data/VGearsLGPArchive.h"
  17. #include "common/BinGZipFile.h"
  18. #include "TexFile.h"
  19. /**
  20. * The media data installer.
  21. */
  22. class MediaDataInstaller{
  23. public:
  24. /**
  25. * Constructor
  26. *
  27. * @param[in] input_dir Path to the directory containing the original data to parse.
  28. * @param[out] input_dir Path to the directory of the installation data.
  29. */
  30. MediaDataInstaller(const std::string input_dir, const std::string output_dir);
  31. /**
  32. * Destructor.
  33. */
  34. ~MediaDataInstaller();
  35. /**
  36. * Extracts all images contained in the menu LGP file and installs them.
  37. *
  38. * For composed textures, it extracts individual images. All images are saved under the
  39. * "images" directory. This also includes font maps.
  40. */
  41. void InstallSprites();
  42. private:
  43. /**
  44. * The path to the directory from which to read the PC game data.
  45. */
  46. std::string input_dir_;
  47. /**
  48. * The path to the directory where to save the V-Gears data.
  49. */
  50. std::string output_dir_;
  51. /**
  52. * The menu.lgp file.
  53. */
  54. VGears::LGPArchive menu_;
  55. /**
  56. * The WINDOW.BIN file.
  57. */
  58. BinGZipFile window_;
  59. };