Subsea deserves a better song than BoomBoomBoom, plus add Rudy to the Credits for Subsea track

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9944 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-10-05 20:15:46 +00:00
parent 9fce22d85c
commit b696dfad65
4 changed files with 19 additions and 12 deletions

Binary file not shown.

View File

@ -51,7 +51,7 @@ MusicInformation::MusicInformation(const std::string& filename) throw (std::runt
{
// Create information just from ogg file
// -------------------------------------
m_title = StringUtils::removeExtension(StringUtils::getBasename(filename));
m_title = core::stringw(StringUtils::removeExtension(StringUtils::getBasename(filename)).c_str());
m_normal_filename = filename;
return;
}
@ -73,7 +73,8 @@ MusicInformation::MusicInformation(const std::string& filename) throw (std::runt
filename.c_str());
throw std::runtime_error("No music node found");
}
if(!root->get("title", &m_title))
std::string title;
if(!root->get("title", &title))
{
fprintf(stderr,
"The 'title' attribute is missing in the music XML file '%s'!\n",
@ -81,7 +82,10 @@ MusicInformation::MusicInformation(const std::string& filename) throw (std::runt
throw std::runtime_error("Incomplete or corrupt music XML file");
return;
}
if(!root->get("composer", &m_composer))
m_title = StringUtils::decodeFromHtmlEntities(title);
std::string composer;
if(!root->get("composer", &composer))
{
fprintf(stderr,
"The 'composer' attribute is missing in the music XML file '%s'!\n",
@ -89,6 +93,8 @@ MusicInformation::MusicInformation(const std::string& filename) throw (std::runt
throw std::runtime_error("Incomplete or corrupt music XML file");
return;
}
m_composer = StringUtils::decodeFromHtmlEntities(composer);
if(!root->get("file", &m_normal_filename))
{
fprintf(stderr,

View File

@ -26,6 +26,9 @@
#include "utils/no_copy.hpp"
#include <irrString.h>
using irr::core::stringw;
class Music;
/**
@ -37,8 +40,8 @@ class Music;
class MusicInformation : public NoCopy
{
private:
std::string m_composer;
std::string m_title;
stringw m_composer;
stringw m_title;
std::string m_normal_filename;
std::string m_fast_filename;
std::vector<std::string> m_all_tracks;
@ -70,11 +73,11 @@ public:
#endif
MusicInformation (const std::string& filename) throw (std::runtime_error);
~MusicInformation ();
const std::string& getComposer () const {return m_composer; }
const std::string& getTitle () const {return m_title; }
const stringw& getComposer () const {return m_composer; }
const stringw& getTitle () const {return m_title; }
const std::string& getNormalFilename() const {return m_normal_filename; }
const std::string& getFastFilename () const {return m_fast_filename; }
//int getNumLoops () const {return m_numLoops; }
//int getNumLoops () const {return m_numLoops; }
float getFasterTime () const {return m_faster_time; }
float getMaxPitch () const {return m_max_pitch; }
void addMusicToTracks ();

View File

@ -575,8 +575,7 @@ void RaceGUIBase::drawGlobalMusicDescription()
const MusicInformation* mi = music_manager->getCurrentMusic();
if (!mi) return;
std::string s="\""+mi->getTitle()+"\"";
core::stringw thetext(s.c_str());
core::stringw thetext = core::stringw(L"\"") + mi->getTitle() + L"\"";
core::dimension2d< u32 > textSize = font->getDimension(thetext.c_str());
int textWidth = textSize.Width;
@ -616,8 +615,7 @@ void RaceGUIBase::drawGlobalMusicDescription()
{
core::rect<s32> pos_by(textXFrom, text_y+40,
textXTo, text_y+40);
std::string s="by "+mi->getComposer();
font->draw(core::stringw(s.c_str()).c_str(), pos_by, white,
font->draw(thetext_composer, pos_by, white,
true, true);
}