Fix circle drawing, again:)

This commit is contained in:
nobody_ 2004-01-31 13:54:06 +00:00
parent c9ae53d71f
commit 5db7772c6c
2 changed files with 15 additions and 15 deletions
src

View file

@ -41,7 +41,7 @@
-- Defines
----------------------------------------------------------------------------*/
#define MASTER_HOST "mohydine.no-ip.com"
#define MASTER_HOST "nobody.gotdns.org"
#define MASTER_PORT 7775
/*----------------------------------------------------------------------------

View file

@ -853,6 +853,7 @@ global void VideoFillCircle(Uint32 color, int x, int y, int r)
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawVLine(color, x + py + 1, y, px + 1);
@ -860,7 +861,6 @@ global void VideoFillCircle(Uint32 color, int x, int y, int r)
VideoDrawVLine(color, x - py - 1, y, px + 1);
VideoDrawVLine(color, x - py - 1, y - px, px);
}
py -= 1;
}
}
}
@ -878,7 +878,7 @@ global void VideoFillTransCircle(Uint32 color, int x, int y,
p = 1 - r;
py = r;
for (px = 0; px <= py + 1; ++px) {
for (px = 0; px <= py; ++px) {
// Fill up the middle half of the circle
VideoDrawTransVLine(color, x + px, y, py + 1, alpha);
@ -892,14 +892,14 @@ global void VideoFillTransCircle(Uint32 color, int x, int y,
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawTransVLine(color, x + py + 2, y, px + 1, alpha);
VideoDrawTransVLine(color, x + py + 2, y - px, px, alpha);
VideoDrawTransVLine(color, x - py - 2, y, px + 1, alpha);
VideoDrawTransVLine(color, x - py - 2, y - px, px, alpha);
VideoDrawTransVLine(color, x + py + 1, y, px + 1, alpha);
VideoDrawTransVLine(color, x + py + 1, y - px, px, alpha);
VideoDrawTransVLine(color, x - py - 1, y, px + 1, alpha);
VideoDrawTransVLine(color, x - py - 1, y - px, px, alpha);
}
py -= 1;
}
}
}
@ -930,6 +930,7 @@ global void VideoFillCircleClip(Uint32 color, int x, int y, int r)
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawVLineClip(color, x + py + 1, y, px + 1);
@ -937,7 +938,6 @@ global void VideoFillCircleClip(Uint32 color, int x, int y, int r)
VideoDrawVLineClip(color, x - py - 1, y, px + 1);
VideoDrawVLineClip(color, x - py - 1, y - px, px);
}
py -= 1;
}
}
}
@ -955,7 +955,7 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
p = 1 - r;
py = r;
for (px = 0; px <= py + 1; ++px) {
for (px = 0; px <= py; ++px) {
// Fill up the middle half of the circle
VideoDrawTransVLineClip(color, x + px, y, py + 1, alpha);
@ -969,6 +969,7 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawTransVLineClip(color, x + py + 1, y, px + 1, alpha);
@ -976,7 +977,6 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
VideoDrawTransVLineClip(color, x - py - 1, y, px + 1, alpha);
VideoDrawTransVLineClip(color, x - py - 1, y - px, px, alpha);
}
py -= 1;
}
}
}
@ -1750,7 +1750,7 @@ global void VideoFillTransCircle(Uint32 color, int x, int y,
p = 1 - r;
py = r;
for (px = 0; px <= py + 1; ++px) {
for (px = 0; px <= py; ++px) {
// Fill up the middle half of the circle
VideoDrawTransVLine(color, x + px, y, py + 1, alpha);
@ -1764,6 +1764,7 @@ global void VideoFillTransCircle(Uint32 color, int x, int y,
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawTransVLine(color, x + py + 1, y, px + 1, alpha);
@ -1771,7 +1772,6 @@ global void VideoFillTransCircle(Uint32 color, int x, int y,
VideoDrawTransVLine(color, x - py - 1, y, px + 1, alpha);
VideoDrawTransVLine(color, x - py - 1, y - px, px, alpha);
}
py -= 1;
}
}
}
@ -1786,7 +1786,7 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
p = 1 - r;
py = r;
for (px = 0; px <= py + 1; ++px) {
for (px = 0; px <= py; ++px) {
// Fill up the middle half of the circle
VideoDrawTransVLineClip(color, x + px, y, py + 1, alpha);
@ -1800,6 +1800,7 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
p += 2 * px + 3;
} else {
p += 2 * (px - py) + 5;
py -= 1;
// Fill up the left/right half of the circle
if (py >= px) {
VideoDrawTransVLineClip(color, x + py + 1, y, px + 1, alpha);
@ -1807,7 +1808,6 @@ global void VideoFillTransCircleClip(Uint32 color, int x, int y,
VideoDrawTransVLineClip(color, x - py - 1, y, px + 1, alpha);
VideoDrawTransVLineClip(color, x - py - 1, y - px, px, alpha);
}
py -= 1;
}
}
}