X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.cpp;h=b3289e29f489201d4d83a94f0e5f89105172cd2e;hb=018ec84e525b49021b26dbbc0ab87cc8e45b3a77;hp=524009d2500b504846f927c4223147d5fba8fe47;hpb=735daf95aba0eef54d151daae01285f0959825d0;p=lugaru.git diff --git a/Source/Game.cpp b/Source/Game.cpp index 524009d..b3289e2 100644 --- a/Source/Game.cpp +++ b/Source/Game.cpp @@ -3,11 +3,6 @@ #include "SDL_thread.h" extern int mainmenu; -extern OPENAL_SAMPLE *samp[100]; -extern int channels[100]; -extern "C" void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused); - - Game::Game() { @@ -219,14 +214,7 @@ typedef struct { } params_thread; void Game::fireSound(int sound) { - float gLoc[3]={0,0,0}; - float vel[3]={0,0,0}; - OPENAL_Sample_SetMinMaxDistance(samp[sound], 9999.0f, 99999.0f); - PlaySoundEx( sound, samp[sound], NULL, true); - OPENAL_3D_SetAttributes(channels[sound], gLoc, vel); - OPENAL_SetVolume(channels[sound], 256); - OPENAL_SetPaused(channels[sound], false); - OPENAL_Sample_SetMinMaxDistance(samp[sound], 8.0f, 2000.0f); + emit_sound_at(sound); } void Game::inputText(char* str, int* charselected, int* nb_chars) { @@ -355,3 +343,12 @@ int Game::thread(void *data) { (pt->game->*(pt->method))(); } } + +void Game::DrawGL() { + if ( stereomode == stereoNone ) { + DrawGLScene(stereoCenter); + } else { + DrawGLScene(stereoLeft); + DrawGLScene(stereoRight); + } +}