Fix VC warnings for examples (#2085)
This commit is contained in:
parent
086f76ba7a
commit
daeccd03ac
21 changed files with 104 additions and 104 deletions
|
@ -67,14 +67,14 @@ int main(void)
|
|||
// Scatter random cubes around
|
||||
for (int i = 0; i < MAX_INSTANCES; i++)
|
||||
{
|
||||
x = GetRandomValue(-50, 50);
|
||||
y = GetRandomValue(-50, 50);
|
||||
z = GetRandomValue(-50, 50);
|
||||
x = (float)GetRandomValue(-50, 50);
|
||||
y = (float)GetRandomValue(-50, 50);
|
||||
z = (float)GetRandomValue(-50, 50);
|
||||
translations[i] = MatrixTranslate(x, y, z);
|
||||
|
||||
x = GetRandomValue(0, 360);
|
||||
y = GetRandomValue(0, 360);
|
||||
z = GetRandomValue(0, 360);
|
||||
x = (float)GetRandomValue(0, 360);
|
||||
y = (float)GetRandomValue(0, 360);
|
||||
z = (float)GetRandomValue(0, 360);
|
||||
Vector3 axis = Vector3Normalize((Vector3){ x, y, z });
|
||||
float angle = (float)GetRandomValue(0, 10)*DEG2RAD;
|
||||
|
||||
|
@ -136,11 +136,11 @@ int main(void)
|
|||
if (IsKeyDown(KEY_NINE)) groups = 9;
|
||||
if (IsKeyDown(KEY_W)) { groups = 7; amp = 25; speed = 18; variance = 0.70f; }
|
||||
|
||||
if (IsKeyDown(KEY_EQUAL)) speed = (speed <= (fps*0.25f))? (fps*0.25f) : (speed*0.95f);
|
||||
if (IsKeyDown(KEY_KP_ADD)) speed = (speed <= (fps*0.25f))? (fps*0.25f) : (speed*0.95f);
|
||||
if (IsKeyDown(KEY_EQUAL)) speed = (speed <= (fps*0.25f))? (int)(fps*0.25f) : (int)(speed*0.95f);
|
||||
if (IsKeyDown(KEY_KP_ADD)) speed = (speed <= (fps*0.25f))? (int)(fps*0.25f) : (int)(speed*0.95f);
|
||||
|
||||
if (IsKeyDown(KEY_MINUS)) speed = fmaxf(speed*1.02f, speed + 1);
|
||||
if (IsKeyDown(KEY_KP_SUBTRACT)) speed = fmaxf(speed*1.02f, speed + 1);
|
||||
if (IsKeyDown(KEY_MINUS)) speed = (int)fmaxf(speed*1.02f, speed + 1);
|
||||
if (IsKeyDown(KEY_KP_SUBTRACT)) speed = (int)fmaxf(speed*1.02f, speed + 1);
|
||||
|
||||
// Update the light shader with the camera view position
|
||||
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
|
||||
|
|
|
@ -120,14 +120,14 @@ int main(void)
|
|||
// and initialize the shader locations
|
||||
for (int i = 0; i < MAX_SPOTS; i++)
|
||||
{
|
||||
spots[i].pos.x = GetRandomValue(64.0f, screenWidth - 64.0f);
|
||||
spots[i].pos.y = GetRandomValue(64.0f, screenHeight - 64.0f);
|
||||
spots[i].pos.x = (float)GetRandomValue(64, screenWidth - 64);
|
||||
spots[i].pos.y = (float)GetRandomValue(64, screenHeight - 64);
|
||||
spots[i].vel = (Vector2){ 0, 0 };
|
||||
|
||||
while ((fabs(spots[i].vel.x) + fabs(spots[i].vel.y)) < 2)
|
||||
{
|
||||
spots[i].vel.x = GetRandomValue(-400.f, 40.0f) / 10.0f;
|
||||
spots[i].vel.y = GetRandomValue(-400.f, 40.0f) / 10.0f;
|
||||
spots[i].vel.x = GetRandomValue(-400, 40) / 10.0f;
|
||||
spots[i].vel.y = GetRandomValue(-400, 40) / 10.0f;
|
||||
}
|
||||
|
||||
spots[i].inner = 28.0f * (i + 1);
|
||||
|
@ -190,8 +190,8 @@ int main(void)
|
|||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
DrawTexture(texRay,
|
||||
(screenWidth/2.0f) + cos((frameCounter + i*8)/51.45f)*(screenWidth/2.2f) - 32,
|
||||
(screenHeight/2.0f) + sin((frameCounter + i*8)/17.87f)*(screenHeight/4.2f), WHITE);
|
||||
(int)((screenWidth/2.0f) + cos((frameCounter + i*8)/51.45f)*(screenWidth/2.2f) - 32),
|
||||
(int)((screenHeight/2.0f) + sin((frameCounter + i*8)/17.87f)*(screenHeight/4.2f)), WHITE);
|
||||
}
|
||||
|
||||
// Draw spot lights
|
||||
|
@ -206,8 +206,8 @@ int main(void)
|
|||
DrawFPS(10, 10);
|
||||
|
||||
DrawText("Move the mouse!", 10, 30, 20, GREEN);
|
||||
DrawText("Pitch Black", screenWidth*0.2f, screenHeight/2, 20, GREEN);
|
||||
DrawText("Dark", screenWidth*.66f, screenHeight/2, 20, GREEN);
|
||||
DrawText("Pitch Black", (int)(screenWidth*0.2f), screenHeight/2, 20, GREEN);
|
||||
DrawText("Dark", (int)(screenWidth*.66f), screenHeight/2, 20, GREEN);
|
||||
|
||||
|
||||
EndDrawing();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue