Changeset 2058 in orxonox.OLD for orxonox/branches/chris/src/environment.cc
- Timestamp:
- Jul 2, 2004, 11:36:56 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/environment.cc
r1982 r2058 11 11 any later version. 12 12 13 ### File Specific :14 main-programmer: ...15 co-programmer: ...13 ### File Specific 14 main-programmer: Patrick Boenzli 15 co-programmer: 16 16 */ 17 17 18 #include <iostream> 19 #include <GL/glut.h> 20 #include <stdlib.h> 21 22 #include "data_tank.h" 18 23 19 24 #include "environment.h" 20 #include <iostream>21 22 25 23 26 using namespace std; 24 27 25 28 29 //Sorry Bensch 30 #define LEVEL_LENGTH 500 26 31 27 32 Environment::Environment () 33 : WorldEntity() 28 34 { 29 35 30 31 for (int x = 0; x < 10; x++) 36 /* 37 //Sorry Bensch: x,y = 10 38 for (int x = 0; x < 50; x++) 32 39 { 33 for (int y = 0; y < 10; y++)40 for (int y = 0; y < 50; y++) 34 41 { 35 mountainTest[x][y] = 42 mountainTest[x][y] =0; 36 43 37 44 } 38 45 } 39 40 for (int x = 1; x < 9; x++)46 //Sorry Bensch: x,y = 9 47 for (int x = 1; x < LEVEL_LENGTH; x++) 41 48 { 42 for (int y = 1; y < 9; y++)49 for (int y = 1; y < LEVEL_LENGTH; y++) 43 50 { 44 mountainTest[x][y] = (float)rand() / 900000000;45 51 //mountainTest[x][y] = (float)random() / 900000000; 52 mountainTest[x][y] = (float)(random() % 4); 46 53 } 47 54 } 55 */ 48 56 } 49 57 … … 53 61 54 62 55 56 void Environment::drawEnvironment() 63 void Environment::paint() 57 64 { 65 /* 58 66 glPushMatrix(); 59 67 //glScalef(0.5, 0.5, 1.0); … … 64 72 65 73 glBegin(GL_LINES); 66 for (int x = 0; x < 9; x += 1)74 for (int x = 0; x < LEVEL_LENGTH; x += 1) 67 75 { 68 for (int y = 0; y < 9; y += 1)76 for (int y = 0; y < 190; y += 1) 69 77 { 70 78 glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]); … … 76 84 77 85 glBegin(GL_LINES); 78 for (int y = 0; y < 9; y += 1)86 for (int y = 0; y < LEVEL_LENGTH; y += 1) 79 87 { 80 for (int x = 0; x < 9 ; x += 1)88 for (int x = 0; x < 90; x += 1) 81 89 { 82 90 glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]); … … 87 95 88 96 glPopMatrix(); 97 */ 89 98 } 90 99 100 void Environment::drawEnvironment() 101 { 102 103 } 104
Note: See TracChangeset
for help on using the changeset viewer.