diff options
Diffstat (limited to 'gui/resources.hpp')
-rw-r--r-- | gui/resources.hpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/gui/resources.hpp b/gui/resources.hpp index 2d3067667..de673184c 100644 --- a/gui/resources.hpp +++ b/gui/resources.hpp @@ -25,8 +25,7 @@ #include <vector> #include <map> #include "rapidxml.hpp" - -struct ZipArchive; +#include "../zipwrap.hpp" extern "C" { #include "../minuitwrp/minui.h" @@ -36,7 +35,7 @@ extern "C" { class Resource { public: - Resource(xml_node<>* node, ZipArchive* pZip); + Resource(xml_node<>* node, ZipWrap* pZip); virtual ~Resource() {} public: @@ -46,27 +45,27 @@ private: std::string mName; protected: - static int ExtractResource(ZipArchive* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile); - static void LoadImage(ZipArchive* pZip, std::string file, gr_surface* surface); + static int ExtractResource(ZipWrap* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile); + static void LoadImage(ZipWrap* pZip, std::string file, gr_surface* surface); static void CheckAndScaleImage(gr_surface source, gr_surface* destination, int retain_aspect); }; class FontResource : public Resource { public: - FontResource(xml_node<>* node, ZipArchive* pZip); + FontResource(xml_node<>* node, ZipWrap* pZip); virtual ~FontResource(); public: void* GetResource() { return this ? mFont : NULL; } int GetHeight() { return gr_ttf_getMaxFontHeight(this ? mFont : NULL); } - void Override(xml_node<>* node, ZipArchive* pZip); + void Override(xml_node<>* node, ZipWrap* pZip); protected: void* mFont; private: - void LoadFont(xml_node<>* node, ZipArchive* pZip); + void LoadFont(xml_node<>* node, ZipWrap* pZip); void DeleteFont(); private: @@ -77,7 +76,7 @@ private: class ImageResource : public Resource { public: - ImageResource(xml_node<>* node, ZipArchive* pZip); + ImageResource(xml_node<>* node, ZipWrap* pZip); virtual ~ImageResource(); public: @@ -92,7 +91,7 @@ protected: class AnimationResource : public Resource { public: - AnimationResource(xml_node<>* node, ZipArchive* pZip); + AnimationResource(xml_node<>* node, ZipWrap* pZip); virtual ~AnimationResource(); public: @@ -112,7 +111,7 @@ public: ResourceManager(); virtual ~ResourceManager(); void AddStringResource(std::string resource_source, std::string resource_name, std::string value); - void LoadResources(xml_node<>* resList, ZipArchive* pZip, std::string resource_source); + void LoadResources(xml_node<>* resList, ZipWrap* pZip, std::string resource_source); public: FontResource* FindFont(const std::string& name) const; |