infalid inttofloat

This commit is contained in:
jonathan santis 2024-11-28 15:19:38 +01:00
parent b569e2fc23
commit 04a0f83208
2 changed files with 8 additions and 2 deletions

View File

@ -135,8 +135,14 @@ const Emitter = struct {
} }
p.update(); p.update();
posx = @intFromFloat(screenWidth / 2 + p.position.a.x); if(p.position.a.x < 10000 and p.position.a.x > -10000)
posy = @intFromFloat(screenHeight / 2 + p.position.a.y); {
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}); //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)}; 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); rl.drawTextureEx(texture, vec2,0.5,p.size, rl.Color.green);

Binary file not shown.