]> git.jsancho.org Git - lugaru.git/commitdiff
Missing files in the CMakeList.txt
authorCôme BERNIGAUD <come.bernigaud@gmail.com>
Sun, 6 Jun 2010 15:51:11 +0000 (17:51 +0200)
committerCôme BERNIGAUD <come.bernigaud@gmail.com>
Sun, 6 Jun 2010 15:51:11 +0000 (17:51 +0200)
And some clean up.

CMakeLists.txt
Source/OpenGL_Windows.cpp
Source/Person.cpp

index f0df14425c951166e2924075ed3dfc57bb953fc7..d86c839cc3066e8317dba38886c40fe9d28f46fe 100644 (file)
@@ -89,12 +89,10 @@ set(LUGARU_H
        ${SRCDIR}/Account.h
        ${SRCDIR}/Game.h
        ${SRCDIR}/Lights.h
-       ${SRCDIR}/LinkedList.h
        ${SRCDIR}/Models.h
        ${SRCDIR}/Objects.h
        ${SRCDIR}/Person.h
        ${SRCDIR}/PhysicsMath.h
-       ${SRCDIR}/Pointer.h
        ${SRCDIR}/Quaternions.h
        ${SRCDIR}/Random.h
        ${SRCDIR}/Skeleton.h
index 2510aa675d08a60657f46d9fe1c7bec542c322a2..36998186c323d4351157336184096481115cedd5 100644 (file)
@@ -415,7 +415,7 @@ Boolean SetUp (Game & game)
 static void DoMouse(Game & game)
 {
 
-       if(mainmenu||(abs(game.deltah)<10*realmultiplier*1000&&abs(game.deltav)<10*realmultiplier*1000))
+       if(mainmenu|| ( (abs(game.deltah)<10*realmultiplier*1000) && (abs(game.deltav)<10*realmultiplier*1000) ))
        {
                game.deltah *= usermousesensitivity;
                game.deltav *= usermousesensitivity;
@@ -482,7 +482,6 @@ void DoUpdate (Game & game)
 
        count = multiplier*sps;
        if(count<2)count=2;
-       //if(count>10)count=10;
 
        realmultiplier=multiplier;
        multiplier*=gamespeed;
@@ -490,9 +489,7 @@ void DoUpdate (Game & game)
        if(difficulty==0)multiplier*=.8;
 
        if(game.loading==4)multiplier*=.00001;
-       //multiplier*.9;
        if(slomo&&!mainmenu)multiplier*=slomospeed;
-       //if(freeze)multiplier*=0.00001;
        oldmult=multiplier;
        multiplier/=(float)count;
 
index cf4a6fbcac35bc34b8fb34b7b10d23166a18c507..716130cd9957c71f6a6ad2b1405a93eff983f3dc 100644 (file)
@@ -88,8 +88,6 @@ extern float damagetaken;
 extern int hostile;
 extern float hostiletime;
 
-extern int mainmenu;
-
 extern int numfalls;
 extern int numflipfail;
 extern int numseen;
@@ -1465,7 +1463,7 @@ void Person::DoHead(){
        static XYZ facing;
        static float lookspeed=500;
 
-       if(!freeze&&!winfreeze&&(!mainmenu||!gamestarted)){
+       if(!freeze&&!winfreeze){
 
                //head facing
                targetheadrotation=(float)((int)((0-rotation-targetheadrotation+180)*100)%36000)/100;
@@ -5050,12 +5048,6 @@ void     Person::DoStuff(){
                        targetanimation=getRun();
                        targetframe=0;
                }
-               /*static float toggledelay;
-               toggledelay-=multiplier;
-               if(toggledelay<0){
-               toggledelay=1;
-               if(Random()%3==0)superruntoggle=1-superruntoggle;
-               }*/
        }
        if(weaponactive==-1&&num_weapons>0){
                if(weapons.type[weaponids[0]]==staff){
@@ -5154,10 +5146,6 @@ void     Person::DoStuff(){
                                if(!skeleton.free)Sprite::MakeSprite(bloodsprite, DoRotation((skeleton.joints[skeleton.jointlabels[abdomen]].position+skeleton.joints[skeleton.jointlabels[abdomen]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1);
                        }
                }
-               /*if(id==0){
-               bloodloss+=deathbleeding*40;
-               deathbleeding=0;
-               }*/
                bloodloss+=deathbleeding*multiplier*80;
                deathbleeding-=multiplier*1.6;
                //if(id==0)deathbleeding-=multiplier*.2;
@@ -5231,10 +5219,6 @@ void     Person::DoStuff(){
                if(endy>skeleton.skinsize-1){endy=skeleton.skinsize-1;bleeding=0;}
                if(endx<startx)endx=startx;
                if(endy<starty)endy=starty;
-               /*int startx=0;
-               int starty=0;
-               int endx=256;
-               int endy=256;*/
 
                for(i=startx;i<endx;i++){
                        for(j=starty;j<endy;j++){
@@ -5610,12 +5594,6 @@ void     Person::DoStuff(){
                }
 
                damage+=20;
-
-               /*
-               if(bloodloss<damagetolerance)
-               for(i=0;i<skeleton.num_joints;i++){
-               skeleton.joints[i].velocity*=1.5;
-               }*/
        }
 
        //if(dead)damage-=multiplier/4;
@@ -6841,9 +6819,12 @@ int Person::DrawSkeleton(){
                if(findDistancefast(&viewer,&coords)<viewdistance*viewdistance/256&&(detail!=1&&detail!=2)){
                        playerdetail=1;
                }
-               if(id==0)playerdetail=1;
-               if(playerdetail!=oldplayerdetail)updatedelay=0;
-               if(playerdetail!=oldplayerdetail)normalsupdatedelay=0;
+               if(id==0)
+                       playerdetail=1;
+               if(playerdetail!=oldplayerdetail) {
+                       updatedelay=0;
+                       normalsupdatedelay=0;
+               }
                static float updatedelaychange;
                static float morphness;
                static float framemult;
@@ -6991,7 +6972,8 @@ int Person::DrawSkeleton(){
                                        }
                                }
                        }
-                       if(!skeleton.free&&(!animation[targetanimation].attack&&targetanimation!=getupfrombackanim&&targetanimation!=getupfrombackanim&&((targetanimation!=rollanim&&!isFlip())||animation[targetanimation].label[targetframe]==6)&&targetanimation!=getupfromfrontanim&&targetanimation!=wolfrunninganim&&targetanimation!=rabbitrunninganim&&targetanimation!=backhandspringanim&&targetanimation!=walljumpfrontanim&&targetanimation!=hurtidleanim&&!isLandhard()&&!isSleeping()))DoHead();
+                       if(!skeleton.free&&(!animation[targetanimation].attack&&targetanimation!=getupfrombackanim&&((targetanimation!=rollanim&&!isFlip())||animation[targetanimation].label[targetframe]==6)&&targetanimation!=getupfromfrontanim&&targetanimation!=wolfrunninganim&&targetanimation!=rabbitrunninganim&&targetanimation!=backhandspringanim&&targetanimation!=walljumpfrontanim&&targetanimation!=hurtidleanim&&!isLandhard()&&!isSleeping()))
+                               DoHead();
                        else {
                                targetheadrotation=-targetrotation;
                                targetheadrotation2=0;