diff --git a/src/main.zig b/src/main.zig index 35ebf58..955310d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -135,8 +135,14 @@ const Emitter = struct { } p.update(); - posx = @intFromFloat(screenWidth / 2 + p.position.a.x); - posy = @intFromFloat(screenHeight / 2 + p.position.a.y); + if(p.position.a.x < 10000 and p.position.a.x > -10000) + { + posx = @intFromFloat(screenWidth / 2 + p.position.a.x); + } + if(p.position.a.y < 10000 and p.position.a.y > -10000) + { + posy = @intFromFloat(screenHeight / 2 + p.position.a.y); + } //rl.drawRectangle(posx,posy,2,2,rl.Color{.r=p.position.a.color.r,.g=p.position.a.color.g,.b=p.position.a.color.b,.a=255}); vec2 = .{.x = (screenWidth/2+p.position.a.x),.y = (screenHeight/2+p.position.a.y)}; rl.drawTextureEx(texture, vec2,0.5,p.size, rl.Color.green); diff --git a/zig-out/bin/raylib-test b/zig-out/bin/raylib-test index ea009ed..d4f55e6 100755 Binary files a/zig-out/bin/raylib-test and b/zig-out/bin/raylib-test differ