Skip to content

Commit 9e3b785

Browse files
committed
update to master branch
1 parent 07ba0be commit 9e3b785

File tree

10 files changed

+33
-25
lines changed

10 files changed

+33
-25
lines changed

headers/raylib.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
6464
* BSD-like license that allows static linking with closed source software:
6565
*
66-
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
66+
* Copyright (c) 2013-2025 Ramon Santamaria (@raysan5)
6767
*
6868
* This software is provided "as-is", without any express or implied warranty. In no event
6969
* will the authors be held liable for any damages arising from the use of this software.
@@ -1510,15 +1510,15 @@ RLAPI const char *TextFormat(const char *text, ...);
15101510
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
15111511
RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
15121512
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
1513-
RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
1514-
RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
1513+
RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
1514+
RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
15151515
RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor!
15161516
RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string
1517-
RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string
1518-
RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string
1519-
RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1520-
RLAPI const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
1521-
RLAPI const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
1517+
RLAPI char *TextToUpper(const char *text); // Get upper case version of provided string
1518+
RLAPI char *TextToLower(const char *text); // Get lower case version of provided string
1519+
RLAPI char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1520+
RLAPI char *TextToSnake(const char *text); // Get Snake case notation version of provided string
1521+
RLAPI char *TextToCamel(const char *text); // Get Camel case notation version of provided string
15221522

15231523
RLAPI int TextToInteger(const char *text); // Get integer value from text
15241524
RLAPI float TextToFloat(const char *text); // Get float value from text

headers/raymath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* LICENSE: zlib/libpng
3434
*
35-
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
35+
* Copyright (c) 2015-2025 Ramon Santamaria (@raysan5)
3636
*
3737
* This software is provided "as-is", without any express or implied warranty. In no event
3838
* will the authors be held liable for any damages arising from the use of this software.

headers/rlgl.h

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
1111
* initialized on rlglInit() to accumulate vertex data
1212
*
13-
* When an internal state change is required all the stored vertex data is renderer in batch,
13+
* When an internal state change is required all the stored vertex data is rendered in batch,
1414
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch
1515
*
1616
* Some resources are also loaded for convenience, here the complete list:
@@ -88,7 +88,7 @@
8888
*
8989
* LICENSE: zlib/libpng
9090
*
91-
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
91+
* Copyright (c) 2014-2025 Ramon Santamaria (@raysan5)
9292
*
9393
* This software is provided "as-is", without any express or implied warranty. In no event
9494
* will the authors be held liable for any damages arising from the use of this software.
@@ -3666,29 +3666,37 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format)
36663666
// Read screen pixel data (color buffer)
36673667
unsigned char *rlReadScreenPixels(int width, int height)
36683668
{
3669-
unsigned char *screenData = (unsigned char *)RL_CALLOC(width*height*4, sizeof(unsigned char));
3669+
unsigned char *imgData = (unsigned char *)RL_CALLOC(width*height*4, sizeof(unsigned char));
36703670

36713671
// NOTE 1: glReadPixels returns image flipped vertically -> (0,0) is the bottom left corner of the framebuffer
36723672
// NOTE 2: We are getting alpha channel! Be careful, it can be transparent if not cleared properly!
3673-
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, screenData);
3673+
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, imgData);
36743674

36753675
// Flip image vertically!
3676-
unsigned char *imgData = (unsigned char *)RL_MALLOC(width*height*4*sizeof(unsigned char));
3677-
3678-
for (int y = height - 1; y >= 0; y--)
3676+
// NOTE: Alpha value has already been applied to RGB in framebuffer, we don't need it!
3677+
for (int y = height - 1; y >= height / 2; y--)
36793678
{
3680-
for (int x = 0; x < (width*4); x++)
3679+
for (int x = 0; x < (width*4); x += 4)
36813680
{
3682-
imgData[((height - 1) - y)*width*4 + x] = screenData[(y*width*4) + x]; // Flip line
3683-
3684-
// Set alpha component value to 255 (no trasparent image retrieval)
3685-
// NOTE: Alpha value has already been applied to RGB in framebuffer, we don't need it!
3686-
if (((x + 1)%4) == 0) imgData[((height - 1) - y)*width*4 + x] = 255;
3681+
size_t s = ((height - 1) - y)*width*4 + x;
3682+
size_t e = y*width*4 + x;
3683+
3684+
unsigned char r = imgData[s];
3685+
unsigned char g = imgData[s+1];
3686+
unsigned char b = imgData[s+2];
3687+
3688+
imgData[s] = imgData[e];
3689+
imgData[s+1] = imgData[e+1];
3690+
imgData[s+2] = imgData[e+2];
3691+
imgData[s+3] = 255; // Set alpha component value to 255 (no trasparent image retrieval)
3692+
3693+
imgData[e] = r;
3694+
imgData[e+1] = g;
3695+
imgData[e+2] = b;
3696+
imgData[e+3] = 255; // Ditto
36873697
}
36883698
}
36893699

3690-
RL_FREE(screenData);
3691-
36923700
return imgData; // NOTE: image data should be freed
36933701
}
36943702

libs/i386-win32/raylib.dll

512 Bytes
Binary file not shown.

libs/x86_32-linux/libraylib.a

232 Bytes
Binary file not shown.

libs/x86_32-linux/libraylib.so

0 Bytes
Binary file not shown.

libs/x86_64-linux/libraylib.a

232 Bytes
Binary file not shown.

libs/x86_64-linux/libraylib.so

0 Bytes
Binary file not shown.

libs/x86_64-win64/raylib.dll

0 Bytes
Binary file not shown.

source/raylib.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ function TextReplace(const text: PChar; const replace, by: PChar): PChar; cdecl;
19161916
{Insert text in a position (WARNING: memory must be freed!)}
19171917
function TextInsert(const text, insert: PChar; position: Integer): PChar; cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'TextInsert';
19181918
{Join text strings with delimiter}
1919-
function TextJoin(const textList: PPChar; count: Integer; const delimiter: PChar): PChar; cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'TextJoin';
1919+
function TextJoin(textList: PPChar; count: Integer; const delimiter: PChar): PChar; cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'TextJoin';
19201920
{Split text into multiple strings}
19211921
function TextSplit(const text: PChar; delimiter: Char; count: PInteger): PPChar; cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'TextSplit';
19221922
{Append text at specific position and move cursor!}

0 commit comments

Comments
 (0)