Ejemplo n.º 1
0
void custommenu(void)
  {
  int count;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_EXIT,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);
    count=352;
    createmenuitem(TXT_PLAY_CAMPAIGN,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_C);
    count+=16;
    createmenuitem(TXT_LOAD_LEVEL,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_L);
    count+=16;
    createmenuitem(TXT_LEVEL_EDITOR,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_E);
    count+=16;
    createmenuitem(TXT_CAMPAIGN_EDITOR,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_A);
    count+=16;

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(620);

    drawtext(TXT_CUSTOM_LEVELS,(320|TEXT_CENTER),304,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (menuitem[1].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=0;

      playcampaignmenu();
      }
    if (menuitem[2].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=0;

      loadlevelmenu();
      }
    if (menuitem[3].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=1;
      game.levelnum=0;
      createlevel();
      gameloop();

      game.editing=0;
      }
    if (menuitem[4].active)
      {
      newmappackmenu();
      }
    }

  resetmenuitems();
  }
Ejemplo n.º 2
0
void postgamemenu(void)
  {
  int count;
  int scoretemp;
  int scorecountdelay;
  int simtimer;
  int simcount;

  savereplay(game.levelnum+100);

  scoretemp=game.totalscore;
  scorecountdelay=0;

  simtimer=SDL_GetTicks();

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !menuitem[1].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);
    if (game.levelnum!=34)
      {
      createmenuitem(TXT_NEXTLEVEL,(640|TEXT_END),0,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_N);
      }
    else
      {
      createmenuitem(TXT_ENDING,(640|TEXT_END),0,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_N);
      }

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(580);

    drawbackground(468,(320|TEXT_CENTER),48,384,64,640,480);
    drawbackground(469,400,160,128,128,640,480);

    if (!game.bosslevel)
      {
      count=128;
      drawtext(TXT_SMALL_AMBER" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[5],game.numofbonus[5]);
      count+=16;
      drawtext(TXT_MEDIUM_AMBER" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[6],game.numofbonus[6]);
      count+=16;
      drawtext(TXT_LARGE_AMBER" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[7],game.numofbonus[7]);
      count+=16;
      drawtext(TXT_TARBALLS" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[4],game.numofbonus[4]);
      count+=16;
      drawtext(TXT_EXTRA_LIVES" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[3],game.numofbonus[3]);
      count+=16;
      drawtext(TXT_SECRETS" /i///i",64,count,16,1.0f,1.0f,1.0f,1.0f,game.bonus[8],game.numofbonus[8]);
      count+=16;

      drawtext(TXT_LIFE_BONUS":/i",64,352,16,1.0f,1.0f,1.0f,1.0f,(object[0].hitpoints/50)*10);
      drawtext(TXT_LEVEL_POINTS":/i",64,368,16,1.0f,1.0f,1.0f,1.0f,game.score[0]-(object[0].hitpoints/50)*10);
      }
    else
      {
      if (game.levelnum==34 && game.exit==GAMEEXIT_WON)
        drawtext(TXT_GF_RESCUING_BONUS,64,336,16,1.0f,1.0f,1.0f,1.0f);
      drawtext(TXT_LIFE_BONUS":/i",64,352,16,1.0f,1.0f,1.0f,1.0f,(object[0].hitpoints/50)*10);
      if (game.levelnum==34 && game.exit==GAMEEXIT_WON)
        drawtext(TXT_BOSS_POINTS":/i",64,368,16,1.0f,1.0f,1.0f,1.0f,game.score[0]-(object[0].hitpoints/50)*10-1);
      else
        drawtext(TXT_BOSS_POINTS":/i",64,368,16,1.0f,1.0f,1.0f,1.0f,game.score[0]-(object[0].hitpoints/50)*10);
      }

    drawtext(TXT_TOTAL_POINTS":/i",64,384,16,1.0f,1.0f,1.0f,1.0f,scoretemp);
    drawtext("+/i",64+19*16,384,16,1.0f,1.0f,1.0f,1.0f,game.score[0]-(scoretemp-game.totalscore));

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    simcount=0;
    while (SDL_GetTicks()-simtimer>20 && simcount<5)
      {
      simcount++;
      count=SDL_GetTicks()-simtimer-20;
      simtimer=SDL_GetTicks()-count;

      scorecountdelay++;

      if (scorecountdelay>=25)
      if (scoretemp<game.totalscore+game.score[0])
        {
        if (scoretemp<=game.totalscore+game.score[0]-10)
          scoretemp+=10;
        else
          scoretemp++;
        if ((scorecountdelay&1)==1)
          playsound(15,view.position,NULL,0.2f,0,1.0f,-1,0);
        }
      }
    }

  if (menuitem[0].active) {
    game.exit=GAMEEXIT_EXITGAME;
  }
  for (count=numofsounds-1;count>=0;count--)
    deletesound(count);

  resetmenuitems();
  }
Ejemplo n.º 3
0
void collectionmenu(void)
  {
  int count;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    count=320;
    createmenuitem(TXT_LEVEL" 1",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 2",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 3",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 4",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 5",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 6",64,count,16,1.0f,1.0f,1.0f,1.0f);
    count+=16;
    createmenuitem(TXT_LEVEL" 7",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 8",64,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;

    count=320;
    createmenuitem(TXT_LEVEL" 9",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 10",240,count,16,1.0f,1.0f,1.0f,1.0f);
    count+=16;
    createmenuitem(TXT_LEVEL" 11",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 12",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 13",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 14",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 15",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 16",240,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;

    count=320;
    createmenuitem(TXT_LEVEL" 17",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 18",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 19",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 20",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 21",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 22",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_LEVEL" 23",416,count,16,1.0f,1.0f,1.0f,1.0f);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=16;
    createmenuitem(TXT_HIGH_SCORE,416,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_H);
    count+=16;

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(620);

    drawtext(TXT_COLLECTION_MODE,(320|TEXT_CENTER),304,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    for (count=1;count<24;count++)
    if (menuitem[count].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=0;
      game.levelnum=0;

      loadcollectionlevel(count);

      gameloop();

      if (!game.playreplay)
      if (game.exit==4)
        highscoremenu(count);

      joymenunum=count;
      }
    if (menuitem[24].active)
      {
      game.exit=3;
      highscoremenu(1);
      }
    }

  resetmenuitems();
  }
Ejemplo n.º 4
0
void singlelevelmenu(void)
  {
  int count;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    count=320;
    createmenuitem(TXT_LEVEL" 1-1",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-2",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-3",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-4",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-5",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-6",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 1-7",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-1",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-2",64,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;

    count=320;
    createmenuitem(TXT_LEVEL" 2-3",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-4",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-5",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-6",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 2-7",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-1",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-2",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-3",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-4",192,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;

    count=320;
    createmenuitem(TXT_LEVEL" 3-5",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-6",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 3-7",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-1",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-2",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-3",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-4",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-5",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 4-6",320,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;

    count=320;
    createmenuitem(TXT_LEVEL" 4-7",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-1",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-2",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-3",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-4",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-5",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;
    createmenuitem(TXT_LEVEL" 5-6",448,count,12,1.0f,1.0f,1.0f,1.0f);
    count+=12;

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(620);

    drawtext(TXT_SINGLE_LEVEL,(320|TEXT_CENTER),304,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    for (count=1;count<=34;count++)
    if (menuitem[count].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=0;
      game.levelnum=0;

      loadstorylevel(count);

      gameloop();

      savereplay(count+100);

      joymenunum=count;
      }
    }

  resetmenuitems();
  }
Ejemplo n.º 5
0
void playerdifficultymenu(void)
  {
  int count;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !menuitem[1].active && !menuitem[2].active && !menuitem[3].active && !menuitem[4].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_CANCEL,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);
    count=352;
    createmenuitem(TXT_EASY,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_E);
    count+=16;
    createmenuitem(TXT_NORMAL,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_N);
    count+=16;
    createmenuitem(TXT_HARD,48,count,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_H);
    count+=16;
    if (player[playernum].unlock[1])
      {
      createmenuitem(TXT_LUDICROUS,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_L);
      count+=16;
      if (player[playernum].unlock[2])
        {
        createmenuitem(TXT_MINI_GISH,48,count,16,1.0f,1.0f,1.0f,1.0f);
        setmenuitem(MO_HOTKEY,SCAN_M);
        count+=16;
        }
      }

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(620);

    if (!player[playernum].gamepassed)
      drawtext(player[playernum].name,(320|TEXT_CENTER),304,16,1.0f,1.0f,1.0f,1.0f);
    else
      drawtext(player[playernum].name,(320|TEXT_CENTER),304,16,1.0f,1.0f,0.0f,1.0f);

    drawtext(TXT_SELECT_DIFFICULTY,48,336,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (menuitem[0].active)
      game.difficulty=-1;
    if (menuitem[1].active)
      game.difficulty=0;
    if (menuitem[2].active)
      game.difficulty=1;
    if (menuitem[3].active)
      game.difficulty=2;
    if (menuitem[4].active)
      game.difficulty=3;
    if (menuitem[5].active)
      game.difficulty=4;
    }

  resetmenuitems();
  }
Ejemplo n.º 6
0
void playerstartmenu(void)
  {
  int count,count2,count3;

  if (playernum==-1)
    return;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    count=352;
    if (player[playernum].levelnum>0)
      {
      createmenuitem(TXT_CONTINUE,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_C);
      count+=16;
      createmenuitem(TXT_COLLECTION_GAME,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_O);
      count+=16;
      createmenuitem(TXT_NEW_GAME,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_N);
      count+=16;
      createmenuitem(TXT_PRACTICE,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_P);
      count+=16;
      createmenuitem(TXT_REPLAY,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_R);
      count+=16;
#ifndef DEMO
      /*
      if (player[playernum].unlock[0])
        {
        createmenuitem(TXT_SINGLE_LEVEL,48,count,16,1.0f,1.0f,1.0f,1.0f);
        setmenuitem(MO_HOTKEY,SCAN_S);
        count+=16;
        }
      else
      */
        createmenuitemempty();
#endif
#ifndef DEMO
      createmenuitem(TXT_CUSTOM_LEVELS,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_U);
      count+=16;
#endif
      }
    else
      {
      createmenuitem(TXT_NEW_GAME,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_N);
      count+=16;
      createmenuitem(TXT_COLLECTION_GAME,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_O);
      count+=16;
      createmenuitemempty();
      createmenuitem(TXT_PRACTICE,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_P);
      count+=16;
      createmenuitem(TXT_REPLAY,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_R);
      count+=16;
      /*
      if (player[playernum].unlock[0])
        {
        createmenuitem(TXT_SINGLE_LEVEL,48,count,16,1.0f,1.0f,1.0f,1.0f);
        setmenuitem(MO_HOTKEY,SCAN_S);
        count+=16;
        }
      else
      */
        createmenuitemempty();
#ifndef DEMO
      createmenuitem(TXT_CUSTOM_LEVELS,48,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_U);
      count+=16;
#endif
      }

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(620);

    count2=(player[playernum].levelnum-1)/7+1;
    count3=(player[playernum].levelnum-1)%7+1;
    if (count3==0)
      count3=1;

    if (!player[playernum].gamepassed)
      {
      drawtext(player[playernum].name,(320|TEXT_CENTER),304,16,1.0f,1.0f,1.0f,1.0f);
      if (player[playernum].levelnum>0)
        {
        drawtext(TXT_PLAYER_INFO,(320|TEXT_CENTER),320,12,1.0f,1.0f,1.0f,1.0f,count2,count3,player[playernum].numoflives,player[playernum].totalscore,player[playernum].highscore);
        if (player[playernum].difficulty==0)
          drawtext(TXT_EASY,(320|TEXT_CENTER),332,12,1.0f,1.0f,1.0f,1.0f);
        if (player[playernum].difficulty==1)
          drawtext(TXT_NORMAL,(320|TEXT_CENTER),332,12,1.0f,1.0f,1.0f,1.0f);
        if (player[playernum].difficulty==2)
          drawtext(TXT_HARD,(320|TEXT_CENTER),332,12,1.0f,1.0f,1.0f,1.0f);
        if (player[playernum].difficulty==3)
          drawtext(TXT_LUDICROUS,(320|TEXT_CENTER),332,12,1.0f,1.0f,1.0f,1.0f);
        if (player[playernum].difficulty==4)
          drawtext(TXT_MINI_GISH,(320|TEXT_CENTER),332,12,1.0f,1.0f,1.0f,1.0f);
        }
      }
    else
      {
      drawtext(player[playernum].name,(320|TEXT_CENTER),304,16,1.0f,1.0f,0.0f,1.0f);
      if (player[playernum].levelnum>0)
        {
        drawtext(TXT_PLAYER_INFO,(320|TEXT_CENTER),320,12,1.0f,1.0f,0.0f,1.0f,count2,count3,player[playernum].numoflives,player[playernum].totalscore,player[playernum].highscore);
        if (player[playernum].difficulty==0)
          drawtext(TXT_EASY,(320|TEXT_CENTER),332,12,1.0f,1.0f,0.0f,1.0f);
        if (player[playernum].difficulty==1)
          drawtext(TXT_NORMAL,(320|TEXT_CENTER),332,12,1.0f,1.0f,0.0f,1.0f);
        if (player[playernum].difficulty==2)
          drawtext(TXT_HARD,(320|TEXT_CENTER),332,12,1.0f,1.0f,0.0f,1.0f);
        if (player[playernum].difficulty==3)
          drawtext(TXT_LUDICROUS,(320|TEXT_CENTER),332,12,1.0f,1.0f,0.0f,1.0f);
        if (player[playernum].difficulty==4)
          drawtext(TXT_MINI_GISH,(320|TEXT_CENTER),332,12,1.0f,1.0f,0.0f,1.0f);
        }
      }
    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (menuitem[1].active)
      {
      if (player[playernum].levelnum>0)
        {
        game.levelnum=player[playernum].levelnum;
        game.totalscore=player[playernum].totalscore;
        game.difficulty=player[playernum].difficulty;
        game.numoflives=player[playernum].numoflives;
        }
      else
        {
        playerdifficultymenu();
        if (game.difficulty==-1)
          {
          game.difficulty=0;
          goto newgamebypass;
          }

        player[playernum].difficulty=game.difficulty;

        game.levelnum=1;
        game.totalscore=0;
        game.numoflives=5;
        if (player[playernum].difficulty==3)
          {
          game.numoflives=0;
          game.turbomode=1;
          }

        storyscreen();
        }

      game.songnum=-1;
      checkmusic();

      pregamemenu();

      player[playernum].levelnum=game.levelnum;
      player[playernum].totalscore=game.totalscore;
      player[playernum].numoflives=game.numoflives;
      if (player[playernum].highscore<player[playernum].totalscore)
        player[playernum].highscore=player[playernum].totalscore;

#ifdef DEMO
      if (player[playernum].levelnum==6)
        {
        player[playernum].levelnum=0;
        player[playernum].totalscore=0;
        player[playernum].numoflives=5;
        player[playernum].gamepassed=1;
        }
#endif
      if (player[playernum].levelnum==35)
        {
        if (player[playernum].difficulty==1 || player[playernum].difficulty==2)
          player[playernum].unlock[0]=1;
        if (player[playernum].difficulty==2)
          player[playernum].unlock[1]=1;
        if (player[playernum].difficulty==3)
          player[playernum].unlock[2]=1;
        if (player[playernum].difficulty==4)
          player[playernum].unlock[3]=1;
        player[playernum].levelnum=0;
        player[playernum].totalscore=0;
        player[playernum].numoflives=5;
        player[playernum].gamepassed=1;
        }

      //game.difficulty=0;

      //menuitem[0].active=1;

      newgamebypass:;
      }
    if (menuitem[2].active)
      {
      collectionmenu();

      //menuitem[0].active=1;
      }
    if (menuitem[3].active)
      {
      playerdifficultymenu();
      if (game.difficulty==-1)
        {
        game.difficulty=0;
        goto newgamebypass2;
        }

      player[playernum].difficulty=game.difficulty;

      game.levelnum=1;
      game.totalscore=0;
      game.numoflives=5;
      if (player[playernum].difficulty==3)
        {
        game.numoflives=0;
        game.turbomode=1;
        }

      storyscreen();

      game.songnum=-1;
      checkmusic();

      pregamemenu();

      player[playernum].levelnum=game.levelnum;
      player[playernum].totalscore=game.totalscore;
      player[playernum].numoflives=game.numoflives;
      if (player[playernum].highscore<player[playernum].totalscore)
        player[playernum].highscore=player[playernum].totalscore;

#ifdef DEMO
      if (player[playernum].levelnum==6)
        {
        player[playernum].levelnum=0;
        player[playernum].totalscore=0;
        player[playernum].numoflives=5;
        player[playernum].gamepassed=1;
        }
#endif
      if (player[playernum].levelnum==35)
        {
        if (player[playernum].difficulty==1 || player[playernum].difficulty==2)
          player[playernum].unlock[0]=1;
        if (player[playernum].difficulty==2)
          player[playernum].unlock[1]=1;
        if (player[playernum].difficulty==3)
          player[playernum].unlock[2]=1;
        if (player[playernum].difficulty==4)
          player[playernum].unlock[3]=1;
        player[playernum].levelnum=0;
        player[playernum].totalscore=0;
        player[playernum].numoflives=5;
        player[playernum].gamepassed=1;
        }

      //game.difficulty=0;

      //menuitem[0].active=1;

      newgamebypass2:;
      }
    if (menuitem[4].active)
      {
      game.songnum=-1;
      checkmusic();

      game.editing=0;
      game.levelnum=0;
      loadlevel("playroom.lvl");
      gameloop();
      }
    if (menuitem[5].active)
      {
      game.songnum=-1;
      checkmusic();

      replaymenu();
      }
    if (menuitem[6].active)
      {
      singlelevelmenu();
      }
    if (menuitem[7].active)
      {
      custommenu();
      }
    }

  resetmenuitems();
  }
Ejemplo n.º 7
0
void playermenu(void)
  {
  int count,count2,count3;
  int deleteplayer;

  resetmenuitems();

  joymenunum=1;
  playernum=-1;
  deleteplayer=0;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    if (playernum==-1)
      {
      count=128;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,0);
      setmenuitem(MO_HOTKEY,SCAN_1);
      count+=40;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,1);
      setmenuitem(MO_HOTKEY,SCAN_2);
      count+=40;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,2);
      setmenuitem(MO_HOTKEY,SCAN_3);
      count+=40;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,3);
      setmenuitem(MO_HOTKEY,SCAN_4);
      count+=40;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,4);
      setmenuitem(MO_HOTKEY,SCAN_5);
      count+=40;
      createmenuitem("",64,count,32,0.25f,0.25f,0.25f,1.0f);
      setmenuitem(MO_SET,&playernum,5);
      setmenuitem(MO_HOTKEY,SCAN_6);
      count+=40;

      count+=16;
      createmenuitem(TXT_DELETE_PLAYER,64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_TOGGLE,&deleteplayer);
      }
    else if (!deleteplayer)
      {
      count=128+playernum*40-16;
      createmenuitem("                    ",96,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_STRINGINPUT,player[playernum].name);
      if (player[playernum].name[0]!=0)
        {
        createmenuitem(TXT_CREATE,432,count+16,16,1.0f,1.0f,1.0f,1.0f);
        setmenuitem(MO_HOTKEY,SCAN_C);
        }
      }

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    if (playernum!=-1)
      {
      if (numofmenuitems>3)
        {
        if (player[playernum].name[0]!=0)
          menuitem[2].active=1;
        else
          menuitem[1].active=1;
        }
      }

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(580);

    drawmenuitems();

    for (count=0;count<6;count++)
      {
      if (count!=playernum || deleteplayer)
        {
        if (player[count].name[0]!=0)
          {
          count2=(player[count].levelnum-1)/7+1;
          count3=(player[count].levelnum-1)%7+1;
          if (count3==0)
            count3=1;
  
          if (!player[count].gamepassed)
            {
            drawtext("/i-/s",64,128+count*40,16,1.0f,1.0f,1.0f,1.0f,count+1,player[count].name);
            drawtext(TXT_PLAYER_INFO,64,128+count*40+16,12,1.0f,1.0f,1.0f,1.0f,count2,count3,player[count].numoflives,player[count].totalscore,player[count].highscore);
            }
          else
            {
            drawtext("/i-/s",64,128+count*40,16,1.0f,1.0f,0.0f,1.0f,count+1,player[count].name);
            drawtext(TXT_PLAYER_INFO,64,128+count*40+16,12,1.0f,1.0f,0.0f,1.0f,count2,count3,player[count].numoflives,player[count].totalscore,player[count].highscore);
            }
          if (count==playernum && deleteplayer)
            {
            drawtext("/i-/s",64,128+count*40,16,1.0f,0.0f,0.0f,1.0f,count+1,player[count].name);
            drawtext(TXT_PLAYER_INFO,64,128+count*40+16,12,1.0f,0.0f,0.0f,1.0f,count2,count3,player[count].numoflives,player[count].totalscore,player[count].highscore);
            }
          }
        else
          drawtext(TXT_NEW_PLAYER,64,128+count*40,16,1.0f,1.0f,1.0f,1.0f,count+1);
        }
      else
        drawtext("/i-",64,128+count*40,16,1.0f,1.0f,1.0f,1.0f,count+1);
      }

    if (playernum==-1)
      drawtext(TXT_CHOOSE_PLAYER,(320|TEXT_CENTER),64,16,1.0f,1.0f,1.0f,1.0f);
    else
      {
      if (!deleteplayer || player[playernum].name[0]==0)
        drawtext(TXT_ENTER_NAME,(320|TEXT_CENTER),64,16,1.0f,1.0f,1.0f,1.0f);
      else
        drawtext(TXT_DELETE_Y_N,(320|TEXT_CENTER),64,16,1.0f,1.0f,1.0f,1.0f,player[playernum].name);
      }

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (deleteplayer)
    if (playernum!=-1)
      {
      if (player[playernum].name[0]==0)
        deleteplayer=0;
      else
        {
#ifdef GERMAN
        if (keyboard[SCAN_J])
#else
        if (keyboard[SCAN_Y])
#endif
          {
          memset(&player[playernum],0,sizeof(player[playernum]));
          playernum=-1;
          deleteplayer=0;
          resetmenuitems();
          }
        if (keyboard[SCAN_N] || keyboard[SCAN_ESC])
          {
          playernum=-1;
          deleteplayer=0;
          resetmenuitems();
          }
        }
      }
    if (playernum!=-1)
    if (player[playernum].name[0]!=0)
    if (menuitem[2].active)
      {
      if (!deleteplayer)
        {
        playerstartmenu();
  
        joymenunum=0;//playernum+1;
  
        playernum=-1;
        }
      /*
      else
        {
        //menuitem[2].active=0;
        //playernum=-1;
        }
      */
      }
    }

  if (playernum!=-1)
    player[playernum].name[0]=0;

  resetmenuitems();
  }
Ejemplo n.º 8
0
void versusmodemenu(int versusnum)
  {
  int count;
  int unlocked;
  char filename[32];

  unlocked=0;
  for (count=0;count<6;count++)
  if (player[count].unlock[1])
    unlocked=1;

  resetmenuitems();

  joymenunum=1;

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_EXIT,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    count=250;
    createmenuitem(TXT_LEVEL" 1",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_1);
    count+=20;
    createmenuitem(TXT_LEVEL" 2",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_2);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=20;
    createmenuitem(TXT_LEVEL" 3",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_3);
#ifdef DEMO
    setmenuitem(MO_HIGHLIGHT,0);
#endif
    count+=20;
#ifndef DEMO
    if (unlocked)
      {
      createmenuitem(TXT_LEVEL" 4",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_4);
      count+=20;
      }
    else
      createmenuitemempty();
#endif
#ifndef DEMO
    count=360;
    if (versusnum==0 || versusnum==1)
      {
      createmenuitem(TXT_LEVEL" 5",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_5);
      count+=20;
      createmenuitem(TXT_LEVEL" 6",(320|TEXT_CENTER),count,20,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_HOTKEY,SCAN_6);
      count+=20;
      }
#endif

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(540);

    drawbackground(530+versusnum,(320|TEXT_CENTER),48,192,192,640,480);

    drawtext("2 "TXT_PLAYER,(320|TEXT_CENTER),234,16,1.0f,1.0f,1.0f,1.0f);
    if (versusnum==0 || versusnum==1)
      drawtext("4 "TXT_PLAYER,(320|TEXT_CENTER),344,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (versusnum==0)
      strcpy(filename,"bathhouse");
    if (versusnum==1)
      strcpy(filename,"field");
    if (versusnum==2)
      strcpy(filename,"amber");
    if (versusnum==3)
      strcpy(filename,"fight");
    if (versusnum==4)
      strcpy(filename,"dragster");
    if (versusnum==5)
      strcpy(filename,"colvs");
    if (versusnum==6)
      strcpy(filename,"racing");

    if (menuitem[1].active)
      {
      game.songnum=-1;
      checkmusic();

      game.levelnum=0;
      strcat(filename,".lvl");
      loadlevel(filename);
      gameloop();
      }
    if (menuitem[2].active)
      {
      game.songnum=-1;
      checkmusic();

      game.levelnum=0;
      strcat(filename,"2.lvl");
      loadlevel(filename);
      gameloop();
      }
    if (menuitem[3].active)
      {
      game.songnum=-1;
      checkmusic();

      game.levelnum=0;
      strcat(filename,"3.lvl");
      loadlevel(filename);
      gameloop();
      }
    if (menuitem[4].active)
      {
      game.songnum=-1;
      checkmusic();

      game.levelnum=0;
      strcat(filename,"4.lvl");
      loadlevel(filename);
      gameloop();
      }
    if (menuitem[5].active)
      {
      game.songnum=-1;
      checkmusic();

      if (versusnum==0)
        strcpy(filename,"4bath");
      if (versusnum==1)
        strcpy(filename,"4field");

      game.levelnum=0;
      strcat(filename,".lvl");
      loadlevel(filename);
      gameloop();
      }
    if (menuitem[6].active)
      {
      game.songnum=-1;
      checkmusic();

      if (versusnum==0)
        strcpy(filename,"4bath");
      if (versusnum==1)
        strcpy(filename,"4field");

      game.levelnum=0;
      strcat(filename,"2.lvl");
      loadlevel(filename);
      gameloop();
      }
    }

  resetmenuitems();
  }
Ejemplo n.º 9
0
void highscoremenu(int levelnum)
  {
  int count,count2;
  int replaysaved;
  float bright;

  replaysaved=0;

  count2=-1;

  if (game.exit==GAMEEXIT_WON)
    {
    count2=10;

    while (count2>0 && game.time>highscore[levelnum][count2-1].time)
      count2--;

    if (count2!=10)
      {
      for (count=10;count>=count2;count--)
        {
        highscore[levelnum][count+1].time=highscore[levelnum][count].time;
        memcpy(highscore[levelnum][count+1].name,highscore[levelnum][count].name,32);
        }
      highscore[levelnum][count2].time=game.time;
      memcpy(highscore[levelnum][count2].name,player[playernum].name,32);
      }
    }

  resetmenuitems();

  while (!menuitem[0].active && !windowinfo.shutdown)
    {
    glClearColor(0.0f,0.0f,0.0f,0.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    numofmenuitems=0;
    createmenuitem(TXT_BACK,0,0,16,1.0f,1.0f,1.0f,1.0f);
    setmenuitem(MO_HOTKEY,SCAN_ESC);

    if (game.exit==GAMEEXIT_WON)
    if (!replaysaved)
      createmenuitem(TXT_SAVEREPLAY,96,356,16,1.0f,1.0f,1.0f,1.0f);

    if (game.exit!=GAMEEXIT_WON)
      {
      count=320;
      createmenuitem(TXT_LEVEL" 1",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,1);
      count+=16;
      createmenuitem(TXT_LEVEL" 2",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,2);
      count+=16;
      createmenuitem(TXT_LEVEL" 3",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,3);
      count+=16;
      createmenuitem(TXT_LEVEL" 4",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,4);
      count+=16;
      createmenuitem(TXT_LEVEL" 5",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,5);
      count+=16;
      createmenuitem(TXT_LEVEL" 6",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,6);
      count+=16;
      createmenuitem(TXT_LEVEL" 7",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,7);
      count+=16;
      createmenuitem(TXT_LEVEL" 8",64,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,8);
      count+=16;

      count=320;
      createmenuitem(TXT_LEVEL" 9",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,9);
      count+=16;
      createmenuitem(TXT_LEVEL" 10",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,10);
      count+=16;
      createmenuitem(TXT_LEVEL" 11",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,11);
      count+=16;
      createmenuitem(TXT_LEVEL" 12",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,12);
      count+=16;
      createmenuitem(TXT_LEVEL" 13",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,13);
      count+=16;
      createmenuitem(TXT_LEVEL" 14",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,14);
      count+=16;
      createmenuitem(TXT_LEVEL" 15",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,15);
      count+=16;
      createmenuitem(TXT_LEVEL" 16",240,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,16);
      count+=16;

      count=320;
      createmenuitem(TXT_LEVEL" 17",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,17);
      count+=16;
      createmenuitem(TXT_LEVEL" 18",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,18);
      count+=16;
      createmenuitem(TXT_LEVEL" 19",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,19);
      count+=16;
      createmenuitem(TXT_LEVEL" 20",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,20);
      count+=16;
      createmenuitem(TXT_LEVEL" 21",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,21);
      count+=16;
      createmenuitem(TXT_LEVEL" 22",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,22);
      count+=16;
      createmenuitem(TXT_LEVEL" 23",416,count,16,1.0f,1.0f,1.0f,1.0f);
      setmenuitem(MO_SET,&levelnum,23);
      count+=16;
      }

    checksystemmessages();
    checkkeyboard();
    checkmouse();
    checkjoystick();
    checkmenuitems();

    updateogg();
    checkmusic();
    game.songnum=8;
    soundsimulation(view.position,view.orientation);

    setuptextdisplay();

    glColor4f(1.0f,1.0f,1.0f,1.0f);
    displaybackground(580);

    drawtext(TXT_LEVEL_HIGHSCORE,(320|TEXT_CENTER),48,16,1.0f,1.0f,1.0f,1.0f,levelnum);

    drawtext(TXT_NAME,96+64,80,16,1.0f,1.0f,1.0f,1.0f);
    drawtext(TXT_TIME,96+320,80,16,1.0f,1.0f,1.0f,1.0f);
    for (count=0;count<10;count++)
      {
      if (count==count2 || count2==-1)
        bright=1.0f;
      else
        bright=0.5f;

      drawtext("/i.",96,112+count*16,16,bright,bright,bright,1.0f,count+1);
      drawtext(highscore[levelnum][count].name,96+64,112+count*16,16,bright,bright,bright,1.0f);
      if (((highscore[levelnum][count].time/50)%60)>=10)
        drawtext("/i:/i./i",96+320,112+count*16,16,bright,bright,bright,1.0f,(highscore[levelnum][count].time/3000),((highscore[levelnum][count].time/50)%60),((highscore[levelnum][count].time/5)%10));
      else
        drawtext("/i:0/i./i",96+320,112+count*16,16,bright,bright,bright,1.0f,(highscore[levelnum][count].time/3000),((highscore[levelnum][count].time/50)%60),((highscore[levelnum][count].time/5)%10));
      }
    if (game.exit==GAMEEXIT_WON)
      {
      drawtext(player[playernum].name,96+64,292,16,1.0f,1.0f,1.0f,1.0f);
      if (((game.time/50)%60)>=10)
        drawtext("/i:/i./i",96+320,292,16,1.0f,1.0f,1.0f,1.0f,(game.time/3000),((game.time/50)%60),((game.time/5)%10));
      else
        drawtext("/i:0/i./i",96+320,292,16,1.0f,1.0f,1.0f,1.0f,(game.time/3000),((game.time/50)%60),((game.time/5)%10));
      }
    if (game.exit==GAMEEXIT_WON)
    if (replaysaved)
      createmenuitem(TXT_REPLAYSAVED,96,356,16,1.0f,1.0f,1.0f,1.0f);

    drawmenuitems();

    drawmousecursor(768+font.cursornum,mouse.x,mouse.y,16,1.0f,1.0f,1.0f,1.0f);

    SDL_GL_SwapBuffers();

    if (game.exit==GAMEEXIT_WON)
    if (menuitem[1].active)
      {
      savereplay(levelnum);
      replaysaved=1;
      menuitem[1].active=0;
      }
    }

  resetmenuitems();
  }