Skip to content

Commit

Permalink
Now building with SDK r15. Many changes to Examples. Probably not com…
Browse files Browse the repository at this point in the history
…piling due to recent GLES2 changes.
  • Loading branch information
Nicolas Gramlich committed Nov 2, 2011
1 parent bbb5bdc commit 84205be
Show file tree
Hide file tree
Showing 83 changed files with 512 additions and 296 deletions.
7 changes: 4 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="AndEngineAugmentedRealityExtension_src"/>
<classpathentry kind="src" path="AndEngine_src"/>
<classpathentry kind="src" path="AndEngineMODPlayerExtension_src"/>
<classpathentry kind="src" path="AndEngineMultiTouchExtension_src"/>
<classpathentry kind="src" path="AndEngineMultiplayerExtension_src"/>
<classpathentry kind="src" path="AndEngineSVGTextureRegionExtension_src"/>
<classpathentry kind="src" path="AndEnginePhysicsBox2DExtension_src"/>
<classpathentry kind="src" path="AndEngineTexturePackerExtension_src"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="src" path="AndEngine_src"/>
<classpathentry kind="src" path="AndEngineMultiplayerExtension_src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
8 changes: 5 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
android:versionCode="46"
android:versionName="1.4.6">

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7" />
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7"/>

<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
Expand Down
Binary file modified assets/gfx/spritesheets/texturepackerexample.pvr.ccz
Binary file not shown.
9 changes: 3 additions & 6 deletions assets/gfx/spritesheets/texturepackerexample.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<texture version="1" file="texturepackerexample.pvr.ccz" type="pvrccz" width="256" height="32" pixelformat="RGBA_4444" minfilter="linear" magfilter="linear" wrapt="clamp" wraps="clamp" premultiplyalpha="false">
<texture version="1" file="texturepackerexample.pvr.ccz" type="pvrccz" width="5" height="4" pixelformat="RGBA_4444" minfilter="nearest" magfilter="nearest" wrapt="clamp" wraps="clamp" premultiplyalpha="false">
<!-- Created with TexturePacker -->
<!-- http://texturepacker.com -->
<!-- $TexturePacker:SmartUpdate:eceec128cf21e7c843fb9a8a1b6fea72$ -->
<textureregion id="0" src="face_box.png" x="195" y="0" width="32" height="32" rotated="false" trimmed="false" srcx="0" srcy="0" srcwidth="32" srcheight="32"/>
<textureregion id="1" src="face_circle_tiled.png" x="130" y="0" width="64" height="32" rotated="false" trimmed="false" srcx="0" srcy="0" srcwidth="64" srcheight="32"/>
<textureregion id="2" src="face_hexagon_tiled.png" x="65" y="0" width="64" height="32" rotated="false" trimmed="false" srcx="0" srcy="0" srcwidth="64" srcheight="32"/>
<textureregion id="3" src="face_triangle_tiled.png" x="0" y="0" width="64" height="32" rotated="false" trimmed="false" srcx="0" srcy="0" srcwidth="64" srcheight="32"/>
<!-- $TexturePacker:SmartUpdate:37c8312a489d2ae89b3a28526148ebdb$ -->
<textureregion id="0" src="test.png" x="0" y="0" width="5" height="4" rotated="false" trimmed="false" srcx="0" srcy="0" srcwidth="5" srcheight="4"/>
</texture>
85 changes: 85 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="AndEngineExamples" default="help">

<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<loadproperties srcFile="local.properties" />

<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />

<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />

<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>


<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<!--
<target name="-pre-build">
</target>
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir} */
<target name="-post-compile">
</target>
-->

<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />

</project>
10 changes: 10 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked in Version Control Systems,
# as it contains information specific to your local configuration.

# location of the SDK. This is only used by Ant
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Users/ngramlich/SDKs/Android
40 changes: 40 additions & 0 deletions proguard.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
18 changes: 9 additions & 9 deletions default.properties → project.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
#
# This file must be checked in Version Control Systems.
#
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# "ant.properties", and override values to adapt the script to your
# project structure.

# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-8
android.library.reference.3=../AndEngineMODPlayerExtension
android.library.reference.4=../AndEngineMultiTouchExtension
android.library.reference.1=../AndEngine
android.library.reference.2=../AndEngineAugmentedRealityExtension
android.library.reference.6=../AndEngineSVGTextureRegionExtension
android.library.reference.5=../AndEngineMultiplayerExtension
android.library.reference.8=../AndEngineTexturePackerExtension
android.library.reference.7=../AndEnginePhysicsBox2DExtension
# Project target.
target=android-13
android.library.reference.6=../AndEnginePhysicsBox2DExtension
android.library.reference.5=../AndEngineSVGTextureRegionExtension
android.library.reference.8=../AndEngineMultiplayerExtension
android.library.reference.7=../AndEngineTexturePackerExtension
1 change: 1 addition & 0 deletions scripts/build_spritesheets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ do
--no-trim \
--max-width 1024 \
--max-height 1024 \
--allow-free-size \
--andengine-wraps clamp \
--andengine-wrapt clamp \
--andengine-minfilter linear \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
import org.anddev.andengine.entity.modifier.ScaleModifier;
import org.anddev.andengine.entity.modifier.SequenceEntityModifier;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.entity.scene.background.Background;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -81,15 +82,15 @@ public void onLoadResources() {
this.mOnScreenControlBaseTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mOnScreenControlTexture, this, "onscreen_control_base.png", 0, 0);
this.mOnScreenControlKnobTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mOnScreenControlTexture, this, "onscreen_control_knob.png", 128, 0);

