summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-24 19:14:24 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-24 19:15:07 +0100
commitb856e8b47ab2dfd393e3c2720c5647eb66393931 (patch)
tree3709cc05792d977aa36ddaa5e3874552aed9d2e4 /src/client.cpp
parent59c5d1ef260736225ba3ba486f40532949cc293b (diff)
downloadmana-b856e8b47ab2dfd393e3c2720c5647eb66393931.tar.gz
mana-b856e8b47ab2dfd393e3c2720c5647eb66393931.tar.bz2
mana-b856e8b47ab2dfd393e3c2720c5647eb66393931.tar.xz
mana-b856e8b47ab2dfd393e3c2720c5647eb66393931.zip
Stream music files directly from the archives
Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept around ResourceManager:copyFile for now, since it may have other uses. Also cleaned up some initialization of configuration defaults. Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 058c113b..ab9557fe 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -202,11 +202,15 @@ Client::Client(const Options &options):
logger = new Logger;
+ // Set default values for configuration files
+ branding.setDefaultValues(getBrandingDefaults());
+ paths.setDefaultValues(getPathsDefaults());
+ config.setDefaultValues(getConfigDefaults());
+
// Load branding information
if (!options.brandingPath.empty())
{
branding.init(options.brandingPath);
- branding.setDefaultValues(getBrandingDefaults());
}
initRootDir();
@@ -393,8 +397,7 @@ Client::Client(const Options &options):
userPalette = new UserPalette;
setupWindow = new Setup;
- sound.playMusic(branding.getValue("loginMusic",
- "music/system/Magick - Real.ogg"));
+ sound.playMusic(branding.getStringValue("loginMusic"));
// Initialize default server
mCurrentServer.hostname = options.serverName;
@@ -754,7 +757,6 @@ int Client::exec()
// Read default paths file 'data/paths.xml'
paths.init("paths.xml", true);
- paths.setDefaultValues(getPathsDefaults());
Event::trigger(Event::ClientChannel, Event::LoadingDatabases);
@@ -1257,7 +1259,6 @@ void Client::initConfiguration()
{
fclose(configFile);
config.init(configPath);
- config.setDefaultValues(getConfigDefaults());
}
}