]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Migrate some more definitions from Constants.h
[lugaru.git] / Source / GameDraw.cpp
index c98a3d29608b411029aae548d3d1cfb02f2f5351..2b2c8b7cf9948b3b0eb0fc09dddc33292b0cae53 100644 (file)
@@ -132,8 +132,10 @@ extern bool gamestarted;
 
 extern bool showdamagebar;
 
-extern int channels[100];
-extern "C"     void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
+enum drawmodes {
+  normalmode, motionblurmode, radialzoommode,
+  realmotionblurmode, doublevisionmode, glowmode,
+};
 
 void Game::flash() { // shouldn't be that way, these should be attributes and Person class should not change rendering.
        flashr=1;
@@ -954,14 +956,6 @@ int Game::DrawGLScene(StereoSide side)
                                                        indialogue=0;
                                                        dialoguegonethrough[whichdialogue]++;
                                                        if(dialogueboxsound[whichdialogue][indialogue]!=0){
-                                                               static float gLoc[3];
-                                                               static float vel[3];
-                                                               gLoc[0]=player[participantfocus[whichdialogue][indialogue]].coords.x;
-                                                               gLoc[1]=player[participantfocus[whichdialogue][indialogue]].coords.y;
-                                                               gLoc[2]=player[participantfocus[whichdialogue][indialogue]].coords.z;
-                                                               vel[0]=0;
-                                                               vel[1]=0;
-                                                               vel[2]=0;
                                                                int whichsoundplay;
                                                                if(dialogueboxsound[whichdialogue][indialogue]==1)whichsoundplay=rabbitchitter;
                                                                if(dialogueboxsound[whichdialogue][indialogue]==2)whichsoundplay=rabbitchitter2;
@@ -983,10 +977,7 @@ int Game::DrawGLScene(StereoSide side)
                                                                if(dialogueboxsound[whichdialogue][indialogue]==-2)whichsoundplay=firestartsound;
                                                                if(dialogueboxsound[whichdialogue][indialogue]==-3)whichsoundplay=consolesuccesssound;
                                                                if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound;
-                                                               PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true);
-                                                               OPENAL_3D_SetAttributes(channels[whichsoundplay], gLoc, vel);
-                                                               OPENAL_SetVolume(channels[whichsoundplay], 256);
-                                                               OPENAL_SetPaused(channels[whichsoundplay], false);
+                                                               emit_sound_at(whichsoundplay, player[participantfocus[whichdialogue][indialogue]].coords);
                                                        }
                                                }
                                        }