5 Commits

Author SHA1 Message Date
3ea8b9298f Refactor text insertion logic in rtext.c (#6022)
Fixed nasty bug, text after insertion is deleted
2026-07-26 20:54:54 +02:00
14d3587858 Refactor text insertion logic in rtext.c (#6021)
Fixed nasty bug
2026-07-26 15:11:39 +02:00
a18051fdd9 Fix various warnings when building in VC2022 (#6020) 2026-07-26 15:10:19 +02:00
ac06acbaee Add rayscal binding for Scala Native (#6019) 2026-07-26 15:09:14 +02:00
ae7c58e5b9 Fix typo in 'Utility Wrapers' heading (#6017) 2026-07-26 15:08:28 +02:00
14 changed files with 53 additions and 52 deletions

View File

@ -85,6 +85,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT | | [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT | | [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.5** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 | | [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.5** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |
| [rayscal](https://github.com/RobertFlexx/rayscal) | **6.0** | [Scala Native](https://scala-native.org) | MIT |
| [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib | | [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib |
| [raylib-v](https://github.com/vlang/raylib) | 5.5 | [V](https://vlang.io) | MIT/Unlicense | | [raylib-v](https://github.com/vlang/raylib) | 5.5 | [V](https://vlang.io) | MIT/Unlicense |
| [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib | | [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib |
@ -110,7 +111,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [gclang-raylib](https://github.com/gnuchanos/gcLang_Compiler/tree/main/windows_version/raylib_version)| **6.0** | [gclang](https://github.com/gnuchanos/gcLang_Compiler) | AGPL-3.0 | | [gclang-raylib](https://github.com/gnuchanos/gcLang_Compiler/tree/main/windows_version/raylib_version)| **6.0** | [gclang](https://github.com/gnuchanos/gcLang_Compiler) | AGPL-3.0 |
### Utility Wrapers ### Utility Wrappers
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's paradigm. These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's paradigm.
| Name | raylib Version | Language | License | | Name | raylib Version | Language | License |

View File

@ -90,7 +90,7 @@ int main(void)
for (int i = 0; i < BUFFER_SIZE; i++) for (int i = 0; i < BUFFER_SIZE; i++)
{ {
int wavelength = SAMPLE_RATE/sineFrequency; int wavelength = SAMPLE_RATE/sineFrequency;
buffer[i] = sin(2*PI*sineIndex/wavelength); buffer[i] = sinf(2*PI*sineIndex/wavelength);
sineIndex++; sineIndex++;
if (sineIndex >= wavelength) if (sineIndex >= wavelength)
@ -116,8 +116,8 @@ int main(void)
DrawText("Up/down to change frequency", 10, 10, 20, DARKGRAY); DrawText("Up/down to change frequency", 10, 10, 20, DARKGRAY);
DrawText("Left/right to pan", 10, 30, 20, DARKGRAY); DrawText("Left/right to pan", 10, 30, 20, DARKGRAY);
int windowStart = (GetTime() - sineStartTime)*SAMPLE_RATE; int windowStart = (int)((GetTime() - sineStartTime)*SAMPLE_RATE);
int windowSize = 0.1f*SAMPLE_RATE; int windowSize = SAMPLE_RATE/10;
int wavelength = SAMPLE_RATE/sineFrequency; int wavelength = SAMPLE_RATE/sineFrequency;
// Draw a sine wave with the same frequency as the one being sent to the audio stream // Draw a sine wave with the same frequency as the one being sent to the audio stream
@ -125,8 +125,8 @@ int main(void)
{ {
int t0 = windowStart + i*windowSize/screenWidth; int t0 = windowStart + i*windowSize/screenWidth;
int t1 = windowStart + (i + 1)*windowSize/screenWidth; int t1 = windowStart + (i + 1)*windowSize/screenWidth;
Vector2 startPos = { i, 250 + 50*sin(2*PI*t0/wavelength) }; Vector2 startPos = { (float)i, 250 + 50*sinf(2*PI*t0/wavelength) };
Vector2 endPos = { i + 1, 250 + 50*sin(2*PI*t1/wavelength) }; Vector2 endPos = { (float)i + 1, 250 + 50*sinf(2*PI*t1/wavelength) };
DrawLineV(startPos, endPos, RED); DrawLineV(startPos, endPos, RED);
} }

View File

@ -133,8 +133,8 @@ int main(void)
// Draw the last 10 ms of uploaded audio // Draw the last 10 ms of uploaded audio
for (int i = 0; i < screenWidth; i++) for (int i = 0; i < screenWidth; i++)
{ {
Vector2 startPos = { i, 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + i*SAMPLE_RATE/100/screenWidth] }; Vector2 startPos = {(float)i, 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + i*SAMPLE_RATE/100/screenWidth] };
Vector2 endPos = { i + 1, 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + (i + 1)*SAMPLE_RATE/100/screenWidth] }; Vector2 endPos = { (float)(i + 1), 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + (i + 1)*SAMPLE_RATE/100/screenWidth] };
DrawLineV(startPos, endPos, RED); DrawLineV(startPos, endPos, RED);
} }
@ -161,9 +161,9 @@ static void SineCallback(void *framesOut, unsigned int frameCount)
int wavelength = SAMPLE_RATE/waveFrequency; int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the sine wave // Synthesize the sine wave
for (int i = 0; i < frameCount; i++) for (unsigned int i = 0; i < frameCount; i++)
{ {
((float *)framesOut)[i] = sin(2*PI*waveIndex/wavelength); ((float *)framesOut)[i] = sinf(2*PI*waveIndex/wavelength);
waveIndex++; waveIndex++;
@ -175,8 +175,8 @@ static void SineCallback(void *framesOut, unsigned int frameCount)
} }
// Save the synthesized samples for later drawing // Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount]; for (unsigned int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i]; for (unsigned int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
} }
static void SquareCallback(void *framesOut, unsigned int frameCount) static void SquareCallback(void *framesOut, unsigned int frameCount)
@ -184,9 +184,9 @@ static void SquareCallback(void *framesOut, unsigned int frameCount)
int wavelength = SAMPLE_RATE/waveFrequency; int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the square wave // Synthesize the square wave
for (int i = 0; i < frameCount; i++) for (unsigned int i = 0; i < frameCount; i++)
{ {
((float *)framesOut)[i] = (waveIndex < wavelength/2)? 1 : -1; ((float *)framesOut)[i] = (waveIndex < wavelength/2)? 1.0f : -1.0f;
waveIndex++; waveIndex++;
if (waveIndex >= wavelength) if (waveIndex >= wavelength)
@ -197,8 +197,8 @@ static void SquareCallback(void *framesOut, unsigned int frameCount)
} }
// Save the synthesized samples for later drawing // Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount]; for (unsigned int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i]; for (unsigned int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
} }
static void TriangleCallback(void *framesOut, unsigned int frameCount) static void TriangleCallback(void *framesOut, unsigned int frameCount)
@ -206,7 +206,7 @@ static void TriangleCallback(void *framesOut, unsigned int frameCount)
int wavelength = SAMPLE_RATE/waveFrequency; int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the triangle wave // Synthesize the triangle wave
for (int i = 0; i < frameCount; i++) for (unsigned int i = 0; i < frameCount; i++)
{ {
((float *)framesOut)[i] = (waveIndex < wavelength/2)? (-1 + 2.0f*waveIndex/(wavelength/2)) : (1 - 2.0f*(waveIndex - wavelength/2)/(wavelength/2)); ((float *)framesOut)[i] = (waveIndex < wavelength/2)? (-1 + 2.0f*waveIndex/(wavelength/2)) : (1 - 2.0f*(waveIndex - wavelength/2)/(wavelength/2));
waveIndex++; waveIndex++;
@ -219,8 +219,8 @@ static void TriangleCallback(void *framesOut, unsigned int frameCount)
} }
// Save the synthesized samples for later drawing // Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount]; for (unsigned int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i]; for (unsigned int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
} }
static void SawtoothCallback(void *framesOut, unsigned int frameCount) static void SawtoothCallback(void *framesOut, unsigned int frameCount)
@ -228,7 +228,7 @@ static void SawtoothCallback(void *framesOut, unsigned int frameCount)
int wavelength = SAMPLE_RATE/waveFrequency; int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the sawtooth wave // Synthesize the sawtooth wave
for (int i = 0; i < frameCount; i++) for (unsigned int i = 0; i < frameCount; i++)
{ {
((float *)framesOut)[i] = -1 + 2.0f*waveIndex/wavelength; ((float *)framesOut)[i] = -1 + 2.0f*waveIndex/wavelength;
waveIndex++; waveIndex++;
@ -241,6 +241,6 @@ static void SawtoothCallback(void *framesOut, unsigned int frameCount)
} }
// Save the synthesized samples for later drawing // Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount]; for (unsigned int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i]; for (unsigned int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float*)framesOut)[i];
} }

View File

@ -88,7 +88,7 @@ int main(void)
DrawCircleV(GetMousePosition(), 20, MAROON); DrawCircleV(GetMousePosition(), 20, MAROON);
DrawRectangleRec((Rectangle) { mousePos.x - 25, mousePos.y, 50, 2 }, BLACK); DrawRectangleRec((Rectangle) { mousePos.x - 25, mousePos.y, 50, 2 }, BLACK);
DrawRectangleRec((Rectangle) { mousePos.x, mousePos.y - 25, 2, 50 }, BLACK); DrawRectangleRec((Rectangle) { mousePos.x, mousePos.y - 25, 2, 50 }, BLACK);
DrawText(TextFormat("[%i,%i]", GetMouseX(), GetMouseY()), mousePos.x - 44, DrawText(TextFormat("[%i,%i]", GetMouseX(), GetMouseY()), (int)mousePos.x - 44,
(mousePos.y > GetScreenHeight() - 60)? (int)mousePos.y - 46 : (int)mousePos.y + 30, 20, BLACK); (mousePos.y > GetScreenHeight() - 60)? (int)mousePos.y - 46 : (int)mousePos.y + 30, 20, BLACK);
EndDrawing(); EndDrawing();

View File

@ -212,12 +212,12 @@ static void UpdateModelAnimationBones(Model *model, ModelAnimation *anim0, int f
if (frame1 < 0) frame1 = 0; if (frame1 < 0) frame1 = 0;
// Get bone count (use minimum of all to be safe) // Get bone count (use minimum of all to be safe)
int boneCount = model->skeleton.boneCount; unsigned int boneCount = model->skeleton.boneCount;
if (anim0->boneCount < boneCount) boneCount = anim0->boneCount; if (anim0->boneCount < boneCount) boneCount = anim0->boneCount;
if (anim1->boneCount < boneCount) boneCount = anim1->boneCount; if (anim1->boneCount < boneCount) boneCount = anim1->boneCount;
// Blend each bone // Blend each bone
for (int boneIndex = 0; boneIndex < boneCount; boneIndex++) for (unsigned int boneIndex = 0; boneIndex < boneCount; boneIndex++)
{ {
// Determine blend factor for this bone // Determine blend factor for this bone
float boneBlendFactor = blend; float boneBlendFactor = blend;

View File

@ -252,7 +252,7 @@ int main(void)
GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize*2); GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize*2);
GuiLabel((Rectangle){ 0, GetScreenHeight() - 100.0f, GetScreenWidth(), 40 }, "PRESS SPACE to START BLENDING"); GuiLabel((Rectangle){ 0, GetScreenHeight() - 100.0f, (float)GetScreenWidth(), 40 }, "PRESS SPACE to START BLENDING");
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize); GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize);
GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT); GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);

View File

@ -103,7 +103,7 @@ int main(void)
if (collision.hit && (collision.distance < closestDistance)) if (collision.hit && (collision.distance < closestDistance))
{ {
closestDistance = collision.distance; closestDistance = collision.distance;
closestVoxelPosition = (Vector3){ x, y, z }; closestVoxelPosition = (Vector3){ (float)x, (float)y, (float)z };
voxelFound = true; voxelFound = true;
} }
} }

