mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-05 19:08:13 +00:00
Compare commits
4 Commits
7103703313
...
507c85900f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
507c85900f | ||
![]() |
03617e0bdd | ||
![]() |
481daf2423 | ||
![]() |
4a4997c615 |
@@ -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 |
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
2
src/external/fix_win32_compatibility.h
vendored
2
src/external/fix_win32_compatibility.h
vendored
@@ -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>
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user