mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-24 07:11:13 +00:00
encapsulation of trace log
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2021
|
||||
** Bomberman
|
||||
** File description:
|
||||
** TraceLog
|
||||
*/
|
||||
|
||||
#include "TraceLog.hpp"
|
||||
|
||||
void RAY::TraceLog::setLevel(RAY::TraceLog::Level level)
|
||||
{
|
||||
SetTraceLogLevel(level);
|
||||
}
|
||||
@@ -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_ */
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user