diff --git a/src/core.h b/src/core.h index 9b85dd36..0f34118e 100644 --- a/src/core.h +++ b/src/core.h @@ -37,7 +37,7 @@ #define _GAPI_GL 1 #define _GAPI_GLES 1 - //#define DYNGEOM_NO_VBO + #define DYNGEOM_NO_VBO #elif __linux__ #define _OS_LINUX 1 #define _GAPI_GL 1 diff --git a/src/gapi_gl.h b/src/gapi_gl.h index 2c47a5cf..57e3691c 100644 --- a/src/gapi_gl.h +++ b/src/gapi_gl.h @@ -633,8 +633,8 @@ namespace GAPI { } void setFilterQuality(int value) { - bool filter = value > Core::Settings::LOW; - bool mipmaps = value > Core::Settings::MEDIUM; + bool filter = (opt & OPT_NEAREST) == 0 && (value > Core::Settings::LOW); + bool mipmaps = (opt & OPT_MIPMAPS) != 0; Core::active.textures[0] = NULL; bind(0); diff --git a/src/lara.h b/src/lara.h index d99886a3..3d7078cd 100644 --- a/src/lara.h +++ b/src/lara.h @@ -39,6 +39,7 @@ #define LARA_SWIM_SPEED 50.0f #define LARA_SWIM_FRICTION 1.0f +#define LARA_MIN_SPECULAR 0.03f #define LARA_WET_SPECULAR 0.5f #define LARA_WET_TIMER (LARA_WET_SPECULAR / 16.0f) // 4 sec @@ -2813,10 +2814,10 @@ struct Lara : Character { updateWeapon(); if (stand == STAND_UNDERWATER) - specular = 0.0f; + specular = LARA_MIN_SPECULAR; else - if (specular > 0.0f) - specular = max(0.0f, specular - LARA_WET_TIMER * Core::deltaTime); + if (specular > LARA_MIN_SPECULAR) + specular = max(LARA_MIN_SPECULAR, specular - LARA_WET_TIMER * Core::deltaTime); if (state == STATE_MIDAS_DEATH || state == STATE_MIDAS_USE) { uint32 sparklesMask = getMidasMask(); diff --git a/src/platform/clover/build.sh b/src/platform/clover/build.sh index d7d54eaa..07e5864c 100755 --- a/src/platform/clover/build.sh +++ b/src/platform/clover/build.sh @@ -1,3 +1,3 @@ set -e -clang++ -std=c++11 -Os -s -g -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara +clang++ -std=c++11 -Os -s -g -marm -march=armv7ve -mtune=cortex-a7 -mfloat-abi=hard -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__CLOVER__ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I/opt/vc/include -I../../ -L/opt/vc/lib/ -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -o../../../bin/OpenLara strip ../../../bin/OpenLara --strip-all --remove-section=.comment --remove-section=.note diff --git a/src/platform/clover/main.cpp b/src/platform/clover/main.cpp index 8a9647b0..f4a569b9 100644 --- a/src/platform/clover/main.cpp +++ b/src/platform/clover/main.cpp @@ -66,7 +66,7 @@ bool sndInit() { int err; // In the perfect world ReedPlayer-Clover process - // will release ALSA devicbefore app running, but... + // will release ALSA device before app running, but... for (int i = 0; i < 20; i++) { // 20 * 0.1 = 2 secs sndOut = NULL; if ((err = snd_pcm_open(&sndOut, "default", SND_PCM_STREAM_PLAYBACK, 0)) < 0) { @@ -581,10 +581,10 @@ LOG("start\n"); inputFree(); - //sndFree(); - //Game::deinit(); - + Game::deinit(); eglFree(); + sndFree(); + return 0; } diff --git a/src/shaders/shader.glsl b/src/shaders/shader.glsl index e87a220e..ad88ebbc 100644 --- a/src/shaders/shader.glsl +++ b/src/shaders/shader.glsl @@ -142,9 +142,9 @@ uniform vec4 uFogParams; float fog; #ifdef UNDERWATER float d; - if (uViewPos.y < uParam.y) - d = abs((coord.y - uParam.y) / normalize(vViewVec.xyz).y); - else + //if (uViewPos.y < uParam.y) // TODO: fix for mediump + // d = abs((coord.y - uParam.y) / normalize(uViewPos.xyz - coord.xyz).y); + //else d = length(uViewPos.xyz - coord.xyz); fog = d * WATER_FOG_DIST; #else @@ -436,7 +436,7 @@ uniform vec4 uFogParams; vec3 normal = normalize(vNormal.xyz); #ifdef TYPE_ENTITY - float rSpecular = uMaterial.z + 0.03; + float rSpecular = uMaterial.z; #endif #ifdef OPT_SHADOW