X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FResource.hh;h=db6fe138e37f748d1d6747f667f8b93876c871dd;hp=8446d0896b715cd626a2444e97172903a6c00fa6;hb=90b2c7fb10b244b781b84965a0d36f1f323ee94d;hpb=8148b51f1bec8f662672d3ca36eea1784991e5cc diff --git a/src/Moof/Resource.hh b/src/Moof/Resource.hh index 8446d08..db6fe13 100644 --- a/src/Moof/Resource.hh +++ b/src/Moof/Resource.hh @@ -17,6 +17,7 @@ * Interface for textures, sounds, and other types of resources. */ +#include #include #include @@ -40,8 +41,8 @@ public: * @param directory Path to a directory. */ - static void addSearchPaths(const std::string& path); - static void addSearchPaths(const std::vector& path); + static void addSearchPaths(const std::string& paths); + static void addSearchPaths(const std::vector& pathList); /** * Get the path to a resource of a given name. @@ -50,7 +51,18 @@ public: * @return The first path found which resolves to a file. */ - static std::string getPath(const std::string& name); + static std::string getPath(const std::string& path, + const std::string& prefix = "", + const std::string& extension = ""); + + static bool getPath(std::string& path, + const std::string& prefix = "", + const std::string& extension = ""); + + static FILE* openFile(std::string& path, + std::string prefix = "", + const std::string& extension = "", + const std::string& mode = "rb"); private: