ソースを参照

Cleaned up the comments in wall.c

Adrien Boucaud 12 年 前
コミット
77bc410e89
共有1 個のファイルを変更した0 個の追加85 個の削除を含む
  1. 0 85
      wall.c

+ 0 - 85
wall.c

@@ -87,16 +87,6 @@ int getSlopeIndex(int dot1, int dot2)
 }
 void show(Wall *list, Camera *cam)
 {
-	/*
-
-	0________________1
-	/        0       \
-  3/                  \1
-  /                    \
-3/______________________\2
- 			2
-
- 	*/
 	Wall *tmp;
 	tmp = list;
 	do{
@@ -116,82 +106,7 @@ void show(Wall *list, Camera *cam)
 					if(dist <= 8) break;
 					ML_line(64 + dist*cos1, 32 + dist*sin1, 64 + dist*cos2, 32 + dist*sin2, BLACK);
 					--dist;
-
 				}
-				/*int x[4];
-				int y[4];
-				float slopes[4];
-				int i = 0;
-				int j = 0;
-
-					int tmpInt = 0;
-					int x1=0, x2 = 0;
-					//finding the two active edges
-					int leftDotIndex = 0, rightDotIndex = 0, leftSlope=0, rightSlope=0;
-
-				x[0]=tmp->d * cos1 + 64;
-				x[1]=tmp->d * cos2 + 64;
-				x[2]= (tmp->h + tmp->d) * cos2 + 64;
-				x[3]=(tmp->h + tmp->d) * cos1 + 64;
-
-				y[0]=tmp->d * sin1 + 32;
-				y[1]=tmp->d * sin2 + 32;
-				y[2]= (tmp->h + tmp->d) * sin2 + 32;
-				y[3]=(tmp->h + tmp->d) * sin1 + 32;
-				*/
-				/*slopes[0] = (y[1] - y[0])/(x[1]-x[0]);
-				slopes[1] = (y[2] - y[1])/(x[2]-x[1]);
-				slopes[2] = (y[3] - y[2])/(x[3]-x[2]);
-				slopes[3] = (y[0] - y[3])/(x[0]-x[3]);*/
-				/*for(i = 0; i < tmp->h; i+=0.5)
-				{
-					ML_line((tmp->d + i) * cos2 + 64, (tmp->d + i) * sin2 + 32, (tmp->d + i) * cos1 + 64, (tmp->d + i) * sin1 + 32, BLACK);
-				}*/
-
-
-/*					i = y[0];
-					j = y[0];
-
-					for(i = 0; i < 4; i++)
-						if(y[tmpInt] > y[i])
-							tmpInt = i;
-					i = tmpInt;
-					tmpInt = 0;
-					for(j = 0; j < 4; j++)
-						if(y[tmpInt] < y[j])
-							tmpInt = j;
-					j = tmpInt;
-					x1 = x[i];
-					x2 = x[i];
-
-					//i contains an index to the highest vertex and j the lowest
-					tmpInt = 0;
-					for(leftDotIndex = 0; leftDotIndex < 4; leftDotIndex ++)
-					{
-						if(leftDotIndex != i && leftDotIndex != j && (tmpInt == 0 || tmpInt > x[leftDotIndex]))
-							tmpInt = x[leftDotIndex];
-					}
-					for(rightDotIndex = 0; rightDotIndex == i || rightDotIndex == j || rightDotIndex == leftDotIndex; rightDotIndex ++)
-					{}
-
-					tmpInt = i;
-					while(i <= j)
-					{
-						//getting the active slopes' indexes
-						if(y[i] < y[leftDotIndex])
-							leftSlope = getSlopeIndex(i, leftDotIndex);
-						else leftSlope = getSlopeIndex(leftDotIndex, j);
-						if(y[i] < y[rightDotIndex])
-							rightSlope = getSlopeIndex(i, rightDotIndex);
-						else rightSlope = getSlopeIndex(rightDotIndex, j);
-
-						ML_horizontal_line(y[tmpInt] + i, x1, x2, BLACK);
-						ML_horizontal_line(y[tmpInt] + i, x2, x1, BLACK);
-						x1 = x1 - (1/slopes[leftSlope]);
-						x2 = x2 - (1/slopes[rightSlope]);
-						i++;
-					}*/
-				//ML_filled_polygone(x, y, 4, BLACK);
 			}
 		}
 		tmp = tmp->nxt;