Jeck - As prior, but for sounds and music as well. Use CommonRes->ssLoadMusic / CommonRes->ssLoadSample.

This commit is contained in:
wagic.jeck
2009-08-27 06:31:38 +00:00
parent 5e14efed3c
commit 807eea7ddb
10 changed files with 644 additions and 629 deletions

View File

@@ -193,7 +193,7 @@ class GameStateDeckViewer: public GameState, public JGuiListener
JSoundSystem::GetInstance()->StopMusic(GameApp::music);
SAFE_DELETE(GameApp::music);
}
GameApp::music = JSoundSystem::GetInstance()->LoadMusic("sound/track1.mp3");
GameApp::music = GameApp::CommonRes->ssLoadMusic("track1.mp3");
if (GameApp::music){
JSoundSystem::GetInstance()->PlayMusic(GameApp::music, true);
}

View File

@@ -31,8 +31,11 @@ public:
JSample* GetSample(const string &sampleName);
JSample* GetSample(int id);
//Wrapped from JRenderer, if we need it.
//Wrapped from other bits, if we want them.
JTexture* LoadTexture(const char* filename, int mode = 0, int textureFormat = TEXTURE_FORMAT);
//Wrapped from JSoundSystem
JMusic * ssLoadMusic(const char *fileName);
JSample * ssLoadSample(const char *fileName);
//Our new redirect system.
string graphicsFile(const string filename, const string specific = "");