Merge branch 'master' into fix-rcore-warnings
This commit is contained in:
commit
6d93dd68ab
|
|
@ -60,7 +60,7 @@ int main(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
if (btnComputeHashes)
|
||||
{
|
||||
int textInputLen = strlen(textInput);
|
||||
int textInputLen = (int)strlen(textInput);
|
||||
|
||||
// Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
|
||||
base64Text = EncodeDataBase64((unsigned char *)textInput, textInputLen, &base64TextSize);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
|
||||
GuiSetStyle(LISTVIEW, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
|
||||
GuiSetStyle(LISTVIEW, TEXT_PADDING, 40);
|
||||
GuiListViewEx((Rectangle){ 0, 50, GetScreenWidth(), GetScreenHeight() - 50 },
|
||||
GuiListViewEx((Rectangle){ 0, 50, (float)GetScreenWidth(), (float)GetScreenHeight() - 50 },
|
||||
files.paths, files.count, &listScrollIndex, &listItemActive, &listItemFocused);
|
||||
|
||||
EndDrawing();
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ int main(void)
|
|||
|
||||
// Draw mouse position
|
||||
DrawCircleV(GetMousePosition(), 20, MAROON);
|
||||
DrawRectangle(mousePos.x - 25, mousePos.y, 50, 2, BLACK);
|
||||
DrawRectangle(mousePos.x, mousePos.y - 25, 2, 50, BLACK);
|
||||
DrawRectangleRec((Rectangle) { mousePos.x - 25, mousePos.y, 50, 2 }, BLACK);
|
||||
DrawRectangleRec((Rectangle) { mousePos.x, mousePos.y - 25, 2, 50 }, BLACK);
|
||||
DrawText(TextFormat("[%i,%i]", GetMouseX(), GetMouseY()), mousePos.x - 44,
|
||||
(mousePos.y > GetScreenHeight() - 60)? mousePos.y - 46 : mousePos.y + 30, 20, BLACK);
|
||||
(mousePos.y > GetScreenHeight() - 60)? (int)mousePos.y - 46 : (int)mousePos.y + 30, 20, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -177,10 +177,10 @@ int main(void)
|
|||
DrawRectangleRec(increaseTypeButton, SKYBLUE);
|
||||
DrawRectangleRec(decreaseResolutionButton, SKYBLUE);
|
||||
DrawRectangleRec(increaseResolutionButton, SKYBLUE);
|
||||
DrawText("<", decreaseTypeButton.x + 3, decreaseTypeButton.y + 1, 10, BLACK);
|
||||
DrawText(">", increaseTypeButton.x + 3, increaseTypeButton.y + 1, 10, BLACK);
|
||||
DrawText("<", decreaseResolutionButton.x + 3, decreaseResolutionButton.y + 1, 10, BLACK);
|
||||
DrawText(">", increaseResolutionButton.x + 3, increaseResolutionButton.y + 1, 10, BLACK);
|
||||
DrawText("<", (int)decreaseTypeButton.x + 3, (int)decreaseTypeButton.y + 1, 10, BLACK);
|
||||
DrawText(">", (int)increaseTypeButton.x + 3, (int)increaseTypeButton.y + 1, 10, BLACK);
|
||||
DrawText("<", (int)decreaseResolutionButton.x + 3, (int)decreaseResolutionButton.y + 1, 10, BLACK);
|
||||
DrawText(">", (int)increaseResolutionButton.x + 3, (int)increaseResolutionButton.y + 1, 10, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -308,7 +308,7 @@ static void ResizeRenderSize(ViewportType viewportType, int *screenWidth, int *s
|
|||
}
|
||||
|
||||
UnloadRenderTexture(*target);
|
||||
*target = LoadRenderTexture(sourceRect->width, -sourceRect->height);
|
||||
*target = LoadRenderTexture((int)sourceRect->width, -(int)sourceRect->height);
|
||||
}
|
||||
|
||||
// Example how to calculate position on RenderTexture
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ int main(void)
|
|||
NULL, TextFormat("x%.1f", animFrameSpeed0), &animFrameSpeed0, 0.1f, 2.0f);
|
||||
GuiEnable();
|
||||
if (dropdownEditMode1) GuiDisable();
|
||||
GuiSlider((Rectangle){ GetScreenWidth() - 170, 38, 160, 12 },
|
||||
GuiSlider((Rectangle){ GetScreenWidth() - 170.0f, 38, 160, 12 },
|
||||
TextFormat("%.1fx", animFrameSpeed1), NULL, &animFrameSpeed1, 0.1f, 2.0f);
|
||||
GuiEnable();
|
||||
|
||||
|
|
@ -241,23 +241,23 @@ int main(void)
|
|||
GuiProgressBar((Rectangle){ 180, 14, 440, 16 }, NULL, NULL, &animBlendProgress, 0.0f, 1.0f);
|
||||
GuiSetStyle(PROGRESSBAR, PROGRESS_SIDE, 0); // Reset to Left-->Right
|
||||
|
||||
if (GuiDropdownBox((Rectangle){ GetScreenWidth() - 170, 10, 160, 24 }, TextJoin(animNames, animCount, ";"),
|
||||
if (GuiDropdownBox((Rectangle){ GetScreenWidth() - 170.0f, 10, 160, 24 }, TextJoin(animNames, animCount, ";"),
|
||||
&animIndex1, dropdownEditMode1)) dropdownEditMode1 = !dropdownEditMode1;
|
||||
|
||||
// Draw playing timeline with keyframes for anim0[]
|
||||
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 60, GetScreenWidth() - 180, 20 }, "ANIM 0",
|
||||
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 60.0f, GetScreenWidth() - 180.0f, 20 }, "ANIM 0",
|
||||
TextFormat("FRAME: %.2f / %i", animFrameProgress0, anims[animIndex0].keyframeCount),
|
||||
&animFrameProgress0, 0.0f, (float)anims[animIndex0].keyframeCount);
|
||||
for (int i = 0; i < anims[animIndex0].keyframeCount; i++)
|
||||
DrawRectangle(60 + ((float)(GetScreenWidth() - 180)/(float)anims[animIndex0].keyframeCount)*(float)i,
|
||||
DrawRectangle(60 + (int)(((float)(GetScreenWidth() - 180)/(float)anims[animIndex0].keyframeCount)*(float)i),
|
||||
GetScreenHeight() - 60, 1, 20, BLUE);
|
||||
|
||||
// Draw playing timeline with keyframes for anim1[]
|
||||
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 30, GetScreenWidth() - 180, 20 }, "ANIM 1",
|
||||
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 30.0f, GetScreenWidth() - 180.0f, 20 }, "ANIM 1",
|
||||
TextFormat("FRAME: %.2f / %i", animFrameProgress1, anims[animIndex1].keyframeCount),
|
||||
&animFrameProgress1, 0.0f, (float)anims[animIndex1].keyframeCount);
|
||||
for (int i = 0; i < anims[animIndex1].keyframeCount; i++)
|
||||
DrawRectangle(60 + ((float)(GetScreenWidth() - 180)/(float)anims[animIndex1].keyframeCount)*(float)i,
|
||||
DrawRectangle(60 + (int)(((float)(GetScreenWidth() - 180)/(float)anims[animIndex1].keyframeCount)*(float)i),
|
||||
GetScreenHeight() - 30, 1, 20, BLUE);
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -108,12 +108,12 @@ int main(void)
|
|||
&animFrameSpeed, 0.1f, 2.0f);
|
||||
|
||||
// Draw playing timeline with keyframes
|
||||
GuiLabel((Rectangle){ 10, GetScreenHeight() - 64, GetScreenWidth() - 20, 24 },
|
||||
GuiLabel((Rectangle){ 10, GetScreenHeight() - 64.0f, GetScreenWidth() - 20.0f, 24 },
|
||||
TextFormat("CURRENT FRAME: %.2f / %i", animFrameProgress, anims[animIndex].keyframeCount));
|
||||
GuiProgressBar((Rectangle){ 10, GetScreenHeight() - 40, GetScreenWidth() - 20, 24 }, NULL, NULL,
|
||||
GuiProgressBar((Rectangle){ 10, GetScreenHeight() - 40.0f, GetScreenWidth() - 20.0f, 24 }, NULL, NULL,
|
||||
&animFrameProgress, 0.0f, (float)anims[animIndex].keyframeCount);
|
||||
for (int i = 0; i < anims[animIndex].keyframeCount; i++)
|
||||
DrawRectangle(10 + ((float)(GetScreenWidth() - 20)/(float)anims[animIndex].keyframeCount)*(float)i,
|
||||
DrawRectangle(10 + (int)(((float)(GetScreenWidth() - 20)/(float)anims[animIndex].keyframeCount)*(float)i),
|
||||
GetScreenHeight() - 40, 1, 24, BLUE);
|
||||
|
||||
EndDrawing();
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ int main(void)
|
|||
// Update model animation
|
||||
ModelAnimation anim = modelAnimations[animIndex];
|
||||
animCurrentFrame = (animCurrentFrame + 1)%anim.keyframeCount;
|
||||
UpdateModelAnimation(characterModel, anim, animCurrentFrame);
|
||||
UpdateModelAnimation(characterModel, anim, (float)animCurrentFrame);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
@ -129,7 +129,7 @@ int main(void)
|
|||
// Draw character
|
||||
Quaternion characterRotate = QuaternionFromAxisAngle((Vector3){ 0.0f, 1.0f, 0.0f }, angle*DEG2RAD);
|
||||
characterModel.transform = MatrixMultiply(QuaternionToMatrix(characterRotate), MatrixTranslate(position.x, position.y, position.z));
|
||||
UpdateModelAnimation(characterModel, anim, animCurrentFrame);
|
||||
UpdateModelAnimation(characterModel, anim, (float)animCurrentFrame);
|
||||
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
|
||||
|
||||
// Draw equipments (hat, sword, shield)
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ int main(void)
|
|||
|
||||
frameCounter++;
|
||||
frameCounter %= (anims[0].keyframeCount);
|
||||
UpdateModelAnimation(robot, anims[0], frameCounter);
|
||||
UpdateModelAnimation(robot, anims[0], (float)frameCounter);
|
||||
|
||||
// Move light with arrow keys
|
||||
const float cameraSpeed = 0.05f;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ int main(void)
|
|||
|
||||
// Cotangent (orange)
|
||||
DrawLineEx((Vector2){ center.x , limitMin.y }, (Vector2){ cotangentPoint.x, limitMin.y }, 2.0f, ORANGE);
|
||||
DrawLineDashed(center, cotangentPoint, 10.0f, 4.0f, ORANGE);
|
||||
DrawLineDashed(center, cotangentPoint, 10, 4, ORANGE);
|
||||
|
||||
// Side background
|
||||
DrawLine(580, 0, 580, GetScreenHeight(), (Color){ 218, 218, 218, 255 });
|
||||
|
|
@ -106,48 +106,48 @@ int main(void)
|
|||
DrawLineEx((Vector2){ start.x, start.y + start.height/2 }, (Vector2){ start.x + start.width, start.y + start.height/2 }, 2.0f, GRAY);
|
||||
|
||||
// Wave graph axis labels
|
||||
DrawText("1", start.x - 8, start.y, 6, GRAY);
|
||||
DrawText("0", start.x - 8, start.y + start.height/2 - 6, 6, GRAY);
|
||||
DrawText("-1", start.x - 12, start.y + start.height - 8, 6, GRAY);
|
||||
DrawText("0", start.x - 2, start.y + start.height + 4, 6, GRAY);
|
||||
DrawText("360", start.x + start.width - 8, start.y + start.height + 4, 6, GRAY);
|
||||
DrawText("1", (int)start.x - 8, (int)start.y, 6, GRAY);
|
||||
DrawText("0", (int)start.x - 8, (int)start.y + (int)start.height/2 - 6, 6, GRAY);
|
||||
DrawText("-1", (int)start.x - 12, (int)start.y + (int)start.height - 8, 6, GRAY);
|
||||
DrawText("0", (int)start.x - 2, (int)start.y + (int)start.height + 4, 6, GRAY);
|
||||
DrawText("360", (int)start.x + (int)start.width - 8, (int)start.y + (int)start.height + 4, 6, GRAY);
|
||||
|
||||
// Sine (red - vertical)
|
||||
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ center.x, point.y }, 2.0f, RED);
|
||||
DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, RED);
|
||||
DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10, 4, RED);
|
||||
DrawText(TextFormat("Sine %.2f", sinRad), 640, 190, 6, RED);
|
||||
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-sinRad + 1)*start.height/2.0f) }, 4.0f, RED);
|
||||
DrawSplineLinear(sinePoints, WAVE_POINTS, 1.0f, RED);
|
||||
|
||||
// Cosine (blue - horizontal)
|
||||
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ point.x, center.y }, 2.0f, BLUE);
|
||||
DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, BLUE);
|
||||
DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10, 4, BLUE);
|
||||
DrawText(TextFormat("Cosine %.2f", cosRad), 640, 210, 6, BLUE);
|
||||
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-cosRad + 1)*start.height/2.0f) }, 4.0f, BLUE);
|
||||
DrawSplineLinear(cosPoints, WAVE_POINTS, 1.0f, BLUE);
|
||||
|
||||
// Tangent (purple)
|
||||
DrawLineEx((Vector2){ limitMax.x , center.y }, (Vector2){ limitMax.x, tangentPoint.y }, 2.0f, PURPLE);
|
||||
DrawLineDashed(center, tangentPoint, 10.0f, 4.0f, PURPLE);
|
||||
DrawLineDashed(center, tangentPoint, 10, 4, PURPLE);
|
||||
DrawText(TextFormat("Tangent %.2f", tangent), 640, 230, 6, PURPLE);
|
||||
|
||||
// Cotangent (orange)
|
||||
DrawText(TextFormat("Cotangent %.2f", cotangent), 640, 250, 6, ORANGE);
|
||||
|
||||
// Complementary angle (beige)
|
||||
DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36.0f, BEIGE);
|
||||
DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36, BEIGE);
|
||||
DrawText(TextFormat("Complementary %0.f°",complementary), 640, 150, 6, BEIGE);
|
||||
|
||||
// Supplementary angle (darkblue)
|
||||
DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36.0f, DARKBLUE);
|
||||
DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36, DARKBLUE);
|
||||
DrawText(TextFormat("Supplementary %0.f°",supplementary), 640, 130, 6, DARKBLUE);
|
||||
|
||||
// Explementary angle (pink)
|
||||
DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36.0f, PINK);
|
||||
DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36, PINK);
|
||||
DrawText(TextFormat("Explementary %0.f°",explementary), 640, 170, 6, PINK);
|
||||
|
||||
// Current angle - arc (lime), radius (black), endpoint (black)
|
||||
DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36.0f, LIME);
|
||||
DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36, LIME);
|
||||
DrawLineEx((Vector2){ center.x , center.y }, point, 2.0f, BLACK);
|
||||
DrawCircleV(point, 4.0f, BLACK);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
//----------------------------------------------------------------------------------
|
||||
typedef struct TurtleState {
|
||||
Vector2 origin;
|
||||
double angle;
|
||||
float angle;
|
||||
} TurtleState;
|
||||
|
||||
typedef struct PenroseLSystem {
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ int main(void)
|
|||
|
||||
// Draw inner circle to create donut effect
|
||||
// TODO: This is a hacky solution, better use DrawRing()
|
||||
if (showDonut) DrawCircle(center.x, center.y, donutInnerRadius, RAYWHITE);
|
||||
if (showDonut) DrawCircleV(center, donutInnerRadius, RAYWHITE);
|
||||
|
||||
startAngle += sweepAngle;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ int main(void)
|
|||
// Setup the stars with a random position
|
||||
for (int i = 0; i < STAR_COUNT; i++)
|
||||
{
|
||||
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f);
|
||||
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f);
|
||||
stars[i].x = (float)GetRandomValue(-screenWidth / 2, (int)screenWidth / 2);
|
||||
stars[i].y = (float)GetRandomValue(-screenHeight / 2, (int)screenHeight / 2);
|
||||
stars[i].z = 1.0f;
|
||||
}
|
||||
|
||||
|
|
@ -85,8 +85,8 @@ int main(void)
|
|||
if ((stars[i].z < 0.0f) || (starsScreenPos[i].x < 0) || (starsScreenPos[i].y < 0.0f) ||
|
||||
(starsScreenPos[i].x > screenWidth) || (starsScreenPos[i].y > screenHeight))
|
||||
{
|
||||
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f);
|
||||
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f);
|
||||
stars[i].x = (float)GetRandomValue(-screenWidth / 2, screenWidth / 2);
|
||||
stars[i].y = (float)GetRandomValue(-screenHeight / 2, screenHeight / 2);
|
||||
stars[i].z = 1.0f;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ int main(void)
|
|||
DrawRectangleRec(textContainerRect, BLUE);
|
||||
|
||||
// Get the size of the text to draw
|
||||
Vector2 textSize = MeasureTextEx(font, words[wordIndex], fontSize, fontSize*.1f);
|
||||
Vector2 textSize = MeasureTextEx(font, words[wordIndex], (float)fontSize, fontSize*.1f);
|
||||
|
||||
// Calculate the top-left text position based on the rectangle and alignment
|
||||
Vector2 textPos = (Vector2){
|
||||
|
|
@ -118,7 +118,7 @@ int main(void)
|
|||
};
|
||||
|
||||
// Draw the text
|
||||
DrawTextEx(font, words[wordIndex], textPos, fontSize, fontSize*.1f, RAYWHITE);
|
||||
DrawTextEx(font, words[wordIndex], textPos, (float)fontSize, fontSize*.1f, RAYWHITE);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -5631,7 +5631,7 @@ Global
|
|||
{C54703BF-D68A-480D-BE27-49B62E45D582} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{9CD8BCAD-F212-4BCC-BA98-899743CE3279} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
|
||||
{6B1A933E-71B8-4C1F-9E79-02D98830E671} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||
{6BFF72EA-7362-4A3B-B6E5-9A3655BBBDA3} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{6777EC3C-077C-42FC-B4AD-B799CE55CCE4} = {8D3C83B7-F1E0-4C2E-9E34-EE5F6AB2502A}
|
||||
{A61DAD9C-271C-4E95-81AA-DB4CD58564D4} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||
|
|
@ -5645,7 +5645,7 @@ Global
|
|||
{52BA9067-A5FC-4CE8-82AD-7204ECFDEF9F} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
|
||||
{8E132D5A-2C00-48D0-8747-97E41356F26F} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{A4662163-83E7-4309-8CAA-B0BF13655FE6} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
|
||||
{5F4B766F-DD52-4B53-B6C3-BC7611E17F20} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{5F4B766F-DD52-4B53-B6C3-BC7611E17F20} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{FF5F9EE9-29C5-40EE-BBCF-AE51B001FEC3} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||
{0C442799-B09C-4CD1-9538-711B6E85E9BF} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{DFB40A10-F8B7-412A-BCC3-5EE49294D816} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@
|
|||
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often
|
||||
#define SUPPORT_WINMM_HIGHRES_TIMER 1
|
||||
#endif
|
||||
#if !defined(SUPPORT_BUSY_WAIT_LOOP) && !SUPPORT_PARTIALBUSY_WAIT_LOOP
|
||||
#if !SUPPORT_BUSY_WAIT_LOOP && !SUPPORT_PARTIALBUSY_WAIT_LOOP
|
||||
// Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used
|
||||
#define SUPPORT_BUSY_WAIT_LOOP 0 // Disabled by default
|
||||
#endif
|
||||
#if !defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) && !SUPPORT_BUSY_WAIT_LOOP
|
||||
#if !SUPPORT_PARTIALBUSY_WAIT_LOOP && !SUPPORT_BUSY_WAIT_LOOP
|
||||
// Use a partial-busy wait loop, in this case frame sleeps for most of the time,
|
||||
// but then runs a busy loop at the end for accuracy
|
||||
#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1
|
||||
|
|
|
|||
|
|
@ -2058,7 +2058,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
|
|||
CORE.Input.Mouse.currentButtonState[button] = action;
|
||||
CORE.Input.Touch.currentTouchState[button] = action;
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
@ -2093,7 +2093,7 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
|
|||
CORE.Input.Mouse.currentPosition.y = (float)y;
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ const char *GetClipboardText(void)
|
|||
return RGFW_readClipboard(NULL);
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if SUPPORT_CLIPBOARD_IMAGE
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_CLIPBOARD_IMPLEMENTATION
|
||||
#define WINUSER_ALREADY_INCLUDED
|
||||
|
|
@ -1006,7 +1006,7 @@ const char *GetClipboardText(void)
|
|||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if SUPPORT_CLIPBOARD_IMAGE
|
||||
#if SUPPORT_MODULE_RTEXTURES
|
||||
#if defined(_WIN32)
|
||||
|
||||
|
|
@ -1151,7 +1151,7 @@ const char *GetKeyName(int key)
|
|||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
// NOTE: Gestures update must be called every frame to reset gestures correctly
|
||||
// because ProcessGestureEvent() is just called on an event, not every frame
|
||||
UpdateGestures();
|
||||
|
|
@ -1417,7 +1417,7 @@ void PollInputEvents(void)
|
|||
default: break;
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
if (touchAction > -1)
|
||||
{
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ const char *GetKeyName(int key)
|
|||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
// NOTE: Gestures update must be called every frame to reset gestures correctly
|
||||
// because ProcessGestureEvent() is just called on an event, not every frame
|
||||
UpdateGestures();
|
||||
|
|
|
|||
|
|
@ -1564,7 +1564,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
|
|||
CORE.Input.Mouse.currentButtonState[button] = action;
|
||||
CORE.Input.Touch.currentTouchState[button] = action;
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
@ -1605,7 +1605,7 @@ static void MouseMoveCallback(GLFWwindow *window, double x, double y)
|
|||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
}
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
|
|||
|
|
@ -1457,7 +1457,7 @@ static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent
|
|||
default: break;
|
||||
}
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
@ -1529,7 +1529,7 @@ static EM_BOOL EmscriptenMouseMoveCallback(int eventType, const EmscriptenMouseE
|
|||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
}
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && SUPPORT_MOUSE_GESTURES
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
|
|
|||
|
|
@ -2545,7 +2545,7 @@ static ma_uint32 ReadAudioBufferFramesInMixingFormat(AudioBuffer *audioBuffer, f
|
|||
}
|
||||
|
||||
memcpy(audioBuffer->converterResidual, inputBuffer + inputFramesProcessedThisIteration*bpf, (size_t)(residualFrameCount * bpf));
|
||||
audioBuffer->converterResidualCount = residualFrameCount;
|
||||
audioBuffer->converterResidualCount = (unsigned int)residualFrameCount;
|
||||
}
|
||||
|
||||
if (inputFramesInInternalFormatCount < estimatedInputFrameCount) break; // Reached the end of the sound
|
||||
|
|
|
|||
|
|
@ -1591,7 +1591,7 @@ int GetFPS(void)
|
|||
{
|
||||
int fps = 0;
|
||||
|
||||
#if !defined(SUPPORT_CUSTOM_FRAME_CONTROL)
|
||||
#if !SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
#define FPS_CAPTURE_FRAMES_COUNT 30 // 30 captures
|
||||
#define FPS_AVERAGE_TIME_SECONDS 0.5f // 500 milliseconds
|
||||
#define FPS_STEP (FPS_AVERAGE_TIME_SECONDS/FPS_CAPTURE_FRAMES_COUNT)
|
||||
|
|
@ -3530,11 +3530,11 @@ AutomationEventList LoadAutomationEventList(const char *fileName)
|
|||
{
|
||||
AutomationEventList list = { 0 };
|
||||
|
||||
#if SUPPORT_AUTOMATION_EVENTS
|
||||
// Allocate and empty automation event list, ready to record new events
|
||||
list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent));
|
||||
list.capacity = MAX_AUTOMATION_EVENTS;
|
||||
|
||||
#if SUPPORT_AUTOMATION_EVENTS
|
||||
|
||||
if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully");
|
||||
else
|
||||
{
|
||||
|
|
@ -4566,7 +4566,7 @@ static void RecordAutomationEvent(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(SUPPORT_MODULE_RTEXT)
|
||||
#if !SUPPORT_MODULE_RTEXT
|
||||
// Formatting of text with variables to 'embed'
|
||||
// WARNING: String returned will expire after this function is called MAX_TEXTFORMAT_BUFFERS times
|
||||
const char *TextFormat(const char *text, ...)
|
||||
|
|
|
|||
|
|
@ -71,31 +71,31 @@
|
|||
#include <stdio.h> // Required for: sprintf() [Used in ExportImageAsCode()]
|
||||
|
||||
// Support only desired texture formats on stb_image
|
||||
#if !defined(SUPPORT_FILEFORMAT_BMP)
|
||||
#if !SUPPORT_FILEFORMAT_BMP
|
||||
#define STBI_NO_BMP
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_PNG)
|
||||
#if !SUPPORT_FILEFORMAT_PNG
|
||||
#define STBI_NO_PNG
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_TGA)
|
||||
#if !SUPPORT_FILEFORMAT_TGA
|
||||
#define STBI_NO_TGA
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_JPG)
|
||||
#if !SUPPORT_FILEFORMAT_JPG
|
||||
#define STBI_NO_JPEG // Image format .jpg and .jpeg
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_PSD)
|
||||
#if !SUPPORT_FILEFORMAT_PSD
|
||||
#define STBI_NO_PSD
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_GIF)
|
||||
#if !SUPPORT_FILEFORMAT_GIF
|
||||
#define STBI_NO_GIF
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_PIC)
|
||||
#if !SUPPORT_FILEFORMAT_PIC
|
||||
#define STBI_NO_PIC
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_HDR)
|
||||
#if !SUPPORT_FILEFORMAT_HDR
|
||||
#define STBI_NO_HDR
|
||||
#endif
|
||||
#if !defined(SUPPORT_FILEFORMAT_PNM)
|
||||
#if !SUPPORT_FILEFORMAT_PNM
|
||||
#define STBI_NO_PNM
|
||||
#endif
|
||||
|
||||
|
|
@ -150,11 +150,11 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(SUPPORT_FILEFORMAT_DDS) || \
|
||||
defined(SUPPORT_FILEFORMAT_PKM) || \
|
||||
defined(SUPPORT_FILEFORMAT_KTX) || \
|
||||
defined(SUPPORT_FILEFORMAT_PVR) || \
|
||||
defined(SUPPORT_FILEFORMAT_ASTC))
|
||||
#if (SUPPORT_FILEFORMAT_DDS || \
|
||||
SUPPORT_FILEFORMAT_PKM || \
|
||||
SUPPORT_FILEFORMAT_KTX || \
|
||||
SUPPORT_FILEFORMAT_PVR || \
|
||||
SUPPORT_FILEFORMAT_ASTC)
|
||||
|
||||
#if defined(__GNUC__) // GCC and Clang
|
||||
#pragma GCC diagnostic push
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user