Make ipo animations always enabled. + start of work to have music on the challenge completed screen but doesn't appear to work yet

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11801 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-10-28 22:54:40 +00:00
parent 8f2c2e396f
commit 8111440317
6 changed files with 28 additions and 3 deletions

View File

@ -65,7 +65,7 @@ BillboardAnimation::BillboardAnimation(const XMLNode &xml_node)
* \param dt Time since last call. */
void BillboardAnimation::update(float dt)
{
if ( UserConfigParams::m_graphical_effects )
//if ( UserConfigParams::m_graphical_effects )
{
Vec3 xyz(m_node->getPosition());
// Rotation doesn't make too much sense for a billboard,

View File

@ -304,7 +304,7 @@ ThreeDAnimation::~ThreeDAnimation()
*/
void ThreeDAnimation::update(float dt)
{
if ( UserConfigParams::m_graphical_effects || m_important_animation )
//if ( UserConfigParams::m_graphical_effects || m_important_animation )
{
Vec3 xyz = m_node->getPosition();
Vec3 scale = m_node->getScale();

View File

@ -266,6 +266,11 @@ namespace GUIEngine
*/
virtual MusicInformation* getMusic() const { return stk_config->m_title_music; }
/**
* \return which music to play at this screen, if accessed in "in-game-menu" mode
*/
virtual MusicInformation* getInGameMenuMusic() const { return NULL; }
virtual int getWidth();
virtual int getHeight();

View File

@ -20,6 +20,7 @@
#include <SColor.h>
#include "audio/music_manager.hpp"
#include "challenges/challenge_data.hpp"
#include "challenges/game_slot.hpp"
#include "challenges/unlock_manager.hpp"
@ -746,3 +747,9 @@ void FeatureUnlockedCutScene::eventCallback(GUIEngine::Widget* widget,
} // eventCallback
// -------------------------------------------------------------------------------------
MusicInformation* FeatureUnlockedCutScene::getInGameMenuMusic() const
{
MusicInformation* mi = music_manager->getMusicInformation("race_summary.music");
return mi;
}

View File

@ -167,6 +167,8 @@ public:
/** override from base class to handle escape press */
virtual bool onEscapePressed() OVERRIDE;
virtual MusicInformation* getInGameMenuMusic() const OVERRIDE;
};
#endif

View File

@ -217,8 +217,19 @@ void StateManager::onTopMostScreenChanged()
{
if (m_game_mode == MENU && GUIEngine::getCurrentScreen() != NULL)
{
music_manager->startMusic(GUIEngine::getCurrentScreen()->getMusic());
if (GUIEngine::getCurrentScreen()->getMusic() != NULL)
{
music_manager->startMusic(GUIEngine::getCurrentScreen()->getMusic());
}
}
else if (m_game_mode == INGAME_MENU && GUIEngine::getCurrentScreen() != NULL)
{
if (GUIEngine::getCurrentScreen()->getInGameMenuMusic() != NULL)
{
music_manager->startMusic(GUIEngine::getCurrentScreen()->getInGameMenuMusic());
}
}
} // onTopMostScreenChanged
// ----------------------------------------------------------------------------