Hi Friends,
Could you please help modify the below line algorithm to plot only one pixel at a time to have a bullet path moving from a x1, y1 to x2, y2. Here x1,y1 is the source and x2, y2 is the target and there values are predefined. No sin / cos calculation here.
Bullet need not travel all the points calculated by the algorithm but jumping few x and y pixels for smooth movement.
void DrawLine(int x1, int y1, int x2, int y2, unsigned char color)
{
int i,dx,dy,sdx,sdy,dxabs,dyabs …