]> git.jsancho.org Git - lugaru.git/commitdiff
Removed registration checks.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 14 May 2010 05:21:35 +0000 (01:21 -0400)
committerRyan C. Gordon <icculus@icculus.org>
Fri, 14 May 2010 05:21:35 +0000 (01:21 -0400)
Source/Game.h
Source/GameDraw.cpp
Source/GameInitDispose.cpp
Source/GameTick.cpp
Source/OpenGL_Windows.cpp

index 426eb630a76422ad956c54b6aeca34b1581d740d..bda4324218e65af58dd42ad4b6109e2e8f3ad6cb 100644 (file)
@@ -103,7 +103,6 @@ public:
        int loaddistrib;
        int keyselect;
        int indemo;
-       int registered;
 
        bool won;
 
index 5acb9472fbe72f6ef50b40a58975fe7c5c1ed98c..ea75d51b0eed5a8e5d972dd6fbe3a01ff4dcae03 100644 (file)
@@ -231,7 +231,6 @@ int Game::DrawGLScene(void)
        lastcheck+=multiplier;
 
        glColorMask( 1.0, 1.0, 1.0, 1.0 );
-       if(!registered)debugmode=0;
 
 
        if(freeze||winfreeze||(mainmenu&&gameon)||(!gameon&&gamestarted)){
@@ -2358,7 +2357,7 @@ int Game::DrawGLScene(void)
 
                /*if(mainmenu!=0)*/oldmainmenu=mainmenu;
 
-               if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==119||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==15||mainmenu==16||mainmenu==17){
+               if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==119||mainmenu==13||mainmenu==17){
                        glClear(GL_DEPTH_BUFFER_BIT);
                        glEnable(GL_ALPHA_TEST);
                        glAlphaFunc(GL_GREATER, 0.001f);
@@ -3058,128 +3057,6 @@ int Game::DrawGLScene(void)
                        }
                }
 
