Quellcode durchsuchen

* Minor coding style changes.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/ttyvaders/trunk@166 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam vor 21 Jahren
Ursprung
Commit
12dccf2f4d
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. +3
    -3
      libee/conic.c
  2. +3
    -3
      libee/line.c
  3. +1
    -1
      src/box.c

+ 3
- 3
libee/conic.c Datei anzeigen

@@ -56,7 +56,7 @@ void ee_fill_ellipse(int xo, int yo, int a, int b, char c)
int y = b;
int d1 = b*b - (a*a*b) + (a*a/4);

while( a*a*y - a*a/2 > b*b*(x+1))
while(a*a*y - a*a/2 > b*b*(x+1))
{
if(d1 < 0)
{
@@ -103,7 +103,7 @@ void ee_draw_ellipse(int xo, int yo, int a, int b, char c)

ellipsepoints(xo, yo, x, y, c);

while( a*a*y - a*a/2 > b*b*(x+1))
while(a*a*y - a*a/2 > b*b*(x+1))
{
if(d1 < 0)
{
@@ -146,7 +146,7 @@ void ee_draw_thin_ellipse(int xo, int yo, int a, int b)

ellipsepoints(xo, yo, x, y, '-');

while( a*a*y - a*a/2 > b*b*(x+1))
while(a*a*y - a*a/2 > b*b*(x+1))
{
if(d1 < 0)
{


+ 3
- 3
libee/line.c Datei anzeigen

@@ -161,18 +161,18 @@ static void clip_line(struct line* s)
s->y1 = s->y2 - (s->x2 - 0) * (s->y2 - s->y1) / (s->x2 - s->x1);
s->x1 = 0;
}
else if( bits1 & (1<<1) )
else if(bits1 & (1<<1))
{
int xmax = ee_get_width() - 1;
s->y1 = s->y2 - (s->x2 - xmax) * (s->y2 - s->y1) / (s->x2 - s->x1);
s->x1 = xmax;
}
else if( bits1 & (1<<2) )
else if(bits1 & (1<<2))
{
s->x1 = s->x2 - (s->y2 - 0) * (s->x2 - s->x1) / (s->y2 - s->y1);
s->y1 = 0;
}
else if( bits1 & (1<<3) )
else if(bits1 & (1<<3))
{
int ymax = ee_get_height() - 1;
s->x1 = s->x2 - (s->y2 - ymax) * (s->x2 - s->x1) / (s->y2 - s->y1);


+ 1
- 1
src/box.c Datei anzeigen

@@ -28,7 +28,7 @@

box * create_box(game *g, int x, int y, int w, int h)
{
box *b = malloc(sizeof( box ));
box *b = malloc(sizeof(box));

b->x = x;
b->y = y;


Laden…
Abbrechen
Speichern