diff options
| author | Ray <[email protected]> | 2020-03-04 00:21:46 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-03-04 00:21:46 +0100 |
| commit | 74c486201d699139280b359df79e8fd32ef6910f (patch) | |
| tree | 5f2aea3222c8593013c6e68c37d2cde46bc8360a /src/raylib.h | |
| parent | 6b8f30964dc9490fb4725a7c4764d793202ee48f (diff) | |
| download | raylib-74c486201d699139280b359df79e8fd32ef6910f.tar.gz raylib-74c486201d699139280b359df79e8fd32ef6910f.zip | |
ADDED: LoadFileText() and SaveFileText()
Improved file access checks
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h index 48728fc1..0c15849e 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -156,6 +156,7 @@ #define FormatText TextFormat #define SubText TextSubtext #define ShowWindow UnhideWindow +#define LoadText LoadFileText //---------------------------------------------------------------------------------- // Structures Definition @@ -951,6 +952,8 @@ RLAPI int GetRandomValue(int min, int max); // Returns a r // Files management functions RLAPI unsigned char *LoadFileData(const char *fileName, int *bytesRead); // Load file data as byte array (read) RLAPI void SaveFileData(const char *fileName, void *data, 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 +RLAPI void SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated RLAPI bool FileExists(const char *fileName); // Check if file exists RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists @@ -1322,9 +1325,8 @@ RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); //------------------------------------------------------------------------------------ // Shader loading/unloading functions -RLAPI char *LoadText(const char *fileName); // Load chars array from text file RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations -RLAPI Shader LoadShaderCode(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations +RLAPI Shader LoadShaderCode(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetShaderDefault(void); // Get default shader |
