Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
Nimetu 7 years ago
commit f960a1114f

@ -242,6 +242,9 @@ external_stlport
nel_tools* nel_tools*
ryzom_tools* ryzom_tools*
#personal projects
personal/
#Dumps #Dumps
*.dmp *.dmp

@ -479,6 +479,10 @@ IF(WITH_STUDIO)
ADD_SUBDIRECTORY(studio) ADD_SUBDIRECTORY(studio)
ENDIF() ENDIF()
IF(WITH_PERSONAL)
ADD_SUBDIRECTORY(personal)
ENDIF()
# To build the documention, you will have to enable it # To build the documention, you will have to enable it
# and then do the equivalent of "make DoxygenDoc". # and then do the equivalent of "make DoxygenDoc".
IF(BUILD_DOCUMENTATION) IF(BUILD_DOCUMENTATION)

@ -1356,10 +1356,14 @@ bool CBitmap::decompressDXT1(bool alpha)
{ {
for(k=0; k<4; k++) for(k=0; k<4; k++)
{ {
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k]= c[bits&3].R; uint32 index = pixelsCount + (j*wtmp+k)*4;
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+1]= c[bits&3].G; // incase input image does not have proper width/height
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+2]= c[bits&3].B; if (index+3 > mipMapSz) break;
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+3]= c[bits&3].A;
dataTmp[m][index+0]= c[bits&3].R;
dataTmp[m][index+1]= c[bits&3].G;
dataTmp[m][index+2]= c[bits&3].B;
dataTmp[m][index+3]= c[bits&3].A;
bits>>=2; bits>>=2;
} }
} }
@ -1466,10 +1470,14 @@ bool CBitmap::decompressDXT3()
{ {
for(k=0; k<4; k++) for(k=0; k<4; k++)
{ {
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k]= c[bits&3].R; uint32 index = pixelsCount + (j*wtmp+k)*4;
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+1]= c[bits&3].G; // incase input image does not have proper width/height
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+2]= c[bits&3].B; if (index+3 > mipMapSz) break;
dataTmp[m][pixelsCount + j*wtmp*4 + 4*k+3]= alpha[4*j+k];
dataTmp[m][index+0]= c[bits&3].R;
dataTmp[m][index+1]= c[bits&3].G;
dataTmp[m][index+2]= c[bits&3].B;
dataTmp[m][index+3]= alpha[4*j+k];
bits>>=2; bits>>=2;
} }
} }
@ -1602,10 +1610,14 @@ bool CBitmap::decompressDXT5()
{ {
for(k=0; k<4; k++) for(k=0; k<4; k++)
{ {
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +0]= c[bits&3].R; uint32 index = pixelsCount + (j*wtmp+k)*4;
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +1]= c[bits&3].G; // incase input image does not have proper width/height
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +2]= c[bits&3].B; if (index+3 > mipMapSz) break;
dataTmp[m][pixelsCount + (j*wtmp+k)*4 +3]= (uint8) alpha[codeAlpha[4*j+k]];
dataTmp[m][index+0]= c[bits&3].R;
dataTmp[m][index+1]= c[bits&3].G;
dataTmp[m][index+2]= c[bits&3].B;
dataTmp[m][index+3]= (uint8) alpha[codeAlpha[4*j+k]];
bits>>=2; bits>>=2;
} }
} }

@ -0,0 +1,9 @@
cmake option to include CMakeLists.txt from this directory is `-DWITH_PERSONAL=ON`
Example:
```
ADD_SUBDIRECTORY(example)
```
Loading…
Cancel
Save