From 88a2e90f8bddede275ef3bf625665efabbb211f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Fri, 21 Jun 2013 15:01:39 +0200 Subject: [PATCH] Fix some compile issues on windows --- src/editing/baseexplorerchunk.cpp | 4 ++++ src/editing/paysages-qt.pro | 7 +++---- src/rendering/noiseperlin.c | 11 ++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/editing/baseexplorerchunk.cpp b/src/editing/baseexplorerchunk.cpp index e8c78df..7aae96a 100644 --- a/src/editing/baseexplorerchunk.cpp +++ b/src/editing/baseexplorerchunk.cpp @@ -1,5 +1,9 @@ #include "baseexplorerchunk.h" +#ifndef GL_CLAMP_TO_EDGE +#define GL_CLAMP_TO_EDGE 0x812F +#endif + BaseExplorerChunk::BaseExplorerChunk(Renderer* renderer) { _renderer = renderer; diff --git a/src/editing/paysages-qt.pro b/src/editing/paysages-qt.pro index 1169b91..b9067f5 100644 --- a/src/editing/paysages-qt.pro +++ b/src/editing/paysages-qt.pro @@ -15,11 +15,10 @@ CONFIG += $$BUILDMODE INCLUDEPATH += $$PROJECT_PATH/src/ release:DEFINES += NDEBUG -release:QMAKE_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable +release:QMAKE_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter -LIBS += -lGLU -unix:LIBS += -L$$DESTDIR -lpaysages_rendering -lpaysages_exploring -win32:LIBS += ../libpaysages.a ../libpaysages_exploring.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0 +unix:LIBS += -L$$DESTDIR -lpaysages_rendering -lpaysages_exploring -lGLU +win32:LIBS += $$PROJECT_PATH/libpaysages.a -lDevIL -lILU -lILUT -lglib-2.0 -lgthread-2.0 TRANSLATIONS = $$PROJECT_PATH/data/i18n/paysages_fr.ts diff --git a/src/rendering/noiseperlin.c b/src/rendering/noiseperlin.c index 40fb47e..4601129 100644 --- a/src/rendering/noiseperlin.c +++ b/src/rendering/noiseperlin.c @@ -9,10 +9,7 @@ #include #include #include - -#include #include -#include #define B 0x100 #define BM 0xff @@ -161,20 +158,20 @@ void noisePerlinInit(void) for (i = 0 ; i < B ; i++) { p[i] = i; - g1[i] = (double)((random() % (B + B)) - B) / B; + g1[i] = (double)((rand() % (B + B)) - B) / B; for (j = 0 ; j < 2 ; j++) - g2[i][j] = (double)((random() % (B + B)) - B) / B; + g2[i][j] = (double)((rand() % (B + B)) - B) / B; _normalize2(g2[i]); for (j = 0 ; j < 3 ; j++) - g3[i][j] = (double)((random() % (B + B)) - B) / B; + g3[i][j] = (double)((rand() % (B + B)) - B) / B; _normalize3(g3[i]); } while (--i) { k = p[i]; - p[i] = p[j = random() % B]; + p[i] = p[j = rand() % B]; p[j] = k; }