Make TraceLog() public to the API
enum LogType could require some revision...
This commit is contained in:
parent
8d3750e36d
commit
ecfe31bf1d
@ -75,7 +75,7 @@
|
|||||||
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
||||||
#else
|
#else
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "utils.h" // Required for: fopen() Android mapping, TraceLog()
|
#include "utils.h" // Required for: fopen() Android mapping
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
||||||
#include "utils.h" // Required for: fopen() Android mapping, TraceLog()
|
#include "utils.h" // Required for: fopen() Android mapping
|
||||||
|
|
||||||
#define RAYMATH_IMPLEMENTATION // Use raymath as a header-only library (includes implementation)
|
#define RAYMATH_IMPLEMENTATION // Use raymath as a header-only library (includes implementation)
|
||||||
#define RAYMATH_EXTERN_INLINE // Compile raymath functions as static inline (remember, it's a compiler hint)
|
#define RAYMATH_EXTERN_INLINE // Compile raymath functions as static inline (remember, it's a compiler hint)
|
||||||
|
28
src/raylib.h
28
src/raylib.h
@ -295,7 +295,7 @@
|
|||||||
#define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo)
|
#define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo)
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
// Boolean type
|
// Boolean type
|
||||||
@ -516,6 +516,18 @@ typedef struct AudioStream {
|
|||||||
unsigned int buffers[2]; // OpenAL audio buffers (double buffering)
|
unsigned int buffers[2]; // OpenAL audio buffers (double buffering)
|
||||||
} AudioStream;
|
} AudioStream;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Enumerators Definition
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Trace log type
|
||||||
|
typedef enum {
|
||||||
|
INFO = 0,
|
||||||
|
WARNING,
|
||||||
|
ERROR,
|
||||||
|
DEBUG,
|
||||||
|
OTHER
|
||||||
|
} LogType;
|
||||||
|
|
||||||
// Texture formats
|
// Texture formats
|
||||||
// NOTE: Support depends on OpenGL version and platform
|
// NOTE: Support depends on OpenGL version and platform
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -552,10 +564,18 @@ typedef enum {
|
|||||||
} TextureFilterMode;
|
} TextureFilterMode;
|
||||||
|
|
||||||
// Texture parameters: wrap mode
|
// Texture parameters: wrap mode
|
||||||
typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode;
|
typedef enum {
|
||||||
|
WRAP_REPEAT = 0,
|
||||||
|
WRAP_CLAMP,
|
||||||
|
WRAP_MIRROR
|
||||||
|
} TextureWrapMode;
|
||||||
|
|
||||||
// Color blending modes (pre-defined)
|
// Color blending modes (pre-defined)
|
||||||
typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode;
|
typedef enum {
|
||||||
|
BLEND_ALPHA = 0,
|
||||||
|
BLEND_ADDITIVE,
|
||||||
|
BLEND_MULTIPLIED
|
||||||
|
} BlendMode;
|
||||||
|
|
||||||
// Gestures type
|
// Gestures type
|
||||||
// NOTE: It could be used as flags to enable only some gestures
|
// NOTE: It could be used as flags to enable only some gestures
|
||||||
@ -689,7 +709,7 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
|
|||||||
|
|
||||||
RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags)
|
RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags)
|
||||||
RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags
|
RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags
|
||||||
//RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG)
|
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG)
|
||||||
RLAPI void TakeScreenshot(void); // Takes a screenshot and saves it in the same folder as executable
|
RLAPI void TakeScreenshot(void); // Takes a screenshot and saves it in the same folder as executable
|
||||||
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
|
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
||||||
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fscanf(), feof(), rewind(), fgets()
|
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fscanf(), feof(), rewind(), fgets()
|
||||||
|
|
||||||
#include "utils.h" // Required for: IsFileExtension()
|
#include "utils.h" // Required for: fopen() Android mapping
|
||||||
|
|
||||||
#if defined(SUPPORT_FILEFORMAT_TTF)
|
#if defined(SUPPORT_FILEFORMAT_TTF)
|
||||||
// Following libs are used on LoadTTF()
|
// Following libs are used on LoadTTF()
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
// Required for: rlglLoadTexture() rlDeleteTextures(),
|
// Required for: rlglLoadTexture() rlDeleteTextures(),
|
||||||
// rlglGenerateMipmaps(), some funcs for DrawTexturePro()
|
// rlglGenerateMipmaps(), some funcs for DrawTexturePro()
|
||||||
|
|
||||||
#include "utils.h" // Required for: fopen() Android mapping, TraceLog()
|
#include "utils.h" // Required for: fopen() Android mapping
|
||||||
|
|
||||||
// Support only desired texture formats on stb_image
|
// Support only desired texture formats on stb_image
|
||||||
#if !defined(SUPPORT_FILEFORMAT_BMP)
|
#if !defined(SUPPORT_FILEFORMAT_BMP)
|
||||||
|
@ -46,8 +46,6 @@
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" { // Prevents name mangling of functions
|
extern "C" { // Prevents name mangling of functions
|
||||||
#endif
|
#endif
|
||||||
@ -60,8 +58,6 @@ extern "C" { // Prevents name mangling of functions
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Declaration
|
// Module Functions Declaration
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
void TraceLog(int msgType, const char *text, ...); // Outputs a trace log message
|
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
|
||||||
#if defined(SUPPORT_SAVE_BMP)
|
#if defined(SUPPORT_SAVE_BMP)
|
||||||
void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize);
|
void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user