Loading...
Searching...
No Matches
4#ifdef KR_WINDOWS_PLATFORM
6 #define KARMA_API __declspec(dllexport)
8 #define KARMA_API __declspec(dllimport)
10#elif defined KR_LINUX_PLATFORM
12 #define KARMA_API __attribute__((visibility("default")))
16#elif defined KR_MAC_PLATFORM
18 #define KARMA_API __attribute__((visibility("default")))
23#error Unsupported Platform detected!
29#define BIT(x) (1 << x)
32#ifdef KR_ENABLE_ASSERTS
36 #define debugBreak() __debugbreak()
39 #define debugBreak() raise(SIGTRAP)
42 #define KR_ASSERT(expr, ...) \
46 KR_ERROR("Assertion Failed: {0}. Refer file: {1}, line: {2}", __VA_ARGS__, __FILE__, __LINE__); \
49 #define KR_CORE_ASSERT(expr, ...) \
53 KR_CORE_ERROR("Assertion Failed: {0}. Refer file: {1}, line: {2}", __VA_ARGS__, __FILE__, __LINE__); \
57 #define KR_ASSERT(expr, ...)
58 #define KR_CORE_ASSERT(expr, ...)
61#define KR_BIND_EVENT_FN(fn) std::bind(&fn, this, std::placeholders::_1)
65#define FUNCTION_NON_NULL_RETURN_START
68#ifndef FUNCTION_NON_NULL_RETURN_START
69#define FUNCTION_NON_NULL_RETURN_START
71#ifndef FUNCTION_NON_NULL_RETURN_END
72#define FUNCTION_NON_NULL_RETURN_END
81#define FORCEINLINE inline
96#define KR_NONCOPYABLE(TypeName) \
97 TypeName(TypeName&&) = delete; \
98 TypeName(const TypeName&) = delete; \
99 TypeName& operator=(const TypeName&) = delete; \
100 TypeName& operator=(TypeName&&) = delete;