            //-------------------------
            if (Buttons & 6)                // Pause or unpause the game
            {
               if (Buttons & 2)             // Who pause the game?
                  GamePausedBy = 0;         //
               else                         //
                  GamePausedBy = 1;         //

               Buttons &= ~6;
               if (GamePause)
               {
                  GamePause = 0;
                  #ifdef TARGETCD
                     #ifdef PLAY_CDXAS
                        AudioResumeAll ();
                     #endif
                  #endif
               }
               else if (!EndRound)
               {
                  PauseChoice = 0;
                  GamePause = 1;
                  #ifdef TARGETCD
                     #ifdef PLAY_CDXAS
                        AudioPauseAll ();
                     #endif
                  #endif
               }
            }

            if (GamePause)                 // Show the "pause" menu if necessary
            {
               int ff;
               char *PauseThing[4] = {"Return to Game","Gun Calibration","Controller setup", "Quit Game"};
               POLY_F4 *plain;
               int nogun;
               int nocontroller;

               if (((gun[0]->id == PADID_GUN) && (gun[0]->result == 0)) ||
                   ((gun[1]->id == PADID_GUN) && (gun[1]->result == 0)))
                  nogun = 0;
               else
                  nogun = 1;
               if (((gun[0]->id == PADID_CON) && (gun[0]->result == 0)) ||
                   ((gun[1]->id == PADID_CON) && (gun[1]->result == 0)))
                  nocontroller = 0;
               else
                  nocontroller = 1;

               if (GamePause < 7)
               {
                  GamePause++;

                  plain = dbuff.Get_Plain ();    // Draw the transparent red
                  setRGB0 (plain, 210,100,100);  // box behind the text
                  setXYWH (plain, 60,120 - GamePause * 9, 200,GamePause * 18);
                  SetSemiTrans (plain, 1);
                  dbuff.Add_Plain (plain, 15);
               }
               else
               {
                  plain = dbuff.Get_Plain ();    // Draw the transparent black bar
                  setRGB0 (plain, 0,0,0);        // behind the selected option
                  setXYWH (plain, 75,93 + PauseChoice * 20, 170,20);
                  SetSemiTrans (plain, 1);
                  dbuff.Add_Plain (plain, 15);

                  plain = dbuff.Get_Plain ();    // Draw the transparent red box
                  setRGB0 (plain, 230,100,100);  // behind the text
                  setXYWH (plain, 60,57, 200,126);
                  SetSemiTrans (plain, 1);
                  dbuff.Add_Plain (plain, 15);

                  SetFontColor (1);
                  FontCenterOn (160, 67);
                  Print ("GAME PAUSED");

                  for (ff = 0; ff < 4; ff++)
                  {
                     SetFontColor (ff == PauseChoice);
                     if ((ff == 1) && (nogun))
                        SetFontColor ((ff == PauseChoice) | 2);
                     else if ((ff == 2) && (nocontroller))
                        SetFontColor ((ff == PauseChoice) | 2);
                     FontCenterOn (160, 95 + ff * 20);
                     if (((ff == PauseChoice) && (VSync (-1) & 32)) || (ff != PauseChoice))
                        Print (PauseThing[ff]);
                  }

                  if (Buttons & 192)
                  {
                     PlaySFX (commonvab, 32, 127,127);
                     if (++PauseChoice > 3)
                        PauseChoice = 0;
                     if ((PauseChoice == 1) && (nogun))
                        PauseChoice++;
                     if ((PauseChoice == 2) && (nocontroller))
                        PauseChoice++;
                  }

                  if (Buttons & 256)
                  {
                     PlaySFX (commonvab, 32, 127,127);
                     if (--PauseChoice < 0)
                        PauseChoice = 3;
                     if ((PauseChoice == 1) && (nogun))
                        PauseChoice--;
                     if ((PauseChoice == 2) && (nocontroller))
                        PauseChoice--;
                  }

                  if (Buttons & 2080)
                  {
                     PlaySFX (commonvab, 32, 127,127);
                     if (PauseChoice == 0)
                        GamePause = 0;
                     else if (PauseChoice == 1)
                     {
                        if (nogun == 0)
                           Calibrate_Guns (GamePausedBy, &dbuff, MemoryP);
                     }
                     else if (PauseChoice == 2)
                     {
                        if (nocontroller == 0)
                           Control_Config (&bkgnd[0], &dbuff, MemoryP);
                     }
                     else
                     {
                        Results = 1;
                        Init_Player (&frgnd.Plr1);
                        Init_Player (&frgnd.Plr2);
                        FlushDemoInfos ();
                        ActualScript = -1;  //FirstScript[LevelSelected] +
                                       //NbrScripts[LevelSelected];
                        LevelSelected = -1;
                     }
                  }
               }

               DR_MODE *drmode = dbuff.Get_DrMode ();
               RECT dummytww = {0,0, 256,256};
               SetDrawMode (drmode, 0, 0, GetTPage (1, 0, 0,0), &dummytww);
               dbuff.Add_DrMode (drmode, 15);

               Buttons = 0;
               trigger = 0;
            }
