Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4165 in orxonox.OLD for orxonox/branches/heightMap/src/lib


Ignore:
Timestamp:
May 11, 2005, 2:23:54 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/heightMap: merged trunk back to the heightMap branche
merged with command:
svn merge trunk/ branches/heightMap/ -r 4122:HEAD

Location:
orxonox/branches/heightMap/src/lib
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/heightMap/src/lib/Makefile.in

    r4122 r4165  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
     
    182183          esac; \
    183184        done; \
    184         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
     185        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
    185186        cd $(top_srcdir) && \
    186           $(AUTOMAKE) --gnu  src/lib/Makefile
     187          $(AUTOMAKE) --foreign  src/lib/Makefile
    187188.PRECIOUS: Makefile
    188189Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/coord/p_node.cc

    r4122 r4165  
    9999  this->parent = parent;
    100100  this->objectName = NULL;
    101   this->time = 1.0; /* set time to 1 to make divisions by zero impossible */
    102101}
    103102
     
    281280}
    282281
    283 
    284 
    285 /**
    286    \brief this calculates the current movement speed of the node
    287 */
    288 float PNode::getSpeed() const
    289 {
    290   return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;
    291 }
    292 
    293 /**
    294    \returns the Velocity of the PNode
    295 */
    296 Vector PNode::getVelocity() const
    297 {
    298   return (this->absCoordinate - this->lastAbsCoordinate) / this->time;
    299 }
    300 
    301282/**
    302283   \brief adds a child and makes this node to a parent
     
    424405{
    425406  this->lastAbsCoordinate = this->absCoordinate;
    426   this->time = dt;
     407
    427408  PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    428409
     
    499480  delete iterator;
    500481
     482  this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt;
    501483  this->timeStamp = timeStamp;
    502484  this->bRelCoorChanged = false;
  • orxonox/branches/heightMap/src/lib/coord/p_node.h

    r4122 r4165  
    6969  void shiftDir (const Quaternion& shift);
    7070
    71   float getSpeed() const;
    72   Vector getVelocity() const;
     71  /** \returns the Speed of the Node */
     72  inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000
     73  /** \returns the Velocity of the Node */
     74  inline const Vector& getVelocity() const {return this->velocity;}
    7375
    7476  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
     
    110112  void init(PNode* parent);
    111113
     114  Vector velocity;          //!< Saves the velocity.
    112115  Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    113   Vector diffCoordinate;    //!< this is stored here for performance reasons, difference to the last vector
    114   float time;                //!< time since last update
    115116};
    116117
  • orxonox/branches/heightMap/src/lib/graphics/Makefile.in

    r4122 r4165  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
     
    176177          esac; \
    177178        done; \
    178         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
     179        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
    179180        cd $(top_srcdir) && \
    180           $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
     181          $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
    181182.PRECIOUS: Makefile
    182183Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc

    r4122 r4165  
    3131{
    3232  this->setClassName ("GraphicsEngine");
     33
     34  this->fullscreen = false;
     35
    3336  this->initVideo();
    3437
     
    140143int GraphicsEngine::setResolution(int width, int height, int bpp)
    141144{
     145  Uint32 fullscreenFlag;
    142146  this->resolutionX = width;
    143147  this->resolutionY = height;
    144148  this->bitsPerPixel = bpp;
     149  if (this->fullscreen)
     150    fullscreenFlag = SDL_FULLSCREEN;
     151  else
     152    fullscreenFlag = 0;
    145153 
    146154  printf ("ok\n");
    147   if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
     155  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
    148156    {
    149157      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
     
    151159      //    return -1;
    152160    }
    153 
     161}
     162
     163void GraphicsEngine::setFullscreen(bool fullscreen)
     164{
     165  this->fullscreen = fullscreen;
     166  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
    154167}
    155168
     
    257270  /* Check if our resolution is restricted */
    258271  if(this->videoModes == (SDL_Rect **)-1){
    259     PRINTF(1)("All resolutions available.\n");
     272    PRINTF(2)("All resolutions available.\n");
    260273  }
    261274  else{
     
    263276    PRINT(0)("Available Resoulution Modes are\n");
    264277    for(int i = 0; this->videoModes[i]; ++i)
    265       PRINT(0)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
     278      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
    266279  }
    267280 
  • orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h

    r3844 r4165  
    2626  int setGLattribs(void);
    2727  int setResolution(int width, int height, int bpp);
     28  void setFullscreen(bool fullscreen = false);
    2829  /** \returns the x resolution */
    2930  inline int getResolutionX(void) {return this->resolutionX;}
  • orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in

    r4122 r4165  
    150150PACKAGE_VERSION = @PACKAGE_VERSION@
    151151PATH_SEPARATOR = @PATH_SEPARATOR@
     152PKG_CONFIG = @PKG_CONFIG@
    152153RANLIB = @RANLIB@
    153154SET_MAKE = @SET_MAKE@
     
    247248          esac; \
    248249        done; \
    249         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
     250        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
    250251        cd $(top_srcdir) && \
    251           $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
     252          $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
    252253.PRECIOUS: Makefile
    253254Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/graphics/importer/material.cc

    r4111 r4165  
    4545  this->setTransparency(1.0);
    4646
    47 
    4847  this->diffuseTexture = NULL;
    4948  this->ambientTexture = NULL;
    5049  this->specularTexture = NULL;
    51 
    52   this->diffuseTextureSet = false;
    53   this->ambientTextureSet = false;
    54   this->specularTextureSet = false;
    5550
    5651  this->setName(mtlName);
     
    107102    glShadeModel(GL_SMOOTH);
    108103
    109   if (this->diffuseTextureSet)
     104  if (this->diffuseTexture)
    110105    {
    111106      glEnable(GL_TEXTURE_2D);
     
    300295{
    301296  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    302   //    diffuseTexture = new Texture();
    303   //    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
    304297
    305298  //! \todo check if RESOURCE MANAGER is availiable
    306299  //! \todo Textures from .mtl-file need special care.
    307   this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
     300  this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
    308301}
    309302
  • orxonox/branches/heightMap/src/lib/graphics/importer/material.h

    r3914 r4165  
    6767  Texture* ambientTexture; //!< The ambient texture of the Material.
    6868  Texture* specularTexture;//!< The specular texture of the Material.
    69  
    70   bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
    71   bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.
    72   bool specularTextureSet;//!< Chekcs if the specular texture is Set.
    73 
    7469};
    7570#endif
  • orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc

    r4122 r4165  
    4040   this->particleType = type;
    4141   this->particles = NULL;
     42   this->deadList = NULL;
    4243   this->setConserve(.8);
    4344   this->setLifeSpan(.1);
     
    5758  // delete what has to be deleted here
    5859   ParticleEngine::getInstance()->removeSystem(this);
     60
     61   // deleting all the living Particles
     62   while (this->particles)
     63     {
     64       Particle* tmpDelPart = this->particles;
     65       this->particles = this->particles->next;
     66       delete tmpDelPart;
     67     }
     68
     69   // deleting all the dead particles
     70   while (this->deadList)
     71     {
     72       Particle* tmpDelPart = this->deadList;
     73       this->deadList = this->deadList->next;
     74       delete tmpDelPart;
     75     }
    5976}
    6077
     
    199216            {
    200217              prevPart->next = tickPart->next;
    201               delete tickPart;
     218              tickPart->next = this->deadList;
     219              this->deadList = tickPart;
    202220              tickPart = prevPart->next;
    203221            }
     
    206224              prevPart = NULL;
    207225              this->particles = tickPart->next;
    208               delete tickPart;
     226              tickPart->next = this->deadList;
     227              this->deadList = tickPart;
    209228              tickPart = this->particles;
    210229            }
     
    266285      if (unlikely(particles == NULL))
    267286        {
    268           this->particles = new Particle;
     287          if (likely(deadList != NULL))
     288            {
     289              this->particles = this->deadList;
     290              deadList = deadList->next;
     291            }
     292          else
     293            this->particles = new Particle;
    269294          this->particles->next = NULL;
    270295        }
     
    272297      else
    273298        {
    274           Particle* tmpPart = new Particle;
     299          Particle* tmpPart;
     300          if (likely(deadList != NULL))
     301            {
     302              tmpPart = this->deadList;
     303              deadList = deadList->next;
     304            }
     305          else
     306            tmpPart = new Particle;
    275307          tmpPart->next = this->particles;
    276308          this->particles = tmpPart;
     
    300332  PRINT(0)("  ParticleSystem %s\n", this->name);
    301333  PRINT(0)("  ParticleCount: %d, maximumCount: %d :: filled %d%%\n", this->count, this->maxCount, 100*this->count/this->maxCount);
    302 }
     334  if (deadList)
     335    {
     336      PRINT(0)("  - ParticleDeadList is used: ");
     337      int i = 1;
     338      Particle* tmpPart = this->deadList;
     339      while (tmpPart = tmpPart->next) ++i;
     340      PRINT(0)("count: %d\n", i);
     341    }
     342}
  • orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.h

    r4122 r4165  
    9292  Material* material;        //!< A Material for all the Particles.
    9393  Particle* particles;       //!< A list of particles of this System.
     94  Particle* deadList;        //!< A list of dead Particles in the System.
    9495
    9596  GLuint* glID;              //!< A List of different gl-List-ID's
  • orxonox/branches/heightMap/src/lib/gui/Makefile.in

    r4122 r4165  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
     
    178179          esac; \
    179180        done; \
    180         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
     181        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
    181182        cd $(top_srcdir) && \
    182           $(AUTOMAKE) --gnu  src/lib/gui/Makefile
     183          $(AUTOMAKE) --foreign  src/lib/gui/Makefile
    183184.PRECIOUS: Makefile
    184185Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/gui/console/Makefile.in

    r4122 r4165  
    132132PACKAGE_VERSION = @PACKAGE_VERSION@
    133133PATH_SEPARATOR = @PATH_SEPARATOR@
     134PKG_CONFIG = @PKG_CONFIG@
    134135RANLIB = @RANLIB@
    135136SET_MAKE = @SET_MAKE@
     
    204205          esac; \
    205206        done; \
    206         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
     207        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
    207208        cd $(top_srcdir) && \
    208           $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
     209          $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
    209210.PRECIOUS: Makefile
    210211Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in

    r4122 r4165  
    150150PACKAGE_VERSION = @PACKAGE_VERSION@
    151151PATH_SEPARATOR = @PATH_SEPARATOR@
     152PKG_CONFIG = @PKG_CONFIG@
    152153RANLIB = @RANLIB@
    153154SET_MAKE = @SET_MAKE@
     
    264265          esac; \
    265266        done; \
    266         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
     267        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
    267268        cd $(top_srcdir) && \
    268           $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
     269          $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
    269270.PRECIOUS: Makefile
    270271Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/heightMap/src/lib/gui/gui/gui.cc

    r4122 r4165  
    5353{
    5454  Window* orxonoxGUI = NULL;
    55 
     55  executable = NULL;
     56 
    5657  initGUI(argc, argv);
    5758
     
    8081      Box* optionBoxR = new Box('v');
    8182      {
    82         exec = new GuiExec();
    83         optionBoxR->fill(exec->getWidget());
    84        
    8583        flags = new GuiFlags();
    86        
    8784        optionBoxR->fill(flags->getWidget());
    8885       
    8986        update = new GuiUpdate();
    9087        optionBoxR->fill(update->getWidget());
     88
     89        exec = new GuiExec();
     90        optionBoxR->fill(exec->getWidget());
    9191      }
    9292      windowBox->fill(optionBoxR);
     
    9494    orxonoxGUI->fill(windowBox);
    9595  }
     96
     97
    9698  // Reading Values from File
    9799  exec->setConfDir(GUI_DEFAULT_CONF_DIR);
     
    116118    }
    117119#endif /* HAVE_CURL */
     120}
    118121
     122/**
     123   \brief starts the OrxonoxGUI
     124*/
     125void Gui::startGui(void)
     126{
    119127  mainloopGUI();
     128 
    120129#ifndef HAVE_GTK2
    121130  GuiExec::startOrxonox(NULL, exec);
     
    123132}
    124133
     134void Gui::printHelp()
     135{
     136  Window::mainWindow->walkThrough(Widget::printHelp, 1);
     137}
     138
     139/**
     140   \brief a bool that knows if orxonox should be started
     141*/
    125142bool Gui::startOrxonox = false;
    126143
  • orxonox/branches/heightMap/src/lib/gui/gui/gui.h

    r4122 r4165  
    2626  ~Gui(void);
    2727
     28  void startGui(void);
     29  void printHelp(void);
     30
    2831  static bool startOrxonox;
    2932};
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc

    r4122 r4165  
    4747      enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO);
    4848      enableSound->setFlagName ("no-sound", 0);
     49      enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox");
     50      enableSound->setDefaultValue(0);
    4951      enableSound->saveability();
    5052      audioBox->fill(enableSound);
     
    5355      musicVolume = new Slider("Music Volume", 0, 100);
    5456      musicVolume->setFlagName("music-volume", "m", 80);
     57      musicVolume->setDescription("Sets the volume of the ingame music");
    5558      musicVolume->saveability();
    5659      audioBox->fill (musicVolume);
     
    5962      effectsVolume = new Slider ("Effects Volume", 0, 100);
    6063      effectsVolume->setFlagName ("effects-volume", "e", 80);
     64      effectsVolume->setDescription("Sets the volune of the ingame SoundEffects");
    6165      effectsVolume->saveability();
    6266      audioBox->fill (effectsVolume);
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc

    r4122 r4165  
    7070      execBox->fill(this->saveSettings);
    7171
    72       verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing", "error", "warning", "info", "lastItem");
     72#ifdef DEBUG
     73      verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing",
     74#if DEBUG >=1
     75                             "error",
     76#endif
     77#if DEBUG >=2
     78                             "warning",
     79#endif
     80#if DEBUG >=3
     81                             "info",
     82#endif
     83#if DEBUG >=4
     84                             "debug",
     85#endif
     86#if DEBUG >=5
     87                             "heavydebug",
     88#endif
     89                             "lastItem");
    7390      verboseMode->setFlagName("verbose", "v", 2);
     91      verboseMode->setDescription("Sets the Output Mode", "This Enables Outbug messages\n"
     92                                  "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n"
     93#if DEBUG >=1
     94                                  "1: error: outputs all the above and errors"
     95#endif
     96#if DEBUG >=2
     97                                  "2: warning: outputs all the above plus warnings"
     98#endif
     99#if DEBUG >=3
     100                                  "3: info: outputs all the above plus Information"
     101#endif
     102#if DEBUG >=4
     103                                  "4: debug: displays all the above plus debug information"
     104#endif
     105#if DEBUG >=5
     106                                  "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this."
     107#endif
     108                                  );
    74109      verboseMode->saveability();
    75110      execBox->fill(verboseMode);
     111#endif
    76112
    77113      alwaysShow = new CheckButton(CONFIG_NAME_ALWAYS_SHOW_GUI);
    78114      alwaysShow->setFlagName("gui", "g", 0);
     115      alwaysShow->setDescription("shows the gui when starting orxonox");
    79116      alwaysShow->saveability();
    80117      execBox->fill(alwaysShow);
     
    114151  this->confDir = ResourceManager::homeDirCheck(confDir);
    115152
    116   PRINTF(3)("Config Directory is: %s.\n", this->confDir);
     153  PRINTF(5)("Config Directory is: %s.\n", this->confDir);
    117154  //! \todo F** Windows-support
    118155#ifndef __WIN32__
     
    135172  this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2];
    136173  sprintf(this->confFile, "%s/%s", this->confDir, fileName);
    137   PRINTF(3)("ConfigurationFile is %s.\n", this->confFile);
     174  PRINTF(5)("ConfigurationFile is %s.\n", this->confFile);
    138175}
    139176
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc

    r4122 r4165  
    3838  this->flagsBox->fill(flagsLabel);
    3939  this->shortFlags = new CheckButton("shortFlags");
     40  this->shortFlags->setDefaultValue(0);
    4041  this->flagsBox->fill(shortFlags);
    4142
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc

    r4122 r4165  
    312312
    313313/**
     314    \brief This is for listing the options of "widget"
     315    \param widget specifies the widget that should be listed
     316    \param data A Counter, that always knows how many Options have been found yet.
     317*/
     318void Widget::printHelp(Widget* widget)
     319{
     320  int helpLen=0;
     321
     322  if (widget->optionType > GUI_NOTHING)
     323    {
     324      Option* option = (Option*)widget;
     325      if (option->flagName || option->flagNameShort)
     326        {
     327          PRINT(0)("  ");
     328          if (option->flagNameShort)
     329            {
     330              PRINT(0)("-%s", option->flagNameShort);
     331              helpLen += strlen(option->flagNameShort)+1;
     332            }
     333          if (option->flagName)
     334            {
     335              if (helpLen > 0)
     336                {
     337                  PRINT(0)("|");
     338                  helpLen++;
     339                }
     340              PRINT(0)("--%s:", option->flagName);
     341              helpLen += strlen(option->flagName)+2;
     342            }
     343          while ((helpLen ++) < 29)
     344            PRINT(0)(" ");
     345          if (option->shortDescription)
     346            PRINT(0)("%s\n", option->shortDescription);
     347          else
     348            PRINT(0)("\n");
     349        }
     350    }
     351}
     352
     353/**
    314354    \brief Finds an Option by a given number(the n'th option found away from this Widget)
    315355    \param number The Count of options to wait(by reference)
     
    595635    }
    596636  else
    597     PRINTF(1)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
     637    PRINTF(2)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
    598638}
    599639
     
    11771217  if ((this->value = atoi(tmpChar))=!0)
    11781218    this->value = 1;
    1179 #endif /* HAVE_GTK2 */
     1219
    11801220  PRINT(0)("%s set to: %d\n", this->title, this->value);
     1221#endif /* HAVE_GTK2 */
    11811222}
    11821223
     
    12621303  if (this->value <= this->start)
    12631304    this->value = this->start;
    1264 #endif /* HAVE_GTK2 */
     1305
    12651306  PRINT(0)("%s set to: %d\n",this->title, this->value);
     1307#endif /* HAVE_GTK2 */
    12661308}
    12671309
     
    13701412    {
    13711413      this->value = 0;
    1372       PRINTF(2)("Sorry, but %s has not been found in the Itemlist of %s\n", loadString, this->title);
    1373     }
    1374   PRINTF(4)( "Loading %s: setting to %d\n", this->title, this->value);
     1414      PRINTF(2)("%s has not been found in the Itemlist of %s\n", loadString, this->title);
     1415    }
     1416  PRINTF(5)( "Loading %s: setting to %d\n", this->title, this->value);
    13751417  this->redraw();
    13761418}
     
    14291471
    14301472#endif /* HAVE_GTK2 */
    1431   PRINT(4)("%s set to: %d\n", this->title, this->value);
     1473  PRINT(5)("%s set to: %d\n", this->title, this->value);
    14321474}
    14331475
     
    15181560void OptionLabel::load(char* loadString)
    15191561{
    1520   PRINTF(4)("Loading %s: setting to %s\n", this->title, loadString);
     1562  PRINTF(5)("Loading %s: setting to %s\n", this->title, loadString);
    15211563  this->setValue(loadString);
    15221564}
     
    16681710#ifdef HAVE_GTK2
    16691711  gtk_progress_set_value(GTK_PROGRESS(widget), this->progress*100.0/this->totalSize);
    1670   PRINTF(4)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
     1712  PRINTF(5)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
    16711713#else /* HVE_GTK2 */
    16721714  PRINT(0)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h

    r4122 r4165  
    7171   static void listGroups(Widget* widget);
    7272   static void listGroups(Widget* widget, void* data);
     73   static void printHelp(Widget* widget);
    7374   Widget* findGroupByNumber(int* number, unsigned int depth);
    7475   static void setOptions(Widget* widget);
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc

    r4122 r4165  
    5555  dataDirButton = new Button(CONFIG_NAME_DATADIR);
    5656  dataDirLabel = new OptionLabel(CONFIG_NAME_DATADIR, "unknown");
     57  dataDirLabel->setFlagName("data-dir", "d", 0);
     58  dataDirLabel->setDescription("Sets the location of the orxonox' Data-Directory");
    5759  dataDirLabel->saveability();
    5860  dataDirDialog = new FileDialog("data-Repos-location");
     
    7375  this->updateBox->fill(this->autoUpdate);
    7476  this->autoUpdate->setFlagName("update", "u", 0);
     77  this->autoUpdate->setDescription("Updates orxonox", "When this option is selected orxonox automatically searches for updates, and if found installs them");
    7578  this->autoUpdate->saveability();
    7679
     
    127130bool GuiUpdate::getSystemInfo(void)
    128131{
    129   PRINTF(3)("Grabbing system information\n");
     132  PRINTF(5)("Grabbing system information\n");
    130133  this->tmpDir = getenv("TMPDIR");
    131134  if(!tmpDir)
    132135    this->tmpDir = "/tmp";
    133   PRINTF(4)("Temporary directory is: %s\n", this->tmpDir);
     136  PRINTF(5)("Temporary directory is: %s\n", this->tmpDir);
    134137
    135138#ifdef __WIN32__
     
    138141  this->homeDir = getenv("HOME");
    139142#endif
    140   PRINTF(4)("Home directory is %s\n", homeDir);
    141 
    142   this->installDataDir = "/usr/share/games/orxonox";
    143   PRINTF(4)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
     143  PRINTF(5)("Home directory is %s\n", homeDir);
     144
     145
     146  this->installDataDir = DEFAULT_DATA_DIR;
     147  PRINTF(5)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
    144148
    145149  this->installSourceDir = "/usr/games/bin";
    146   PRINTF(4)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
     150  PRINTF(5)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
    147151
    148152  this->userName = getenv("USER");
    149   PRINTF(4)("Logged in username is: %s\n", this->userName);
     153  PRINTF(5)("Logged in username is: %s\n", this->userName);
    150154}
    151155
     
    153157bool* GuiUpdate::checkForUpdates(void)
    154158{
    155   PRINTF(3)("checking for new version of orxonox\n");
     159  PRINTF(4)("checking for new version of orxonox\n");
    156160  FileInfo updateFileInfo;
    157161  updateFileInfo.fileName = "update_info";
     
    263267  dataInfo->webRoot  = "http://www.orxonox.ethz.ch/files/";
    264268  dataInfo->localRoot = "./";
    265   PRINTF(3)("Preparing to download file %s.\n", dataInfo->fileName);
     269  PRINTF(4)("Preparing to download file %s.\n", dataInfo->fileName);
    266270  downloadWithStyle(dataInfo);
    267271}
     
    348352      return false;
    349353    }
    350   PRINTF(3)("Downloading.\n");
     354  PRINTF(4)("Downloading.\n");
    351355  FileInfo* info =(FileInfo*)fileInfo;
    352356  CURLcode res;
     
    396400      return false;
    397401    }
    398   PRINTF(3)("Downloading.\n");
     402  PRINTF(4)("Downloading.\n");
    399403  FileInfo* info =(FileInfo*)fileInfo;
    400404  CURLcode res;
     
    464468    curl_easy_cleanup(curlHandle);
    465469 
    466   PRINTF(3)("Closing the downloaded file.\n");
     470  PRINTF(4)("Closing the downloaded file.\n");
    467471  fclose(info->fileHandle);
    468472
     
    490494gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar)
    491495{
    492   PRINTF(4)("Cannot cancle the Downloading process until after this File\n");
     496  PRINTF(3)("Cannot cancle the Downloading process until after this File\n");
    493497}
    494498#endif /* HAVE_GTK2 */
  • orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc

    r4122 r4165  
    5151      fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN);
    5252      fullscreen->setFlagName("windowed", "q", 1);
     53      fullscreen->setDescription("Starts orxonox in windowed mode");
    5354      fullscreen->saveability();
    5455      videoBox->fill(fullscreen);
     
    5758      resolution->saveability();
    5859      resolution->setFlagName("resolution", "r", 0);
     60      resolution->setDescription("Sets the resolution of orxonox");
    5961      videoBox->fill(resolution);
    6062      wireframe = new CheckButton(CONFIG_NAME_WIREFRAME);
    6163      wireframe->setFlagName("wireframe", "w", 0);
     64      wireframe->setDescription("Starts orxonox in wireframe mode");
    6265      wireframe->saveability();
    6366      videoBox->fill(wireframe);
     
    199202  else{
    200203    /* Print valid modes */
    201     PRINT(4)("Available Modes\n");
     204    PRINT(5)("Available Modes\n");
    202205    for(i = 0; modes[i] ;++i)
    203206      {
    204207        if (x != modes[i]->w || y != modes[i]->h)
    205208          {
    206             PRINT(4)("  %d x %d\n", modes[i]->w, modes[i]->h);
     209            PRINTF(5)("  %d x %d\n", modes[i]->w, modes[i]->h);
    207210            sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h);
    208211            menu->addItem(tmpChar);
Note: See TracChangeset for help on using the changeset viewer.