- Timestamp:
- Jul 2, 2006, 4:41:32 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/glgui_widget.cc
r8990 r9019 116 116 this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 117 117 118 this->setForegroundColor(Color( 1, 0, 0, 1), OrxGui::Normal);119 this->setForegroundColor(Color(0, 0, 1, 1), OrxGui::Selected);120 this->setForegroundColor(Color(0, 1,0, 1), OrxGui::Focused);118 this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal); 119 this->setForegroundColor(Color(0, .4, 1.0, 1), OrxGui::Selected); 120 this->setForegroundColor(Color(0, .0, 1.0, 1), OrxGui::Focused); 121 121 this->setForegroundColor(Color(.1, .1, .1, 1), OrxGui::Insensitive); 122 122 -
trunk/src/lib/sound/ogg_player.cc
r8362 r9019 32 32 #include "debug.h" 33 33 #include "compiler.h" 34 35 #include "helper_functions.h" 34 36 35 37 #ifdef HAVE_SDL_SDL_H … … 137 139 vorbisInfo = ov_info(&oggStream, -1); 138 140 vorbisComment = ov_comment(&oggStream, -1); 141 this->retrieveFileInfo(&oggStream); 139 142 140 143 if(vorbisInfo->channels == 1) … … 469 472 alSourceUnqueueBuffers(source, 1, &buffer); 470 473 SoundEngine::checkError("OggPlayer::empty()::unqueue Buffers", __LINE__); 474 } 475 } 476 477 478 void OggPlayer::retrieveFileInfo(OggVorbis_File* file) 479 { 480 vorbis_comment* comment = ov_comment(file, -1); 481 if (comment == NULL) 482 { 483 PRINTF(2)("Retrieving Comment of %s failed\n", this->getName()); 484 return; 485 } 486 for (int i = 0; i < comment->comments; ++i) 487 { 488 if (!nocaseCmp("artist=", comment->user_comments[i], 7)) 489 this->_artist = comment->user_comments[i]+7; 490 if (!nocaseCmp("title=", comment->user_comments[i], 6)) 491 this->_title = comment->user_comments[i] + 6; 492 if (!nocaseCmp("album=", comment->user_comments[i], 6)) 493 this->_album = comment->user_comments[i]+6; 471 494 } 472 495 } -
trunk/src/lib/sound/ogg_player.h
r7737 r9019 59 59 bool getState() { return this->state; }; 60 60 61 const std::string& artist() const { return this->_artist; }; 62 const std::string& title() const { return this->_title; }; 63 const std::string& album() const { return this->_album; }; 64 65 61 66 void debug() const; 62 67 void printState() const; … … 75 80 void empty(); 76 81 82 void retrieveFileInfo(OggVorbis_File* file); 83 77 84 private: 78 85 FILE* oggFile; //!< general file-handler, to open the sound-file … … 88 95 SDL_Thread* musicThreadID; //!< The Thread in which music is Played back. 89 96 OrxThread::Mutex musicMutex; //!< A Mutex so that the two threads do not interfere. 97 98 99 100 std::string _title; 101 std::string _artist; 102 std::string _album; 103 std::string _vendor; 90 104 }; 91 105 -
trunk/src/story_entities/game_world_data.cc
r8975 r9019 389 389 std::string oggFile = ResourceManager::getFullName(name); 390 390 this->music = new OrxSound::OggPlayer(oggFile); 391 if (this->localPlayer != NULL) 392 this->localPlayer->hud().notifyUser(std::string("Playing SoundTrack: ") + this->music->artist() + " - " + this->music->title()); 391 393 392 394 //(OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL); -
trunk/src/world_entities/elements/glgui_radar.cc
r9014 r9019 42 42 this->setBackgroundTexture("gui_radar.png"); 43 43 44 this->_updateInterval = 1.0f;44 this->_updateInterval = .01f; 45 45 this->_timePassed = 0.0f; 46 46 this->_range = 100.0f; … … 94 94 _timePassed+=dt; 95 95 96 //if (_timePassed > _updateInterval)96 if (_timePassed > _updateInterval) 97 97 { 98 98 _timePassed = 0 ; //-=_updateInterval; -
trunk/src/world_entities/environments/mapped_water.cc
r9006 r9019 351 351 OrxGui::GLGuiBox* waterColorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 352 352 { 353 OrxGui::GLGui InputLine* waterColorText = new OrxGui::GLGuiInputLine();353 OrxGui::GLGuiText* waterColorText = new OrxGui::GLGuiText(); 354 354 waterColorText->setText("WaterColor"); 355 355 waterColorBox->pack(waterColorText); … … 380 380 OrxGui::GLGuiBox* waterUVBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 381 381 { 382 OrxGui::GLGui InputLine* waterUVText = new OrxGui::GLGuiInputLine();382 OrxGui::GLGuiText* waterUVText = new OrxGui::GLGuiText(); 383 383 waterUVText->setText("WaterUV"); 384 384 waterUVBox->pack(waterUVText); … … 395 395 OrxGui::GLGuiBox* waterFlowBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 396 396 { 397 OrxGui::GLGui InputLine* waterFlowText = new OrxGui::GLGuiInputLine();397 OrxGui::GLGuiText* waterFlowText = new OrxGui::GLGuiText(); 398 398 waterFlowText->setText("WaterFlow"); 399 399 waterFlowBox->pack(waterFlowText); … … 410 410 OrxGui::GLGuiBox* shineSizeBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 411 411 { 412 OrxGui::GLGui InputLine* shineSizeText = new OrxGui::GLGuiInputLine();412 OrxGui::GLGuiText* shineSizeText = new OrxGui::GLGuiText(); 413 413 shineSizeText->setText("ShineSize"); 414 414 shineSizeBox->pack(shineSizeText); … … 425 425 OrxGui::GLGuiBox* shineStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 426 426 { 427 OrxGui::GLGui InputLine* shineStrengthText = new OrxGui::GLGuiInputLine();427 OrxGui::GLGuiText* shineStrengthText = new OrxGui::GLGuiText(); 428 428 shineStrengthText->setText("ShineStrength"); 429 429 shineStrengthBox->pack(shineStrengthText); … … 440 440 OrxGui::GLGuiBox* reflStrengthBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 441 441 { 442 OrxGui::GLGui InputLine* reflStrengthText = new OrxGui::GLGuiInputLine();442 OrxGui::GLGuiText* reflStrengthText = new OrxGui::GLGuiText(); 443 443 reflStrengthText->setText("ReflStrength"); 444 444 reflStrengthBox->pack(reflStrengthText); … … 455 455 OrxGui::GLGuiBox* refractionBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 456 456 { 457 OrxGui::GLGui InputLine* refractionText = new OrxGui::GLGuiInputLine();457 OrxGui::GLGuiText* refractionText = new OrxGui::GLGuiText(); 458 458 refractionText->setText("Refraction"); 459 459 refractionBox->pack(refractionText); … … 470 470 OrxGui::GLGuiBox* lightPosBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 471 471 { 472 OrxGui::GLGui InputLine* lightPosText = new OrxGui::GLGuiInputLine();472 OrxGui::GLGuiText* lightPosText = new OrxGui::GLGuiText(); 473 473 lightPosText->setText("LightPos"); 474 474 lightPosBox->pack(lightPosText); … … 499 499 OrxGui::GLGuiBox* waterHeightBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 500 500 { 501 OrxGui::GLGui InputLine* waterHeightText = new OrxGui::GLGuiInputLine();501 OrxGui::GLGuiText* waterHeightText = new OrxGui::GLGuiText(); 502 502 waterHeightText->setText("WaterHeight"); 503 503 waterHeightBox->pack(waterHeightText); -
trunk/src/world_entities/player.cc
r8362 r9019 38 38 39 39 this->playable = NULL; 40 this-> hud.setVisibility(true);40 this->_hud.setVisibility(true); 41 41 42 42 this->subscribeEvent(ES_GAME, KeyMapper::PEV_CHANGE_SHIP); … … 62 62 { 63 63 PRINTF(4)("Player gets ejected from Playable\n"); 64 this-> hud.setEnergyWidget(NULL);65 this-> hud.setWeaponManager(NULL);64 this->_hud.setEnergyWidget(NULL); 65 this->_hud.setWeaponManager(NULL); 66 66 67 67 Playable* ejectedPlayable = this->playable; … … 75 75 PRINTF(4)("Enter new Playable\n"); 76 76 this->playable = playable; 77 this-> hud.setEnergyWidget(this->playable->getHealthWidget());78 this-> hud.setWeaponManager(&this->playable->getWeaponManager());77 this->_hud.setEnergyWidget(this->playable->getHealthWidget()); 78 this->_hud.setWeaponManager(&this->playable->getWeaponManager()); 79 79 80 80 this->playable->setPlayer(this); … … 96 96 void Player::weaponConfigChanged() 97 97 { 98 this-> hud.updateWeaponManager();98 this->_hud.updateWeaponManager(); 99 99 } 100 100 -
trunk/src/world_entities/player.h
r9002 r9019 32 32 inline Playable* getPlayable() const { return this->playable; }; 33 33 34 //inline Hud& hud() { return this->_hud; };35 //inline const Hud& hud() const { return this->_hud; };34 inline Hud& hud() { return this->_hud; }; 35 inline const Hud& hud() const { return this->_hud; }; 36 36 37 37 … … 43 43 private: 44 44 Playable* playable; //!< The one we controll or NULL if none 45 Hud hud; //!< The HUD to be displayed for this Player.45 Hud _hud; //!< The HUD to be displayed for this Player. 46 46 }; 47 47
Note: See TracChangeset
for help on using the changeset viewer.