#ifndef RES_H #define RES_H #include #include #define RESOURCE_PACK(pack) namespace Resource {\ void getResourcePack_ ## pack(ResourceMap &resourceFilesData);\ } /** * To load an attached resource pack file, you must declare the pack with : * RESOURCE_PACK(pack_name) * it will allow you to use the function : * getResourcePack_pack_name(ResourceMap &map) * This function will give access the the embedded data through its original file name, * using the provided map. * * example : * RESOURCE_PACK(shaders) // declaring the resource pack function * Resource::ResourceMap myShaders; // defining a resource map * Resource::getResourcePack(myShaders); // putting the resources of the resource pack in the map * string *shader = new string(myShaders["shaders/shaderFile.glsl"]); // getting a resource file */ namespace Resource { typedef std::unordered_map ResourceMap; } #endif // RES_H