this.mEngine.getTextureManager().loadTextures(this.mBitmapTextureAtlas, this.mOnScreenControlTexture);
TextureManager.loadTextures(this.mBitmapTextureAtlas, this.mOnScreenControlTexture);
}

@Override
public Scene onLoadScene() {
this.mEngine.registerUpdateHandler(new FPSLogger());

final Scene scene = new Scene();
scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
scene.setBackground(new Background(0.09804f, 0.6274f, 0.8784f));

final int centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
final int centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation;
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.entity.scene.background.Background;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.extension.input.touch.controller.MultiTouch;
import org.anddev.andengine.extension.input.touch.controller.MultiTouchController;
import org.anddev.andengine.extension.input.touch.exception.MultiTouchException;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -102,15 +103,15 @@ public void onLoadResources() {
this.mOnScreenControlBaseTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mOnScreenControlTexture, this, "onscreen_control_base.png", 0, 0);
this.mOnScreenControlKnobTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mOnScreenControlTexture, this, "onscreen_control_knob.png", 128, 0);

this.mEngine.getTextureManager().loadTextures(this.mBitmapTextureAtlas, this.mOnScreenControlTexture);
TextureManager.loadTextures(this.mBitmapTextureAtlas, this.mOnScreenControlTexture);
}

@Override
public Scene onLoadScene() {
this.mEngine.registerUpdateHandler(new FPSLogger());

final Scene scene = new Scene();
scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
scene.setBackground(new Background(0.09804f, 0.6274f, 0.8784f));

final int centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
final int centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
Expand Down
7 changes: 4 additions & 3 deletions src/org/anddev/andengine/examples/AnimatedSpritesExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation;
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.entity.scene.background.Background;
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -70,15 +71,15 @@ public void onLoadResources() {
this.mBananaTextureRegion = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(this.mBitmapTextureAtlas, this, "banana_tiled.png", 0, 180, 4, 2);
this.mFaceTextureRegion = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(this.mBitmapTextureAtlas, this, "face_box_tiled.png", 132, 180, 2, 1);

this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas);
TextureManager.loadTexture(this.mBitmapTextureAtlas);
}

@Override
public Scene onLoadScene() {
this.mEngine.registerUpdateHandler(new FPSLogger());

final Scene scene = new Scene();
scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
scene.setBackground(new Background(0.09804f, 0.6274f, 0.8784f));

/* Quickly twinkling face. */
final AnimatedSprite face = new AnimatedSprite(100, 50, this.mFaceTextureRegion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.modifier.MoveModifier;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.entity.scene.background.Background;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.extension.augmentedreality.BaseAugmentedRealityGameActivity;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -66,7 +67,7 @@ public void onLoadResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.mFaceTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mBitmapTextureAtlas, this, "face_box.png", 0, 0);

this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas);
TextureManager.loadTexture(this.mBitmapTextureAtlas);
}

@Override
Expand All @@ -75,7 +76,7 @@ public Scene onLoadScene() {

final Scene scene = new Scene();
// scene.setBackgroundEnabled(false);
scene.setBackground(new ColorBackground(0.0f, 0.0f, 0.0f, 0.0f));
scene.setBackground(new Background(0.0f, 0.0f, 0.0f, 0.0f));

final int centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
final int centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation;
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.entity.scene.background.Background;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.extension.augmentedreality.BaseAugmentedRealityGameActivity;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -69,15 +70,15 @@ public void onLoadResources() {
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/");
this.mFaceTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mBitmapTextureAtlas, this, "face_box.png", 0, 0);

this.mEngine.getTextureManager().loadTexture(this.mBitmapTextureAtlas);
TextureManager.loadTexture(this.mBitmapTextureAtlas);
}

@Override
public Scene onLoadScene() {
this.mEngine.registerUpdateHandler(new FPSLogger());
final Scene scene = new Scene();
// scene.setBackgroundEnabled(false);
scene.setBackground(new ColorBackground(0.0f, 0.0f, 0.0f, 0.0f));
scene.setBackground(new Background(0.0f, 0.0f, 0.0f, 0.0f));

final int centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
final int centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.entity.util.FPSLogger;
import org.anddev.andengine.opengl.texture.TextureManager;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
Expand Down Expand Up @@ -79,7 +80,7 @@ public void onLoadResources() {
this.mParallaxLayerBack = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mAutoParallaxBackgroundTexture, this, "parallax_background_layer_back.png", 0, 188);
this.mParallaxLayerMid = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mAutoParallaxBackgroundTexture, this, "parallax_background_layer_mid.png", 0, 669);

this.mEngine.getTextureManager().loadTextures(this.mBitmapTextureAtlas, this.mAutoParallaxBackgroundTexture);
TextureManager.loadTextures(this.mBitmapTextureAtlas, this.mAutoParallaxBackgroundTexture);
}

@Override
Expand Down
Loading

0 comments on commit 84205be

Please sign in to comment.