4 Commits

Author SHA1 Message Date
Hamza RAHAL
507c85900f fix: [digital_clock] minute hand doesn't appear (#5151) 2025-08-28 22:32:41 +02:00
Artem V. Ageev
03617e0bdd Add raylib-ada to BINDINGS.md (#5150) 2025-08-28 22:31:39 +02:00
JohnnyCena123
481daf2423 remove extra backslash in fix_win32_compatibility.h (#5148) 2025-08-28 22:30:25 +02:00
JohnnyCena123
4a4997c615 fix unnecessary warnings in some files (#5152) 2025-08-28 22:28:56 +02:00
7 changed files with 10 additions and 8 deletions

View File

@@ -7,6 +7,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| Name | raylib Version | Language | License |
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
| [raylib](https://github.com/raysan5/raylib) | **5.5** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
| [raylib-ada](https://github.com/Fabien-Chouteau/raylib-ada) | **5.5** | [Ada](https://en.wikipedia.org/wiki/Ada_(programming_language)) | MIT |
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.5** | [Beef](https://www.beeflang.org) | MIT |
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
| [raylib-c3](https://github.com/c3lang/vendor/tree/main/libraries/raylib55.c3l) | **5.5** | [C3](https://c3-lang.org) | MIT |

View File

@@ -175,7 +175,6 @@ static void DrawTextCenterKeyHelp(const char *key, const char *text, int posX, i
int spaceSize = MeasureText(" ", fontSize);
int pressSize = MeasureText("Press", fontSize);
int keySize = MeasureText(key, fontSize);
int textSize = MeasureText(text, fontSize);
int textSizeCurrent = 0;
DrawText("Press", posX, posY, fontSize, color);
@@ -184,4 +183,4 @@ static void DrawTextCenterKeyHelp(const char *key, const char *text, int posX, i
DrawRectangle(posX + textSizeCurrent, posY + fontSize, keySize, 3, RED);
textSizeCurrent += keySize + 2*spaceSize;
DrawText(text, posX + textSizeCurrent, posY, fontSize, color);
}
}

View File

@@ -18,6 +18,7 @@
#include "raylib.h"
#include "raymath.h"
#undef FLT_MAX
#define FLT_MAX 340282346638528859811704183484516925440.0f // Maximum value of a float, from bit pattern 01111111011111111111111111111111
//------------------------------------------------------------------------------------
@@ -245,4 +246,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

View File

@@ -161,9 +161,9 @@ static Mesh GenMeshPoints(int numPoints)
// https://en.wikipedia.org/wiki/Spherical_coordinate_system
for (int i = 0; i < numPoints; i++)
{
float theta = ((float)PI*rand())/RAND_MAX;
float phi = (2.0f*PI*rand())/RAND_MAX;
float r = (10.0f*rand())/RAND_MAX;
float theta = ((float)PI*rand())/((float)RAND_MAX);
float phi = (2.0f*PI*rand())/((float)RAND_MAX);
float r = (10.0f*rand())/((float)RAND_MAX);
mesh.vertices[i*3 + 0] = r*sinf(theta)*cosf(phi);
mesh.vertices[i*3 + 1] = r*sinf(theta)*sinf(phi);

View File

@@ -164,7 +164,7 @@ static void DrawClock(Clock clock, Vector2 centerPosition)
DrawText(TextFormat("%i", clock.second.value), centerPosition.x + (clock.second.length - 10)*cosf(clock.second.angle*(float)(PI/180)) - DIGIT_SIZE/2, centerPosition.y + clock.second.length*sinf(clock.second.angle*(float)(PI/180)) - DIGIT_SIZE/2, DIGIT_SIZE, GRAY);
DrawText(TextFormat("%i", clock.minute.value), clock.minute.origin.x + clock.minute.length*cosf(clock.minute.angle*(float)(PI/180)) - DIGIT_SIZE/2, centerPosition.y + clock.minute.length*sinf(clock.minute.angle*(float)(PI/180)) - DIGIT_SIZE/2, DIGIT_SIZE, RED);
DrawText(TextFormat("%i", clock.minute.value), centerPosition.x + clock.minute.length*cosf(clock.minute.angle*(float)(PI/180)) - DIGIT_SIZE/2, centerPosition.y + clock.minute.length*sinf(clock.minute.angle*(float)(PI/180)) - DIGIT_SIZE/2, DIGIT_SIZE, RED);
DrawText(TextFormat("%i", clock.hour.value), centerPosition.x + clock.hour.length*cosf(clock.hour.angle*(float)(PI/180)) - DIGIT_SIZE/2, centerPosition.y + clock.hour.length*sinf(clock.hour.angle*(float)(PI/180)) - DIGIT_SIZE/2, DIGIT_SIZE, GOLD);
}

View File

@@ -42,7 +42,7 @@
#define DrawTextW DrawTextWin32
#define DrawTextExA DrawTextExAWin32
#define DrawTextExW DrawTextExWin32
#define PlaySoundA PlaySoundAWin32\
#define PlaySoundA PlaySoundAWin32
// include windows
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

View File

@@ -3243,6 +3243,7 @@ unsigned int rlLoadTexture(const void *data, int width, int height, int format,
int mipWidth = width;
int mipHeight = height;
int mipOffset = 0; // Mipmap data offset, only used for tracelog
(void)mipOffset; // Used to avoid gcc warnings about unused variable
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
unsigned char *dataPtr = NULL;