i see
function fire_laser(player, angle as float, offsetX as float, offsetY as float, cR as integer, cG as integer, cB as integer)
// offset X/Y is where the laser turret is at, from ship position, when ship is not rotated
startX# = rotatePointX(offsetX, offsetY, angle) + p[player].fXPos
startY# = rotatePointY(offsetX, offsetY, angle) + p[player].fYPos
newX# = startX# + cos(angle) * 1000.0
newY# = startY# + sin(angle) * 1000.0
// line starts from correct position when not rotated, but the more rotation, the farther from correct starting point it gets
drawLine(startX#, startY#, newX#, newy#, cR, cG, cB)
endfunction
something is still wrong in my function :/