mirror of
https://github.com/XProger/OpenLara.git
synced 2025-01-29 10:38:04 +01:00
parent
2ffa5a7bf4
commit
7299446ed7
BIN
bin/OpenLara.exe
BIN
bin/OpenLara.exe
Binary file not shown.
@ -23,8 +23,8 @@ namespace Game {
|
||||
|
||||
Core::settings.ambient = true;
|
||||
Core::settings.lighting = true;
|
||||
Core::settings.shadows = false;//true;
|
||||
Core::settings.water = false;//Core::support.texFloat || Core::support.texHalf;
|
||||
Core::settings.shadows = true;
|
||||
Core::settings.water = Core::support.texFloat || Core::support.texHalf;
|
||||
|
||||
level = NULL;
|
||||
ui = NULL;
|
||||
|
@ -3,7 +3,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="0.1" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" />
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14" />
|
||||
<supports-screens android:smallScreens="true" android:largeScreens="true" android:normalScreens="true" android:xlargeScreens="true" />
|
||||
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
|
@ -11,4 +11,4 @@
|
||||
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-9
|
||||
target=android-14
|
||||
|
@ -21,13 +21,13 @@ import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
//import android.view.View.OnGenericMotionListener;
|
||||
import android.view.View.OnGenericMotionListener;
|
||||
import android.view.View.OnKeyListener;
|
||||
import android.view.View.OnTouchListener;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
public class MainActivity extends Activity implements OnTouchListener/*, OnGenericMotionListener, OnKeyListener*/ {
|
||||
public class MainActivity extends Activity implements OnTouchListener, OnGenericMotionListener, OnKeyListener {
|
||||
private GLSurfaceView view;
|
||||
//private GvrLayout gvrLayout;
|
||||
private Wrapper wrapper;
|
||||
@ -56,8 +56,8 @@ public class MainActivity extends Activity implements OnTouchListener/*, OnGener
|
||||
view.setFocusableInTouchMode(true);
|
||||
|
||||
view.setOnTouchListener(this);
|
||||
// view.setOnGenericMotionListener(this);
|
||||
// view.setOnKeyListener(this);
|
||||
view.setOnGenericMotionListener(this);
|
||||
view.setOnKeyListener(this);
|
||||
/*
|
||||
gvrLayout = new GvrLayout(this);
|
||||
gvrLayout.setPresentationView(view);
|
||||
@ -120,7 +120,7 @@ public class MainActivity extends Activity implements OnTouchListener/*, OnGener
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
|
||||
private int getJoyIndex(InputDevice dev) {
|
||||
int src = dev.getSources();
|
||||
if ((src & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD ||
|
||||
@ -185,7 +185,6 @@ public class MainActivity extends Activity implements OnTouchListener/*, OnGener
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
static {
|
||||
System.loadLibrary("game");
|
||||
|
@ -6,4 +6,4 @@ set FLAGS=-O3 -Wno-deprecated-register --llvm-opts 2 -fmax-type-align=2 -std=c++
|
||||
set PRELOAD=./LEVEL2.PSX
|
||||
echo.
|
||||
call em++ %SRC% %FLAGS% -o %PROJ%.js --preload-file %PRELOAD%
|
||||
ggzip.exe -9 -f %PROJ%.data %PROJ%.js %PROJ%.js.mem
|
||||
gzip.exe -9 -f %PROJ%.data %PROJ%.js %PROJ%.js.mem
|
@ -413,14 +413,19 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - caustics coords
|
||||
#ifndef TYPE_FLASH
|
||||
#ifdef OPT_SHADOW
|
||||
#ifdef PASS_COMPOSE
|
||||
vec3 n = normalize(vNormal.xyz);
|
||||
|
||||
vec3 light = uLightColor[1].xyz * vLight.y + uLightColor[2].xyz * vLight.z;
|
||||
|
||||
#ifdef TYPE_ENTITY
|
||||
light += vAmbient + uLightColor[0].xyz * (vLight.x * getShadow());
|
||||
float rShadow = getShadow();
|
||||
light += vAmbient + uLightColor[0].xyz * (vLight.x * rShadow);
|
||||
#if defined(OPT_WATER) && defined(UNDERWATER)
|
||||
light += calcCaustics(n);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ROOM
|
||||
vec3 n = normalize(vNormal.xyz);
|
||||
light += mix(vAmbient.x, vLight.x, getShadow());
|
||||
#if defined(OPT_WATER) && defined(UNDERWATER)
|
||||
light += calcCaustics(n);
|
||||
@ -434,6 +439,10 @@ varying vec4 vTexCoord; // xy - atlas coords, zw - caustics coords
|
||||
#ifndef TYPE_MIRROR
|
||||
color.xyz *= light;
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ENTITY
|
||||
color.xyz += calcSpecular(n, vViewVec.xyz, vLightVec, uLightColor[0], uMaterial.z * rShadow + 0.03);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PASS_AMBIENT
|
||||
|
Loading…
x
Reference in New Issue
Block a user