#ifndef OLC_PGE_RESOURCE_PACK #define OLC_PGE_RESOURCE_PACK #include #include #include #include #include #include #include #include "olcPGE_Common.h" namespace olc { class ResourcePack { public: ResourcePack(); ~ResourcePack(); struct sEntry : public std::streambuf { uint32_t nID, nFileOffset, nFileSize; uint8_t* data; void _config() { this->setg((char*)data, (char*)data, (char*)(data + nFileSize)); } }; public: olc::rcode AddToPack(std::string sFile); olc::rcode RemoveFromPack(std::string sFile); public: olc::rcode SavePack(std::string sFile); olc::rcode LoadPack(std::string sFile); olc::rcode ClearPack(); public: olc::ResourcePack::sEntry GetStreamBuffer(std::string sFile); std::vector GetEntries(); private: std::map mapFiles; }; } #endif