diff --git a/src/FontManager.cc b/src/FontManager.cc index 817ab05..48fc668 100644 --- a/src/FontManager.cc +++ b/src/FontManager.cc @@ -1,5 +1,4 @@ #include "FontManager.h" -#include "Runtime.h" #include namespace jes @@ -26,6 +25,9 @@ namespace jes FontRef FontManager::load_font(const char * fname, size_t size) { + /* TODO */ + return NULL; +#if 0 PathRef font_path = Runtime::locate(Runtime::FONT, fname); if (font_path == NULL) return NULL; @@ -35,5 +37,6 @@ namespace jes return NULL; return font; +#endif } } diff --git a/src/GUI.cc b/src/GUI.cc index e0b3599..1d8925c 100644 --- a/src/GUI.cc +++ b/src/GUI.cc @@ -1,7 +1,6 @@ #include "GUI.h" #include "gl3w.h" #include -#include "Runtime.h" #define WIDTH 500 #define HEIGHT 500 @@ -80,7 +79,11 @@ namespace jes for (int j = 0; j < 2; j++) { + /* TODO */ + shader_paths[j] = NULL; +#if 0 shader_paths[j] = Runtime::locate(Runtime::SHADER, shader_sources[i][j]); +#endif if (shader_paths[j] == NULL) { std::cerr << "Could not find shader source " << shader_sources[i][j] << std::endl; diff --git a/src/Runtime.cc b/src/Runtime.cc deleted file mode 100644 index 46424ae..0000000 --- a/src/Runtime.cc +++ /dev/null @@ -1,46 +0,0 @@ -#include "Runtime.h" - -namespace jes -{ - static const char * const runtime_directories[Runtime::COUNT] = { - "fonts", - "shaders", - }; - - PathRef Runtime::locate(int type, const std::string & name) - { - PathRef path = Core::instance.get_bin_path()->dirname()->dirname()->join("runtime")->join(runtime_directories[type]); - PathRef rv = NULL; - switch (type) - { - case Runtime::SHADER: - rv = path->join(name); - break; - case Runtime::FONT: - { - static const char * extensions[] = { - "ttf", - }; - std::vector dirents = path->dir_entries(); - for (auto de : dirents) - { - PathRef test_path = path->join(de)->join(name); - if (test_path->exists()) - return test_path; - for (auto ext : extensions) - { - test_path = test_path->ext(ext); - if (test_path->exists()) - return test_path; - } - } - } - break; - } - - if ((rv != NULL) && (rv->exists())) - return rv; - - return NULL; - } -} diff --git a/src/Runtime.h b/src/Runtime.h deleted file mode 100644 index 70a4633..0000000 --- a/src/Runtime.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef JES_RUNTIME_H -#define JES_RUNTIME_H - -#include "Core.h" -#include "Path.h" - -namespace jes -{ - class Runtime - { - public: - enum - { - FONT, - SHADER, - COUNT, - }; - static PathRef locate(int type, const std::string & name); - }; -} - -#endif