Sfoglia il codice sorgente

android: compilation fixes for recent engine changes.

legacy
Sam Hocevar sam 13 anni fa
parent
commit
d7ca14a836
2 ha cambiato i file con 4 aggiunte e 5 eliminazioni
  1. +3
    -4
      src/androidapp.cpp
  2. +1
    -1
      src/video.cpp

+ 3
- 4
src/androidapp.cpp Vedi File

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

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

new Interface();
new DebugFps(20, 20);
@@ -54,7 +54,7 @@ Java_org_zoy_LolEngine_LolRenderer_nativeResize(JNIEnv* env, jobject thiz,
jint w, jint 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
@@ -85,8 +85,7 @@ extern "C" void
Java_org_zoy_LolEngine_LolView_nativeMove(JNIEnv* env, jobject thiz,
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);
}



+ 1
- 1
src/video.cpp Vedi File

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

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

/* Set the projection matrix */


Caricamento…
Annulla
Salva