mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
[examples] Fix examples to work in MSVC (#5267)
* Fix warnings in many examples Add examples to MSVC solution correctly * fix CI error --------- Co-authored-by: Ray <raysan5@gmail.com>
This commit is contained in:
@ -88,7 +88,7 @@ int main(void)
|
||||
if (!voxels[x][y][z]) continue; // Skip empty voxels
|
||||
|
||||
// Build a bounding box for this voxel
|
||||
Vector3 position = { x, y, z };
|
||||
Vector3 position = { (float)x, (float)y, (float)z };
|
||||
BoundingBox box = {
|
||||
(Vector3){ position.x - 0.5f, position.y - 0.5f, position.z - 0.5f },
|
||||
(Vector3){ position.x + 0.5f, position.y + 0.5f, position.z + 0.5f }
|
||||
@ -126,7 +126,7 @@ int main(void)
|
||||
{
|
||||
if (!voxels[x][y][z]) continue;
|
||||
|
||||
Vector3 position = { x, y, z };
|
||||
Vector3 position = { (float)x, (float)y, (float)z };
|
||||
DrawModel(cubeModel, position, 1.0f, BEIGE);
|
||||
DrawCubeWires(position, 1.0f, 1.0f, 1.0f, BLACK);
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ int main(void)
|
||||
// Load image to create texture for the cube
|
||||
Model model = LoadModelFromMesh(GenMeshCube(1.0f, 1.0f, 1.0f));
|
||||
Image img = LoadImage("resources/cubicmap_atlas.png");
|
||||
Image crop = ImageFromImage(img, (Rectangle){0, img.height/2, img.width/2, img.height/2});
|
||||
Image crop = ImageFromImage(img, (Rectangle){0, img.height/2.0f, img.width/2.0f, img.height/2.0f});
|
||||
Texture2D texture = LoadTextureFromImage(crop);
|
||||
UnloadImage(img);
|
||||
UnloadImage(crop);
|
||||
|
||||
@ -65,7 +65,7 @@ int main(void)
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
rotation = DEG2RAD*45.0f*GetTime();
|
||||
rotation = DEG2RAD*45.0f*(float)GetTime();
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user