Skip to content
Browse files

Fix minor errors when merging branch android_sound

  • Loading branch information...
1 parent 1028353 commit 0b97766ec92a65b0bb035d2b2efbceaf115f1d4c Magnus Ahlberg committed Aug 20, 2011
Showing with 5 additions and 7 deletions.
  1. +1 −1 Android/OpenGLRenderer.cpp
  2. +4 −6 Android/OpenGLRenderer.java
View
2 Android/OpenGLRenderer.cpp
@@ -17,7 +17,7 @@ extern "C" {
JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_init(JNIEnv * env, jobject obj);
JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_draw(JNIEnv * env, jobject obj);
JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_update(JNIEnv * env, jobject obj);
- JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_addTexture(JNIEnv * env, jobject obj, jstring textureName, jint textureId, jint tiles);
+ JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_loadResources(JNIEnv * env, jobject callingObject);
JNIEXPORT void JNICALL Java_com_hexgame_game_OpenGLRenderer_realizeAssetLoader(JNIEnv * env, jobject obj, jobject assetManager);
};
View
10 Android/OpenGLRenderer.java
@@ -1,5 +1,8 @@
package com.hexgame.game;
+import java.io.IOException;
+import java.io.InputStream;
+
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
@@ -11,6 +14,7 @@
import android.opengl.GLUtils;
import android.util.Log;
+
public class OpenGLRenderer implements Renderer {
static {
@@ -74,11 +78,6 @@ public void onSurfaceCreated(GL10 gl, EGLConfig eglConfig) {
OpenGLRenderer.gl10 = gl;
loadResources();
OpenGLRenderer.gl10 = null;
- OpenGLRenderer.addTexture("hexTiles", loadTexture(gl, R.raw.texmap_hex), 2);
- OpenGLRenderer.addTexture("actions", loadTexture(gl, R.raw.actions), 4);
- OpenGLRenderer.addTexture("icons", loadTexture(gl, R.raw.icons), 4);
- OpenGLRenderer.addTexture("units", loadTexture(gl, R.raw.texmap), 2);
- OpenGLRenderer.addTexture("font", loadTexture(gl, R.raw.font_1), 1);
OpenGLRenderer.realizeAssetLoader(HexGame.assetManager);
}
@@ -124,6 +123,5 @@ public static int loadTexture(String textureName) {
public static native void init();
public static native void draw();
public static native void update();
- public static native void addTexture(String name, int textureId, int tiles);
public static native void realizeAssetLoader(AssetManager assetManager);
}

0 comments on commit 0b97766

Please sign in to comment.
Something went wrong with that request. Please try again.