-               if(mainmenu==12){       
-                       menupulse+=multiplier*2;
-
-                       nummenuitems=6;
-                       char temp[255];
-
-                       sprintf (menustring[0], "Register now for only $19.95!");
-                       startx[0]=160;
-                       starty[0]=270;
-                       endx[0]=startx[0]+strlen(menustring[0])*10;
-                       endy[0]=starty[0]+20;
-                       movex[0]=0;
-                       movey[0]=0;
-
-                       sprintf (menustring[1], "Confront raiders, wolves, and more!");
-                       startx[1]=130;
-                       starty[1]=240;
-                       endx[1]=startx[1]+strlen(menustring[1])*10;
-                       endy[1]=starty[1]+20;
-                       movex[1]=0;
-                       movey[1]=0;
-
-                       sprintf (menustring[2], "Fight using swords, staves and armor!");
-                       startx[2]=125;
-                       starty[2]=210;
-                       endx[2]=startx[2]+strlen(menustring[2])*10;
-                       endy[2]=starty[2]+20;
-                       movex[2]=0;
-                       movey[2]=0;
-
-                       if(!tryquit)sprintf (menustring[3], "Back");
-                       else sprintf (menustring[3], "Quit");
-                       startx[3]=10;
-                       endx[3]=startx[3]+strlen(menustring[3])*10;
-                       starty[3]=10;
-                       endy[3]=starty[3]+20;
-                       movex[3]=0;
-                       movey[3]=0;
-
-                       sprintf (menustring[4], "Register now!");
-                       startx[4]=250;
-                       endx[4]=startx[4]+strlen(menustring[4])*10;
-                       starty[4]=140;
-                       endy[4]=starty[4]+20;
-                       movex[4]=0;
-                       movey[4]=0;
-
-                       sprintf (menustring[5], "Enter registration code!");
-                       startx[5]=190;
-                       endx[5]=startx[5]+strlen(menustring[5])*10;
-                       starty[5]=120;
-                       endy[5]=starty[5]+20;
-                       movex[5]=0;
-                       movey[5]=0;
-               }
-
-               if(mainmenu==15){       
-                       nummenuitems=2;
-                       char temp[255];
-
-                       sprintf (menustring[0], "Thank you for supporting Wolfire Software!");
-                       startx[0]=100;
-                       starty[0]=270;
-                       endx[0]=startx[0]+strlen(menustring[0])*10;
-                       endy[0]=starty[0]+20;
-                       movex[0]=0;
-                       movey[0]=0;
-
-                       sprintf (menustring[1], "Back");
-                       startx[1]=10;
-                       endx[1]=startx[1]+strlen(menustring[1])*10;
-                       starty[1]=10;
-                       endy[1]=starty[1]+20;
-                       movex[1]=0;
-                       movey[1]=0;
-               }
-
-               if(mainmenu==16){       
-                       nummenuitems=5;
-                       char temp[255];
-
-                       sprintf (menustring[0], "Sorry, that name/serial number combination is incorrect.");
-                       startx[0]=40;
-                       starty[0]=270;
-                       endx[0]=startx[0]+strlen(menustring[0])*10;
-                       endy[0]=starty[0]+20;
-                       movex[0]=0;
-                       movey[0]=0;
-
-                       sprintf (menustring[1], "Back");
-                       startx[1]=10;
-                       endx[1]=startx[1]+strlen(menustring[1])*10;
-                       starty[1]=10;
-                       endy[1]=starty[1]+20;
-                       movex[1]=0;
-                       movey[1]=0;
-
-                       sprintf (menustring[2], "Please make sure you are copying your name and serial");
-                       startx[2]=50;
-                       starty[2]=240;
-                       endx[2]=startx[2]+strlen(menustring[2])*10;
-                       endy[2]=starty[2]+20;
-                       movex[2]=0;
-                       movey[2]=0;
-
-                       sprintf (menustring[3], "number exactly as they appear in your email.");
-                       startx[3]=90;
-                       starty[3]=210;
-                       endx[3]=startx[3]+strlen(menustring[3])*10;
-                       endy[3]=starty[3]+20;
-                       movex[3]=0;
-                       movey[3]=0;
-
-                       sprintf (menustring[4], "Capitalization and punctuation matter!");
-                       startx[4]=120;
-                       starty[4]=180;
-                       endx[4]=startx[4]+strlen(menustring[4])*10;
-                       endy[4]=starty[4]+20;
-                       movex[4]=0;
-                       movey[4]=0;
-               }
-
                if(mainmenu==13){       
                        nummenuitems=2;
                        char temp[255];
@@ -3200,49 +3077,6 @@ int Game::DrawGLScene(void)
                        movex[1]=0;
                        movey[1]=0;
                }
-
-               if(mainmenu==14){       
-                       nummenuitems=2;
-                       char temp[255];
-
-                       sprintf (menustring[0], "Please enter your number:");
-                       startx[0]=30;
-                       starty[0]=250;
-                       endx[0]=startx[0]+strlen(menustring[0])*10;
-                       endy[0]=starty[0]+20;
-                       movex[0]=0;
-                       movey[0]=0;
-
-                       sprintf (menustring[1], "Please enter your name:");
-                       startx[1]=290;
-                       starty[1]=250;
-                       endx[1]=startx[1]+strlen(menustring[1])*10;
-                       endy[1]=starty[1]+20;
-                       movex[1]=0;
-                       movey[1]=0;
-                       /*
-                       char tempstring[256];
-                       sprintf (tempstring, "%s", registrationname);
-                       long num1;
-                       long num2;
-                       long num3;
-                       long num4;
-                       long long longnum;
-                       longnum = MD5_string ( tempstring);
-                       //longnum = 1111111111111111;
-                       num1 = longnum/100000000;
-                       num2 = longnum%100000000;
-                       sprintf (tempstring, "%d-%d-%d-%d", num1/10000, num1%10000, num2/10000, num2%10000);
-
-                       sprintf (menustring[2], "%s", tempstring);
-                       startx[2]=290;
-                       starty[2]=230;
-                       endx[2]=startx[2]+strlen(menustring[2])*10;
-                       endy[2]=starty[2]+20;
-                       movex[2]=0;
-                       movey[2]=0;                             */      
-               }
-
                if(mainmenu==1||mainmenu==2){
                        nummenuitems=7;
                        startx[0]=150;
@@ -3410,7 +3244,7 @@ int Game::DrawGLScene(void)
                                }
                        }
 
