Merge remote-tracking branch 'TSnake41/master'
This commit is contained in:
commit
a2a120bd63
1 changed files with 44 additions and 2 deletions
11
src/raylib.h
11
src/raylib.h
|
|
@ -852,6 +852,14 @@ typedef enum {
|
|||
// Callbacks to be implemented by users
|
||||
typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
|
||||
|
||||
// Filesystem override implemented by users.
|
||||
typedef struct FilesystemOverride {
|
||||
unsigned char *(*loadFileData)(const char *fileName, unsigned int *bytesRead);
|
||||
void (*saveFileData)(const char *fileName, void *data, unsigned int bytesToWrite);
|
||||
char *(*loadFileText)(const char *fileName);
|
||||
void (*saveFileText)(const char *fileName, char *text);
|
||||
} FilesystemOverride;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" { // Prevents name mangling of functions
|
||||
#endif
|
||||
|
|
@ -945,6 +953,7 @@ RLAPI void TakeScreenshot(const char *fileName); // Takes a scr
|
|||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||
|
||||
// Files management functions
|
||||
RLAPI void SetFilesystemOverride(FilesystemOverride override); // Set filesystem functions override.
|
||||
RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
||||
RLAPI void SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write)
|
||||
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
||||
|
|
@ -1157,7 +1166,7 @@ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Col
|
|||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw circle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
|
|
|
|||
Loading…
Reference in a new issue