@@ -25,7 +25,7 @@ int main(void)
2525
2626 raylib::Image imMap (" resources/cubicmap.png" ); // Load cubicmap image (RAM)
2727 raylib::Texture cubicmap (imMap); // Convert image to texture to display (VRAM)
28- Mesh mesh = raylib::Mesh::Cubicmap (imMap, ( Vector3) { 1 .0f , 1 .0f , 1 .0f });
28+ Mesh mesh = raylib::Mesh::Cubicmap (imMap, Vector3{ 1 .0f , 1 .0f , 1 .0f });
2929 raylib::Model model (mesh);
3030
3131 // NOTE: By default each cube is mapped to one part of texture atlas
@@ -75,7 +75,7 @@ int main(void)
7575 {
7676 if ((mapPixels[y*cubicmap.width + x].r == 255 ) && // Collision: white pixel, only check R channel
7777 (playerPos.CheckCollisionCircle (playerRadius,
78- ( Rectangle) { mapPosition.x - 0 .5f + x*1 .0f , mapPosition.z - 0 .5f + y*1 .0f , 1 .0f , 1 .0f })))
78+ Rectangle{ mapPosition.x - 0 .5f + x*1 .0f , mapPosition.z - 0 .5f + y*1 .0f , 1 .0f , 1 .0f })))
7979 {
8080 // Collision detected, reset camera position
8181 camera.position = oldCamPos;
@@ -97,7 +97,7 @@ int main(void)
9797 }
9898 camera.EndMode ();
9999
100- cubicmap.Draw (( Vector2) { static_cast <float >(GetScreenWidth () - cubicmap.width *4 - 20 ), 20 }, 0 .0f , 4 .0f , WHITE);
100+ cubicmap.Draw (Vector2{ static_cast <float >(GetScreenWidth () - cubicmap.width *4 - 20 ), 20 }, 0 .0f , 4 .0f , WHITE);
101101 DrawRectangleLines (GetScreenWidth () - cubicmap.width *4 - 20 , 20 , cubicmap.width *4 , cubicmap.height *4 , GREEN);
102102
103103 // Draw player position radar
0 commit comments