]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
Do not link against OpenGL library
[lugaru.git] / Source / OpenGL_Windows.cpp
index 4e163eb85f89637e779feb428a680dd4df02fa96..f5aed92e9a0851d151ef68d4a57d5f28ac0cd747 100644 (file)
@@ -54,25 +54,15 @@ static bool save_png(const char * fname);
 
 #include "openal_wrapper.h"
 
-// ADDED GWC
-#ifdef _MSC_VER
-#pragma comment(lib, "opengl32.lib")
-#pragma comment(lib, "glu32.lib")
-#pragma comment(lib, "glaux.lib")
-#endif
-
 extern float multiplier;
 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 +223,6 @@ Boolean SetUp (Game & game)
        osx = 0;
        cellophane=0;
        texdetail=4;
-       terraindetail=2;
        slomospeed=0.25;
        slomofreq=8012;
        numplayers=1;
@@ -564,29 +553,6 @@ static bool IsFocused()
 }
 
 
-static void launch_web_browser(const char *url)
-{
-#ifdef WIN32
-    ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
-
-#elif (defined(__APPLE__) && defined(__MACH__))
-    const char *fmt = "open '%s'";
-    const size_t len = strlen(fmt) + strlen(url) + 16;
-    char *buf = new char[len];
-    snprintf(buf, len, fmt, url);
-    system(buf);
-    delete[] buf;
-
-#elif PLATFORM_LINUX
-    const char *fmt = "PATH=$PATH:. xdg-open '%s'";
-    const size_t len = strlen(fmt) + strlen(url) + 16;
-    char *buf = new char[len];
-    snprintf(buf, len, fmt, url);
-    system(buf);
-    delete[] buf;
-#endif
-}
-
 
 #ifndef WIN32
 // (code lifted from physfs: http://icculus.org/physfs/ ... zlib license.)
@@ -706,7 +672,6 @@ int main(int argc, char **argv)
 
        try
        {
-               bool regnow = false;
                {
                        Game game;
                        pgame = &game;
@@ -765,7 +730,6 @@ int main(int argc, char **argv)
                                }
                        }
 
-                       regnow = game.registernow;
                }
                pgame = 0;
 
@@ -794,62 +758,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)
 {