-                       if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==11||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==15||mainmenu==16||mainmenu==17)
+                       if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==11||mainmenu==13||mainmenu==17)
                                for(i=0;i<nummenuitems;i++){
                                        if((mousecoordh/screenwidth*640)>startx[i]&&(mousecoordh/screenwidth*640)<endx[i]&&480-(mousecoordv/screenheight*480)>starty[i]&&480-(mousecoordv/screenheight*480)<endy[i]){
                                                if(mainmenu!=5)selected=i;
@@ -3603,18 +3437,17 @@ int Game::DrawGLScene(void)
                                                                                        }
                                                                                }
                                                                        }
-                                                                       if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==11||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==15||mainmenu==16||mainmenu==17)
+                                                                       if(mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==8||mainmenu==9||mainmenu==10||mainmenu==11||mainmenu==13||mainmenu==17)
                                                                        {
                                                                                if(mainmenu!=5||j<6)
                                                                                {
                                                                                        glColor4f(1,0,0,1);
-                                                                                       if(mainmenu==12&&j==4)glColor4f(1,(sin(menupulse)+1)/2,(sin(menupulse)+1)/2,1);
                                                                                        if(mainmenu==9&&j>accountprogress[accountactive]&&j<numchallengelevels)glColor4f(0.5,0,0,1);
                                                                                        if(mainmenu==11&&j>accountprogress[accountactive]&&j<numchallengelevels)glColor4f(0.5,0,0,1);
                                                                                        //if(1-((float)i)/10-(1-selectedlong[j])>0){
                                                                                        glMatrixMode(GL_MODELVIEW);                                                     // Select The Modelview Matrix
                                                                                        glPushMatrix();
-                                                                                               if((mainmenu!=7||j!=0||!entername)&&(mainmenu!=13||j!=1)&&(mainmenu!=14||j!=1))text.glPrint(startx[j],starty[j],menustring[j],0,1,640,480);
+                                                                                               if(mainmenu!=7||j!=0||!entername)text.glPrint(startx[j],starty[j],menustring[j],0,1,640,480);
                                                                                                else
                                                                                                {
                                                                                                        if(displayblink){
@@ -3644,7 +3477,6 @@ int Game::DrawGLScene(void)
                                                                                                if(1-((float)i)/15-(1-selectedlong[j])>0)
                                                                                                {
                                                                                                        glColor4f(1,0,0,(1-((float)i)/10-(1-selectedlong[j]))*.25);
-                                                                                                       if(mainmenu==12&&j==4)glColor4f(1,(sin(menupulse)+1)/2,(sin(menupulse)+1)/2,(1-((float)i)/10-(1-selectedlong[j]))*.25);
                                                                                                        if(mainmenu==9&&j>accountprogress[accountactive]&&j<numchallengelevels)glColor4f(0.5,0,0,(1-((float)i)/10-(1-selectedlong[j]))*.25);
                                                                                                        if(mainmenu==11&&j>accountprogress[accountactive]&&j<numchallengelevels)glColor4f(0.5,0,0,(1-((float)i)/10-(1-selectedlong[j]))*.25);
                                                                                                        if(mainmenu==3)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4-((/*1*/+((float)i)/70)*strlen(menustring[j]))*3,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
@@ -3656,12 +3488,8 @@ int Game::DrawGLScene(void)
                                                                                                        if(mainmenu==9)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
                                                                                                        if(mainmenu==11)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
                                                                                                        if(mainmenu==10)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
-                                                                                                       if(mainmenu==12)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
-                                                                                                       if(mainmenu==15)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
-                                                                                                       if(mainmenu==16)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
                                                                                                        if(mainmenu==17)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
                                                                                                        if(mainmenu==13&&j!=1)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
-                                                                                                       if(mainmenu==14&&j!=1)text.glPrint(startx[j]-((float)i)+offsetx[j]*((float)i)/4/*-((((float)i)/70)*strlen(menustring[j]))*3*/,starty[j]/*-i*1/2*/+offsety[j]*((float)i)/4,menustring[j],0,1+((float)i)/70,640,480);
                                                                                                        /*else{
                                                                                                        if(displayblink){
                                                                                                        sprintf (string, "_");
index ddd7b222c462666bbed0524c5ceecca3114858c0..509976f99c6daa8b3099de8f42a087f032a3b85b 100644 (file)
@@ -990,8 +990,6 @@ void Game::InitGame()
 
        numchallengelevels=14;
 
-       registered=0;
-
        /*char tempstring[256];
        sprintf (tempstring, "%s", registrationname);
        long num1;
@@ -1007,51 +1005,6 @@ void Game::InitGame()
        */
 
        FILE                    *tfile;
-       tfile=fopen( ":Data:Sounds:flame.ogg", "rb" );
-       if(tfile)
-       {
-               long num1;
-               long num2;
-               long long longnum;
-               long long longnuma;
-               long num1a;
-               long num2a;
-
-               int numchars;
-               funpackf(tfile, "Bb", &registered);
-               if(registered)
-               {
-                       funpackf(tfile, "Bi", &numchars);
-                       if(numchars>0)
-                       {
-                               for(j=0;j<numchars;j++)
-                               {
-                                       funpackf(tfile, "Bb",  &registrationname[j]);
-                               }
-                               registrationname[numchars]='\0';
-                               funpackf(tfile, "Bi", &num1);
-                               funpackf(tfile, "Bi", &num2);
-                               longnum=num2+num1*100000000;
-
-                               char tempstring[256];
-                               #if defined(__APPLE__)
-                               sprintf (tempstring, "%s", registrationname);
-                               #elif defined(_WIN32) || defined(__linux__)
-                               sprintf (tempstring, "%s-windows", registrationname);
-                               #else
-                               #error Please make sure you have the right registration key stuff here!
-                               #endif
-                               longnuma = MD5_string ( tempstring);
-                               num1a = longnuma/100000000;
-                               num2a = longnuma%100000000;
-                               //if(num1a==num1&&num2a==num2)registered=1;
-                               if(numchars>2)registered=1;
-                               else registered=0;
-                       }
-               }
-               fclose(tfile);
-       }
-       else registered=0;
 
        accountactive=-1;
 
@@ -1910,7 +1863,6 @@ Game::Game()
        loaddistrib = 0;
        keyselect = 0;
        indemo = 0;
-       registered = 0;
 
        won = 0;
 
index 6b0e38ce083230c5acdbce044097b82ed4de6e5a..2f59318d62f71a362506c5d231797bacbaf333dc 100644 (file)
@@ -1743,7 +1743,7 @@ void      Game::Tick()
                        entername=0;
                        mainmenutogglekeydown=1;
                }
-               if((IsKeyDown(theKeyMap, MAC_ESCAPE_KEY)||(mainmenu==0&&((IsKeyDown(theKeyMap, jumpkey)||IsKeyDown(theKeyMap, MAC_SPACE_KEY)||(campaign)))&&!oldjumpkeydown&&campaign&&winfreeze))&&!mainmenutogglekeydown&&(!mainmenu||gameon||mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||(mainmenu==7&&!entername)||mainmenu==9||mainmenu==11||(mainmenu==12&&!tryquit)||mainmenu==13||mainmenu==14||mainmenu==15||mainmenu==16||mainmenu==17||mainmenu==10)){
+               if((IsKeyDown(theKeyMap, MAC_ESCAPE_KEY)||(mainmenu==0&&((IsKeyDown(theKeyMap, jumpkey)||IsKeyDown(theKeyMap, MAC_SPACE_KEY)||(campaign)))&&!oldjumpkeydown&&campaign&&winfreeze))&&!mainmenutogglekeydown&&(!mainmenu||gameon||mainmenu==3||mainmenu==4||mainmenu==5||mainmenu==6||(mainmenu==7&&!entername)||mainmenu==9||mainmenu==11||mainmenu==13||mainmenu==17||mainmenu==10)){
                        selected=-1;
                        if(mainmenu==1||mainmenu==2||mainmenu==0){
                                if(mainmenu==0&&!winfreeze)mainmenu=2;
@@ -1950,7 +1950,7 @@ void      Game::Tick()
                                opstream << KeyToChar(chatkey);
                                opstream.close();
                        }
-                       if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==10||mainmenu==11||mainmenu==100){
+                       if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==13||mainmenu==10||mainmenu==11||mainmenu==100){
                                float gLoc[3]={0,0,0};
                                float vel[3]={0,0,0};
                                OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
@@ -1975,9 +1975,7 @@ void      Game::Tick()
                        if(mainmenu==7)mainmenu=1;
                        if(mainmenu==9)mainmenu=5;
                        if(mainmenu==11)mainmenu=5;
-                       if(mainmenu==12)mainmenu=5;
                        if(mainmenu==13)mainmenu=12;
-                       if(mainmenu==14)mainmenu=13;
                        if(mainmenu==10)mainmenu=5;
                        if(mainmenu==100){
                                mainmenu=5;
@@ -2107,7 +2105,7 @@ void      Game::Tick()
                                if(!gameon){
                                        //quit
                                        tryquit=1;
-                                       if(registered)OPENAL_SetPaused(channels[stream_music3], true);
+                                       OPENAL_SetPaused(channels[stream_music3], true);
                                }
                                else{
                                        //end game
@@ -2433,33 +2431,6 @@ void     Game::Tick()
                }
 
                if(mainmenu==5){
-                       if(accountcampaignchoicesmade[accountactive]>8&&!registered){
-                               OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                               PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                               OPENAL_SetPaused(channels[stream_music3], false);
-                               OPENAL_SetVolume(channels[stream_music3], 256);
-
-                               gameon=0;
-                               mainmenu=12;
-                               accountcampaignchoicesmade[accountactive]=0;
-                               accountcampaignscore[accountactive]=0;
-                               accountcampaigntime[accountactive]=0;
-
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-                       }
 
                        if(endgame==2){
                                accountcampaignchoicesmade[accountactive]=0;
@@ -2757,94 +2728,6 @@ void     Game::Tick()
                        else oldbutton=0;
                }
 
-               if(mainmenu==15||mainmenu==16){
-                       if(Button()&&!oldbutton&&selected==1){
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               if(mainmenu==15)mainmenu=5;
-                               else mainmenu=12;
-                       }
-                       if(Button())oldbutton=1;
-                       else oldbutton=0;
-               }
-
-               if(mainmenu==12){
-                       endgame=2;
-                       if(Button()&&!oldbutton&&selected==3){
-                               if(tryquit)quit=1;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               mainmenu=5;
-                       }
-
-                       if(Button()&&!oldbutton&&selected==4){
-                               registernow=1;
-                               quit=1;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-                       }
-
-
-                       if(Button()&&!oldbutton&&selected==5){
-                               tryquit=0;
-                               float gLoc[3]={0,0,0};
-                               float vel[3]={0,0,0};
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                               PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                               OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                               OPENAL_SetVolume(channels[fireendsound], 256);
-                               OPENAL_SetPaused(channels[fireendsound], false);
-                               OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                               flashr=1;
-                               flashg=0;
-                               flashb=0;
-                               flashamount=1;
-                               flashdelay=1;
-
-                               mainmenu=13;
-                       }
-                       if(Button())oldbutton=1;
-                       else oldbutton=0;
-               }
                if(mainmenu==6){
                        if(Button()&&!oldbutton&&selected!=-1){
                                float gLoc[3]={0,0,0};
@@ -3103,7 +2986,7 @@ void      Game::Tick()
                }
                OPENAL_SetFrequency(channels[stream_music3], 22050);
 
-               if(entername||mainmenu==13||mainmenu==14){
+               if(entername){
                        for(i=0;i<140;i++){
                                if(IsKeyDown(theKeyMap, i)){
                                        togglekeydelay[i]+=multiplier;
@@ -3189,114 +3072,13 @@ void   Game::Tick()
                                                                displayselected=0;
                                                        }}
 
-                                               if(i==MAC_RETURN_KEY&&mainmenu==14){
-                                                       if(displaychars[0]){
-                                                               char serialstring[256];
-                                                               char tempstring[256];
-                                                               #if defined(__APPLE__)
-                                                               sprintf (tempstring, "%s", registrationname);
-                                                               #elif defined(_WIN32) || defined(__linux__)
-                                                               sprintf (tempstring, "%s-windows", registrationname);
-                                                               #else
-                                                               #error Please make sure you have the right registration key stuff here!
-                                                               #endif
-                                                               long num1;
-                                                               long num2;
-                                                               long num3;
-                                                               long num4;
-                                                               long long longnum;
-                                                               longnum = MD5_string ( tempstring);
-                                                               //longnum = 1111111111111111;
-                                                               num1 = longnum/100000000;
-                                                               num2 = longnum%100000000;
-                                                               sprintf (tempstring, "%ld-%ld-%ld-%ld\0\0\0\0\0", num1/10000, num1%10000, num2/10000, num2%10000);
-
-                                                               int goodcode=3;
-                                                               int numchars=3;
-                                                               if(num1/10000>999)numchars+=4;
-                                                               else if(num1/10000>99)numchars+=3;
-                                                               else if(num1/10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num1%10000>999)numchars+=4;
-                                                               else if(num1%10000>99)numchars+=3;
-                                                               else if(num1%10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num2/10000>999)numchars+=4;
-                                                               else if(num2/10000>99)numchars+=3;
-                                                               else if(num2/10000>9)numchars+=2;
-                                                               else numchars+=1;
-                                                               if(num2%10000>999)numchars+=4;
-                                                               else if(num2%10000>99)numchars+=3;
-                                                               else if(num2%10000>9)numchars+=2;
-                                                               else numchars+=1;
-
-                                                               //numchars=12;
-
-                                                               for(j=0;j<numchars;j++){
-                                                                       if(displaytext[0][j]!=tempstring[j]&&tempstring[j]!=' '&&tempstring[j]!='\0')goodcode--;
-                                                               }
-
-                                                               if(longnum==LONGLONGCONST(5077041556214789))goodcode=-1;
-
-                                                               if(goodcode<0)goodcode=0;
-
-                                                               if(goodcode){
-                                                                       registered=1;
-                                                                       mainmenu=15;
-
-                                                                       FILE                    *tfile;
-                                                                       tfile=fopen( ":Data:Sounds:flame.ogg", "wb" );
-                                                                       if (tfile)
-                                                                       {
-                                                                               int numchars;
-                                                                               numchars=strlen(registrationname);
-                                                                               fpackf(tfile, "Bb", registered);
-                                                                               fpackf(tfile, "Bi", numchars);
-                                                                               if(numchars>0)
-                                                                               {
-                                                                                       for(j=0;j<numchars;j++)
-                                                                                       {
-                                                                                               fpackf(tfile, "Bb",  registrationname[j]);
-                                                                                       }
-                                                                               }
-                                                                               fpackf(tfile, "Bi", num1);
-                                                                               fpackf(tfile, "Bi", num2);
-                                                                               fclose(tfile);
-                                                                       }
-                                                               }
-                                                               else
-                                                               {
-                                                                       mainmenu=16;
-                                                               }
-                                                               flashr=1;
-                                                               flashg=0;
-                                                               flashb=0;
-                                                               flashamount=1;
-                                                               flashdelay=1;
-
-                                                               float gLoc[3]={0,0,0};
-                                                               float vel[3]={0,0,0};
-                                                               OPENAL_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f);
-                                                               PlaySoundEx( firestartsound, samp[firestartsound], NULL, true);
-                                                               OPENAL_3D_SetAttributes(channels[firestartsound], gLoc, vel);
-                                                               OPENAL_SetVolume(channels[firestartsound], 256);
-                                                               OPENAL_SetPaused(channels[firestartsound], false);
-                                                               OPENAL_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f);
-
-                                                               for(j=0;j<255;j++){
-                                                                       displaytext[0][j]=' ';
-                                                               }
-                                                               displaychars[0]=0;
-                                                               displayselected=0;
-                                                       }}
-
                                                if(i==MAC_RETURN_KEY&&mainmenu==13){
                                                        if(displaychars[0]){
                                                                sprintf (registrationname, "%s", displaytext[0]);
                                                                if(displaychars[0]<254)registrationname[displaychars[0]]='\0';
 
-                                                               mainmenu=14;
-
+                                                               mainmenu=5;
+                        
                                                                flashr=1;
                                                                flashg=0;
                                                                flashb=0;
@@ -3316,21 +3098,7 @@ void     Game::Tick()
                                                                        displaytext[0][j]=' ';
                                                                }
                                                                displaychars[0]=0;
-
-                                                               /*char tempstring[50];
-                                                               sprintf (tempstring, registrationname);
-                                                               long num1;
-                                                               long num2;
-                                                               long num3;
-                                                               long num4;
-                                                               long long longnum;
-                                                               longnum = MD5_string ( tempstring);
-                                                               num1 = longnum/100000000;
-                                                               num2 = longnum%100000000;
-                                                               sprintf (displaytext[0], "%d-%d-%d-%d", num1/10000, num1%10000, num2/10000, num2%10000);
-
-                                                               displaychars[0]=strlen(displaytext[0]);
-                                                               */
+                        
                                                                displayselected=0;
                                                        }}
                                        }
@@ -10935,55 +10703,7 @@ void   Game::TickOnce(){
                        if(rotation2<-70)rotation2=-70;
                }
                if(mainmenu)rotation+=multiplier*5;
-               if(!mainmenu&&!indemo&&!registered){
-                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                       OPENAL_SetPaused(channels[stream_music3], false);
-                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                       gameon=0;
-                       mainmenu=12;
-
-                       float gLoc[3]={0,0,0};
-                       float vel[3]={0,0,0};
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                       OPENAL_SetVolume(channels[fireendsound], 256);
-                       OPENAL_SetPaused(channels[fireendsound], false);
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                       flashr=1;
-                       flashg=0;
-                       flashb=0;
-                       flashamount=1;
-                       flashdelay=1;
-               }
-
-               if(tryquit==1&&!registered&&mainmenu!=12){
-                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                       OPENAL_SetPaused(channels[stream_music3], false);
-                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                       gameon=0;
-                       mainmenu=12;
-
-                       float gLoc[3]={0,0,0};
-                       float vel[3]={0,0,0};
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                       OPENAL_SetVolume(channels[fireendsound], 256);
-                       OPENAL_SetPaused(channels[fireendsound], false);
-                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                       flashr=1;
-                       flashg=0;
-                       flashb=0;
-                       flashamount=1;
-                       flashdelay=1;
-               }
+      
                //}
 }
 
@@ -11306,32 +11026,7 @@ void   Game::TickOnceAfter(){
                                                        }
                                                        if(changedelay<=-999&&whichlevel!=-2&&!loading&&(player[0].dead||(alldead&&maptype==mapkilleveryone)||(winhotspot)||(killhotspot))&&!winfreeze)loading=1;
                                                        if((player[0].dead||(alldead&&maptype==mapkilleveryone)||(winhotspot)||(windialogue)||(killhotspot))&&changedelay<=0){
-                                                               if(accountprogress[accountactive]>3&&!registered){
-                                                                       OPENAL_SetFrequency(OPENAL_ALL, 0.001);
-                                                                       PlayStreamEx( stream_music3, strm[stream_music3], NULL, true);
-                                                                       OPENAL_SetPaused(channels[stream_music3], false);
-                                                                       OPENAL_SetVolume(channels[stream_music3], 256);
-
-                                                                       gameon=0;
-                                                                       mainmenu=12;
-                                                                       accountprogress[accountactive]=3;
-
-                                                                       float gLoc[3]={0,0,0};
-                                                                       float vel[3]={0,0,0};
-                                                                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f);
-                                                                       PlaySoundEx( fireendsound, samp[fireendsound], NULL, true);
-                                                                       OPENAL_3D_SetAttributes(channels[fireendsound], gLoc, vel);
-                                                                       OPENAL_SetVolume(channels[fireendsound], 256);
-                                                                       OPENAL_SetPaused(channels[fireendsound], false);
-                                                                       OPENAL_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f);
-
-                                                                       flashr=1;
-                                                                       flashg=0;
-                                                                       flashb=0;
-                                                                       flashamount=1;
-                                                                       flashdelay=1;
-                                                               }
-                                                               else{
+                        {
                                                                        if(whichlevel!=-2&&!loading&&!player[0].dead){
                                                                                winfreeze=1;
                                                                                changedelay=-999;
index 1c362a8bbc59e59a6193985c8b771bd70aab6431..f8f180c6aa38b3c7a8f7ce889355f12250869b69 100644 (file)
@@ -1347,7 +1347,7 @@ int main(int argc, char **argv)
                        if (!SetUp (game))
                 return 42;
 
-                       while (!gDone&&!game.quit&&(!game.tryquit||!game.registered))
+                       while (!gDone&&!game.quit&&(!game.tryquit))
                        {
                                if (IsFocused())
                                {