Fixes for 64 bit typecast warnings (#1733)

This commit is contained in:
Jeffery Myers 2021-04-25 09:50:26 -07:00 committed by GitHub
parent 8719858655
commit 6c518008a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 68 additions and 68 deletions

View file

@ -45,9 +45,9 @@ int main(void)
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
DrawTriangle((Vector2){screenWidth/4*3, 80},
(Vector2){screenWidth/4*3 - 60, 150},
(Vector2){screenWidth/4*3 + 60, 150}, VIOLET);
DrawTriangle((Vector2){screenWidth/4.0f *3.0f, 80.0f},
(Vector2){screenWidth/4.0f *3.0f - 60.0f, 150.0f},
(Vector2){screenWidth/4.0f *3.0f + 60.0f, 150.0f}, VIOLET);
DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, BROWN);
@ -57,9 +57,9 @@ int main(void)
// this way, all LINES are rendered in a single draw pass
DrawLine(18, 42, screenWidth - 18, 42, BLACK);
DrawCircleLines(screenWidth/4, 340, 80, DARKBLUE);
DrawTriangleLines((Vector2){screenWidth/4*3, 160},
(Vector2){screenWidth/4*3 - 20, 230},
(Vector2){screenWidth/4*3 + 20, 230}, DARKBLUE);
DrawTriangleLines((Vector2){screenWidth/4.0f*3.0f, 160.0f},
(Vector2){screenWidth/4.0f*3.0f - 20.0f, 230.0f},
(Vector2){screenWidth/4.0f*3.0f + 20.0f, 230.0f}, DARKBLUE);
EndDrawing();
//----------------------------------------------------------------------------------
}

View file

@ -37,10 +37,10 @@ int main(void)
// Fills colorsRecs data (for every rectangle)
for (int i = 0; i < MAX_COLORS_COUNT; i++)
{
colorsRecs[i].x = 20 + 100*(i%7) + 10*(i%7);
colorsRecs[i].y = 80 + 100*(i/7) + 10*(i/7);
colorsRecs[i].width = 100;
colorsRecs[i].height = 100;
colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7);
colorsRecs[i].y = 80.0f + 100.0f *(i/7) + 10.0f *(i/7);
colorsRecs[i].width = 100.0f;
colorsRecs[i].height = 100.0f;
}
int colorState[MAX_COLORS_COUNT] = { 0 }; // Color state: 0-DEFAULT, 1-MOUSE_HOVER

View file

@ -22,12 +22,12 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - following eyes");
Vector2 scleraLeftPosition = { GetScreenWidth()/2 - 100, GetScreenHeight()/2 };
Vector2 scleraRightPosition = { GetScreenWidth()/2 + 100, GetScreenHeight()/2 };
Vector2 scleraLeftPosition = { GetScreenWidth()/2.0f - 100.0f, GetScreenHeight()/2.0f };
Vector2 scleraRightPosition = { GetScreenWidth()/2.0f + 100.0f, GetScreenHeight()/2.0f };
float scleraRadius = 80;
Vector2 irisLeftPosition = { GetScreenWidth()/2 - 100, GetScreenHeight()/2 };
Vector2 irisRightPosition = { GetScreenWidth()/2 + 100, GetScreenHeight()/2};
Vector2 irisLeftPosition = { GetScreenWidth()/2.0f - 100.0f, GetScreenHeight()/2.0f };
Vector2 irisRightPosition = { GetScreenWidth()/2.0f + 100.0f, GetScreenHeight()/2.0f };
float irisRadius = 24;
float angle = 0.0f;

View file

@ -22,7 +22,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines");
Vector2 start = { 0, 0 };
Vector2 end = { screenWidth, screenHeight };
Vector2 end = { (float)screenWidth, (float)screenHeight };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------