X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=3d4b9f782391ac38ffb7796fa238f6307464e5c1;hb=bbf8873b80baf3cb468ac12b3f62b0938320fef1;hp=3b93f28ddbe4831fd6a92dd976845f8fe92316a3;hpb=5e75f94daefef68f2d0cfd631116f960d222dab0;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 3b93f28..3d4b9f7 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -81,13 +81,6 @@ extern bool decals; //extern int texdetail; extern float texdetail; extern bool musictoggle; -extern int bonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; -extern int oldbonus; -extern float startbonustotal; -extern float bonusnum[100]; extern int tutoriallevel; extern float smoketex; extern float tutorialstagetime; @@ -113,34 +106,14 @@ extern float menupulse; extern bool gamestart; -extern int numdialogues; -extern int numdialogueboxes[max_dialogues]; -extern int dialoguetype[max_dialogues]; -extern int dialogueboxlocation[max_dialogues][max_dialoguelength]; -extern float dialogueboxcolor[max_dialogues][max_dialoguelength][3]; -extern int dialogueboxsound[max_dialogues][max_dialoguelength]; -extern char dialoguetext[max_dialogues][max_dialoguelength][128]; -extern char dialoguename[max_dialogues][max_dialoguelength][64]; -extern XYZ dialoguecamera[max_dialogues][max_dialoguelength]; -extern XYZ participantlocation[max_dialogues][10]; -extern int participantfocus[max_dialogues][max_dialoguelength]; -extern int participantaction[max_dialogues][max_dialoguelength]; -extern float participantrotation[max_dialogues][10]; -extern XYZ participantfacing[max_dialogues][max_dialoguelength][10]; -extern float dialoguecamerarotation[max_dialogues][max_dialoguelength]; -extern float dialoguecamerarotation2[max_dialogues][max_dialoguelength]; -extern int indialogue; -extern int whichdialogue; -extern int directing; -extern float dialoguetime; -extern int dialoguegonethrough[20]; - 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; @@ -961,14 +934,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; @@ -990,10 +955,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); } } }