diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-09 01:44:18 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-09 01:44:18 +0000 |
commit | 3c214ff26a33555e3744608d7047286eb9eb5780 (patch) | |
tree | 46f5dce9cee082509cfa588b4cf93e7eb937e931 /src/main.cpp | |
parent | 4408659ea0f7c25e1d73718576822b562a29d0b4 (diff) | |
download | Mana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.gz Mana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.bz2 Mana-3c214ff26a33555e3744608d7047286eb9eb5780.tar.xz Mana-3c214ff26a33555e3744608d7047286eb9eb5780.zip |
Use new animation system in character selection/creation. Shows equipment and
allowed for some cleanup. Had a bit of help from the patch by VictorSan.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6f34e0b8..eebb92bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,8 +84,6 @@ // Account infos char n_server, n_character; -std::vector<Spriteset *> hairset; -Spriteset *playerset[2]; Graphics *graphics; // TODO Anyone knows a good location for this? Or a way to make it non-global? @@ -272,26 +270,6 @@ void init_engine(const Options &options) // Initialize for drawing graphics->_beginDraw(); - playerset[0] = resman->getSpriteset( - "graphics/sprites/player_male_base.png", 64, 64); - if (!playerset[0]) logger->error("Couldn't load male player spriteset!"); - playerset[1] = resman->getSpriteset( - "graphics/sprites/player_female_base.png", 64, 64); - if (!playerset[1]) logger->error("Couldn't load female player spriteset!"); - - - for (int i=0; i < NR_HAIR_STYLES; i++) - { - Spriteset *tmp = ResourceManager::getInstance()->getSpriteset( - "graphics/sprites/hairstyle" + toString(i + 1) + ".png", - 40, 40); - if (!tmp) { - logger->error("Unable to load hairstyle"); - } else { - hairset.push_back(tmp); - } - } - gui = new Gui(graphics); state = UPDATE_STATE; /**< Initial game state */ @@ -300,8 +278,8 @@ void init_engine(const Options &options) if (config.getValue("sound", 0) == 1) { sound.init(); } - sound.setSfxVolume((int)config.getValue("sfxVolume", 100)); - sound.setMusicVolume((int)config.getValue("musicVolume", 60)); + sound.setSfxVolume((int) config.getValue("sfxVolume", 100)); + sound.setMusicVolume((int) config.getValue("musicVolume", 60)); } catch (const char *err) { state = ERROR_STATE; @@ -322,13 +300,6 @@ void exit_engine() delete gui; delete graphics; - std::for_each(hairset.begin(), hairset.end(), - std::mem_fun(&Spriteset::decRef)); - hairset.clear(); - - playerset[0]->decRef(); - playerset[1]->decRef(); - // Shutdown libxml xmlCleanupParser(); |