X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=5b3d92671336f5bd2ce16b9d7639f802e4e07740;hb=0b7253f3d99e4382008aff8b8e221e88ff40d3e9;hp=c0f061cf2a56a89dc545d991894c26ea24456901;hpb=2be40815197f266e99b054544bbb988b20d2289c;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index c0f061c..5b3d926 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -66,13 +66,10 @@ extern float sps; extern float realmultiplier; extern int slomo; extern bool cellophane; -extern float terraindetail; extern float texdetail; extern bool osx; -extern int numplayers; extern bool freeze; -extern Person player[maxplayers]; extern bool stillloading; extern int mainmenu; /*extern*/ bool gameFocused; @@ -233,7 +230,6 @@ Boolean SetUp (Game & game) osx = 0; cellophane=0; texdetail=4; - terraindetail=2; slomospeed=0.25; slomofreq=8012; numplayers=1; @@ -683,7 +679,6 @@ int main(int argc, char **argv) try { - bool regnow = false; { Game game; pgame = &game; @@ -742,7 +737,6 @@ int main(int argc, char **argv) } } - regnow = game.registernow; } pgame = 0; @@ -771,62 +765,6 @@ int main(int argc, char **argv) // -------------------------------------------------------------------------- -extern int channels[100]; -extern OPENAL_SAMPLE * samp[100]; -extern OPENAL_STREAM * strm[20]; - -extern "C" void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused) -{ - const OPENAL_SAMPLE * currSample = OPENAL_GetCurrentSample(channels[chan]); - if (currSample && currSample == samp[chan]) - { - if (OPENAL_GetPaused(channels[chan])) - { - OPENAL_StopSound(channels[chan]); - channels[chan] = OPENAL_FREE; - } - else if (OPENAL_IsPlaying(channels[chan])) - { - int loop_mode = OPENAL_GetLoopMode(channels[chan]); - if (loop_mode & OPENAL_LOOP_OFF) - { - channels[chan] = OPENAL_FREE; - } - } - } - else - { - channels[chan] = OPENAL_FREE; - } - - channels[chan] = OPENAL_PlaySoundEx(channels[chan], sptr, dsp, startpaused); - if (channels[chan] < 0) - { - channels[chan] = OPENAL_PlaySoundEx(OPENAL_FREE, sptr, dsp, startpaused); - } -} - -extern "C" void PlayStreamEx(int chan, OPENAL_STREAM *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused) -{ - const OPENAL_SAMPLE * currSample = OPENAL_GetCurrentSample(channels[chan]); - if (currSample && currSample == OPENAL_Stream_GetSample(sptr)) - { - OPENAL_StopSound(channels[chan]); - OPENAL_Stream_Stop(sptr); - } - else - { - OPENAL_Stream_Stop(sptr); - channels[chan] = OPENAL_FREE; - } - - channels[chan] = OPENAL_Stream_PlayEx(channels[chan], sptr, dsp, startpaused); - if (channels[chan] < 0) - { - channels[chan] = OPENAL_Stream_PlayEx(OPENAL_FREE, sptr, dsp, startpaused); - } -} - bool LoadImage(const char * fname, TGAImageRec & tex) {