diff --git a/src/main.zig b/src/main.zig index 51986ee..9474e10 100644 --- a/src/main.zig +++ b/src/main.zig @@ -57,7 +57,7 @@ const Particle = struct { self.position.a.y = @floatFromInt(rl.getMouseY()-screenHeight/2); self.velocity.a.x = 0; self.velocity.a.y = -20; - self.position.a.color.r = rand.intRangeAtMost(u8,0,255); + self.position.a.color.r = rand.intRangeAtMost(u8,0,30); self.position.a.color.g = rand.intRangeAtMost(u8,0,255); self.position.a.color.b = rand.intRangeAtMost(u8,0,255); } @@ -85,14 +85,14 @@ pub fn main() anyerror!void { var posx : i32 = 0; var posy : i32 = 0; - var p1 : [1000]Particle = undefined; + var p1 : [5000]Particle = undefined; for (&p1) |*p| { xrnr = rand.float(f32); yrnr = rand.float(f32); p.* = Particle{.velocity = .{.a = .{.x = 1,.y = -3}},.acceleration = .{.a = .{.x=xrnr,.y=yrnr}}}; } - const img : rl.Texture = rl.loadTexture("img.png"); + //const img : rl.Texture = rl.loadTexture("img.png"); rl.initWindow(screenWidth, screenHeight, "raylib-zig [core] example - basic window"); defer rl.closeWindow(); // Close window and OpenGL context @@ -138,7 +138,7 @@ pub fn main() anyerror!void { } else { posy = 0; } - rl.drawCircle(posx,posy,5,rl.Color{.r=p.position.a.color.r,.g=p.position.a.color.g,.b=p.position.a.color.b,.a=255}); + rl.drawRectangle(posx,posy,5,5,rl.Color{.r=p.position.a.color.r,.g=p.position.a.color.g,.b=p.position.a.color.b,.a=255}); } diff --git a/zig-out/bin/raylib-test b/zig-out/bin/raylib-test index 1c31a95..d519144 100755 Binary files a/zig-out/bin/raylib-test and b/zig-out/bin/raylib-test differ diff --git a/zig-out/lib/libraylib-test.a b/zig-out/lib/libraylib-test.a index bf8c03a..1322988 100644 Binary files a/zig-out/lib/libraylib-test.a and b/zig-out/lib/libraylib-test.a differ