- streflop was disabled (likely when we switched to cmake). Turn it on for now but we need to investigate more thoroughly if we really need this?

This commit is contained in:
Mark Vejvoda 2011-02-11 19:16:06 +00:00
parent cab252c220
commit 34e95f5cd5
3 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
IF(WIN32)
ADD_DEFINITIONS("-D_WINDOWS -D_WIN32 -D_STDCALL_SUPPORTED -D_M_IX86 -DXML_LIBRARY -D_LIB -DUSE_STREFLOP -DSTREFLOP_SSE -DSTREFLOP_RANDOM_GEN_SIZE=32 -DLIBM_COMPILING_FLT32 -DCURL_STATICLIB")
ELSE()
ADD_DEFINITIONS("-DCURL_STATICLIB")
ADD_DEFINITIONS("-DUSE_STREFLOP -DSTREFLOP_SSE -DSTREFLOP_RANDOM_GEN_SIZE=32 -DLIBM_COMPILING_FLT32 -DCURL_STATICLIB")
ENDIF()
ENDIF()

View File

@ -1109,11 +1109,12 @@ void Map::smoothSurface(Tileset *tileset) {
float numUsedToSmooth = 0.f;
for (int k = -1; k <= 1; ++k) {
for (int l = -1; l <= 1; ++l) {
if (cliffLevel<=0.1f || cliffLevel > abs(oldHeights[(j) * surfaceW + (i)]
if (cliffLevel<=0.1f || cliffLevel > fabs(oldHeights[(j) * surfaceW + (i)]
- oldHeights[(j + k) * surfaceW + (i + l)])) {
height += oldHeights[(j + k) * surfaceW + (i + l)];
numUsedToSmooth++;
} else {
}
else {
// we have something which should not be smoothed!
// This is a cliff and must be textured -> set cliff texture
getSurfaceCell(i, j)->setSurfaceType(5);

View File

@ -71,7 +71,7 @@ bool MapPreview::isCliff(int x, int y){
if(xToCheck < 0 || yToCheck < 0 || xToCheck >= w || yToCheck >= h){
//ignore
}
else if(cliffLevel <= abs(getHeight(x, y) - getHeight(xToCheck, yToCheck))){
else if(cliffLevel <= abs((int)(getHeight(x, y) - getHeight(xToCheck, yToCheck)))) {
return true;
}
}