X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=3640a0b224d54a146a39d0e7f87b1bbd7bb809b0;hb=bba3631a5899f8f9f26fd596e13f097ae2d6f8b8;hp=b60c350671527402c85e3075e9bc532f0949c9d0;hpb=a6c3ac9511035a2448dfe40b1728d9f5ab2e8724;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index b60c350..3640a0b 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -67,7 +67,6 @@ extern bool tiltweird; extern bool midweird; extern bool proportionweird; extern bool vertexweird[6]; -extern GLubyte texturearray[512*512*3]; extern XYZ envsound[30]; extern float envsoundvol[30]; extern float envsoundlife[30]; @@ -475,8 +474,7 @@ void Person::DoBloodBig(float howmuch,int which){ } } glBindTexture(GL_TEXTURE_2D,skeleton.drawmodel.textureptr); - if(detail!=2||osx)DoMipmaps(5,0,0,skeleton.skinsize,skeleton.skinsize); - else DoMipmaps(0,startx/realtexdetail,endx/realtexdetail,starty/realtexdetail,endy/realtexdetail); + DoMipmaps(); bleedxint=0; bleedyint=0; @@ -704,8 +702,7 @@ bool Person::DoBloodBigWhere(float howmuch,int which, XYZ where){ } } glBindTexture(GL_TEXTURE_2D,skeleton.drawmodel.textureptr); - if(detail!=2||osx)DoMipmaps(5,0,0,skeleton.skinsize,skeleton.skinsize); - else DoMipmaps(0,startx/realtexdetail,endx/realtexdetail,starty/realtexdetail,endy/realtexdetail); + DoMipmaps(); bleedy=(1+coordsy)*512; bleedx=coordsx*512; @@ -735,73 +732,6 @@ bool Person::DoBloodBigWhere(float howmuch,int which, XYZ where){ } -void Person::DoMipmaps(int howmanylevels,float startx, float endx, float starty, float endy){ - int i,j,k; - static float temp; - static int bytesPerPixel=3; - static int newsize,totalsize,rowsize,bigstep,smallstep,sum; - static int newstartx,newstarty,newendx,newendy; - static int newnewstartx,newnewstarty,newnewendx,newnewendy; - static int which; - static float sizemult; - /* - for(i=0;iskeleton.skinsize-1)endx=skeleton.skinsize-1; - if(endy>skeleton.skinsize-1)endy=skeleton.skinsize-1; - if((endx>startx&&endy>starty)||howmanylevels){ - - newstartx=startx; - newstarty=starty; - newendx=endx; - newendy=endy; - - for(i=startx;iaitype==playercontrolled||hostiletime>1) @@ -3915,7 +3845,7 @@ void Person::DoStuff(){ bleeding-=multiplier*.3; if(bloodtoggle==2){ glBindTexture(GL_TEXTURE_2D,skeleton.drawmodel.textureptr); - if(bleeding<=0&&(detail!=2||osx))DoMipmaps(5,0,0,skeleton.skinsize,skeleton.skinsize); + if(bleeding<=0&&(detail!=2||osx))DoMipmaps(); } } @@ -4042,7 +3972,7 @@ void Person::DoStuff(){ } if(!osx&&detail>1){ glBindTexture(GL_TEXTURE_2D,skeleton.drawmodel.textureptr); - DoMipmaps(0,startx,endx,starty,endy); + DoMipmaps(); } if(!skeleton.free){