diff --git a/lib/Ray/CMakeLists.txt b/lib/Ray/CMakeLists.txt index 48984f64..f57089af 100644 --- a/lib/Ray/CMakeLists.txt +++ b/lib/Ray/CMakeLists.txt @@ -18,6 +18,7 @@ set(HEADERS sources/IRessource.hpp sources/Matrix.hpp sources/Mesh.hpp + sources/TraceLog.hpp sources/Window.hpp sources/Audio/IAudio.hpp sources/Audio/Music.hpp @@ -62,6 +63,7 @@ set(HEADERS set(SRC sources/Color.cpp sources/Font.cpp + sources/TraceLog.cpp sources/Window.cpp sources/Audio/Music.cpp sources/Audio/Sound.cpp diff --git a/lib/Ray/sources/TraceLog.cpp b/lib/Ray/sources/TraceLog.cpp new file mode 100644 index 00000000..394809a7 --- /dev/null +++ b/lib/Ray/sources/TraceLog.cpp @@ -0,0 +1,13 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** TraceLog +*/ + +#include "TraceLog.hpp" + +void RAY::TraceLog::setLevel(RAY::TraceLog::Level level) +{ + SetTraceLogLevel(level); +} \ No newline at end of file diff --git a/lib/Ray/sources/TraceLog.hpp b/lib/Ray/sources/TraceLog.hpp new file mode 100644 index 00000000..3c5022da --- /dev/null +++ b/lib/Ray/sources/TraceLog.hpp @@ -0,0 +1,24 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** TraceLog +*/ + +#ifndef TRACELOG_HPP_ +#define TRACELOG_HPP_ + +#include + +namespace RAY { + class TraceLog { + public: + typedef ::TraceLogLevel Level; + + //! @brief Set Trace Log level + //! @param level Level of log to display + static void setLevel(Level level); + }; +} + +#endif /* !TRACELOG_HPP_ */ diff --git a/sources/main.cpp b/sources/main.cpp index 1e40b264..4c26b717 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -16,6 +16,7 @@ #include "Model/ModelAnimations.hpp" #include "Vector/Vector3.hpp" #include "Window.hpp" +#include "TraceLog.hpp" int main() { @@ -24,6 +25,7 @@ int main() //-------------------------------------------------------------------------------------- const int screenWidth = 800; const int screenHeight = 450; + RAY::TraceLog::setLevel(LOG_WARNING); RAY::Window &window = RAY::Window::getInstance(screenWidth, screenHeight, "Bidibidibop", FLAG_WINDOW_RESIZABLE); RAY::Camera::Camera3D camera(RAY::Vector3(10.0f, 10.0f, 10.0f), RAY::Vector3(0.0f, 0.0f, 0.0f),