commit 522a5394f6529fa736aeca3428fdeedf0f6bd7a3
parent 4705479f025f2efc9a38aebe42b78c3377ddb138
Author: Yoann <yoann.b87@voila.fr>
Date: Thu, 27 Oct 2011 14:22:50 +0200
Passage du teableau de nœds de route en tableau de sommets.
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/roads.c b/roads.c
@@ -101,8 +101,8 @@ void grid_initNodesGrid(int width, int height, int segmentSize) {
int xSize, ySize;
xSize = (int)(width/segmentSize);
ySize = (int)(height/segmentSize);
-
- nodesGrid = (roadNodeY****) malloc(sizeof(roadNodeY***)*xSize);
+
+ vGrid = (Vertex****) malloc(sizeof(Vertex***)*xSize);
int i,j,k;
maxSegmentSize = segmentSize;
@@ -112,11 +112,11 @@ void grid_initNodesGrid(int width, int height, int segmentSize) {
quarterHeight = height;
for(i=0;i<xSize;i++) {
- nodesGrid[i] = (roadNodeY***) malloc(sizeof(roadNodeY**)*ySize);
+ vGrid[i] = (Vertex***) malloc(sizeof(Vertex**)*ySize);
for(j=0;j<ySize;j++) {
- nodesGrid[i][j] = (roadNodeY**) malloc(sizeof(roadNodeY*)*maxNodesInGrid);
+ vGrid[i][j] = (Vertex**) malloc(sizeof(Vertex*)*maxNodesInGrid);
for(k=0;k<maxNodesInGrid;k++)
- nodesGrid[i][j][k] = NULL;
+ vGrid[i][j][k] = NULL;
}
}
}
diff --git a/roads.h b/roads.h
@@ -55,7 +55,7 @@ typedef struct roadSet {
} roadStep;
-roadNodeY ****nodesGrid;
+Vertex ****vGrid;
roadPointY **roadsList;
short nbXSubDivision;
short nbYSubDivision;