Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2058 in orxonox.OLD for orxonox/branches/chris/src/environment.cc


Ignore:
Timestamp:
Jul 2, 2004, 11:36:56 AM (20 years ago)
Author:
chris
Message:

orxonox/branches/chris: Trunk remerged into my branch started on SDL reconfiguration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/environment.cc

    r1982 r2058  
    1111   any later version.
    1212
    13    ### File Specific:
    14    main-programmer: ...
    15    co-programmer: ...
     13   ### File Specific
     14   main-programmer: Patrick Boenzli
     15   co-programmer:
    1616*/
    1717
     18#include <iostream>
     19#include <GL/glut.h>
     20#include <stdlib.h>
     21
     22#include "data_tank.h"
    1823
    1924#include "environment.h"
    20 #include <iostream>
    21 
    2225
    2326using namespace std;
    2427
    2528
     29//Sorry Bensch
     30#define LEVEL_LENGTH 500
    2631
    2732Environment::Environment ()
     33  : WorldEntity()
    2834{
    2935
    30 
    31   for (int x = 0; x < 10; x++)
     36  /*
     37  //Sorry Bensch: x,y = 10
     38  for (int x = 0; x < 50; x++)
    3239    {
    33       for (int y = 0; y < 10; y++)
     40      for (int y = 0; y < 50; y++)
    3441        {
    35           mountainTest[x][y] = 0;
     42          mountainTest[x][y] =0;
    3643                                                 
    3744        }
    3845    }
    39 
    40   for (int x = 1; x < 9; x++)
     46  //Sorry Bensch: x,y = 9
     47  for (int x = 1; x < LEVEL_LENGTH; x++)
    4148    {
    42       for (int y = 1; y < 9; y++)
     49      for (int y = 1; y < LEVEL_LENGTH; y++)
    4350        {
    44           mountainTest[x][y] = (float)rand() / 900000000;
    45                                                  
     51          //mountainTest[x][y] = (float)random() / 900000000;
     52          mountainTest[x][y] = (float)(random() % 4);                                       
    4653        }
    4754    }
     55  */
    4856}
    4957
     
    5361
    5462
    55 
    56 void Environment::drawEnvironment()
     63void Environment::paint()
    5764{
     65  /*
    5866  glPushMatrix();
    5967  //glScalef(0.5, 0.5, 1.0);
     
    6472 
    6573  glBegin(GL_LINES);
    66   for (int x = 0; x < 9; x += 1)
     74  for (int x = 0; x < LEVEL_LENGTH; x += 1)
    6775    {
    68       for (int y = 0; y < 9; y += 1)
     76      for (int y = 0; y < 190; y += 1)
    6977        {
    7078          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    7684 
    7785  glBegin(GL_LINES);
    78   for (int y = 0; y < 9; y += 1)
     86  for (int y = 0; y < LEVEL_LENGTH; y += 1)
    7987    {
    80       for (int x = 0; x < 9; x += 1)
     88      for (int x = 0; x < 90; x += 1)
    8189        {
    8290          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    8795 
    8896  glPopMatrix();
     97  */
    8998}
    9099
     100void Environment::drawEnvironment()
     101{
     102
     103}
     104
Note: See TracChangeset for help on using the changeset viewer.