Changeset 4165 in orxonox.OLD for orxonox/branches/heightMap/src/lib
- Timestamp:
- May 11, 2005, 2:23:54 PM (20 years ago)
- Location:
- orxonox/branches/heightMap/src/lib
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap/src/lib/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 182 183 esac; \ 183 184 done; \ 184 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/Makefile'; \185 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/Makefile'; \ 185 186 cd $(top_srcdir) && \ 186 $(AUTOMAKE) -- gnusrc/lib/Makefile187 $(AUTOMAKE) --foreign src/lib/Makefile 187 188 .PRECIOUS: Makefile 188 189 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/coord/p_node.cc
r4122 r4165 99 99 this->parent = parent; 100 100 this->objectName = NULL; 101 this->time = 1.0; /* set time to 1 to make divisions by zero impossible */102 101 } 103 102 … … 281 280 } 282 281 283 284 285 /**286 \brief this calculates the current movement speed of the node287 */288 float PNode::getSpeed() const289 {290 return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;291 }292 293 /**294 \returns the Velocity of the PNode295 */296 Vector PNode::getVelocity() const297 {298 return (this->absCoordinate - this->lastAbsCoordinate) / this->time;299 }300 301 282 /** 302 283 \brief adds a child and makes this node to a parent … … 424 405 { 425 406 this->lastAbsCoordinate = this->absCoordinate; 426 this->time = dt; 407 427 408 PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 428 409 … … 499 480 delete iterator; 500 481 482 this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt; 501 483 this->timeStamp = timeStamp; 502 484 this->bRelCoorChanged = false; -
orxonox/branches/heightMap/src/lib/coord/p_node.h
r4122 r4165 69 69 void shiftDir (const Quaternion& shift); 70 70 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;} 73 75 74 76 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE); … … 110 112 void init(PNode* parent); 111 113 114 Vector velocity; //!< Saves the velocity. 112 115 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 vector114 float time; //!< time since last update115 116 }; 116 117 -
orxonox/branches/heightMap/src/lib/graphics/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 176 177 esac; \ 177 178 done; \ 178 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile'; \179 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/Makefile'; \ 179 180 cd $(top_srcdir) && \ 180 $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile181 $(AUTOMAKE) --foreign src/lib/graphics/Makefile 181 182 .PRECIOUS: Makefile 182 183 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc
r4122 r4165 31 31 { 32 32 this->setClassName ("GraphicsEngine"); 33 34 this->fullscreen = false; 35 33 36 this->initVideo(); 34 37 … … 140 143 int GraphicsEngine::setResolution(int width, int height, int bpp) 141 144 { 145 Uint32 fullscreenFlag; 142 146 this->resolutionX = width; 143 147 this->resolutionY = height; 144 148 this->bitsPerPixel = bpp; 149 if (this->fullscreen) 150 fullscreenFlag = SDL_FULLSCREEN; 151 else 152 fullscreenFlag = 0; 145 153 146 154 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) 148 156 { 149 157 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError()); … … 151 159 // return -1; 152 160 } 153 161 } 162 163 void GraphicsEngine::setFullscreen(bool fullscreen) 164 { 165 this->fullscreen = fullscreen; 166 this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel); 154 167 } 155 168 … … 257 270 /* Check if our resolution is restricted */ 258 271 if(this->videoModes == (SDL_Rect **)-1){ 259 PRINTF( 1)("All resolutions available.\n");272 PRINTF(2)("All resolutions available.\n"); 260 273 } 261 274 else{ … … 263 276 PRINT(0)("Available Resoulution Modes are\n"); 264 277 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); 266 279 } 267 280 -
orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h
r3844 r4165 26 26 int setGLattribs(void); 27 27 int setResolution(int width, int height, int bpp); 28 void setFullscreen(bool fullscreen = false); 28 29 /** \returns the x resolution */ 29 30 inline int getResolutionX(void) {return this->resolutionX;} -
orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in
r4122 r4165 150 150 PACKAGE_VERSION = @PACKAGE_VERSION@ 151 151 PATH_SEPARATOR = @PATH_SEPARATOR@ 152 PKG_CONFIG = @PKG_CONFIG@ 152 153 RANLIB = @RANLIB@ 153 154 SET_MAKE = @SET_MAKE@ … … 247 248 esac; \ 248 249 done; \ 249 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile'; \250 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile'; \ 250 251 cd $(top_srcdir) && \ 251 $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile252 $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile 252 253 .PRECIOUS: Makefile 253 254 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/graphics/importer/material.cc
r4111 r4165 45 45 this->setTransparency(1.0); 46 46 47 48 47 this->diffuseTexture = NULL; 49 48 this->ambientTexture = NULL; 50 49 this->specularTexture = NULL; 51 52 this->diffuseTextureSet = false;53 this->ambientTextureSet = false;54 this->specularTextureSet = false;55 50 56 51 this->setName(mtlName); … … 107 102 glShadeModel(GL_SMOOTH); 108 103 109 if (this->diffuseTexture Set)104 if (this->diffuseTexture) 110 105 { 111 106 glEnable(GL_TEXTURE_2D); … … 300 295 { 301 296 PRINTF(4)("setting Diffuse Map %s\n", dMap); 302 // diffuseTexture = new Texture();303 // this->diffuseTextureSet = diffuseTexture->loadImage(dMap);304 297 305 298 //! \todo check if RESOURCE MANAGER is availiable 306 299 //! \todo Textures from .mtl-file need special care. 307 this->diffuseTexture Set = this->diffuseTexture= (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);300 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE); 308 301 } 309 302 -
orxonox/branches/heightMap/src/lib/graphics/importer/material.h
r3914 r4165 67 67 Texture* ambientTexture; //!< The ambient texture of the Material. 68 68 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 74 69 }; 75 70 #endif -
orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc
r4122 r4165 40 40 this->particleType = type; 41 41 this->particles = NULL; 42 this->deadList = NULL; 42 43 this->setConserve(.8); 43 44 this->setLifeSpan(.1); … … 57 58 // delete what has to be deleted here 58 59 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 } 59 76 } 60 77 … … 199 216 { 200 217 prevPart->next = tickPart->next; 201 delete tickPart; 218 tickPart->next = this->deadList; 219 this->deadList = tickPart; 202 220 tickPart = prevPart->next; 203 221 } … … 206 224 prevPart = NULL; 207 225 this->particles = tickPart->next; 208 delete tickPart; 226 tickPart->next = this->deadList; 227 this->deadList = tickPart; 209 228 tickPart = this->particles; 210 229 } … … 266 285 if (unlikely(particles == NULL)) 267 286 { 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; 269 294 this->particles->next = NULL; 270 295 } … … 272 297 else 273 298 { 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; 275 307 tmpPart->next = this->particles; 276 308 this->particles = tmpPart; … … 300 332 PRINT(0)(" ParticleSystem %s\n", this->name); 301 333 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 92 92 Material* material; //!< A Material for all the Particles. 93 93 Particle* particles; //!< A list of particles of this System. 94 Particle* deadList; //!< A list of dead Particles in the System. 94 95 95 96 GLuint* glID; //!< A List of different gl-List-ID's -
orxonox/branches/heightMap/src/lib/gui/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 178 179 esac; \ 179 180 done; \ 180 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/Makefile'; \181 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/Makefile'; \ 181 182 cd $(top_srcdir) && \ 182 $(AUTOMAKE) -- gnusrc/lib/gui/Makefile183 $(AUTOMAKE) --foreign src/lib/gui/Makefile 183 184 .PRECIOUS: Makefile 184 185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/console/Makefile.in
r4122 r4165 132 132 PACKAGE_VERSION = @PACKAGE_VERSION@ 133 133 PATH_SEPARATOR = @PATH_SEPARATOR@ 134 PKG_CONFIG = @PKG_CONFIG@ 134 135 RANLIB = @RANLIB@ 135 136 SET_MAKE = @SET_MAKE@ … … 204 205 esac; \ 205 206 done; \ 206 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile'; \207 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/console/Makefile'; \ 207 208 cd $(top_srcdir) && \ 208 $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile209 $(AUTOMAKE) --foreign src/lib/gui/console/Makefile 209 210 .PRECIOUS: Makefile 210 211 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in
r4122 r4165 150 150 PACKAGE_VERSION = @PACKAGE_VERSION@ 151 151 PATH_SEPARATOR = @PATH_SEPARATOR@ 152 PKG_CONFIG = @PKG_CONFIG@ 152 153 RANLIB = @RANLIB@ 153 154 SET_MAKE = @SET_MAKE@ … … 264 265 esac; \ 265 266 done; \ 266 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile'; \267 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile'; \ 267 268 cd $(top_srcdir) && \ 268 $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile269 $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile 269 270 .PRECIOUS: Makefile 270 271 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/gui/gui.cc
r4122 r4165 53 53 { 54 54 Window* orxonoxGUI = NULL; 55 55 executable = NULL; 56 56 57 initGUI(argc, argv); 57 58 … … 80 81 Box* optionBoxR = new Box('v'); 81 82 { 82 exec = new GuiExec();83 optionBoxR->fill(exec->getWidget());84 85 83 flags = new GuiFlags(); 86 87 84 optionBoxR->fill(flags->getWidget()); 88 85 89 86 update = new GuiUpdate(); 90 87 optionBoxR->fill(update->getWidget()); 88 89 exec = new GuiExec(); 90 optionBoxR->fill(exec->getWidget()); 91 91 } 92 92 windowBox->fill(optionBoxR); … … 94 94 orxonoxGUI->fill(windowBox); 95 95 } 96 97 96 98 // Reading Values from File 97 99 exec->setConfDir(GUI_DEFAULT_CONF_DIR); … … 116 118 } 117 119 #endif /* HAVE_CURL */ 120 } 118 121 122 /** 123 \brief starts the OrxonoxGUI 124 */ 125 void Gui::startGui(void) 126 { 119 127 mainloopGUI(); 128 120 129 #ifndef HAVE_GTK2 121 130 GuiExec::startOrxonox(NULL, exec); … … 123 132 } 124 133 134 void 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 */ 125 142 bool Gui::startOrxonox = false; 126 143 -
orxonox/branches/heightMap/src/lib/gui/gui/gui.h
r4122 r4165 26 26 ~Gui(void); 27 27 28 void startGui(void); 29 void printHelp(void); 30 28 31 static bool startOrxonox; 29 32 }; -
orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc
r4122 r4165 47 47 enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO); 48 48 enableSound->setFlagName ("no-sound", 0); 49 enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox"); 50 enableSound->setDefaultValue(0); 49 51 enableSound->saveability(); 50 52 audioBox->fill(enableSound); … … 53 55 musicVolume = new Slider("Music Volume", 0, 100); 54 56 musicVolume->setFlagName("music-volume", "m", 80); 57 musicVolume->setDescription("Sets the volume of the ingame music"); 55 58 musicVolume->saveability(); 56 59 audioBox->fill (musicVolume); … … 59 62 effectsVolume = new Slider ("Effects Volume", 0, 100); 60 63 effectsVolume->setFlagName ("effects-volume", "e", 80); 64 effectsVolume->setDescription("Sets the volune of the ingame SoundEffects"); 61 65 effectsVolume->saveability(); 62 66 audioBox->fill (effectsVolume); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc
r4122 r4165 70 70 execBox->fill(this->saveSettings); 71 71 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"); 73 90 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 ); 74 109 verboseMode->saveability(); 75 110 execBox->fill(verboseMode); 111 #endif 76 112 77 113 alwaysShow = new CheckButton(CONFIG_NAME_ALWAYS_SHOW_GUI); 78 114 alwaysShow->setFlagName("gui", "g", 0); 115 alwaysShow->setDescription("shows the gui when starting orxonox"); 79 116 alwaysShow->saveability(); 80 117 execBox->fill(alwaysShow); … … 114 151 this->confDir = ResourceManager::homeDirCheck(confDir); 115 152 116 PRINTF( 3)("Config Directory is: %s.\n", this->confDir);153 PRINTF(5)("Config Directory is: %s.\n", this->confDir); 117 154 //! \todo F** Windows-support 118 155 #ifndef __WIN32__ … … 135 172 this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2]; 136 173 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); 138 175 } 139 176 -
orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc
r4122 r4165 38 38 this->flagsBox->fill(flagsLabel); 39 39 this->shortFlags = new CheckButton("shortFlags"); 40 this->shortFlags->setDefaultValue(0); 40 41 this->flagsBox->fill(shortFlags); 41 42 -
orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc
r4122 r4165 312 312 313 313 /** 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 */ 318 void 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 /** 314 354 \brief Finds an Option by a given number(the n'th option found away from this Widget) 315 355 \param number The Count of options to wait(by reference) … … 595 635 } 596 636 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"); 598 638 } 599 639 … … 1177 1217 if ((this->value = atoi(tmpChar))=!0) 1178 1218 this->value = 1; 1179 #endif /* HAVE_GTK2 */ 1219 1180 1220 PRINT(0)("%s set to: %d\n", this->title, this->value); 1221 #endif /* HAVE_GTK2 */ 1181 1222 } 1182 1223 … … 1262 1303 if (this->value <= this->start) 1263 1304 this->value = this->start; 1264 #endif /* HAVE_GTK2 */ 1305 1265 1306 PRINT(0)("%s set to: %d\n",this->title, this->value); 1307 #endif /* HAVE_GTK2 */ 1266 1308 } 1267 1309 … … 1370 1412 { 1371 1413 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); 1375 1417 this->redraw(); 1376 1418 } … … 1429 1471 1430 1472 #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); 1432 1474 } 1433 1475 … … 1518 1560 void OptionLabel::load(char* loadString) 1519 1561 { 1520 PRINTF( 4)("Loading %s: setting to %s\n", this->title, loadString);1562 PRINTF(5)("Loading %s: setting to %s\n", this->title, loadString); 1521 1563 this->setValue(loadString); 1522 1564 } … … 1668 1710 #ifdef HAVE_GTK2 1669 1711 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); 1671 1713 #else /* HVE_GTK2 */ 1672 1714 PRINT(0)("Progress: %f%%\n", this->progress*100.0/this->totalSize); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h
r4122 r4165 71 71 static void listGroups(Widget* widget); 72 72 static void listGroups(Widget* widget, void* data); 73 static void printHelp(Widget* widget); 73 74 Widget* findGroupByNumber(int* number, unsigned int depth); 74 75 static void setOptions(Widget* widget); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc
r4122 r4165 55 55 dataDirButton = new Button(CONFIG_NAME_DATADIR); 56 56 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"); 57 59 dataDirLabel->saveability(); 58 60 dataDirDialog = new FileDialog("data-Repos-location"); … … 73 75 this->updateBox->fill(this->autoUpdate); 74 76 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"); 75 78 this->autoUpdate->saveability(); 76 79 … … 127 130 bool GuiUpdate::getSystemInfo(void) 128 131 { 129 PRINTF( 3)("Grabbing system information\n");132 PRINTF(5)("Grabbing system information\n"); 130 133 this->tmpDir = getenv("TMPDIR"); 131 134 if(!tmpDir) 132 135 this->tmpDir = "/tmp"; 133 PRINTF( 4)("Temporary directory is: %s\n", this->tmpDir);136 PRINTF(5)("Temporary directory is: %s\n", this->tmpDir); 134 137 135 138 #ifdef __WIN32__ … … 138 141 this->homeDir = getenv("HOME"); 139 142 #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); 144 148 145 149 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); 147 151 148 152 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); 150 154 } 151 155 … … 153 157 bool* GuiUpdate::checkForUpdates(void) 154 158 { 155 PRINTF( 3)("checking for new version of orxonox\n");159 PRINTF(4)("checking for new version of orxonox\n"); 156 160 FileInfo updateFileInfo; 157 161 updateFileInfo.fileName = "update_info"; … … 263 267 dataInfo->webRoot = "http://www.orxonox.ethz.ch/files/"; 264 268 dataInfo->localRoot = "./"; 265 PRINTF( 3)("Preparing to download file %s.\n", dataInfo->fileName);269 PRINTF(4)("Preparing to download file %s.\n", dataInfo->fileName); 266 270 downloadWithStyle(dataInfo); 267 271 } … … 348 352 return false; 349 353 } 350 PRINTF( 3)("Downloading.\n");354 PRINTF(4)("Downloading.\n"); 351 355 FileInfo* info =(FileInfo*)fileInfo; 352 356 CURLcode res; … … 396 400 return false; 397 401 } 398 PRINTF( 3)("Downloading.\n");402 PRINTF(4)("Downloading.\n"); 399 403 FileInfo* info =(FileInfo*)fileInfo; 400 404 CURLcode res; … … 464 468 curl_easy_cleanup(curlHandle); 465 469 466 PRINTF( 3)("Closing the downloaded file.\n");470 PRINTF(4)("Closing the downloaded file.\n"); 467 471 fclose(info->fileHandle); 468 472 … … 490 494 gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar) 491 495 { 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"); 493 497 } 494 498 #endif /* HAVE_GTK2 */ -
orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc
r4122 r4165 51 51 fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN); 52 52 fullscreen->setFlagName("windowed", "q", 1); 53 fullscreen->setDescription("Starts orxonox in windowed mode"); 53 54 fullscreen->saveability(); 54 55 videoBox->fill(fullscreen); … … 57 58 resolution->saveability(); 58 59 resolution->setFlagName("resolution", "r", 0); 60 resolution->setDescription("Sets the resolution of orxonox"); 59 61 videoBox->fill(resolution); 60 62 wireframe = new CheckButton(CONFIG_NAME_WIREFRAME); 61 63 wireframe->setFlagName("wireframe", "w", 0); 64 wireframe->setDescription("Starts orxonox in wireframe mode"); 62 65 wireframe->saveability(); 63 66 videoBox->fill(wireframe); … … 199 202 else{ 200 203 /* Print valid modes */ 201 PRINT( 4)("Available Modes\n");204 PRINT(5)("Available Modes\n"); 202 205 for(i = 0; modes[i] ;++i) 203 206 { 204 207 if (x != modes[i]->w || y != modes[i]->h) 205 208 { 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); 207 210 sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h); 208 211 menu->addItem(tmpChar);
Note: See TracChangeset
for help on using the changeset viewer.