Core.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <string>
  3. #include <nlohmann/json.hpp>
  4. #include <glm/vec3.hpp>
  5. #include <glm/vec2.hpp>
  6. #include <glm/mat4x4.hpp>
  7. namespace WallpaperEngine::Core
  8. {
  9. glm::vec4 aToVector4 (const char* str);
  10. glm::vec3 aToVector3 (const char* str);
  11. glm::vec2 aToVector2 (const char* str);
  12. glm::vec4 aToVector4 (const std::string& str);
  13. glm::vec3 aToVector3 (const std::string& str);
  14. glm::vec2 aToVector2 (const std::string& str);
  15. glm::vec3 aToColorf (const char* str);
  16. glm::vec3 aToColorf (const std::string& str);
  17. glm::ivec3 aToColori (const char* str);
  18. glm::ivec3 aToColori (const std::string& str);
  19. nlohmann::json::iterator jsonFindRequired (nlohmann::json& data, const char *key, const char *notFoundMsg);
  20. nlohmann::json::iterator jsonFindRequired (nlohmann::json::iterator& data, const char *key, const char *notFoundMsg);
  21. template <typename T> T jsonFindDefault (nlohmann::json& data, const char *key, T defaultValue);
  22. template <typename T, typename S> T* jsonFindUserConfig (nlohmann::json& data, const char *key, S defaultValue);
  23. };