Put framework in place for dealing with graphs in 3 dimensions
This commit is contained in:
@ -52,7 +52,7 @@ bool DrawUtils::draw(SDL_Surface* dest, SDL_Surface* drawable, int x, int y,
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 width, Uint32 colour)
|
||||
{
|
||||
float dx, dy, len;
|
||||
@ -60,7 +60,7 @@ void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Si
|
||||
|
||||
SDL_Rect pen;
|
||||
|
||||
len = MathUtils::distance(x1,y1,x2,y2);
|
||||
len = MathUtils::distance(x1, y1, 0, x2, y2, 0);
|
||||
|
||||
// dx and dy represent the amount we move
|
||||
// each step in our drawing loop
|
||||
|
Reference in New Issue
Block a user