Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1994 in orxonox.OLD for orxonox/branches/dave/core/environment.cc


Ignore:
Timestamp:
Jun 21, 2004, 12:39:11 AM (21 years ago)
Author:
dave
Message:

orxonox/branches/dave:[test the Shit]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/dave/core/environment.cc

    r1883 r1994  
    2323using namespace std;
    2424
    25 
     25//Sorry Bensch
     26#define LEVEL_LENGTH 500
    2627
    2728Environment::Environment ()
    2829{
    2930
    30   for (int x = 1; x < 9; x++)
     31  //Sorry Bensch: x,y = 10
     32  for (int x = 0; x < 50; x++)
    3133    {
    32       for (int y = 1; y < 9; y++)
     34      for (int y = 0; y < 50; y++)
    3335        {
    34           mountainTest[x][y] = (float)random() / 900000000;
     36          mountainTest[x][y] =0;
    3537                                                 
    3638        }
    3739    }
    38 
    39  for (int x = 0; x < 10; x++)
     40  //Sorry Bensch: x,y = 9
     41  for (int x = 1; x < LEVEL_LENGTH; x++)
    4042    {
    41       for (int y = 0; y < 10; y++)
     43      for (int y = 1; y < LEVEL_LENGTH; y++)
    4244        {
    43           cout << " " << mountainTest[x][y] << " ";
    44          
     45          //mountainTest[x][y] = (float)random() / 900000000;
     46          mountainTest[x][y] = (float)(random() % 4);                                       
    4547        }
    46       cout << endl;
    4748    }
    4849}
     
    5758{
    5859  glPushMatrix();
     60  glEnable(GL_DEPTH_TEST);
    5961  //glScalef(0.5, 0.5, 1.0);
    6062  //glTranslatef(xCor, yCor, zCor);
    61   glTranslatef( -16.0, -2.0, 0.0);
     63  glTranslatef( -100.0, -50.0, 0.0);
    6264 
    63   glColor3f(0.0, 1.0, 0.0);
     65  glColor4f(0.0, 0.3, 0.4,1.0);
    6466 
    6567  glBegin(GL_LINES);
    66   for (int x = 0; x < 10; x += 1)
     68  for (int x = 0; x < LEVEL_LENGTH; x += 1)
    6769    {
    68       for (int y = 0; y < 10; y += 1)
     70      for (int y = 0; y < 190; y += 1)
    6971        {
    7072          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    7678 
    7779  glBegin(GL_LINES);
    78   for (int y = 0; y < 10; y += 1)
     80  for (int y = 0; y < LEVEL_LENGTH; y += 1)
    7981    {
    80       for (int x = 0; x < 10; x += 1)
     82      for (int x = 0; x < 90; x += 1)
    8183        {
    8284          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
Note: See TracChangeset for help on using the changeset viewer.