Fixed first vertex bug, use pointers to track vertices (in case we want to move them easily later), and added a formula for vertex distance calculations

This commit is contained in:
2011-06-22 21:54:35 -04:00
parent bbae7690f4
commit 53f1560393
5 changed files with 78 additions and 29 deletions

View File

@ -51,7 +51,7 @@ bool DrawUtils::draw(SDL_Surface* dest, SDL_Surface* drawable, int x, int y,
return true;
}
void DrawUtils::draw_line(Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 width, Uint32 colour, SDL_Surface* dest)
void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 width, Uint32 colour)
{
float dx, dy, len;
float cx, cy; // our current coords