-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jleAssert and jleCommon header files
- Loading branch information
Showing
76 changed files
with
161 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include "jleComponent.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include "jleComponent.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#if JLE_BUILD_EDITOR | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#if JLE_BUILD_EDITOR | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#if JLE_BUILD_EDITOR | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include <glm/glm.hpp> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include <string> | ||
#include <vector> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/********************************************************************************************* | ||
* * | ||
* , . , . ,--. * | ||
* | | | | | o * | ||
* | ,-. |- -- | ,-: ,-: ,-: ,-. ,-| |- ;-. ,-: . ;-. ,-. * | ||
* | |-' | | | | | | | | |-' | | | | | | | | | | |-' * | ||
* -' `-' `-' `--' `-` `-| `-| `-' `-' `--' ' ' `-| ' ' ' `-' * | ||
* * | ||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * | ||
* Jet-Lagged Engine (jle) is licenced under GNU General Public License v3.0. * | ||
* The licence can be found here: https://github.com/Mormert/jle/blob/master/LICENSE * | ||
* Copyright (c) 2020-2024 Johan Lind. All rights reserved. * | ||
* * | ||
*********************************************************************************************/ | ||
|
||
#ifndef JLE_ASSERT_H | ||
#define JLE_ASSERT_H | ||
|
||
#ifndef NDEBUG | ||
|
||
#include <plog/Log.h> | ||
|
||
#ifdef _WIN32 | ||
#include <intrin.h> | ||
#define JLE_DEBUG_BREAK __debugbreak() | ||
#else | ||
#include <signal.h> | ||
#define JLE_DEBUG_BREAK raise(SIGTRAP) | ||
#endif | ||
|
||
// Will only assert once, which can be convenient sometimes to avoid assertion spam | ||
#define jleAssertOnce(condition) \ | ||
do { \ | ||
static bool triggeredOnce{false}; \ | ||
if (!(condition) && !triggeredOnce) { \ | ||
triggeredOnce = true; \ | ||
LOGE << "Assertion failed: " << #condition << " at " << __FILE__ << ":" << __LINE__ << std::endl; \ | ||
JLE_DEBUG_BREAK; \ | ||
} \ | ||
} while (0) | ||
|
||
#define jleAssert(condition) \ | ||
do { \ | ||
if (!(condition)) { \ | ||
LOGE << "Assertion failed: " << #condition << " at " << __FILE__ << ":" << __LINE__ << std::endl; \ | ||
JLE_DEBUG_BREAK; \ | ||
} \ | ||
} while (0) | ||
|
||
#else | ||
#define jleAssert(condition) ((void)0) | ||
#define jleAssertOnce(condition) ((void)0) | ||
#endif | ||
|
||
#endif // JLE_ASSERT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include <glm/glm.hpp> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
#pragma once | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleCommon.h" | ||
|
||
#include <string> | ||
#include <vector> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/********************************************************************************************* | ||
* * | ||
* , . , . ,--. * | ||
* | | | | | o * | ||
* | ,-. |- -- | ,-: ,-: ,-: ,-. ,-| |- ;-. ,-: . ;-. ,-. * | ||
* | |-' | | | | | | | | |-' | | | | | | | | | | |-' * | ||
* -' `-' `-' `--' `-` `-| `-| `-' `-' `--' ' ' `-| ' ' ' `-' * | ||
* * | ||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * | ||
* Jet-Lagged Engine (jle) is licenced under GNU General Public License v3.0. * | ||
* The licence can be found here: https://github.com/Mormert/jle/blob/master/LICENSE * | ||
* Copyright (c) 2020-2024 Johan Lind. All rights reserved. * | ||
* * | ||
*********************************************************************************************/ | ||
|
||
#ifndef JLE_COMMON_H | ||
#define JLE_COMMON_H | ||
|
||
#include "jleBuildConfig.h" | ||
#include "jleAssert.h" | ||
|
||
#include <plog/Log.h> | ||
|
||
#endif //JLE_COMMON_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.