mirror of
https://github.com/glest/glest-source.git
synced 2025-08-14 04:13:58 +02:00
- 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:
@@ -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()
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user