rotate tiles on center
This commit is contained in:
parent
03c1d29ea0
commit
76423f3729
@ -119,10 +119,10 @@ public class MyRenderer implements GLSurfaceView.Renderer
|
||||
public void onSurfaceCreated(GL10 unused, EGLConfig config)
|
||||
{
|
||||
final float attribs[] = {
|
||||
1, 1, 0.8f, 0.8f, 1,
|
||||
0, 1, 0, 0, 1,
|
||||
0, 0, 0.8f, 0.8f, 1,
|
||||
1, 0, 0, 0, 1
|
||||
0.5f, 0.5f, 0.8f, 0.8f, 1,
|
||||
-0.5f, 0.5f, 0, 0, 1,
|
||||
-0.5f, -0.5f, 0.8f, 0.8f, 1,
|
||||
0.5f, -0.5f, 0, 0, 1
|
||||
};
|
||||
checkGLError("onSurfaceCreated");
|
||||
ByteBuffer bb = ByteBuffer.allocateDirect(attribs.length * 4);
|
||||
@ -221,7 +221,8 @@ public class MyRenderer implements GLSurfaceView.Renderer
|
||||
Tile t = m_tiles[x][y];
|
||||
Matrix.setIdentityM(m_modelview, 0);
|
||||
Matrix.translateM(m_modelview, 0,
|
||||
x - GRID_WIDTH / 2.0f, y - GRID_HEIGHT / 2.0f,
|
||||
x + 0.5f - GRID_WIDTH / 2.0f,
|
||||
y + 0.5f - GRID_HEIGHT / 2.0f,
|
||||
-DISTANCE);
|
||||
if (t.flipping)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user