Browse Source

android: compilation fixes for recent engine changes.

legacy
Sam Hocevar sam 13 years ago
parent
commit
d7ca14a836
2 changed files with 4 additions and 5 deletions
  1. +3
    -4
      src/androidapp.cpp
  2. +1
    -1
      src/video.cpp

+ 3
- 4
src/androidapp.cpp View File

@@ -43,7 +43,7 @@ Java_org_zoy_LolEngine_LolRenderer_nativeInit(JNIEnv* env)


__android_log_print(ANDROID_LOG_INFO, "LOL", "init"); __android_log_print(ANDROID_LOG_INFO, "LOL", "init");
Ticker::Setup(30.0f); Ticker::Setup(30.0f);
Video::Setup(320, 200);
Video::Setup(vec2i(320, 200));


new Interface(); new Interface();
new DebugFps(20, 20); new DebugFps(20, 20);
@@ -54,7 +54,7 @@ Java_org_zoy_LolEngine_LolRenderer_nativeResize(JNIEnv* env, jobject thiz,
jint w, jint h) jint w, jint h)
{ {
__android_log_print(ANDROID_LOG_INFO, "LOL", "resize w=%d h=%d", w, h); __android_log_print(ANDROID_LOG_INFO, "LOL", "resize w=%d h=%d", w, h);
Video::Setup(w, h);
Video::Setup(vec2i(w, h));
} }


extern "C" void extern "C" void
@@ -85,8 +85,7 @@ extern "C" void
Java_org_zoy_LolEngine_LolView_nativeMove(JNIEnv* env, jobject thiz, Java_org_zoy_LolEngine_LolView_nativeMove(JNIEnv* env, jobject thiz,
jint x, jint y) jint x, jint y)
{ {
vec2i pos(x * 640 / Video::GetWidth(),
480 - 1 - y * 480 / Video::GetHeight());
vec2i pos = vec2i(0, 479) + vec2i(x * 640, -y * 480) / Video::GetSize();
Input::SetMousePos(pos); Input::SetMousePos(pos);
} }




+ 1
- 1
src/video.cpp View File

@@ -148,7 +148,7 @@ void Video::SetFov(float theta)
float far = size.x + size.y; float far = size.x + size.y;


#if defined ANDROID_NDK #if defined ANDROID_NDK
size = vec(640.0f, 480.0f);
size = vec2(640.0f, 480.0f);
#endif #endif


/* Set the projection matrix */ /* Set the projection matrix */


Loading…
Cancel
Save