Created
July 28, 2009 20:33
-
-
Save newbamboo/157651 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/makoto/work/sample/ndkbox2dtest20090707/apps/box2dtest/project/src | |
Unknown-00-21-e9-db-a7-d3:src makoto$ git status | |
# On branch master | |
# Changed but not updated: | |
# (use "git add <file>..." to update what will be committed) | |
# | |
# modified: com/akjava/android/box2d/JBox2dControler.java | |
# modified: com/akjava/android/box2d/NDKBox2dControler.java | |
# modified: com/akjava/android/box2dtest/AbstractBox2dTestRender.java | |
# modified: com/akjava/android/box2dtest/AndroidBox2dTest.java | |
# modified: com/akjava/android/box2dtest/BlockBreakRenderer.java | |
# modified: com/akjava/android/box2dtest/BoundBallRenderer.java | |
# modified: com/akjava/android/box2dtest/BoundBoxRenderer.java | |
# modified: com/akjava/android/box2dtest/JBox2dActivity.java | |
# modified: com/akjava/android/box2dtest/MoveBoxRenderer.java | |
# modified: com/akjava/android/box2dtest/jbox2d/BlockBreakActivity.java | |
# modified: com/akjava/android/box2dtest/jbox2d/BoundBallActivity.java | |
# modified: com/akjava/android/box2dtest/jbox2d/BoundBoxActivity.java | |
# modified: com/akjava/android/box2dtest/jbox2d/MoveBoxActivity.java | |
# modified: com/akjava/android/box2dtest/ndkbox2d/BoundBallActivity.java | |
Unknown-00-21-e9-db-a7-d3:src makoto$ git diff | |
diff --git a/com/akjava/android/box2d/JBox2dControler.java b/com/akjava/android/box2d/JBox2dControler.java | |
index d330246..e533b72 100755 | |
--- a/com/akjava/android/box2d/JBox2dControler.java | |
+++ b/com/akjava/android/box2d/JBox2dControler.java | |
@@ -1,194 +1,194 @@ | |
-package com.akjava.android.box2d;^M | |
-^M | |
-import org.jbox2d.collision.AABB;^M | |
-import org.jbox2d.collision.CircleDef;^M | |
-import org.jbox2d.collision.PolygonDef;^M | |
-import org.jbox2d.common.Vec2;^M | |
-import org.jbox2d.dynamics.Body;^M | |
-import org.jbox2d.dynamics.BodyDef;^M | |
-import org.jbox2d.dynamics.World;^M | |
-import org.jbox2d.dynamics.contacts.ContactEdge;^M | |
-^M | |
-public class JBox2dControler implements Box2dControler{^M | |
-^M | |
- ^M | |
- ^M | |
- World mWorld;^M | |
-^M | |
- ^M | |
- private Body[] bodies=new Body[maxBodySize];^M | |
- int bodyIndex;^M | |
- @Override^M | |
- public void createWorld(float minX, float minY, float maxX,^M | |
- float maxY, float gravityX, float gravityY) {^M | |
- Vec2 minV = new Vec2(minX,minY);^M | |
- Vec2 maxV = new Vec2(maxX,maxY);//世界を小さくした^M | |
- AABB aabb = new AABB(minV,maxV);^M | |
- mWorld = new World(aabb, new Vec2(gravityX,gravityY),true);^M | |
- }^M | |
- ^M | |
- ^M | |
- @Override^M | |
- public int createBox(float x, float y, float width,^M | |
- float height) {^M | |
- BodyDef groundBodyDef = new BodyDef();^M | |
- groundBodyDef.position.set(x+width/2, y+height/2);^M | |
- ^M | |
- PolygonDef groundShapeDef = new PolygonDef();^M | |
- groundShapeDef.restitution=0f;^M | |
- ^M | |
- groundShapeDef.setAsBox(width/2,height/2);^M | |
- Body groundBody = mWorld.createBody(groundBodyDef);^M | |
- groundBody.createShape(groundShapeDef);^M | |
- bodies[bodyIndex]=groundBody;^M | |
- ^M | |
- return bodyIndex++;^M | |
- }^M | |
-^M | |
-^M | |
-^M | |
- @Override^M | |
- public int createCircle(float x, float y, float radius, float weight,^M | |
- float restitution) {^M | |
- BodyDef ballBodyDef = new BodyDef();^M | |
- ballBodyDef.position.set(x, y);^M | |
- CircleDef ballShapeDef = new CircleDef();^M | |
- ballShapeDef.radius = radius;^M | |
- ^M | |
- //ballShapeDef.friction=1; 不明^M | |
- ballShapeDef.density = weight;^M | |
- ballShapeDef.restitution = restitution;^M | |
- Body body = mWorld.createBody(ballBodyDef);^M | |
- body.createShape(ballShapeDef);^M | |
- body.setMassFromShapes();^M | |
- bodies[bodyIndex]=body;^M | |
- return bodyIndex++;^M | |
- }^M | |
- ^M | |
- public BodyInfo getBodyInfo(BodyInfo info,int index){^M | |
- if(bodies[index]==null){^M | |
- return null;^M | |
- }^M | |
- Vec2 tmpWpos = bodies[index].m_sweep.c; ^M | |
- float angle=bodies[index].getAngle();^M | |
- info.setValues(tmpWpos.x, tmpWpos.y, angle);^M | |
- return info;^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void step(float stepTime, int velocityIterations,^M | |
- int positionIterations) {^M | |
- mWorld.step(stepTime, velocityIterations+positionIterations);^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void setGravity(float gravityX, float gravityY) {^M | |
- mWorld.setGravity(new Vec2(gravityX,gravityY));^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void destroyBody(int id) {^M | |
- mWorld.destroyBody(bodies[id]);^M | |
- bodies[id]=null;^M | |
- }^M | |
-^M | |
-^M | |
- public void getCollisions(collisionIdKeeper keeper,int index){^M | |
- ContactEdge c=bodies[index].m_contactList;^M | |
- while(c!=null){^M | |
- int id=findId(c.other);^M | |
- if(id!=-1){^M | |
- keeper.add(id);^M | |
- }^M | |
- c=c.next;^M | |
- }^M | |
- }^M | |
-^M | |
- ^M | |
- public int findId(Body body){^M | |
- int ret=-1;^M | |
- for (int i = 0; i < bodies.length; i++) {^M | |
- if(bodies[i]==body){^M | |
- return i;^M | |
- }^M | |
- }^M | |
- return ret;^M | |
- }^M | |
-^M | |
-^M | |
- ^M | |
- @Override^M | |
- public int createBox2(float x, float y, float width, float height,^M | |
- float density, float restitution, float friction) {^M | |
- BodyDef groundBodyDef = new BodyDef();^M | |
- groundBodyDef.position.set(x+width/2, y+height/2);^M | |
- ^M | |
- PolygonDef groundShapeDef = new PolygonDef();^M | |
- groundShapeDef.restitution=restitution;^M | |
- groundShapeDef.friction=friction;^M | |
- groundShapeDef.density=density;^M | |
- ^M | |
- ^M | |
- ^M | |
- groundShapeDef.setAsBox(width/2,height/2);^M | |
- Body groundBody = mWorld.createBody(groundBodyDef);^M | |
- ^M | |
- groundBody.createShape(groundShapeDef);^M | |
- ^M | |
- groundBody.setMassFromShapes();^M | |
- ^M | |
- bodies[bodyIndex]=groundBody;^M | |
- return bodyIndex++;^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void setBodyAngularVelocity(int id,float radiant) {^M | |
- if(bodies[id]!=null){^M | |
- bodies[id].setAngularVelocity(radiant);^M | |
- }^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void setBodyLinearVelocity(int id,float x, float y) {^M | |
- if(bodies[id]!=null){^M | |
- bodies[id].setLinearVelocity(new Vec2(x,y));^M | |
- }^M | |
- }^M | |
-^M | |
-^M | |
- @Override^M | |
- public void setBodyXForm(int id, float x, float y, float radiant) {^M | |
- if(bodies[id]!=null){^M | |
- bodies[id].setXForm(new Vec2(x,y),radiant);^M | |
- }^M | |
- }^M | |
- ^M | |
- @Override^M | |
- public BodyInfo getStatus(BodyInfo info,int index){^M | |
- if(bodies[index]==null){^M | |
- return null;^M | |
- }^M | |
- info.setFrozen(bodies[index].isFrozen());^M | |
- info.setDynamic(bodies[index].isDynamic());^M | |
- info.setStatic(bodies[index].isStatic());^M | |
- info.setSleeping(bodies[index].isSleeping());^M | |
- info.setBullet(bodies[index].isBullet());^M | |
- return info;^M | |
- }^M | |
- ^M | |
- @Override^M | |
- public BodyInfo getLinerVelocity(BodyInfo info,int index){^M | |
- if(bodies[index]==null){^M | |
- return null;^M | |
- }^M | |
- Vec2 v=bodies[index].getLinearVelocity();^M | |
- info.setLinerVelocity(v.x, v.y);^M | |
- return info;^M | |
- }^M | |
- ^M | |
-}^M | |
+//package com.akjava.android.box2d;^M | |
+//^M | |
+//import org.jbox2d.collision.AABB;^M | |
+//import org.jbox2d.collision.CircleDef;^M | |
+//import org.jbox2d.collision.PolygonDef;^M | |
+//import org.jbox2d.common.Vec2;^M | |
+//import org.jbox2d.dynamics.Body;^M | |
+//import org.jbox2d.dynamics.BodyDef;^M | |
+//import org.jbox2d.dynamics.World;^M | |
+//import org.jbox2d.dynamics.contacts.ContactEdge;^M | |
+//^M | |
+//public class JBox2dControler implements Box2dControler{^M | |
+//^M | |
+// ^M | |
+// ^M | |
+// World mWorld;^M | |
+//^M | |
+// ^M | |
+// private Body[] bodies=new Body[maxBodySize];^M | |
+// int bodyIndex;^M | |
+// @Override^M | |
+// public void createWorld(float minX, float minY, float maxX,^M | |
+// float maxY, float gravityX, float gravityY) {^M | |
+// Vec2 minV = new Vec2(minX,minY);^M | |
+// Vec2 maxV = new Vec2(maxX,maxY);//世界を小さくした^M | |
+// AABB aabb = new AABB(minV,maxV);^M | |
+// mWorld = new World(aabb, new Vec2(gravityX,gravityY),true);^M | |
+// }^M | |
+// ^M | |
+// ^M | |
+// @Override^M | |
+// public int createBox(float x, float y, float width,^M | |
+// float height) {^M | |
+// BodyDef groundBodyDef = new BodyDef();^M | |
+// groundBodyDef.position.set(x+width/2, y+height/2);^M | |
+// ^M | |
+// PolygonDef groundShapeDef = new PolygonDef();^M | |
+// groundShapeDef.restitution=0f;^M | |
+// ^M | |
+// groundShapeDef.setAsBox(width/2,height/2);^M | |
+// Body groundBody = mWorld.createBody(groundBodyDef);^M | |
+// groundBody.createShape(groundShapeDef);^M | |
+// bodies[bodyIndex]=groundBody;^M | |
+// ^M | |
+// return bodyIndex++;^M | |
+// }^M | |
+//^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public int createCircle(float x, float y, float radius, float weight,^M | |
+// float restitution) {^M | |
+// BodyDef ballBodyDef = new BodyDef();^M | |
+// ballBodyDef.position.set(x, y);^M | |
+// CircleDef ballShapeDef = new CircleDef();^M | |
+// ballShapeDef.radius = radius;^M | |
+// ^M | |
+// //ballShapeDef.friction=1; 不明^M | |
+// ballShapeDef.density = weight;^M | |
+// ballShapeDef.restitution = restitution;^M | |
+// Body body = mWorld.createBody(ballBodyDef);^M | |
+// body.createShape(ballShapeDef);^M | |
+// body.setMassFromShapes();^M | |
+// bodies[bodyIndex]=body;^M | |
+// return bodyIndex++;^M | |
+// }^M | |
+// ^M | |
+// public BodyInfo getBodyInfo(BodyInfo info,int index){^M | |
+// if(bodies[index]==null){^M | |
+// return null;^M | |
+// }^M | |
+// Vec2 tmpWpos = bodies[index].m_sweep.c; ^M | |
+// float angle=bodies[index].getAngle();^M | |
+// info.setValues(tmpWpos.x, tmpWpos.y, angle);^M | |
+// return info;^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void step(float stepTime, int velocityIterations,^M | |
+// int positionIterations) {^M | |
+// mWorld.step(stepTime, velocityIterations+positionIterations);^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void setGravity(float gravityX, float gravityY) {^M | |
+// mWorld.setGravity(new Vec2(gravityX,gravityY));^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void destroyBody(int id) {^M | |
+// mWorld.destroyBody(bodies[id]);^M | |
+// bodies[id]=null;^M | |
+// }^M | |
+//^M | |
+//^M | |
+// public void getCollisions(collisionIdKeeper keeper,int index){^M | |
+// ContactEdge c=bodies[index].m_contactList;^M | |
+// while(c!=null){^M | |
+// int id=findId(c.other);^M | |
+// if(id!=-1){^M | |
+// keeper.add(id);^M | |
+// }^M | |
+// c=c.next;^M | |
+// }^M | |
+// }^M | |
+//^M | |
+// ^M | |
+// public int findId(Body body){^M | |
+// int ret=-1;^M | |
+// for (int i = 0; i < bodies.length; i++) {^M | |
+// if(bodies[i]==body){^M | |
+// return i;^M | |
+// }^M | |
+// }^M | |
+// return ret;^M | |
+// }^M | |
+//^M | |
+//^M | |
+// ^M | |
+// @Override^M | |
+// public int createBox2(float x, float y, float width, float height,^M | |
+// float density, float restitution, float friction) {^M | |
+// BodyDef groundBodyDef = new BodyDef();^M | |
+// groundBodyDef.position.set(x+width/2, y+height/2);^M | |
+// ^M | |
+// PolygonDef groundShapeDef = new PolygonDef();^M | |
+// groundShapeDef.restitution=restitution;^M | |
+// groundShapeDef.friction=friction;^M | |
+// groundShapeDef.density=density;^M | |
+// ^M | |
+// ^M | |
+// ^M | |
+// groundShapeDef.setAsBox(width/2,height/2);^M | |
+// Body groundBody = mWorld.createBody(groundBodyDef);^M | |
+// ^M | |
+// groundBody.createShape(groundShapeDef);^M | |
+// ^M | |
+// groundBody.setMassFromShapes();^M | |
+// ^M | |
+// bodies[bodyIndex]=groundBody;^M | |
+// return bodyIndex++;^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void setBodyAngularVelocity(int id,float radiant) {^M | |
+// if(bodies[id]!=null){^M | |
+// bodies[id].setAngularVelocity(radiant);^M | |
+// }^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void setBodyLinearVelocity(int id,float x, float y) {^M | |
+// if(bodies[id]!=null){^M | |
+// bodies[id].setLinearVelocity(new Vec2(x,y));^M | |
+// }^M | |
+// }^M | |
+//^M | |
+//^M | |
+// @Override^M | |
+// public void setBodyXForm(int id, float x, float y, float radiant) {^M | |
+// if(bodies[id]!=null){^M | |
+// bodies[id].setXForm(new Vec2(x,y),radiant);^M | |
+// }^M | |
+// }^M | |
+// ^M | |
+// @Override^M | |
+// public BodyInfo getStatus(BodyInfo info,int index){^M | |
+// if(bodies[index]==null){^M | |
+// return null;^M | |
+// }^M | |
+// info.setFrozen(bodies[index].isFrozen());^M | |
+// info.setDynamic(bodies[index].isDynamic());^M | |
+// info.setStatic(bodies[index].isStatic());^M | |
+// info.setSleeping(bodies[index].isSleeping());^M | |
+// info.setBullet(bodies[index].isBullet());^M | |
+// return info;^M | |
+// }^M | |
+// ^M | |
+// @Override^M | |
+// public BodyInfo getLinerVelocity(BodyInfo info,int index){^M | |
+// if(bodies[index]==null){^M | |
+// return null;^M | |
+// }^M | |
+// Vec2 v=bodies[index].getLinearVelocity();^M | |
+// info.setLinerVelocity(v.x, v.y);^M | |
+// return info;^M | |
+// }^M | |
+// ^M | |
+//}^M | |
diff --git a/com/akjava/android/box2d/NDKBox2dControler.java b/com/akjava/android/box2d/NDKBox2dControler.java | |
index 48b0037..bf3816d 100755 | |
--- a/com/akjava/android/box2d/NDKBox2dControler.java | |
+++ b/com/akjava/android/box2d/NDKBox2dControler.java | |
@@ -8,53 +8,51 @@ public class NDKBox2dControler implements Box2dControler{ | |
^M | |
^M | |
^M | |
- @Override^M | |
public native void createWorld(float minX, float minY, float maxX,^M | |
float maxY, float gravityX, float gravityY);^M | |
^M | |
^M | |
- @Override^M | |
public native int createBox(float x, float y, float width,^M | |
float height) ;^M | |
^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native int createCircle(float x, float y, float radius, float weight,^M | |
float restitution) ;^M | |
^M | |
public native BodyInfo getBodyInfo(BodyInfo info,int index);^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void step(float stepTime, int velocityIterations,^M | |
int positionIterations) ;^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void setGravity(float gravityX, float gravityY) ;^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void destroyBody(int id) ;^M | |
^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void getCollisions(collisionIdKeeper keeper,int index);^M | |
^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native int createBox2(float x,float y,float width,float height,float density,float restitution,float friction);^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void setBodyXForm(int id,float x,float y,float radiant);^M | |
- @Override^M | |
+// @Override^M | |
public native void setBodyAngularVelocity(int id,float radiant);^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public native void setBodyLinearVelocity(int id,float x,float y);^M | |
^M | |
^M | |
diff --git a/com/akjava/android/box2dtest/AbstractBox2dTestRender.java b/com/akjava/android/box2dtest/AbstractBox2dTestRender.java | |
index 32d989a..6c8948e 100755 | |
--- a/com/akjava/android/box2dtest/AbstractBox2dTestRender.java | |
+++ b/com/akjava/android/box2dtest/AbstractBox2dTestRender.java | |
@@ -23,7 +23,7 @@ public abstract class AbstractBox2dTestRender extends AbstractRenderer{ | |
}^M | |
^M | |
^M | |
- @Override^M | |
+// @Override^M | |
public void onSurfaceChanged(GL10 gl, int width, int height) {^M | |
gl.glViewport(0, 0, width, height);^M | |
gl.glMatrixMode(GL10.GL_PROJECTION);^M | |
diff --git a/com/akjava/android/box2dtest/AndroidBox2dTest.java b/com/akjava/android/box2dtest/AndroidBox2dTest.java | |
index 6b5a5fc..56fb97a 100755 | |
--- a/com/akjava/android/box2dtest/AndroidBox2dTest.java | |
+++ b/com/akjava/android/box2dtest/AndroidBox2dTest.java | |
@@ -1,6 +1,6 @@ | |
package com.akjava.android.box2dtest; | |
-import com.akjava.android.box2dtest.jbox2d.BoundBallActivity; | |
+//import com.akjava.android.box2dtest.jbox2d.BoundBallActivity; | |
import android.app.ListActivity; | |
import android.content.Intent; | |
@@ -21,7 +21,7 @@ public class AndroidBox2dTest extends ListActivity { | |
getListView().setTextFilterEnabled(true); | |
} | |
private Class[] actives={ | |
- JBox2dActivity.class, | |
+// JBox2dActivity.class, | |
NDKBox2dActivity.class, | |
diff --git a/com/akjava/android/box2dtest/BlockBreakRenderer.java b/com/akjava/android/box2dtest/BlockBreakRenderer.java | |
index 6f8e9ea..38c0b03 100755 | |
--- a/com/akjava/android/box2dtest/BlockBreakRenderer.java | |
+++ b/com/akjava/android/box2dtest/BlockBreakRenderer.java | |
@@ -237,7 +237,7 @@ long beforeStep=before-current; | |
private ArrayList<AbstractParticle> blocks=new ArrayList<AbstractParticle>(); | |
*/ | |
- @Override | |
+// @Override | |
public void onSurfaceCreated(GL10 gl, EGLConfig config) { | |
gl.glAlphaFunc(GL10.GL_GEQUAL, 0.5f);//important,it remove edge and speed fast,but quality become low | |
diff --git a/com/akjava/android/box2dtest/BoundBallRenderer.java b/com/akjava/android/box2dtest/BoundBallRenderer.java | |
index 089d7bf..c6e9d0f 100755 | |
--- a/com/akjava/android/box2dtest/BoundBallRenderer.java | |
+++ b/com/akjava/android/box2dtest/BoundBallRenderer.java | |
@@ -8,11 +8,11 @@ package com.akjava.android.box2dtest; | |
import javax.microedition.khronos.egl.EGLConfig; | |
import javax.microedition.khronos.opengles.GL10; | |
-import org.jbox2d.collision.OBB; | |
-import org.jbox2d.collision.PolygonShape; | |
-import org.jbox2d.collision.Shape; | |
-import org.jbox2d.common.Vec2; | |
-import org.jbox2d.dynamics.Body; | |
+//import org.jbox2d.collision.OBB; | |
+//import org.jbox2d.collision.PolygonShape; | |
+//import org.jbox2d.collision.Shape; | |
+//import org.jbox2d.common.Vec2; | |
+//import org.jbox2d.dynamics.Body; | |
import android.content.Context; | |
import android.opengl.GLU; | |
@@ -90,7 +90,7 @@ public class BoundBallRenderer extends AbstractBox2dTestRender { | |
private static final int WORLD_SCALE = 10;//what? | |
BodyInfo info=new BodyInfo(); | |
- @Override | |
+// @Override | |
public void onDrawFrame(GL10 gl) { | |
current=System.currentTimeMillis(); | |
@@ -157,7 +157,7 @@ public class BoundBallRenderer extends AbstractBox2dTestRender { | |
int ballTextureId; | |
int blockTextureId; | |
- @Override | |
+// @Override | |
public void onSurfaceCreated(GL10 gl, EGLConfig config) { | |
gl.glAlphaFunc(GL10.GL_GEQUAL, 0.5f);//important,it remove edge and speed fast,but quality become low | |
diff --git a/com/akjava/android/box2dtest/BoundBoxRenderer.java b/com/akjava/android/box2dtest/BoundBoxRenderer.java | |
index 50944d8..3e19ae4 100755 | |
--- a/com/akjava/android/box2dtest/BoundBoxRenderer.java | |
+++ b/com/akjava/android/box2dtest/BoundBoxRenderer.java | |
@@ -76,7 +76,7 @@ public class BoundBoxRenderer extends AbstractBox2dTestRender { | |
BodyInfo info=new BodyInfo(); | |
boolean debug_showFps=true; | |
- @Override | |
+// @Override | |
public void onDrawFrame(GL10 gl) { | |
current=System.currentTimeMillis(); | |
@@ -183,7 +183,7 @@ long beforeStep=before-current; | |
int ballTextureId; | |
int blockTextureId; | |
- @Override | |
+// @Override | |
public void onSurfaceCreated(GL10 gl, EGLConfig config) { | |
gl.glAlphaFunc(GL10.GL_GEQUAL, 0.5f);//important,it remove edge and speed fast,but quality become low | |
diff --git a/com/akjava/android/box2dtest/JBox2dActivity.java b/com/akjava/android/box2dtest/JBox2dActivity.java | |
index 68b7064..4a1f502 100755 | |
--- a/com/akjava/android/box2dtest/JBox2dActivity.java | |
+++ b/com/akjava/android/box2dtest/JBox2dActivity.java | |
@@ -1,50 +1,50 @@ | |
-package com.akjava.android.box2dtest; | |
- | |
-import com.akjava.android.box2dtest.jbox2d.BlockBreakActivity; | |
-import com.akjava.android.box2dtest.jbox2d.BoundBallActivity; | |
-import com.akjava.android.box2dtest.jbox2d.BoundBoxActivity; | |
-import com.akjava.android.box2dtest.jbox2d.MoveBoxActivity; | |
- | |
-import android.app.ListActivity; | |
-import android.content.Intent; | |
-import android.os.Bundle; | |
-import android.view.View; | |
-import android.widget.ArrayAdapter; | |
-import android.widget.ListView; | |
- | |
-public class JBox2dActivity extends ListActivity { | |
- /** Called when the activity is first created. */ | |
- @Override | |
- public void onCreate(Bundle savedInstanceState) { | |
- super.onCreate(savedInstanceState); | |
- setTitle("JBox2D"); | |
- | |
- setListAdapter(new ArrayAdapter<String>(this, | |
- android.R.layout.simple_list_item_1, listTitles())); | |
- getListView().setTextFilterEnabled(true); | |
- } | |
- private Class[] actives={ | |
- BoundBallActivity.class, | |
- BoundBoxActivity.class, | |
- BlockBreakActivity.class, | |
- MoveBoxActivity.class, | |
- }; | |
- public String[] listTitles(){ | |
- String titles[]=new String[actives.length]; | |
- for (int i = 0; i < titles.length; i++) { | |
- String t=actives[i].getSimpleName(); | |
- t=t.substring(0,t.length()-"Activity".length()); | |
- titles[i]=t; | |
- } | |
- return titles; | |
- } | |
- | |
- @Override | |
- protected void onListItemClick(ListView l, View v, int position, long id) { | |
- super.onListItemClick(l, v, position, id); | |
- Intent i = null; | |
- i=new Intent(this,actives[position]); | |
- if(i!=null) | |
- startActivity(i); | |
- } | |
-} | |
\ No newline at end of file | |
+//package com.akjava.android.box2dtest; | |
+// | |
+//import com.akjava.android.box2dtest.jbox2d.BlockBreakActivity; | |
+//import com.akjava.android.box2dtest.jbox2d.BoundBallActivity; | |
+//import com.akjava.android.box2dtest.jbox2d.BoundBoxActivity; | |
+//import com.akjava.android.box2dtest.jbox2d.MoveBoxActivity; | |
+// | |
+//import android.app.ListActivity; | |
+//import android.content.Intent; | |
+//import android.os.Bundle; | |
+//import android.view.View; | |
+//import android.widget.ArrayAdapter; | |
+//import android.widget.ListView; | |
+// | |
+//public class JBox2dActivity extends ListActivity { | |
+// /** Called when the activity is first created. */ | |
+// @Override | |
+// public void onCreate(Bundle savedInstanceState) { | |
+// super.onCreate(savedInstanceState); | |
+// setTitle("JBox2D"); | |
+// | |
+// setListAdapter(new ArrayAdapter<String>(this, | |
+// android.R.layout.simple_list_item_1, listTitles())); | |
+// getListView().setTextFilterEnabled(true); | |
+// } | |
+// private Class[] actives={ | |
+// BoundBallActivity.class, | |
+// BoundBoxActivity.class, | |
+// BlockBreakActivity.class, | |
+// MoveBoxActivity.class, | |
+// }; | |
+// public String[] listTitles(){ | |
+// String titles[]=new String[actives.length]; | |
+// for (int i = 0; i < titles.length; i++) { | |
+// String t=actives[i].getSimpleName(); | |
+// t=t.substring(0,t.length()-"Activity".length()); | |
+// titles[i]=t; | |
+// } | |
+// return titles; | |
+// } | |
+// | |
+// @Override | |
+// protected void onListItemClick(ListView l, View v, int position, long id) { | |
+// super.onListItemClick(l, v, position, id); | |
+// Intent i = null; | |
+// i=new Intent(this,actives[position]); | |
+// if(i!=null) | |
+// startActivity(i); | |
+// } | |
+//} | |
\ No newline at end of file | |
diff --git a/com/akjava/android/box2dtest/MoveBoxRenderer.java b/com/akjava/android/box2dtest/MoveBoxRenderer.java | |
index 37856ed..e89f8d2 100755 | |
--- a/com/akjava/android/box2dtest/MoveBoxRenderer.java | |
+++ b/com/akjava/android/box2dtest/MoveBoxRenderer.java | |
@@ -77,7 +77,7 @@ public class MoveBoxRenderer extends AbstractBox2dTestRender { | |
BodyInfo info=new BodyInfo(); | |
boolean debug_showFps=true; | |
- @Override | |
+// @Override | |
public void onDrawFrame(GL10 gl) { | |
current=System.currentTimeMillis(); | |
@@ -187,7 +187,7 @@ long beforeStep=before-current; | |
int ballTextureId; | |
int blockTextureId; | |
- @Override | |
+// @Override | |
public void onSurfaceCreated(GL10 gl, EGLConfig config) { | |
gl.glAlphaFunc(GL10.GL_GEQUAL, 0.5f);//important,it remove edge and speed fast,but quality become low | |
diff --git a/com/akjava/android/box2dtest/jbox2d/BlockBreakActivity.java b/com/akjava/android/box2dtest/jbox2d/BlockBreakActivity.java | |
index 980daa3..768f3df 100755 | |
--- a/com/akjava/android/box2dtest/jbox2d/BlockBreakActivity.java | |
+++ b/com/akjava/android/box2dtest/jbox2d/BlockBreakActivity.java | |
@@ -1,70 +1,70 @@ | |
-/* | |
- * Copyright (C) 2008 [email protected] | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); | |
- * you may not use this file except in compliance with the License. | |
- * You may obtain a copy of the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, | |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
- * See the License for the specific language governing permissions and | |
- * limitations under the License. | |
- */ | |
- | |
-package com.akjava.android.box2dtest.jbox2d; | |
- | |
-import android.app.Activity; | |
-import android.os.Bundle; | |
- | |
-import com.akjava.android.box2d.Box2dControler; | |
-import com.akjava.android.box2d.JBox2dControler; | |
-import com.akjava.android.box2dtest.BlockBreakRenderer; | |
-import com.akjava.android.box2dtest.BoundBoxRenderer; | |
-import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
-import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
- | |
-/* | |
-* | |
-*センターでボールの追加 | |
-*上下左右で重力の変更 | |
- */ | |
-public class BlockBreakActivity extends Activity { | |
- | |
- /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
- * false for faster code. | |
- * | |
- */ | |
- | |
- @Override | |
- protected void onCreate(Bundle savedInstanceState) { | |
- super.onCreate(savedInstanceState); | |
- setTitle("jbox2d block break"); | |
- | |
- | |
- | |
- | |
- mGLView = new SimpleGameGLSurfaceView(this); | |
- Box2dControler controler=new JBox2dControler(); setContentView(mGLView); | |
- | |
- BlockBreakRenderer render= new BlockBreakRenderer(this,controler); | |
- mGLView.setAbstractRender(render); | |
- } | |
- | |
- @Override | |
- protected void onPause() { | |
- super.onPause(); | |
- mGLView.onPause(); | |
- } | |
- | |
- @Override | |
- protected void onResume() { | |
- super.onResume(); | |
- mGLView.onResume(); | |
- | |
- } | |
- | |
- private AbstractGLSurfaceView mGLView; | |
-} | |
+///* | |
+// * Copyright (C) 2008 [email protected] | |
+// * | |
+// * Licensed under the Apache License, Version 2.0 (the "License"); | |
+// * you may not use this file except in compliance with the License. | |
+// * You may obtain a copy of the License at | |
+// * | |
+// * http://www.apache.org/licenses/LICENSE-2.0 | |
+// * | |
+// * Unless required by applicable law or agreed to in writing, software | |
+// * distributed under the License is distributed on an "AS IS" BASIS, | |
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
+// * See the License for the specific language governing permissions and | |
+// * limitations under the License. | |
+// */ | |
+// | |
+//package com.akjava.android.box2dtest.jbox2d; | |
+// | |
+//import android.app.Activity; | |
+//import android.os.Bundle; | |
+// | |
+//import com.akjava.android.box2d.Box2dControler; | |
+//import com.akjava.android.box2d.JBox2dControler; | |
+//import com.akjava.android.box2dtest.BlockBreakRenderer; | |
+//import com.akjava.android.box2dtest.BoundBoxRenderer; | |
+//import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
+//import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
+// | |
+///* | |
+//* | |
+//*センターでボールの追加 | |
+//*上下左右で重力の変更 | |
+// */ | |
+//public class BlockBreakActivity extends Activity { | |
+// | |
+// /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
+// * false for faster code. | |
+// * | |
+// */ | |
+// | |
+// @Override | |
+// protected void onCreate(Bundle savedInstanceState) { | |
+// super.onCreate(savedInstanceState); | |
+// setTitle("jbox2d block break"); | |
+// | |
+// | |
+// | |
+// | |
+// mGLView = new SimpleGameGLSurfaceView(this); | |
+// Box2dControler controler=new JBox2dControler(); setContentView(mGLView); | |
+// | |
+// BlockBreakRenderer render= new BlockBreakRenderer(this,controler); | |
+// mGLView.setAbstractRender(render); | |
+// } | |
+// | |
+// @Override | |
+// protected void onPause() { | |
+// super.onPause(); | |
+// mGLView.onPause(); | |
+// } | |
+// | |
+// @Override | |
+// protected void onResume() { | |
+// super.onResume(); | |
+// mGLView.onResume(); | |
+// | |
+// } | |
+// | |
+// private AbstractGLSurfaceView mGLView; | |
+//} | |
diff --git a/com/akjava/android/box2dtest/jbox2d/BoundBallActivity.java b/com/akjava/android/box2dtest/jbox2d/BoundBallActivity.java | |
index 2de7eed..f92dd63 100755 | |
--- a/com/akjava/android/box2dtest/jbox2d/BoundBallActivity.java | |
+++ b/com/akjava/android/box2dtest/jbox2d/BoundBallActivity.java | |
@@ -1,65 +1,65 @@ | |
-/* | |
- * Copyright (C) 2008 [email protected] | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); | |
- * you may not use this file except in compliance with the License. | |
- * You may obtain a copy of the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, | |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
- * See the License for the specific language governing permissions and | |
- * limitations under the License. | |
- */ | |
- | |
-package com.akjava.android.box2dtest.jbox2d; | |
- | |
-import com.akjava.android.box2d.Box2dControler; | |
-import com.akjava.android.box2d.JBox2dControler; | |
-import com.akjava.android.box2dtest.AbstractBox2dTestRender; | |
-import com.akjava.android.box2dtest.BoundBallRenderer; | |
- | |
-import android.app.Activity; | |
-import android.opengl.GLSurfaceView; | |
-import android.os.Bundle; | |
- | |
-public class BoundBallActivity extends Activity { | |
- | |
- /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
- * false for faster code. | |
- * | |
- */ | |
- | |
- | |
- @Override | |
- protected void onCreate(Bundle savedInstanceState) { | |
- super.onCreate(savedInstanceState); | |
- setTitle("jbox2d bound ball"); | |
- | |
- glView = new GLSurfaceView(this); | |
- setContentView(glView); | |
- | |
- Box2dControler controler=new JBox2dControler(); | |
- AbstractBox2dTestRender render= new BoundBallRenderer(this,controler); | |
- glView.setRenderer(render); | |
- | |
- | |
- | |
- } | |
- | |
- @Override | |
- protected void onPause() { | |
- super.onPause(); | |
- glView.onPause(); | |
- } | |
- | |
- @Override | |
- protected void onResume() { | |
- super.onResume(); | |
- glView.onResume(); | |
- } | |
- | |
- private GLSurfaceView glView; | |
-} | |
+///* | |
+// * Copyright (C) 2008 [email protected] | |
+// * | |
+// * Licensed under the Apache License, Version 2.0 (the "License"); | |
+// * you may not use this file except in compliance with the License. | |
+// * You may obtain a copy of the License at | |
+// * | |
+// * http://www.apache.org/licenses/LICENSE-2.0 | |
+// * | |
+// * Unless required by applicable law or agreed to in writing, software | |
+// * distributed under the License is distributed on an "AS IS" BASIS, | |
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
+// * See the License for the specific language governing permissions and | |
+// * limitations under the License. | |
+// */ | |
+// | |
+//package com.akjava.android.box2dtest.jbox2d; | |
+// | |
+//import com.akjava.android.box2d.Box2dControler; | |
+//import com.akjava.android.box2d.JBox2dControler; | |
+//import com.akjava.android.box2dtest.AbstractBox2dTestRender; | |
+//import com.akjava.android.box2dtest.BoundBallRenderer; | |
+// | |
+//import android.app.Activity; | |
+//import android.opengl.GLSurfaceView; | |
+//import android.os.Bundle; | |
+// | |
+//public class BoundBallActivity extends Activity { | |
+// | |
+// /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
+// * false for faster code. | |
+// * | |
+// */ | |
+// | |
+// | |
+// @Override | |
+// protected void onCreate(Bundle savedInstanceState) { | |
+// super.onCreate(savedInstanceState); | |
+// setTitle("jbox2d bound ball"); | |
+// | |
+// glView = new GLSurfaceView(this); | |
+// setContentView(glView); | |
+// | |
+// Box2dControler controler=new JBox2dControler(); | |
+// AbstractBox2dTestRender render= new BoundBallRenderer(this,controler); | |
+// glView.setRenderer(render); | |
+// | |
+// | |
+// | |
+// } | |
+// | |
+// @Override | |
+// protected void onPause() { | |
+// super.onPause(); | |
+// glView.onPause(); | |
+// } | |
+// | |
+// @Override | |
+// protected void onResume() { | |
+// super.onResume(); | |
+// glView.onResume(); | |
+// } | |
+// | |
+// private GLSurfaceView glView; | |
+//} | |
diff --git a/com/akjava/android/box2dtest/jbox2d/BoundBoxActivity.java b/com/akjava/android/box2dtest/jbox2d/BoundBoxActivity.java | |
index 65f7449..64eec29 100755 | |
--- a/com/akjava/android/box2dtest/jbox2d/BoundBoxActivity.java | |
+++ b/com/akjava/android/box2dtest/jbox2d/BoundBoxActivity.java | |
@@ -1,66 +1,66 @@ | |
-/* | |
- * Copyright (C) 2008 [email protected] | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); | |
- * you may not use this file except in compliance with the License. | |
- * You may obtain a copy of the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, | |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
- * See the License for the specific language governing permissions and | |
- * limitations under the License. | |
- */ | |
- | |
-package com.akjava.android.box2dtest.jbox2d; | |
- | |
-import android.app.Activity; | |
-import android.os.Bundle; | |
- | |
-import com.akjava.android.box2d.Box2dControler; | |
-import com.akjava.android.box2d.JBox2dControler; | |
-import com.akjava.android.box2dtest.BoundBoxRenderer; | |
-import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
-import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
- | |
-/* | |
-* | |
-*センターでボールの追加 | |
-*上下左右で重力の変更 | |
- */ | |
-public class BoundBoxActivity extends Activity { | |
- | |
- /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
- * false for faster code. | |
- * | |
- */ | |
- | |
- @Override | |
- protected void onCreate(Bundle savedInstanceState) { | |
- super.onCreate(savedInstanceState); | |
- setTitle("jbox2d bound box(center key add ball)"); | |
- | |
- mGLView = new SimpleGameGLSurfaceView(this); | |
- Box2dControler controler=new JBox2dControler(); setContentView(mGLView); | |
- | |
- BoundBoxRenderer render= new BoundBoxRenderer(this,controler); | |
- mGLView.setAbstractRender(render); | |
- } | |
- | |
- @Override | |
- protected void onPause() { | |
- super.onPause(); | |
- mGLView.onPause(); | |
- } | |
- | |
- @Override | |
- protected void onResume() { | |
- super.onResume(); | |
- mGLView.onResume(); | |
- | |
- } | |
- | |
- private AbstractGLSurfaceView mGLView; | |
-} | |
+///* | |
+// * Copyright (C) 2008 [email protected] | |
+// * | |
+// * Licensed under the Apache License, Version 2.0 (the "License"); | |
+// * you may not use this file except in compliance with the License. | |
+// * You may obtain a copy of the License at | |
+// * | |
+// * http://www.apache.org/licenses/LICENSE-2.0 | |
+// * | |
+// * Unless required by applicable law or agreed to in writing, software | |
+// * distributed under the License is distributed on an "AS IS" BASIS, | |
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
+// * See the License for the specific language governing permissions and | |
+// * limitations under the License. | |
+// */ | |
+// | |
+//package com.akjava.android.box2dtest.jbox2d; | |
+// | |
+//import android.app.Activity; | |
+//import android.os.Bundle; | |
+// | |
+//import com.akjava.android.box2d.Box2dControler; | |
+//import com.akjava.android.box2d.JBox2dControler; | |
+//import com.akjava.android.box2dtest.BoundBoxRenderer; | |
+//import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
+//import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
+// | |
+///* | |
+//* | |
+//*センターでボールの追加 | |
+//*上下左右で重力の変更 | |
+// */ | |
+//public class BoundBoxActivity extends Activity { | |
+// | |
+// /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
+// * false for faster code. | |
+// * | |
+// */ | |
+// | |
+// @Override | |
+// protected void onCreate(Bundle savedInstanceState) { | |
+// super.onCreate(savedInstanceState); | |
+// setTitle("jbox2d bound box(center key add ball)"); | |
+// | |
+// mGLView = new SimpleGameGLSurfaceView(this); | |
+// Box2dControler controler=new JBox2dControler(); setContentView(mGLView); | |
+// | |
+// BoundBoxRenderer render= new BoundBoxRenderer(this,controler); | |
+// mGLView.setAbstractRender(render); | |
+// } | |
+// | |
+// @Override | |
+// protected void onPause() { | |
+// super.onPause(); | |
+// mGLView.onPause(); | |
+// } | |
+// | |
+// @Override | |
+// protected void onResume() { | |
+// super.onResume(); | |
+// mGLView.onResume(); | |
+// | |
+// } | |
+// | |
+// private AbstractGLSurfaceView mGLView; | |
+//} | |
diff --git a/com/akjava/android/box2dtest/jbox2d/MoveBoxActivity.java b/com/akjava/android/box2dtest/jbox2d/MoveBoxActivity.java | |
index 47bec48..fe58bdd 100755 | |
--- a/com/akjava/android/box2dtest/jbox2d/MoveBoxActivity.java | |
+++ b/com/akjava/android/box2dtest/jbox2d/MoveBoxActivity.java | |
@@ -1,64 +1,64 @@ | |
-/* | |
- * Copyright (C) 2008 [email protected] | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); | |
- * you may not use this file except in compliance with the License. | |
- * You may obtain a copy of the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, | |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
- * See the License for the specific language governing permissions and | |
- * limitations under the License. | |
- */ | |
- | |
-package com.akjava.android.box2dtest.jbox2d; | |
- | |
-import android.app.Activity; | |
-import android.os.Bundle; | |
- | |
-import com.akjava.android.box2d.Box2dControler; | |
-import com.akjava.android.box2d.JBox2dControler; | |
-import com.akjava.android.box2dtest.BoundBoxRenderer; | |
-import com.akjava.android.box2dtest.MoveBoxRenderer; | |
-import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
-import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
- | |
- | |
-public class MoveBoxActivity extends Activity { | |
- | |
- /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
- * false for faster code. | |
- * | |
- */ | |
- | |
- @Override | |
- protected void onCreate(Bundle savedInstanceState) { | |
- super.onCreate(savedInstanceState); | |
- setTitle("jbox2d move box(use d-pad)"); | |
- | |
- mGLView = new SimpleGameGLSurfaceView(this); | |
- Box2dControler controler=new JBox2dControler(); | |
- setContentView(mGLView); | |
- | |
- MoveBoxRenderer render= new MoveBoxRenderer(this,controler); | |
- mGLView.setAbstractRender(render); | |
- } | |
- | |
- @Override | |
- protected void onPause() { | |
- super.onPause(); | |
- mGLView.onPause(); | |
- } | |
- | |
- @Override | |
- protected void onResume() { | |
- super.onResume(); | |
- mGLView.onResume(); | |
- | |
- } | |
- | |
- private AbstractGLSurfaceView mGLView; | |
-} | |
+///* | |
+// * Copyright (C) 2008 [email protected] | |
+// * | |
+// * Licensed under the Apache License, Version 2.0 (the "License"); | |
+// * you may not use this file except in compliance with the License. | |
+// * You may obtain a copy of the License at | |
+// * | |
+// * http://www.apache.org/licenses/LICENSE-2.0 | |
+// * | |
+// * Unless required by applicable law or agreed to in writing, software | |
+// * distributed under the License is distributed on an "AS IS" BASIS, | |
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
+// * See the License for the specific language governing permissions and | |
+// * limitations under the License. | |
+// */ | |
+// | |
+//package com.akjava.android.box2dtest.jbox2d; | |
+// | |
+//import android.app.Activity; | |
+//import android.os.Bundle; | |
+// | |
+//import com.akjava.android.box2d.Box2dControler; | |
+//import com.akjava.android.box2d.JBox2dControler; | |
+//import com.akjava.android.box2dtest.BoundBoxRenderer; | |
+//import com.akjava.android.box2dtest.MoveBoxRenderer; | |
+//import com.akjava.lib.android.opengl.AbstractGLSurfaceView; | |
+//import com.akjava.lib.android.opengl.SimpleGameGLSurfaceView; | |
+// | |
+// | |
+//public class MoveBoxActivity extends Activity { | |
+// | |
+// /** Set to true to enable checking of the OpenGL error code after every OpenGL call. Set to | |
+// * false for faster code. | |
+// * | |
+// */ | |
+// | |
+// @Override | |
+// protected void onCreate(Bundle savedInstanceState) { | |
+// super.onCreate(savedInstanceState); | |
+// setTitle("jbox2d move box(use d-pad)"); | |
+// | |
+// mGLView = new SimpleGameGLSurfaceView(this); | |
+// Box2dControler controler=new JBox2dControler(); | |
+// setContentView(mGLView); | |
+// | |
+// MoveBoxRenderer render= new MoveBoxRenderer(this,controler); | |
+// mGLView.setAbstractRender(render); | |
+// } | |
+// | |
+// @Override | |
+// protected void onPause() { | |
+// super.onPause(); | |
+// mGLView.onPause(); | |
+// } | |
+// | |
+// @Override | |
+// protected void onResume() { | |
+// super.onResume(); | |
+// mGLView.onResume(); | |
+// | |
+// } | |
+// | |
+// private AbstractGLSurfaceView mGLView; | |
+//} | |
diff --git a/com/akjava/android/box2dtest/ndkbox2d/BoundBallActivity.java b/com/akjava/android/box2dtest/ndkbox2d/BoundBallActivity.java | |
index eb6f6a2..d471335 100755 | |
--- a/com/akjava/android/box2dtest/ndkbox2d/BoundBallActivity.java | |
+++ b/com/akjava/android/box2dtest/ndkbox2d/BoundBallActivity.java | |
@@ -21,7 +21,7 @@ import android.opengl.GLSurfaceView; | |
import android.os.Bundle; | |
import com.akjava.android.box2d.Box2dControler; | |
-import com.akjava.android.box2d.JBox2dControler; | |
+//import com.akjava.android.box2d.JBox2dControler; | |
import com.akjava.android.box2d.NDKBox2dControler; | |
import com.akjava.android.box2dtest.AbstractBox2dTestRender; | |
import com.akjava.android.box2dtest.BoundBallRenderer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment