encapsulation of trace log

This commit is contained in:
arthur.jamet
2021-05-24 10:59:29 +02:00
parent 4ef7f7543a
commit 60cfc7f9be
4 changed files with 41 additions and 0 deletions
+2
View File
@@ -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
+13
View File
@@ -0,0 +1,13 @@
/*
** EPITECH PROJECT, 2021
** Bomberman
** File description:
** TraceLog
*/
#include "TraceLog.hpp"
void RAY::TraceLog::setLevel(RAY::TraceLog::Level level)
{
SetTraceLogLevel(level);
}
+24
View File
@@ -0,0 +1,24 @@
/*
** EPITECH PROJECT, 2021
** Bomberman
** File description:
** TraceLog
*/
#ifndef TRACELOG_HPP_
#define TRACELOG_HPP_
#include <raylib.h>
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_ */
+2
View File
@@ -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),