Update example casts

This commit is contained in:
Not-Nik 2023-07-11 15:56:39 +02:00
parent 9e908b3925
commit d07552a064
Failed to generate hash of commit
4 changed files with 7 additions and 7 deletions

View file

@ -93,8 +93,8 @@ pub fn main() anyerror!void {
rl.drawRectangleRec(player, rl.Color.red);
rl.drawLine(@floatToInt(c_int, camera.target.x), -screenHeight * 10, @floatToInt(c_int, camera.target.x), screenHeight * 10, rl.Color.green);
rl.drawLine(-screenWidth * 10, @floatToInt(c_int, camera.target.y), screenWidth * 10, @floatToInt(c_int, camera.target.y), rl.Color.green);
rl.drawLine(@floatToInt(i32, camera.target.x), -screenHeight * 10, @floatToInt(i32, camera.target.x), screenHeight * 10, rl.Color.green);
rl.drawLine(-screenWidth * 10, @floatToInt(i32, camera.target.y), screenWidth * 10, @floatToInt(i32, camera.target.y), rl.Color.green);
camera.end();

View file

@ -39,7 +39,7 @@ pub fn main() anyerror!void {
rl.clearBackground(rl.Color.ray_white);
rl.drawCircle(@floatToInt(c_int, ballPosition.x), @floatToInt(c_int, ballPosition.y), 50, ballColor);
rl.drawCircle(@floatToInt(i32, ballPosition.x), @floatToInt(i32, ballPosition.y), 50, ballColor);
//DrawCircleV(ballPosition, 40, ballColor);
rl.drawText("move ball with mouse and click mouse button to change color", 10, 10, 20, rl.Color.dark_gray);

View file

@ -29,7 +29,7 @@ pub fn main() anyerror!void {
rl.clearBackground(rl.Color.white);
rl.drawRectangle(screenWidth / 2 - 40, @floatToInt(c_int, boxPositionY), 80, 80, rl.Color.maroon);
rl.drawRectangle(screenWidth / 2 - 40, @floatToInt(i32, boxPositionY), 80, 80, rl.Color.maroon);
rl.drawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, rl.Color.gray);
//rl.drawText(rl.textFormat("Box position Y: %03i", .{@floatToInt(c_int, boxPositionY)}), 10, 40, 20, rl.Color.light_gray);