Bladeren bron

android: compilation fixes for recent engine changes.

legacy
Sam Hocevar sam 13 jaren geleden
bovenliggende
commit
d7ca14a836
2 gewijzigde bestanden met toevoegingen van 4 en 5 verwijderingen
  1. +3
    -4
      src/androidapp.cpp
  2. +1
    -1
      src/video.cpp

+ 3
- 4
src/androidapp.cpp Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 */


Laden…
Annuleren
Opslaan