From: <dv...@us...> - 2008-05-04 18:53:22
|
Revision: 267 http://dunelegacy.svn.sourceforge.net/dunelegacy/?rev=267&view=rev Author: dvalin Date: 2008-05-04 11:53:03 -0700 (Sun, 04 May 2008) Log Message: ----------- commit some soundplayer code that never made it in, thus breaking build.. Modified Paths: -------------- branches/dunks/include/Application.h branches/dunks/src/Application.cpp Modified: branches/dunks/include/Application.h =================================================================== --- branches/dunks/include/Application.h 2008-05-04 04:31:10 UTC (rev 266) +++ branches/dunks/include/Application.h 2008-05-04 18:53:03 UTC (rev 267) @@ -13,7 +13,11 @@ #include <pthread.h> extern "C" void *dataCacheThread(void * arg); #endif +//#include "SoundPlayerClass.h" +class SoundPlayerClass; +class Mix_Chunk; + typedef enum { CURSOR_NORMAL, @@ -59,8 +63,11 @@ void UpdateVideoMode(bool fullscreen); void UpdateVideoMode(Uint16 w, Uint16 h); void UpdateVideoMode(Uint16 w, Uint16 h, bool fullscreen); +// SoundPlayerClass* soundPlayer; + void playSound(Mix_Chunk* chunk, int channel = 0); private: + SoundPlayerClass* soundPlayer; // void *testis(void * arg); void InitSettings(); void InitAudio(); Modified: branches/dunks/src/Application.cpp =================================================================== --- branches/dunks/src/Application.cpp 2008-05-04 04:31:10 UTC (rev 266) +++ branches/dunks/src/Application.cpp 2008-05-04 18:53:03 UTC (rev 267) @@ -108,7 +108,7 @@ SDL_EnableUNICODE(1); // replace NULL with a path to a 32x32 icon - SDL_WM_SetCaption("Dune Legacy", NULL); + SDL_WM_SetCaption("Dune Legacy", "paks/DUNE2.ICO"); InitAudio(); //InitNet(); @@ -276,22 +276,9 @@ void Application::LoadData() { printf("loading resources\n"); - ResMan::Instance()->addRes("ATRE"); - ResMan::Instance()->addRes("DUNE"); - ResMan::Instance()->addRes("ENGLISH"); - ResMan::Instance()->addRes("GERMAN"); - ResMan::Instance()->addRes("FINALE"); - ResMan::Instance()->addRes("HARK"); - ResMan::Instance()->addRes("HERC"); ResMan::Instance()->addRes("INTRO"); - ResMan::Instance()->addRes("INTROVOC"); - ResMan::Instance()->addRes("MENTAT"); - ResMan::Instance()->addRes("MERC"); - ResMan::Instance()->addRes("ORDOS"); - ResMan::Instance()->addRes("SCENARIO"); - ResMan::Instance()->addRes("SOUND"); - ResMan::Instance()->addRes("VOC"); - ResMan::Instance()->addRes("XTRE"); + + printf("done loading resources\n"); #ifdef __linux__ pthread_t threads[1]; @@ -306,12 +293,16 @@ m_cursor.reset(DataCache::Instance()->getGuiPic(UI_MouseCursor).get()); //mouse.getPicture(0)); fprintf(stdout, "starting sound...\n"); - SoundPlayerClass* soundPlayer = new SoundPlayerClass(); + soundPlayer = new SoundPlayerClass(); - Mix_Chunk* myChunk = DataCache::Instance()->getMusic(MUSIC_INTRO, 0); - soundPlayer->playSound(myChunk); +/* Mix_Chunk* myChunk = DataCache::Instance()->getMusic(MUSIC_INTRO, 0); + soundPlayer->playSound(myChunk);*/ } +void Application::playSound(Mix_Chunk* chunk, int channel) +{ + soundPlayer->playSound(chunk, channel); +} void Application::Die() { FontManager::Destroy(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |