diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-10 14:16:58 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-10 14:16:58 +0000 |
commit | 26d50af0fb1b07e662978f7c341a3c2548074840 (patch) | |
tree | 548619f2a360bcef9227bbde4aa1592128a48e53 /src/main.cpp | |
parent | b42e9e23fd6fe4819d34f04124ba66eca6a6c020 (diff) | |
download | mana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.gz mana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.bz2 mana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.xz mana-26d50af0fb1b07e662978f7c341a3c2548074840.zip |
Resource manager can now load sfx and music as samples.
(added a new sfx to test the sound engine)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index da3970e1..95b1727b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,6 +68,7 @@ char *dir = NULL; int displayFlags, screenW, screenH, bitDepth; Sound sound; +Music *bgm; // ini file configuration reader Configuration config; @@ -274,7 +275,7 @@ void init_engine() "graphics/sprites/player_male_base.png"); Image *hairImg = resman->getImage( "graphics/sprites/player_male_hair.png"); - + if (!login_wallpaper) logger.error("Couldn't load login_wallpaper.png"); if (!playerImg) logger.error("Couldn't load player_male_base.png"); if (!hairImg) logger.error("Couldn't load player_male_hair.png"); @@ -341,11 +342,15 @@ int main(int argc, char *argv[]) guiInput->pushInput(event); } + + ResourceManager *resman = ResourceManager::getInstance(); switch (state) { case LOGIN: logger.log("State: LOGIN"); sound.startBgm("data/music/Ivano(de)Jeanette.ogg"); + /*bgm = resman->getMusic("music/Ivano(de)Jeanette.ogg"); + bgm->play(-1);*/ login(); break; case CHAR_SERVER: @@ -358,6 +363,7 @@ int main(int argc, char *argv[]) break; case GAME: sound.stopBgm(); + //bgm->stop(); logger.log("State: GAME"); try { map_start(); |