Browse Source

Changing enums, now referenced as int.

pull/731/head
Marco Lizza 6 years ago
parent
commit
343fef4aa4
2 changed files with 9 additions and 9 deletions
  1. +4
    -4
      src/raylib.h
  2. +5
    -5
      src/utils.c

+ 4
- 4
src/raylib.h View File

@ -819,7 +819,7 @@ typedef enum {
} NPatchType;
// Callbacks to be implemented by users
typedef void (*TraceLogCallback)(n">TraceLogType logType, const char *text, va_list args);
typedef void (*TraceLogCallback)(kt">int logType, const char *text, va_list args);
#if defined(__cplusplus)
extern "C" { // Prevents name mangling of functions
@ -899,10 +899,10 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
// Misc. functions
RLAPI void SetConfigFlags(unsigned char flags); // Setup window configuration flags (view FLAGS)
RLAPI void SetTraceLogLevel(n">TraceLogType logType); // Set the current threshold (minimum) log level.
RLAPI void SetTraceLogExit(n">TraceLogType logType); // Set the exit threshold (minimum) log level.
RLAPI void SetTraceLogLevel(kt">int logType); // Set the current threshold (minimum) log level.
RLAPI void SetTraceLogExit(kt">int logType); // Set the exit threshold (minimum) log level.
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging bypassing raylib's one
RLAPI void TraceLog(n">TraceLogType logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
RLAPI void TraceLog(kt">int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)

+ 5
- 5
src/utils.c View File

@ -53,8 +53,8 @@
//----------------------------------------------------------------------------------
// Log types messages
static n">TraceLogType logTypeLevel = LOG_INFO;
static n">TraceLogType logTypeExit = LOG_ERROR;
static kt">int logTypeLevel = LOG_INFO;
static kt">int logTypeExit = LOG_ERROR;
static TraceLogCallback logCallback = NULL;
#if defined(PLATFORM_ANDROID)
@ -81,13 +81,13 @@ static int android_close(void *cookie);
//----------------------------------------------------------------------------------
// Set the current threshold (minimum) log level.
void SetTraceLogLevel(n">TraceLogType logType)
void SetTraceLogLevel(kt">int logType)
{
logTypeLevel = logType;
}
// Set the exit threshold (minimum) log level.
void SetTraceLogExit(n">TraceLogType logType)
void SetTraceLogExit(kt">int logType)
{
logTypeExit = logType;
}
@ -99,7 +99,7 @@ void SetTraceLogCallback(TraceLogCallback callback)
}
// Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
void TraceLog(n">TraceLogType logType, const char *text, ...)
void TraceLog(kt">int logType, const char *text, ...)
{
#if defined(SUPPORT_TRACELOG)
if (logType < logTypeLevel) { // Message has level below current threshold, don't emit.

Loading…
Cancel
Save