예제 #1
0
  private Bitmap makeProperBitmap(final Bitmap aBitmap, final int aWidth, final int aHeight) {
    final Bitmap bitmap = Bitmap.createBitmap(aWidth, aHeight, Bitmap.Config.ARGB_8888);
    myTextureCloneCanvas.setBitmap(bitmap);
    myTextureCloneCanvas.drawBitmap(aBitmap, 0, 0, myTextureClonePaint);

    // #if DEBUG
    Log.debug("created proper texture bitmap");
    Log.debug("bitmap size: {}x{}", aBitmap.getWidth(), aBitmap.getHeight());
    Log.debug("proper size: {}x{}", aWidth, aHeight);
    // #endif

    return bitmap;
  }
예제 #2
0
  public final void startGame() throws Exception {
    // #if DEBUG
    Log.debug("startGame");
    // #endif

    state = STATE_SHOW_LEVEL_INFO;

    for (int idx = 0; idx < myGameObjects.size; idx++) {
      final GameObject gameObject = (GameObject) myGameObjects.objects[idx];
      gameObject.onStartGame();
    }
  }