Fixed the remaining bugs from r339. Now we have a fully working gradiation rectangle system !

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@343 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2008-11-15 15:35:02 +00:00
parent d016b8ba48
commit a6774e5d73
3 changed files with 7 additions and 5 deletions

View File

@@ -5268,11 +5268,12 @@ void Tracer_rectangle_degrade(short RAX,short RAY,short RBX,short RBY,short VAX,
}
else
{
short a,b;
float a;
float b;
int Distance_X, Distance_Y;
Degrade_Intervalle_total = sqrt(pow(VBY - VAY,2)+pow(VBX - VAX,2));
a = (VBY - VAY)/(VBX - VAX);
a = (float)(VBY - VAY)/(float)(VBX - VAX);
b = VAY - a*VAX;
for (Pos_Y=RAY;Pos_Y<=RBY;Pos_Y++)