View File

@ -64,7 +64,7 @@ int main(void)
int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 }; int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 };
// Search bones for sockets // Search bones for sockets
for (int i = 0; i < characterModel.skeleton.boneCount; i++) for (unsigned int i = 0; i < characterModel.skeleton.boneCount; i++)
{ {
if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hat")) if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hat"))
{ {

View File

@ -119,7 +119,7 @@ static void DrawModelSkeleton(ModelSkeleton skeleton, ModelAnimPose pose, float
{ {
// Loop to (boneCount - 1) because the last one is a special "no bone" bone, // Loop to (boneCount - 1) because the last one is a special "no bone" bone,
// needed to workaround buggy models without a -1, a cube is always drawn at the origin // needed to workaround buggy models without a -1, a cube is always drawn at the origin
for (int i = 0; i < skeleton.boneCount - 1; i++) for (unsigned int i = 0; i < skeleton.boneCount - 1; i++)
{ {
// Display the frame-pose skeleton // Display the frame-pose skeleton
DrawCube(pose[i].translation, scale*0.05f, scale*0.05f, scale*0.05f, color); DrawCube(pose[i].translation, scale*0.05f, scale*0.05f, scale*0.05f, color);

View File

@ -82,8 +82,8 @@ int main(void)
if (IsTextureValid(collection[i].texture)) if (IsTextureValid(collection[i].texture))
{ {
DrawTexturePro(collection[i].texture, DrawTexturePro(collection[i].texture,
(Rectangle){0,0,collection[i].texture.width, collection[i].texture.height}, (Rectangle){0,0,(float)collection[i].texture.width, (float)collection[i].texture.height},
(Rectangle){collection[i].position.x,collection[i].position.y,collection[i].texture.width, collection[i].texture.height}, (Rectangle){collection[i].position.x,collection[i].position.y, (float)collection[i].texture.width, (float)collection[i].texture.height},
(Vector2){collection[i].texture.width*0.5f, collection[i].texture.height*0.5f}, (Vector2){collection[i].texture.width*0.5f, collection[i].texture.height*0.5f},
0.0f, WHITE); 0.0f, WHITE);
} }

View File

@ -115,7 +115,7 @@ int main(void)
EndMode3D(); EndMode3D();
DrawRectangleLines((int)((subjectTarget.texture.width - captureSize)/2.0f), (int)((subjectTarget.texture.height - captureSize)/2.0f), captureSize, captureSize, GREEN); DrawRectangleLines((int)((subjectTarget.texture.width - captureSize)/2.0f), (int)((subjectTarget.texture.height - captureSize)/2.0f), (int)captureSize, (int)captureSize, GREEN);
DrawText("Subject View", 10, subjectTarget.texture.height - 30, 20, BLACK); DrawText("Subject View", 10, subjectTarget.texture.height - 30, 20, BLACK);
EndTextureMode(); EndTextureMode();

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions> _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -1987,8 +1987,8 @@ char *TextInsert(const char *text, const char *insert, int position)
// TODO: Allow copying data inserted up to maximum buffer size and stop // TODO: Allow copying data inserted up to maximum buffer size and stop
for (int i = 0; i < position; i++) buffer[i] = text[i]; for (int i = 0; i < position; i++) buffer[i] = text[i];
for (int i = position; i < insertLen + position; i++) buffer[i] = insert[i - position]; for (int i = 0; i < insertLen; i++) buffer[i+position] = insert[i];
for (int i = (insertLen + position); i < (textLen + insertLen); i++) buffer[i] = text[i - insertLen]; for (int i = position; i < textLen; i++) buffer[i+insertLen] = text[i];
buffer[textLen + insertLen] = '\0'; // Add EOL buffer[textLen + insertLen] = '\0'; // Add EOL
} }
@ -2013,8 +2013,8 @@ char *TextInsertAlloc(const char *text, const char *insert, int position)
result = (char *)RL_MALLOC(textLen + insertLen + 1); result = (char *)RL_MALLOC(textLen + insertLen + 1);
for (int i = 0; i < position; i++) result[i] = text[i]; for (int i = 0; i < position; i++) result[i] = text[i];
for (int i = position; i < (insertLen + position); i++) result[i] = insert[i - position]; for (int i = 0; i < insertLen; i++) result[i+position] = insert[i];
for (int i = (insertLen + position); i < (textLen + insertLen); i++) result[i] = text[i - insertLen]; for (int i = position; i < textLen; i++) result[i+insertLen] = text[i];
result[textLen + insertLen] = '\0'; // Add EOL result[textLen + insertLen] = '\0'; // Add EOL
} }