From bda7ff3a5e99b731fef91693c48e61cbd074be31 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 10 Aug 2006 00:33:42 -0400 Subject: [PATCH] Changed class Level to deal with changes to class Triangle ~Tom --- src/level.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/level.cpp b/src/level.cpp index 7433ea4..416f3c2 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -127,15 +127,15 @@ namespace OpenArena { //Vertex Data input >> readBuffer; - triangles[i].vertecies[i2].x = atof(readBuffer.c_str()); + triangles[i].vertecies[i2].coordinates.x = atof(readBuffer.c_str()); input >> readBuffer; - triangles[i].vertecies[i2].y = atof(readBuffer.c_str()); + triangles[i].vertecies[i2].coordinates.y = atof(readBuffer.c_str()); input >> readBuffer; - triangles[i].vertecies[i2].z = atof(readBuffer.c_str()); + triangles[i].vertecies[i2].coordinates.z = atof(readBuffer.c_str()); input >> readBuffer; - triangles[i].texCoords[i2].x = (float)atof(readBuffer.c_str()); + triangles[i].vertecies[i2].textureCoordinates.x = (float)atof(readBuffer.c_str()); input >> readBuffer; - triangles[i].texCoords[i2].y = (float)atof(readBuffer.c_str()); + triangles[i].vertecies[i2].textureCoordinates.y = (float)atof(readBuffer.c_str()); } //Normal @@ -260,11 +260,11 @@ namespace OpenArena for(unsigned int i2=0; i2<3; i2++) { - output << triangles[i].vertecies[i2].x << " " - << triangles[i].vertecies[i2].y << " " - << triangles[i].vertecies[i2].z << " " - << triangles[i].texCoords[i2].x << " " - << triangles[i].texCoords[i2].y << endl; + output << triangles[i].vertecies[i2].coordinates.x << " " + << triangles[i].vertecies[i2].coordinates.y << " " + << triangles[i].vertecies[i2].coordinates.z << " " + << triangles[i].vertecies[i2].textureCoordinates.x << " " + << triangles[i].vertecies[i2].textureCoordinates.y << endl; } output << triangles[i].normal.x << " " @@ -302,11 +302,11 @@ namespace OpenArena // glNormal3f((GLfloat)triangles[i].normal.x, (GLfloat)triangles[i].normal.y, (GLfloat)triangles[i].normal.z); for (uint32 i2=0; i2<3; i2++) { - glTexCoord2f(triangles[i].texCoords[i2].x, - triangles[i].texCoords[i2].y); - glVertex3f((GLfloat)triangles[i].vertecies[i2].x, - (GLfloat)triangles[i].vertecies[i2].y, - (GLfloat)triangles[i].vertecies[i2].z); + glTexCoord2f(triangles[i].vertecies[i2].textureCoordinates.x, + triangles[i].vertecies[i2].textureCoordinates.y); + glVertex3f((GLfloat)triangles[i].vertecies[i2].coordinates.x, + (GLfloat)triangles[i].vertecies[i2].coordinates.y, + (GLfloat)triangles[i].vertecies[i2].coordinates.z); } glEnd(); }