Changeset 1917 in orxonox.OLD for orxonox/trunk/core
- Timestamp:
- Jun 7, 2004, 9:32:51 PM (20 years ago)
- Location:
- orxonox/trunk/core
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/environment.cc
r1896 r1917 28 28 { 29 29 30 31 for (int x = 0; x < 10; x++) 32 { 33 for (int y = 0; y < 10; y++) 34 { 35 mountainTest[x][y] = 0; 36 37 } 38 } 39 30 40 for (int x = 1; x < 9; x++) 31 41 { … … 54 64 55 65 glBegin(GL_LINES); 56 for (int x = 0; x < 10; x += 1)66 for (int x = 0; x < 9; x += 1) 57 67 { 58 for (int y = 0; y < 10; y += 1)68 for (int y = 0; y < 9; y += 1) 59 69 { 60 70 glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]); … … 66 76 67 77 glBegin(GL_LINES); 68 for (int y = 0; y < 10; y += 1)78 for (int y = 0; y < 9; y += 1) 69 79 { 70 for (int x = 0; x < 10; x += 1)80 for (int x = 0; x < 9; x += 1) 71 81 { 72 82 glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]); -
orxonox/trunk/core/orxonox.cc
r1902 r1917 134 134 void Orxonox::timeSlice(int value) 135 135 { 136 cout << "got " << fps << endl;136 cout << "got " << fps << " fps" << endl; 137 137 /* this is very very unsafe: io could be uninit */ 138 138 io->setPlayerStep(19.2 / fps); /* set player to propper speed */ -
orxonox/trunk/core/world.cc
r1902 r1917 32 32 lastNPC = null; 33 33 lastEnv = null; 34 primitiveMove = 0; 34 35 } 35 36 … … 163 164 tmpNPC = tmpNPC->next; 164 165 } 166 167 glPushMatrix(); 168 glTranslatef(0.0, -primitiveMove, 0.0); 169 165 170 /* now draw the rest of the world: environement */ 166 171 envList* tmpEnv = lastEnv; … … 170 175 tmpEnv = tmpEnv->next; 171 176 } 172 173 174 glColor3f(0.0, 1.0, 0.0); 175 177 178 179 /* draw the ground grid */ 180 glColor3f(0.0, 1.0, 0.0); 181 glBegin(GL_LINES); 182 /* for the moment, we've got only pseudo moving ground */ 183 for (int y = 0; y < 60; y += 2) 184 { 185 for (int x = 0; x < 60; x += 2) 186 { 187 glVertex3f((float)(x - 30), (float)(y - 30), surface[x][y]); 188 glVertex3f((float)(x - 28), (float)(y - 30), surface[x+2][y]); 189 } 190 } 191 glEnd(); 192 glPopMatrix(); 193 176 194 glBegin(GL_LINES); 177 195 for (int x = 0; x < 60; x += 2) … … 184 202 } 185 203 glEnd(); 186 187 188 glBegin(GL_LINES); 189 for (int y = 0; y < 60; y += 2) 190 { 191 for (int x = 0; x < 60; x += 2) 192 { 193 glVertex3f((float)(x - 30), (float)(y - 30), surface[x][y]); 194 glVertex3f((float)(x - 28), (float)(y - 30), surface[x+2][y]); 195 } 196 } 197 glEnd(); 198 204 205 206 primitiveMove+=0.1; 199 207 } 200 208 -
orxonox/trunk/core/world.h
r1904 r1917 20 20 World (); 21 21 ~World (); 22 23 float primitiveMove; 22 24 23 25 /* for easier use: map the first two player here */
Note: See TracChangeset
for help on using the changeset viewer.