]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Resource.hh
bugfix: resource file searching was broken
[chaz/yoink] / src / Moof / Resource.hh
index 8446d0896b715cd626a2444e97172903a6c00fa6..db6fe138e37f748d1d6747f667f8b93876c871dd 100644 (file)
@@ -17,6 +17,7 @@
  * Interface for textures, sounds, and other types of resources.
  */
 
+#include <cstdio>
 #include <string>
 #include <vector>
 
@@ -40,8 +41,8 @@ public:
         * @param directory Path to a directory.
         */
 
-       static void addSearchPaths(const std::string& path);
-       static void addSearchPaths(const std::vector<std::string>& path);
+       static void addSearchPaths(const std::string& paths);
+       static void addSearchPaths(const std::vector<std::string>& 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:
 
This page took 0.0195 seconds and 4 git commands to generate.