├── .classpath ├── .gitignore ├── .project ├── AUTHORS.md ├── AndroidManifest.xml ├── LICENSE.md ├── README.md ├── build.xml ├── ext ├── img │ ├── android.svg │ ├── badge.png │ ├── badge.svg │ ├── clapboard.png │ ├── clapboard.svg │ ├── favicon.png │ ├── favicon.svg │ ├── icon.svg │ ├── logo.png │ ├── logo.svg │ ├── logo_icon.svg │ ├── source.png │ ├── source.svg │ ├── splash.png │ └── splash.svg └── scripts │ └── build_texturepacks.sh ├── jni ├── Android.mk ├── Application.mk ├── build.sh └── src │ ├── BufferUtils.cpp │ ├── BufferUtils.h │ └── GLES20Fix.c ├── libs ├── armeabi-v7a │ └── libandengine.so ├── armeabi │ └── libandengine.so └── x86 │ └── libandengine.so ├── proguard.cfg ├── project.properties ├── res └── .gitignore └── src └── org └── andengine ├── AndEngine.java ├── audio ├── BaseAudioEntity.java ├── BaseAudioManager.java ├── IAudioEntity.java ├── IAudioManager.java ├── exception │ └── AudioException.java ├── music │ ├── Music.java │ ├── MusicFactory.java │ ├── MusicLibrary.java │ ├── MusicManager.java │ └── exception │ │ ├── MusicException.java │ │ └── MusicReleasedException.java └── sound │ ├── Sound.java │ ├── SoundFactory.java │ ├── SoundLibrary.java │ ├── SoundManager.java │ └── exception │ ├── SoundException.java │ └── SoundReleasedException.java ├── engine ├── Engine.java ├── FixedStepEngine.java ├── LimitedFPSEngine.java ├── camera │ ├── BoundCamera.java │ ├── Camera.java │ ├── CameraFactory.java │ ├── SmoothCamera.java │ ├── ZoomCamera.java │ └── hud │ │ ├── HUD.java │ │ └── controls │ │ ├── AnalogOnScreenControl.java │ │ ├── BaseOnScreenControl.java │ │ └── DigitalOnScreenControl.java ├── handler │ ├── BaseEntityUpdateHandler.java │ ├── DrawHandlerList.java │ ├── IDrawHandler.java │ ├── IUpdateHandler.java │ ├── UpdateHandlerList.java │ ├── collision │ │ ├── CollisionHandler.java │ │ └── ICollisionCallback.java │ ├── physics │ │ └── PhysicsHandler.java │ ├── runnable │ │ └── RunnableHandler.java │ └── timer │ │ ├── ITimerCallback.java │ │ └── TimerHandler.java ├── options │ ├── AudioOptions.java │ ├── EngineOptions.java │ ├── MusicOptions.java │ ├── RenderOptions.java │ ├── ScreenOrientation.java │ ├── SoundOptions.java │ ├── TouchOptions.java │ ├── WakeLockOptions.java │ └── resolutionpolicy │ │ ├── BaseResolutionPolicy.java │ │ ├── FillResolutionPolicy.java │ │ ├── FixedResolutionPolicy.java │ │ ├── IResolutionPolicy.java │ │ ├── RatioResolutionPolicy.java │ │ └── RelativeResolutionPolicy.java └── splitscreen │ ├── DoubleSceneSplitScreenEngine.java │ └── SingleSceneSplitScreenEngine.java ├── entity ├── Entity.java ├── IEntity.java ├── IEntityComparator.java ├── IEntityFactory.java ├── IEntityMatcher.java ├── IEntityParameterCallable.java ├── TagEntityMatcher.java ├── ZIndexSorter.java ├── modifier │ ├── AlphaModifier.java │ ├── CardinalSplineMoveModifier.java │ ├── CatmullRomSplineMoveModifier.java │ ├── ColorModifier.java │ ├── CubicBezierCurveMoveModifier.java │ ├── DelayModifier.java │ ├── DoubleValueChangeEntityModifier.java │ ├── DoubleValueSpanEntityModifier.java │ ├── DurationEntityModifier.java │ ├── EntityModifier.java │ ├── EntityModifierList.java │ ├── FadeInModifier.java │ ├── FadeOutModifier.java │ ├── IEntityModifier.java │ ├── JumpModifier.java │ ├── LoopEntityModifier.java │ ├── MoveByModifier.java │ ├── MoveModifier.java │ ├── MoveXModifier.java │ ├── MoveYModifier.java │ ├── ParallelEntityModifier.java │ ├── PathModifier.java │ ├── QuadraticBezierCurveMoveModifier.java │ ├── RotationAtModifier.java │ ├── RotationByModifier.java │ ├── RotationModifier.java │ ├── ScaleAtModifier.java │ ├── ScaleModifier.java │ ├── SequenceEntityModifier.java │ ├── SingleValueChangeEntityModifier.java │ ├── SingleValueSpanEntityModifier.java │ ├── SkewModifier.java │ ├── SkewXModifier.java │ ├── SkewYModifier.java │ └── TripleValueSpanEntityModifier.java ├── particle │ ├── BatchedPseudoSpriteParticleSystem.java │ ├── BatchedSpriteParticleSystem.java │ ├── BlendFunctionParticleSystem.java │ ├── Particle.java │ ├── ParticleSystem.java │ ├── SpriteParticleSystem.java │ ├── emitter │ │ ├── BaseCircleParticleEmitter.java │ │ ├── BaseParticleEmitter.java │ │ ├── BaseRectangleParticleEmitter.java │ │ ├── CircleOutlineParticleEmitter.java │ │ ├── CircleParticleEmitter.java │ │ ├── IParticleEmitter.java │ │ ├── PointParticleEmitter.java │ │ ├── RectangleOutlineParticleEmitter.java │ │ └── RectangleParticleEmitter.java │ ├── initializer │ │ ├── AccelerationParticleInitializer.java │ │ ├── AlphaParticleInitializer.java │ │ ├── BaseDoubleValueParticleInitializer.java │ │ ├── BaseSingleValueParticleInitializer.java │ │ ├── BaseTripleValueParticleInitializer.java │ │ ├── BlendFunctionParticleInitializer.java │ │ ├── ColorParticleInitializer.java │ │ ├── GravityParticleInitializer.java │ │ ├── IParticleInitializer.java │ │ ├── RotationParticleInitializer.java │ │ ├── ScaleParticleInitializer.java │ │ └── VelocityParticleInitializer.java │ └── modifier │ │ ├── AlphaParticleModifier.java │ │ ├── BaseDoubleValueSpanParticleModifier.java │ │ ├── BaseSingleValueSpanParticleModifier.java │ │ ├── BaseTripleValueSpanParticleModifier.java │ │ ├── ColorParticleModifier.java │ │ ├── ExpireParticleInitializer.java │ │ ├── IParticleModifier.java │ │ ├── OffCameraExpireParticleModifier.java │ │ ├── RotationParticleModifier.java │ │ └── ScaleParticleModifier.java ├── primitive │ ├── DrawMode.java │ ├── Line.java │ ├── Mesh.java │ ├── Rectangle.java │ └── vbo │ │ ├── HighPerformanceLineVertexBufferObject.java │ │ ├── HighPerformanceMeshVertexBufferObject.java │ │ ├── HighPerformanceRectangleVertexBufferObject.java │ │ ├── ILineVertexBufferObject.java │ │ ├── IMeshVertexBufferObject.java │ │ ├── IRectangleVertexBufferObject.java │ │ ├── LowMemoryLineVertexBufferObject.java │ │ └── LowMemoryRectangleVertexBufferObject.java ├── scene │ ├── CameraScene.java │ ├── IOnAreaTouchListener.java │ ├── IOnSceneTouchListener.java │ ├── ITouchArea.java │ ├── Scene.java │ ├── background │ │ ├── AutoParallaxBackground.java │ │ ├── Background.java │ │ ├── EntityBackground.java │ │ ├── IBackground.java │ │ ├── ParallaxBackground.java │ │ ├── RepeatingSpriteBackground.java │ │ ├── SpriteBackground.java │ │ └── modifier │ │ │ ├── ColorBackgroundModifier.java │ │ │ ├── IBackgroundModifier.java │ │ │ ├── LoopBackgroundModifier.java │ │ │ ├── ParallelBackgroundModifier.java │ │ │ └── SequenceBackgroundModifier.java │ └── menu │ │ ├── MenuScene.java │ │ ├── animator │ │ ├── AlphaMenuAnimator.java │ │ ├── BaseMenuAnimator.java │ │ ├── DirectMenuAnimator.java │ │ ├── IMenuAnimator.java │ │ └── SlideMenuAnimator.java │ │ └── item │ │ ├── AnimatedSpriteMenuItem.java │ │ ├── IMenuItem.java │ │ ├── SpriteMenuItem.java │ │ ├── TextMenuItem.java │ │ └── decorator │ │ ├── BaseMenuItemDecorator.java │ │ ├── ColorMenuItemDecorator.java │ │ └── ScaleMenuItemDecorator.java ├── shape │ ├── IAreaShape.java │ ├── IShape.java │ ├── RectangularShape.java │ └── Shape.java ├── sprite │ ├── AnimatedSprite.java │ ├── AnimationData.java │ ├── ButtonSprite.java │ ├── DiamondSprite.java │ ├── IAnimationData.java │ ├── Sprite.java │ ├── TiledSprite.java │ ├── UncoloredSprite.java │ ├── UniformColorSprite.java │ ├── batch │ │ ├── DynamicSpriteBatch.java │ │ ├── SpriteBatch.java │ │ ├── SpriteGroup.java │ │ └── vbo │ │ │ ├── HighPerformanceSpriteBatchVertexBufferObject.java │ │ │ ├── ISpriteBatchVertexBufferObject.java │ │ │ └── LowMemorySpriteBatchVertexBufferObject.java │ └── vbo │ │ ├── HighPerformanceDiamondSpriteVertexBufferObject.java │ │ ├── HighPerformanceSpriteVertexBufferObject.java │ │ ├── HighPerformanceTiledSpriteVertexBufferObject.java │ │ ├── HighPerformanceUncoloredSpriteVertexBufferObject.java │ │ ├── HighPerformanceUniformColorSpriteVertexBufferObject.java │ │ ├── IDiamondSpriteVertexBufferObject.java │ │ ├── ISpriteVertexBufferObject.java │ │ ├── ITiledSpriteVertexBufferObject.java │ │ ├── IUncoloredSpriteVertexBufferObject.java │ │ ├── IUniformColorSpriteVertexBufferObject.java │ │ ├── LowMemoryDiamondSpriteVertexBufferObject.java │ │ ├── LowMemorySpriteVertexBufferObject.java │ │ ├── LowMemoryTiledSpriteVertexBufferObject.java │ │ ├── LowMemoryUncoloredSpriteVertexBufferObject.java │ │ └── LowMemoryUniformColorSpriteVertexBufferObject.java ├── text │ ├── AutoWrap.java │ ├── Text.java │ ├── TextOptions.java │ ├── TickerText.java │ ├── exception │ │ ├── OutOfCharactersException.java │ │ └── TextException.java │ └── vbo │ │ ├── HighPerformanceTextVertexBufferObject.java │ │ ├── ITextVertexBufferObject.java │ │ └── LowMemoryTextVertexBufferObject.java └── util │ ├── AverageFPSCounter.java │ ├── FPSCounter.java │ ├── FPSLogger.java │ ├── FrameCountCrasher.java │ ├── FrameCounter.java │ ├── ScreenCapture.java │ └── ScreenGrabber.java ├── input ├── sensor │ ├── BaseSensorData.java │ ├── SensorDelay.java │ ├── acceleration │ │ ├── AccelerationData.java │ │ ├── AccelerationSensorOptions.java │ │ └── IAccelerationListener.java │ ├── location │ │ ├── ILocationListener.java │ │ ├── LocationProviderStatus.java │ │ └── LocationSensorOptions.java │ └── orientation │ │ ├── IOrientationListener.java │ │ ├── OrientationData.java │ │ └── OrientationSensorOptions.java └── touch │ ├── TouchEvent.java │ ├── controller │ ├── BaseTouchController.java │ ├── ITouchController.java │ ├── ITouchEventCallback.java │ ├── MultiTouch.java │ ├── MultiTouchController.java │ └── SingleTouchController.java │ └── detector │ ├── BaseDetector.java │ ├── ClickDetector.java │ ├── ContinuousHoldDetector.java │ ├── HoldDetector.java │ ├── PinchZoomDetector.java │ ├── ScrollDetector.java │ ├── SurfaceGestureDetector.java │ ├── SurfaceGestureDetectorAdapter.java │ └── SurfaceScrollDetector.java ├── opengl ├── GLES20Fix.java ├── exception │ ├── GLException.java │ ├── GLFrameBufferException.java │ └── RenderTextureInitializationException.java ├── font │ ├── BitmapFont.java │ ├── Font.java │ ├── FontFactory.java │ ├── FontLibrary.java │ ├── FontManager.java │ ├── FontUtils.java │ ├── IFont.java │ ├── Letter.java │ ├── StrokeFont.java │ └── exception │ │ ├── FontException.java │ │ └── LetterNotFoundException.java ├── shader │ ├── PositionColorShaderProgram.java │ ├── PositionColorTextureCoordinatesShaderProgram.java │ ├── PositionTextureCoordinatesPositionInterpolationTextureSelectShaderProgram.java │ ├── PositionTextureCoordinatesShaderProgram.java │ ├── PositionTextureCoordinatesTextureSelectShaderProgram.java │ ├── PositionTextureCoordinatesUniformColorShaderProgram.java │ ├── ShaderProgram.java │ ├── ShaderProgramManager.java │ ├── constants │ │ └── ShaderProgramConstants.java │ ├── exception │ │ ├── ShaderProgramCompileException.java │ │ ├── ShaderProgramException.java │ │ └── ShaderProgramLinkException.java │ └── source │ │ ├── CriteriaShaderSource.java │ │ ├── IShaderSource.java │ │ └── StringShaderSource.java ├── texture │ ├── DebugTextureStateListener.java │ ├── ITexture.java │ ├── ITextureStateListener.java │ ├── PixelFormat.java │ ├── Texture.java │ ├── TextureManager.java │ ├── TextureOptions.java │ ├── TextureStateAdapter.java │ ├── TextureWarmUpVertexBufferObject.java │ ├── atlas │ │ ├── ITextureAtlas.java │ │ ├── TextureAtlas.java │ │ ├── bitmap │ │ │ ├── BitmapTextureAtlas.java │ │ │ ├── BitmapTextureAtlasTextureRegionFactory.java │ │ │ ├── BuildableBitmapTextureAtlas.java │ │ │ └── source │ │ │ │ ├── AssetBitmapTextureAtlasSource.java │ │ │ │ ├── EmptyBitmapTextureAtlasSource.java │ │ │ │ ├── FileBitmapTextureAtlasSource.java │ │ │ │ ├── IBitmapTextureAtlasSource.java │ │ │ │ ├── PictureBitmapTextureAtlasSource.java │ │ │ │ ├── ResourceBitmapTextureAtlasSource.java │ │ │ │ └── decorator │ │ │ │ ├── BaseBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── BaseShapeBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── ColorKeyBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── ColorSwapBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── FillBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── LinearGradientFillBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── OutlineBitmapTextureAtlasSourceDecorator.java │ │ │ │ ├── RadialGradientFillBitmapTextureAtlasSourceDecorator.java │ │ │ │ └── shape │ │ │ │ ├── ArcBitmapTextureAtlasSourceDecoratorShape.java │ │ │ │ ├── CircleBitmapTextureAtlasSourceDecoratorShape.java │ │ │ │ ├── EllipseBitmapTextureAtlasSourceDecoratorShape.java │ │ │ │ ├── IBitmapTextureAtlasSourceDecoratorShape.java │ │ │ │ ├── RectangleBitmapTextureAtlasSourceDecoratorShape.java │ │ │ │ └── RoundedRectangleBitmapTextureAtlasSourceDecoratorShape.java │ │ ├── buildable │ │ │ ├── BuildableTextureAtlas.java │ │ │ ├── BuildableTextureAtlasTextureRegionFactory.java │ │ │ ├── IBuildableTextureAtlas.java │ │ │ └── builder │ │ │ │ ├── BlackPawnTextureAtlasBuilder.java │ │ │ │ └── ITextureAtlasBuilder.java │ │ └── source │ │ │ ├── BaseTextureAtlasSource.java │ │ │ └── ITextureAtlasSource.java │ ├── bitmap │ │ ├── AssetBitmapTexture.java │ │ ├── BitmapTexture.java │ │ ├── BitmapTextureFormat.java │ │ └── ResourceBitmapTexture.java │ ├── compressed │ │ ├── etc1 │ │ │ └── ETC1Texture.java │ │ └── pvr │ │ │ ├── PVRCCZTexture.java │ │ │ ├── PVRGZTexture.java │ │ │ ├── PVRTexture.java │ │ │ └── pixelbufferstrategy │ │ │ ├── GreedyPVRTexturePixelBufferStrategy.java │ │ │ ├── IPVRTexturePixelBufferStrategy.java │ │ │ └── SmartPVRTexturePixelBufferStrategy.java │ ├── region │ │ ├── BaseTextureRegion.java │ │ ├── ITextureRegion.java │ │ ├── ITiledTextureRegion.java │ │ ├── TextureRegion.java │ │ ├── TextureRegionFactory.java │ │ ├── TextureRegionLibrary.java │ │ └── TiledTextureRegion.java │ └── render │ │ └── RenderTexture.java ├── util │ ├── BufferUtils.java │ ├── GLHelper.java │ ├── GLMatrixStack.java │ ├── GLState.java │ ├── VertexUtils.java │ └── criteria │ │ ├── AndroidVersionCodeGLCriteria.java │ │ ├── BuildModelGLCriteria.java │ │ ├── GLExtensionsGLCriteria.java │ │ ├── GLRendererGLCriteria.java │ │ ├── GLVersionGLCriteria.java │ │ ├── IGLCriteria.java │ │ ├── IntGLCriteria.java │ │ ├── LogicalAndGLCriteria.java │ │ ├── LogicalOrGLCriteria.java │ │ └── StringGLCriteria.java ├── vbo │ ├── DrawType.java │ ├── HighPerformanceVertexBufferObject.java │ ├── IVertexBufferObject.java │ ├── LowMemoryVertexBufferObject.java │ ├── SharedMemoryVertexBufferObject.java │ ├── VertexBufferObject.java │ ├── VertexBufferObjectManager.java │ ├── ZeroMemoryVertexBufferObject.java │ └── attribute │ │ ├── VertexBufferObjectAttribute.java │ │ ├── VertexBufferObjectAttributeFix.java │ │ ├── VertexBufferObjectAttributes.java │ │ └── VertexBufferObjectAttributesBuilder.java └── view │ ├── ConfigChooser.java │ ├── EngineRenderer.java │ ├── IRendererListener.java │ └── RenderSurfaceView.java ├── ui ├── IGameInterface.java ├── activity │ ├── BaseActivity.java │ ├── BaseGameActivity.java │ ├── LayoutGameActivity.java │ ├── LegacyBaseGameActivity.java │ ├── SimpleAsyncGameActivity.java │ ├── SimpleBaseGameActivity.java │ └── SimpleLayoutGameActivity.java └── dialog │ ├── GenericInputDialogBuilder.java │ └── StringInputDialogBuilder.java └── util ├── ActivityUtils.java ├── BetaUtils.java ├── Constants.java ├── DialogUtils.java ├── FileUtils.java ├── HorizontalAlign.java ├── IDisposable.java ├── IMatcher.java ├── ProbabilityGenerator.java ├── SAXUtils.java ├── SocketUtils.java ├── StreamUtils.java ├── TextUtils.java ├── ThreadUtils.java ├── TimeUtils.java ├── VerticalAlign.java ├── ViewUtils.java ├── adt ├── DataConstants.java ├── array │ └── ArrayUtils.java ├── bit │ └── BitVector.java ├── bounds │ ├── BoundsSplit.java │ ├── FloatBounds.java │ ├── IBounds.java │ ├── IFloatBounds.java │ ├── IIntBounds.java │ └── IntBounds.java ├── cache │ ├── IntLRUCache.java │ ├── LRUCache.java │ └── concurrent │ │ ├── SynchronizedIntLRUCache.java │ │ └── SynchronizedLRUCache.java ├── data │ ├── DataUtils.java │ └── operator │ │ ├── ByteOperator.java │ │ ├── CharOperator.java │ │ ├── DoubleOperator.java │ │ ├── FloatOperator.java │ │ ├── IntOperator.java │ │ ├── LongOperator.java │ │ ├── ShortOperator.java │ │ └── StringOperator.java ├── io │ ├── in │ │ ├── AssetInputStreamOpener.java │ │ ├── ByteArrayInputStreamOpener.java │ │ ├── IInputStreamOpener.java │ │ └── ResourceInputStreamOpener.java │ └── out │ │ └── ByteBufferOutputStream.java ├── list │ ├── CircularList.java │ ├── FloatArrayList.java │ ├── IFloatList.java │ ├── IIntList.java │ ├── IList.java │ ├── ILongList.java │ ├── ISortedList.java │ ├── IUniqueList.java │ ├── IntArrayList.java │ ├── ListUtils.java │ ├── LongArrayList.java │ ├── ShiftList.java │ ├── SmartList.java │ ├── SortedList.java │ ├── UniqueList.java │ └── concurrent │ │ └── SynchronizedList.java ├── map │ ├── Library.java │ ├── LongSparseArray.java │ ├── MultiKey.java │ ├── MultiKeyHashMap.java │ └── SparseArrayUtils.java ├── pool │ ├── EntityDetachRunnablePoolItem.java │ ├── EntityDetachRunnablePoolUpdateHandler.java │ ├── GenericPool.java │ ├── MultiPool.java │ ├── Pool.java │ ├── PoolItem.java │ ├── PoolUpdateHandler.java │ ├── RunnablePoolItem.java │ └── RunnablePoolUpdateHandler.java ├── queue │ ├── CircularQueue.java │ ├── IQueue.java │ ├── ISortedQueue.java │ ├── IUniqueQueue.java │ ├── ShiftQueue.java │ ├── SortedQueue.java │ ├── UniqueQueue.java │ └── concurrent │ │ └── SynchronizedQueue.java ├── spatial │ ├── ISpatialItem.java │ ├── bounds │ │ └── util │ │ │ ├── FloatBoundsUtils.java │ │ │ └── IntBoundsUtils.java │ └── quadtree │ │ ├── FloatQuadTree.java │ │ ├── IntQuadTree.java │ │ └── QuadTree.java ├── transformation │ ├── Transformation.java │ └── TransformationPool.java └── trie │ ├── ITrie.java │ └── Trie.java ├── algorithm ├── Spiral.java ├── collision │ ├── BaseCollisionChecker.java │ ├── LineCollisionChecker.java │ ├── RectangularShapeCollisionChecker.java │ ├── ShapeCollisionChecker.java │ └── TriangleCollisionChecker.java ├── hull │ ├── HullUtils.java │ ├── IHullAlgorithm.java │ └── JarvisMarch.java ├── path │ ├── Direction.java │ ├── ICostFunction.java │ ├── IPathFinder.java │ ├── IPathFinderMap.java │ ├── Path.java │ └── astar │ │ ├── AStarPathFinder.java │ │ ├── EuclideanHeuristic.java │ │ ├── IAStarHeuristic.java │ │ ├── ManhattanHeuristic.java │ │ └── NullHeuristic.java └── sort │ ├── InsertionSorter.java │ └── Sorter.java ├── animationpack ├── AnimationPack.java ├── AnimationPackLoader.java ├── AnimationPackParser.java ├── AnimationPackTiledTextureRegion.java ├── AnimationPackTiledTextureRegionLibrary.java └── exception │ └── AnimationPackParseException.java ├── base64 ├── Base64.java └── Base64InputStream.java ├── call ├── AsyncCallable.java ├── Callable.java ├── Callback.java └── ParameterCallable.java ├── color ├── Color.java ├── ColorPool.java ├── ColorUtils.java └── constants │ └── ColorConstants.java ├── debug ├── Debug.java └── DebugTimer.java ├── exception ├── AndEngineException.java ├── AndEngineRuntimeException.java ├── CancelledException.java ├── DeviceNotSupportedException.java ├── MethodNotSupportedException.java ├── MethodNotYetImplementedException.java └── NullBitmapException.java ├── level ├── IEntityLoader.java ├── LevelLoader.java ├── LevelParser.java └── constants │ └── LevelConstants.java ├── levelstats └── LevelStatsDBConnector.java ├── math ├── MathConstants.java └── MathUtils.java ├── mime └── MIMEType.java ├── modifier ├── BaseDoubleValueChangeModifier.java ├── BaseDoubleValueSpanModifier.java ├── BaseDurationModifier.java ├── BaseModifier.java ├── BaseQuadrupelValueSpanModifier.java ├── BaseSingleValueChangeModifier.java ├── BaseSingleValueSpanModifier.java ├── BaseTripleValueSpanModifier.java ├── IModifier.java ├── LoopModifier.java ├── ModifierList.java ├── ParallelModifier.java ├── SequenceModifier.java ├── ease │ ├── EaseBackIn.java │ ├── EaseBackInOut.java │ ├── EaseBackOut.java │ ├── EaseBounceIn.java │ ├── EaseBounceInOut.java │ ├── EaseBounceOut.java │ ├── EaseCircularIn.java │ ├── EaseCircularInOut.java │ ├── EaseCircularOut.java │ ├── EaseCubicIn.java │ ├── EaseCubicInOut.java │ ├── EaseCubicOut.java │ ├── EaseElasticIn.java │ ├── EaseElasticInOut.java │ ├── EaseElasticOut.java │ ├── EaseExponentialIn.java │ ├── EaseExponentialInOut.java │ ├── EaseExponentialOut.java │ ├── EaseLinear.java │ ├── EaseQuadIn.java │ ├── EaseQuadInOut.java │ ├── EaseQuadOut.java │ ├── EaseQuartIn.java │ ├── EaseQuartInOut.java │ ├── EaseQuartOut.java │ ├── EaseQuintIn.java │ ├── EaseQuintInOut.java │ ├── EaseQuintOut.java │ ├── EaseSineIn.java │ ├── EaseSineInOut.java │ ├── EaseSineOut.java │ ├── EaseStrongIn.java │ ├── EaseStrongInOut.java │ ├── EaseStrongOut.java │ └── IEaseFunction.java └── util │ └── ModifierUtils.java ├── preferences └── SimplePreferences.java ├── progress ├── IProgressListener.java ├── ProgressCallable.java └── ProgressMonitor.java ├── system ├── CPUUsage.java └── SystemUtils.java ├── texturepack ├── TexturePack.java ├── TexturePackLibrary.java ├── TexturePackLoader.java ├── TexturePackParser.java ├── TexturePackTextureRegion.java ├── TexturePackTextureRegionLibrary.java └── exception │ └── TexturePackParseException.java └── time └── TimeConstants.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # System: 2 | Thumbs.db 3 | .DS_Store 4 | *.swp 5 | *~ 6 | Desktop.ini 7 | 8 | # Version Control Systems: 9 | .svn 10 | CVS 11 | .hg 12 | .bzr 13 | 14 | # Android: 15 | local.properties 16 | proguard/** 17 | target/** 18 | bin/** 19 | obj/** 20 | doc/** 21 | gen/** 22 | gdb.setup 23 | gdbserver 24 | 25 | # Eclipse: 26 | .settings 27 | 28 | # IntelliJ / Android Studio: 29 | idea/workspace.xml 30 | idea/tasks.xml 31 | 32 | # Crashlytics 33 | res/values/com_crashlytics_export_strings.xml 34 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndEngine 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ext/img/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/badge.png -------------------------------------------------------------------------------- /ext/img/clapboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/clapboard.png -------------------------------------------------------------------------------- /ext/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/favicon.png -------------------------------------------------------------------------------- /ext/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/logo.png -------------------------------------------------------------------------------- /ext/img/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/source.png -------------------------------------------------------------------------------- /ext/img/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/ext/img/splash.png -------------------------------------------------------------------------------- /jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := andengine_shared 6 | LOCAL_MODULE_FILENAME := libandengine 7 | LOCAL_CFLAGS := -Werror 8 | LOCAL_SRC_FILES := src/GLES20Fix.c \ 9 | src/BufferUtils.cpp 10 | LOCAL_LDLIBS := -lGLESv2 11 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/src 12 | 13 | include $(BUILD_SHARED_LIBRARY) 14 | -------------------------------------------------------------------------------- /jni/Application.mk: -------------------------------------------------------------------------------- 1 | # Build both ARMv5TE and ARMv7-A and x86 machine code. 2 | APP_ABI := armeabi armeabi-v7a x86 3 | APP_STL := gnustl_shared -------------------------------------------------------------------------------- /jni/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | NDK_DIRECTORY="/Users/ngramlich/SDKs/Android/ndk/r7b/" 4 | PROJECT_DIRECTORY="/Users/ngramlich/Workspace/gdk/graphic_engines/AndEngine/AndEngine/" 5 | 6 | # Run build: 7 | pushd ${PROJECT_DIRECTORY} 8 | ${NDK_DIRECTORY}ndk-build 9 | 10 | # Clean temporary files: 11 | # rm -rf ${PROJECT_DIRECTORY}obj 12 | # find . -name gdbserver -print0 | xargs -0 rm -rf 13 | # find . -name gdb.setup -print0 | xargs -0 rm -rf 14 | 15 | popd -------------------------------------------------------------------------------- /jni/src/BufferUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "BufferUtils.h" 2 | #include 3 | #include 4 | 5 | // =========================================================== 6 | // org.andengine.opengl.util.BufferUtils 7 | // =========================================================== 8 | 9 | JNIEXPORT void JNICALL Java_org_andengine_opengl_util_BufferUtils_jniPut(JNIEnv *env, jclass, jobject pBuffer, jfloatArray pData, jint pLength, jint pOffset) { 10 | unsigned char* bufferAddress = (unsigned char*)env->GetDirectBufferAddress(pBuffer); 11 | float* dataAddress = (float*)env->GetPrimitiveArrayCritical(pData, 0); 12 | 13 | memcpy(bufferAddress, dataAddress + pOffset, pLength << 2); 14 | env->ReleasePrimitiveArrayCritical(pData, dataAddress, 0); 15 | } 16 | 17 | JNIEXPORT jobject JNICALL Java_org_andengine_opengl_util_BufferUtils_jniAllocateDirect(JNIEnv *env, jclass, jint pCapacity) { 18 | jbyte* bytebuffer = (jbyte*) malloc(sizeof(jbyte) * pCapacity); 19 | return env->NewDirectByteBuffer(bytebuffer, pCapacity); 20 | } 21 | 22 | JNIEXPORT void JNICALL Java_org_andengine_opengl_util_BufferUtils_jniFreeDirect(JNIEnv* env, jclass, jobject pBuffer) { 23 | unsigned char* bufferAddress = (unsigned char*)env->GetDirectBufferAddress(pBuffer); 24 | free(bufferAddress); 25 | } 26 | -------------------------------------------------------------------------------- /jni/src/BufferUtils.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" { 4 | // =========================================================== 5 | // org.andengine.opengl.util.BufferUtils 6 | // =========================================================== 7 | 8 | JNIEXPORT void JNICALL Java_org_andengine_opengl_util_BufferUtils_jniPut(JNIEnv *, jclass, jobject, jfloatArray, jint, jint); 9 | JNIEXPORT jobject JNICALL Java_org_andengine_opengl_util_BufferUtils_jniAllocateDirect(JNIEnv *, jclass, jint); 10 | JNIEXPORT void JNICALL Java_org_andengine_opengl_util_BufferUtils_jniFreeDirect(JNIEnv *, jclass, jobject); 11 | } -------------------------------------------------------------------------------- /jni/src/GLES20Fix.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | // =========================================================== 5 | // org.andengine.opengl.GLES20Fix 6 | // =========================================================== 7 | 8 | void Java_org_andengine_opengl_GLES20Fix_glVertexAttribPointer (JNIEnv *env, jclass c, jint index, jint size, jint type, jboolean normalized, jint stride, jint offset) { 9 | glVertexAttribPointer(index, size, type, normalized, stride, (void*) offset); 10 | } 11 | 12 | void Java_org_andengine_opengl_GLES20Fix_glDrawElements (JNIEnv *env, jclass c, jint mode, jint count, jint type, jint offset) { 13 | glDrawElements(mode, count, type, (void*) offset); 14 | } -------------------------------------------------------------------------------- /libs/armeabi-v7a/libandengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/libs/armeabi-v7a/libandengine.so -------------------------------------------------------------------------------- /libs/armeabi/libandengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/libs/armeabi/libandengine.so -------------------------------------------------------------------------------- /libs/x86/libandengine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/libs/x86/libandengine.so -------------------------------------------------------------------------------- /proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | android.library=true 11 | # Indicates whether an apk should be generated for each density. 12 | split.density=false 13 | # Project target. 14 | target=android-15 15 | -------------------------------------------------------------------------------- /res/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicolasgramlich/AndEngine/720897f99d2c56ba357e8fe361454bd8d88c37ed/res/.gitignore -------------------------------------------------------------------------------- /src/org/andengine/audio/IAudioEntity.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 14:53:29 - 13.06.2010 9 | */ 10 | public interface IAudioEntity { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void play(); 20 | public void pause(); 21 | public void resume(); 22 | public void stop(); 23 | 24 | public float getVolume(); 25 | public void setVolume(final float pVolume); 26 | 27 | public float getLeftVolume(); 28 | public float getRightVolume(); 29 | public void setVolume(final float pLeftVolume, final float pRightVolume); 30 | 31 | public void onMasterVolumeChanged(final float pMasterVolume); 32 | 33 | public void setLooping(final boolean pLooping); 34 | 35 | public void release(); 36 | } 37 | -------------------------------------------------------------------------------- /src/org/andengine/audio/IAudioManager.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 15:02:06 - 13.06.2010 9 | */ 10 | public interface IAudioManager { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public float getMasterVolume(); 20 | public void setMasterVolume(final float pMasterVolume); 21 | 22 | public void add(final T pAudioEntity); 23 | public boolean remove(final T pAudioEntity); 24 | 25 | public void releaseAll(); 26 | } 27 | -------------------------------------------------------------------------------- /src/org/andengine/audio/exception/AudioException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:44:53 - 09.11.2011 10 | */ 11 | public class AudioException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = 2647561236520151571L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public AudioException() { 27 | super(); 28 | } 29 | 30 | public AudioException(final String pMessage) { 31 | super(pMessage); 32 | } 33 | 34 | public AudioException(final Throwable pThrowable) { 35 | super(pThrowable); 36 | } 37 | 38 | public AudioException(final String pMessage, final Throwable pThrowable) { 39 | super(pMessage, pThrowable); 40 | } 41 | 42 | // =========================================================== 43 | // Getter & Setter 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/audio/music/MusicLibrary.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.music; 2 | 3 | import org.andengine.util.adt.map.Library; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:30:34 - 09.11.2011 10 | */ 11 | public class MusicLibrary extends Library { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Methods 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Inner and Anonymous Classes 38 | // =========================================================== 39 | } 40 | -------------------------------------------------------------------------------- /src/org/andengine/audio/music/MusicManager.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.music; 2 | 3 | import org.andengine.audio.BaseAudioManager; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:01:23 - 13.06.2010 11 | */ 12 | public class MusicManager extends BaseAudioManager { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public MusicManager() { 26 | 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods for/from SuperClass/Interfaces 35 | // =========================================================== 36 | 37 | // =========================================================== 38 | // Methods 39 | // =========================================================== 40 | 41 | // =========================================================== 42 | // Inner and Anonymous Classes 43 | // =========================================================== 44 | } 45 | -------------------------------------------------------------------------------- /src/org/andengine/audio/music/exception/MusicException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.music.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:37:53 - 09.11.2011 10 | */ 11 | public class MusicException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = -3314204068618256639L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public MusicException() { 27 | super(); 28 | } 29 | 30 | public MusicException(final String pMessage) { 31 | super(pMessage); 32 | } 33 | 34 | public MusicException(final Throwable pThrowable) { 35 | super(pThrowable); 36 | } 37 | 38 | public MusicException(final String pMessage, final Throwable pThrowable) { 39 | super(pMessage, pThrowable); 40 | } 41 | 42 | // =========================================================== 43 | // Getter & Setter 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/audio/music/exception/MusicReleasedException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.music.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 20:44:27 - 09.11.2011 8 | */ 9 | public class MusicReleasedException extends MusicException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = 8284741766961042604L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Methods 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Inner and Anonymous Classes 38 | // =========================================================== 39 | } 40 | -------------------------------------------------------------------------------- /src/org/andengine/audio/sound/SoundLibrary.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.sound; 2 | 3 | import org.andengine.util.adt.map.Library; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 20:41:56 - 20.08.2010 11 | */ 12 | public class SoundLibrary extends Library { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods 35 | // =========================================================== 36 | 37 | // =========================================================== 38 | // Inner and Anonymous Classes 39 | // =========================================================== 40 | } 41 | -------------------------------------------------------------------------------- /src/org/andengine/audio/sound/exception/SoundException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.sound.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:37:53 - 09.11.2011 10 | */ 11 | public class SoundException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = 2647561236520151571L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public SoundException() { 27 | super(); 28 | } 29 | 30 | public SoundException(final String pMessage) { 31 | super(pMessage); 32 | } 33 | 34 | public SoundException(final Throwable pThrowable) { 35 | super(pThrowable); 36 | } 37 | 38 | public SoundException(final String pMessage, final Throwable pThrowable) { 39 | super(pMessage, pThrowable); 40 | } 41 | 42 | // =========================================================== 43 | // Getter & Setter 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/audio/sound/exception/SoundReleasedException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.audio.sound.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 20:44:27 - 09.11.2011 8 | */ 9 | public class SoundReleasedException extends SoundException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = -1232103208009031624L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Methods 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Inner and Anonymous Classes 38 | // =========================================================== 39 | } 40 | -------------------------------------------------------------------------------- /src/org/andengine/engine/camera/hud/HUD.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.camera.hud; 2 | 3 | import org.andengine.engine.camera.Camera; 4 | import org.andengine.entity.scene.CameraScene; 5 | import org.andengine.entity.scene.Scene; 6 | 7 | /** 8 | * While you can add a {@link HUD} to {@link Scene}, you should not do so. 9 | * {@link HUD}s are meant to be added to {@link Camera}s via {@link Camera#setHUD(HUD)}. 10 | * 11 | * (c) 2010 Nicolas Gramlich 12 | * (c) 2011 Zynga Inc. 13 | * 14 | * @author Nicolas Gramlich 15 | * @since 14:13:13 - 01.04.2010 16 | */ 17 | public class HUD extends CameraScene { 18 | // =========================================================== 19 | // Constants 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Fields 24 | // =========================================================== 25 | 26 | // =========================================================== 27 | // Constructors 28 | // =========================================================== 29 | 30 | public HUD() { 31 | super(); 32 | 33 | this.setBackgroundEnabled(false); 34 | } 35 | 36 | // =========================================================== 37 | // Getter & Setter 38 | // =========================================================== 39 | 40 | // =========================================================== 41 | // Methods for/from SuperClass/Interfaces 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/engine/handler/IDrawHandler.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.handler; 2 | 3 | import org.andengine.engine.camera.Camera; 4 | import org.andengine.opengl.util.GLState; 5 | 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 10:50:58 - 08.08.2010 13 | */ 14 | public interface IDrawHandler { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | public void onDraw(final GLState pGLState, final Camera pCamera); 24 | } 25 | -------------------------------------------------------------------------------- /src/org/andengine/engine/handler/IUpdateHandler.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.handler; 2 | 3 | import org.andengine.util.IMatcher; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 12:24:09 - 11.03.2010 11 | */ 12 | public interface IUpdateHandler { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void onUpdate(final float pSecondsElapsed); 22 | public void reset(); 23 | 24 | // TODO Maybe add onRegister and onUnregister. (Maybe add SimpleUpdateHandler that implements all methods, but onUpdate) 25 | 26 | // =========================================================== 27 | // Inner and Anonymous Classes 28 | // =========================================================== 29 | 30 | public interface IUpdateHandlerMatcher extends IMatcher { 31 | // =========================================================== 32 | // Constants 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods 37 | // =========================================================== 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/org/andengine/engine/handler/collision/ICollisionCallback.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.handler.collision; 2 | 3 | import org.andengine.entity.shape.IShape; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 12:05:39 - 11.03.2010 11 | */ 12 | public interface ICollisionCallback { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | /** 22 | * @param pCheckShape 23 | * @param pTargetShape 24 | * @return true to proceed, false to stop further collosion-checks. 25 | */ 26 | public boolean onCollision(final IShape pCheckShape, final IShape pTargetShape); 27 | } 28 | -------------------------------------------------------------------------------- /src/org/andengine/engine/handler/timer/ITimerCallback.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.handler.timer; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 16:23:25 - 12.03.2010 9 | */ 10 | public interface ITimerCallback { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void onTimePassed(final TimerHandler pTimerHandler); 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/engine/options/MusicOptions.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.options; 2 | 3 | 4 | /** 5 | * (c) Zynga 2011 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 23:13:07 - 22.11.2011 9 | */ 10 | public class MusicOptions { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | private boolean mNeedsMusic; 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | public boolean needsMusic() { 30 | return this.mNeedsMusic; 31 | } 32 | 33 | public MusicOptions setNeedsMusic(final boolean pNeedsMusic) { 34 | this.mNeedsMusic = pNeedsMusic; 35 | return this; 36 | } 37 | 38 | // =========================================================== 39 | // Methods for/from SuperClass/Interfaces 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/engine/options/RenderOptions.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.options; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 13:01:40 - 02.07.2010 9 | */ 10 | public class RenderOptions { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | private boolean mMultiSampling = false; 20 | private boolean mDithering = false; 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | // =========================================================== 27 | // Getter & Setter 28 | // =========================================================== 29 | 30 | public boolean isMultiSampling() { 31 | return this.mMultiSampling; 32 | } 33 | 34 | public void setMultiSampling(final boolean pMultiSampling) { 35 | this.mMultiSampling = pMultiSampling; 36 | } 37 | 38 | public boolean isDithering() { 39 | return this.mDithering; 40 | } 41 | 42 | public void setDithering(final boolean pDithering) { 43 | this.mDithering = pDithering; 44 | } 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/engine/options/resolutionpolicy/FixedResolutionPolicy.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.options.resolutionpolicy; 2 | 3 | import org.andengine.opengl.view.RenderSurfaceView; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:23:00 - 29.03.2010 11 | */ 12 | public class FixedResolutionPolicy extends BaseResolutionPolicy { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | private final int mWidth; 22 | private final int mHeight; 23 | 24 | // =========================================================== 25 | // Constructors 26 | // =========================================================== 27 | 28 | public FixedResolutionPolicy(final int pWidth, final int pHeight) { 29 | this.mWidth = pWidth; 30 | this.mHeight = pHeight; 31 | } 32 | 33 | // =========================================================== 34 | // Getter & Setter 35 | // =========================================================== 36 | 37 | // =========================================================== 38 | // Methods for/from SuperClass/Interfaces 39 | // =========================================================== 40 | 41 | @Override 42 | public void onMeasure(final RenderSurfaceView pRenderSurfaceView, final int pWidthMeasureSpec, final int pHeightMeasureSpec) { 43 | pRenderSurfaceView.setMeasuredDimensionProxy(this.mWidth, this.mHeight); 44 | } 45 | 46 | // =========================================================== 47 | // Methods 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Inner and Anonymous Classes 52 | // =========================================================== 53 | } 54 | -------------------------------------------------------------------------------- /src/org/andengine/engine/options/resolutionpolicy/IResolutionPolicy.java: -------------------------------------------------------------------------------- 1 | package org.andengine.engine.options.resolutionpolicy; 2 | 3 | import org.andengine.opengl.view.RenderSurfaceView; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:02:35 - 29.03.2010 11 | */ 12 | public interface IResolutionPolicy { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void onMeasure(final RenderSurfaceView pRenderSurfaceView, final int pWidthMeasureSpec, final int pHeightMeasureSpec); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/entity/IEntityComparator.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity; 2 | 3 | import java.util.Comparator; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 14:02:56 - 10.04.2012 10 | */ 11 | public interface IEntityComparator extends Comparator { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | } 20 | -------------------------------------------------------------------------------- /src/org/andengine/entity/IEntityFactory.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity; 2 | 3 | 4 | /** 5 | * (c) Zynga 2011 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 20:04:41 - 19.11.2011 9 | */ 10 | public interface IEntityFactory { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public T create(final float pX, final float pY); 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/entity/IEntityMatcher.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity; 2 | 3 | import org.andengine.util.IMatcher; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:06:28 - 26.03.2012 10 | */ 11 | public interface IEntityMatcher extends IMatcher { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | @Override 21 | public boolean matches(final IEntity pEntity); 22 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/IEntityParameterCallable.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity; 2 | 3 | import org.andengine.util.call.ParameterCallable; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:06:53 - 26.03.2012 10 | */ 11 | public interface IEntityParameterCallable extends ParameterCallable { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | @Override 21 | public void call(final IEntity pEntity); 22 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/TagEntityMatcher.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 15:49:11 - 01.05.2012 8 | */ 9 | public class TagEntityMatcher implements IEntityMatcher { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Fields 16 | // =========================================================== 17 | 18 | private int mTag; 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public TagEntityMatcher(final int pTag) { 25 | this.mTag = pTag; 26 | } 27 | 28 | // =========================================================== 29 | // Getter & Setter 30 | // =========================================================== 31 | 32 | public int getTag() { 33 | return this.mTag; 34 | } 35 | 36 | public void setTag(final int pTag) { 37 | this.mTag = pTag; 38 | } 39 | 40 | // =========================================================== 41 | // Methods for/from SuperClass/Interfaces 42 | // =========================================================== 43 | 44 | @Override 45 | public boolean matches(final IEntity pEntity) { 46 | return this.mTag == pEntity.getTag(); 47 | } 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } 57 | -------------------------------------------------------------------------------- /src/org/andengine/entity/modifier/EntityModifier.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.modifier; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.andengine.util.modifier.BaseModifier; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 10:53:16 - 03.09.2010 12 | */ 13 | public abstract class EntityModifier extends BaseModifier implements IEntityModifier { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public EntityModifier() { 27 | super(); 28 | } 29 | 30 | public EntityModifier(final IEntityModifierListener pEntityModifierListener) { 31 | super(pEntityModifierListener); 32 | } 33 | 34 | // =========================================================== 35 | // Getter & Setter 36 | // =========================================================== 37 | 38 | // =========================================================== 39 | // Methods for/from SuperClass/Interfaces 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/entity/modifier/EntityModifierList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.modifier; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.andengine.util.modifier.ModifierList; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 14:19:18 - 24.12.2010 12 | */ 13 | public class EntityModifierList extends ModifierList { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | private static final long serialVersionUID = 161652765736600082L; 19 | 20 | // =========================================================== 21 | // Fields 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Constructors 26 | // =========================================================== 27 | 28 | public EntityModifierList(final IEntity pTarget) { 29 | super(pTarget); 30 | } 31 | 32 | public EntityModifierList(final IEntity pTarget, final int pCapacity) { 33 | super(pTarget, pCapacity); 34 | } 35 | 36 | // =========================================================== 37 | // Getter & Setter 38 | // =========================================================== 39 | 40 | // =========================================================== 41 | // Methods for/from SuperClass/Interfaces 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/entity/modifier/IEntityModifier.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.modifier; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.andengine.util.IMatcher; 5 | import org.andengine.util.modifier.IModifier; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 11:17:50 - 19.03.2010 13 | */ 14 | public interface IEntityModifier extends IModifier { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | @Override 24 | public IEntityModifier deepCopy() throws DeepCopyNotSupportedException; 25 | 26 | // =========================================================== 27 | // Inner and Anonymous Classes 28 | // =========================================================== 29 | 30 | public static interface IEntityModifierListener extends IModifierListener{ 31 | // =========================================================== 32 | // Constants 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods 37 | // =========================================================== 38 | } 39 | 40 | public interface IEntityModifierMatcher extends IMatcher> { 41 | // =========================================================== 42 | // Constants 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Methods 47 | // =========================================================== 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/entity/particle/emitter/IParticleEmitter.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.particle.emitter; 2 | 3 | import org.andengine.engine.handler.IUpdateHandler; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:48:09 - 01.10.2010 11 | */ 12 | public interface IParticleEmitter extends IUpdateHandler { 13 | // =========================================================== 14 | // Final Fields 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void getPositionOffset(final float[] pOffset); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/entity/particle/emitter/PointParticleEmitter.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.particle.emitter; 2 | 3 | import static org.andengine.util.Constants.VERTEX_INDEX_X; 4 | import static org.andengine.util.Constants.VERTEX_INDEX_Y; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 23:14:42 - 01.10.2010 12 | */ 13 | public class PointParticleEmitter extends BaseParticleEmitter { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public PointParticleEmitter(final float pCenterX, final float pCenterY) { 27 | super(pCenterX, pCenterY); 28 | } 29 | 30 | // =========================================================== 31 | // Getter & Setter 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods for/from SuperClass/Interfaces 36 | // =========================================================== 37 | 38 | @Override 39 | public void getPositionOffset(final float[] pOffset) { 40 | pOffset[VERTEX_INDEX_X] = this.mCenterX; 41 | pOffset[VERTEX_INDEX_Y] = this.mCenterY; 42 | } 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/entity/particle/initializer/GravityParticleInitializer.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.particle.initializer; 2 | 3 | import org.andengine.entity.IEntity; 4 | 5 | import android.hardware.SensorManager; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 12:04:00 - 15.03.2010 13 | */ 14 | public class GravityParticleInitializer extends AccelerationParticleInitializer { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public GravityParticleInitializer() { 28 | super(0, SensorManager.GRAVITY_EARTH); 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } 47 | -------------------------------------------------------------------------------- /src/org/andengine/entity/particle/initializer/IParticleInitializer.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.particle.initializer; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.andengine.entity.particle.Particle; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 10:12:09 - 29.06.2010 12 | */ 13 | public interface IParticleInitializer { 14 | // =========================================================== 15 | // Final Fields 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Methods 20 | // =========================================================== 21 | 22 | public void onInitializeParticle(final Particle pParticle); 23 | } 24 | -------------------------------------------------------------------------------- /src/org/andengine/entity/particle/modifier/IParticleModifier.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.particle.modifier; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.andengine.entity.particle.Particle; 5 | import org.andengine.entity.particle.initializer.IParticleInitializer; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 20:06:05 - 14.03.2010 13 | */ 14 | public interface IParticleModifier extends IParticleInitializer { 15 | // =========================================================== 16 | // Final Fields 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | public void onUpdateParticle(final Particle pParticle); 24 | } 25 | -------------------------------------------------------------------------------- /src/org/andengine/entity/primitive/vbo/ILineVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.primitive.vbo; 2 | 3 | import org.andengine.entity.primitive.Line; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 18:45:00 - 28.03.2012 11 | */ 12 | public interface ILineVertexBufferObject extends IVertexBufferObject { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void onUpdateColor(final Line pLine); 22 | public void onUpdateVertices(final Line pLine); 23 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/primitive/vbo/IMeshVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.primitive.vbo; 2 | 3 | import org.andengine.entity.primitive.Mesh; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 18:46:51 - 28.03.2012 11 | */ 12 | public interface IMeshVertexBufferObject extends IVertexBufferObject { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public float[] getBufferData(); 22 | public void onUpdateColor(final Mesh pMesh); 23 | public void onUpdateVertices(final Mesh pMesh); 24 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/primitive/vbo/IRectangleVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.primitive.vbo; 2 | 3 | import org.andengine.entity.primitive.Rectangle; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 18:48:14 - 28.03.2012 11 | */ 12 | public interface IRectangleVertexBufferObject extends IVertexBufferObject { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void onUpdateColor(final Rectangle pRectangle); 22 | public void onUpdateVertices(final Rectangle pRectangle); 23 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/IOnAreaTouchListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene; 2 | 3 | import org.andengine.input.touch.TouchEvent; 4 | 5 | /** 6 | * An interface for a callback to be invoked when a {@link TouchEvent} is 7 | * dispatched to an {@link ITouchArea} area. The callback will be invoked 8 | * before the {@link TouchEvent} is passed to the {@link ITouchArea}. 9 | * 10 | * (c) Zynga 2012 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 15:01:48 PM - 27.03.2012 14 | */ 15 | public interface IOnAreaTouchListener { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | 24 | /** 25 | * Called when a {@link TouchEvent} is dispatched to an {@link ITouchArea}. This allows 26 | * listeners to get a chance to respond before the target {@link ITouchArea#onAreaTouched(TouchEvent, float, float)} is called. 27 | * 28 | * @param pTouchArea The {@link ITouchArea} that the {@link TouchEvent} has been dispatched to. 29 | * @param pSceneTouchEvent The {@link TouchEvent} object containing full information about the event. 30 | * @param pTouchAreaLocalX the x coordinate within the area touched. 31 | * @param pTouchAreaLocalY the y coordinate within the area touched. 32 | * 33 | * @return true if this {@link IOnAreaTouchListener} has consumed the {@link TouchEvent}, false otherwise. 34 | */ 35 | public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final ITouchArea pTouchArea, final float pTouchAreaLocalX, final float pTouchAreaLocalY); 36 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/IOnSceneTouchListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene; 2 | 3 | import org.andengine.input.touch.TouchEvent; 4 | 5 | /** 6 | * An interface for a callback to be invoked when a {@link TouchEvent} is 7 | * dispatched to a {@link Scene}. The callback will be invoked 8 | * after all {@link ITouchArea}s have been checked and none consumed the {@link TouchEvent}. 9 | * 10 | * (c) Zynga 2012 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 15:02:20 - 27.03.2012 14 | */ 15 | public interface IOnSceneTouchListener { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | 24 | /** 25 | * Called when a {@link TouchEvent} is dispatched to a {@link Scene}. 26 | * 27 | * @param pScene The {@link Scene} that the {@link TouchEvent} has been dispatched to. 28 | * @param pSceneTouchEvent The {@link TouchEvent} object containing full information about the event. 29 | * 30 | * @return true if this {@link IOnSceneTouchListener} has consumed the {@link TouchEvent}, false otherwise. 31 | */ 32 | public boolean onSceneTouchEvent(final Scene pScene, final TouchEvent pSceneTouchEvent); 33 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/ITouchArea.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene; 2 | 3 | import org.andengine.input.touch.TouchEvent; 4 | import org.andengine.util.IMatcher; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:01:18 - 27.03.2012 11 | */ 12 | public interface ITouchArea { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public boolean contains(final float pX, final float pY); 22 | 23 | public float[] convertSceneToLocalCoordinates(final float pX, final float pY); 24 | public float[] convertLocalToSceneCoordinates(final float pX, final float pY); 25 | 26 | /** 27 | * This method only fires if this {@link ITouchArea} is registered to the {@link Scene} via {@link Scene#registerTouchArea(ITouchArea)}. 28 | * @param pSceneTouchEvent 29 | * @return true if the event was handled (that means {@link IOnAreaTouchListener} of the {@link Scene} will not be fired!), otherwise false. 30 | */ 31 | public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY); 32 | 33 | // =========================================================== 34 | // Inner and Anonymous Classes 35 | // =========================================================== 36 | 37 | public static interface ITouchAreaMatcher extends IMatcher { 38 | // =========================================================== 39 | // Constants 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | } 46 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/background/IBackground.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene.background; 2 | 3 | import org.andengine.engine.handler.IDrawHandler; 4 | import org.andengine.engine.handler.IUpdateHandler; 5 | import org.andengine.util.color.Color; 6 | import org.andengine.util.modifier.IModifier; 7 | 8 | /** 9 | * (c) 2010 Nicolas Gramlich 10 | * (c) 2011 Zynga Inc. 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 13:47:41 - 19.07.2010 14 | */ 15 | public interface IBackground extends IDrawHandler, IUpdateHandler { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | 24 | public void registerBackgroundModifier(final IModifier pBackgroundModifier); 25 | public boolean unregisterBackgroundModifier(final IModifier pBackgroundModifier); 26 | public void clearBackgroundModifiers(); 27 | 28 | public boolean isColorEnabled(); 29 | public void setColorEnabled(final boolean pColorEnabled); 30 | 31 | public void setColor(final Color pColor); 32 | public void setColor(final float pRed, final float pGreen, final float pBlue); 33 | public void setColor(final float pRed, final float pGreen, final float pBlue, final float pAlpha); 34 | } 35 | -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/background/SpriteBackground.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene.background; 2 | 3 | import org.andengine.entity.sprite.Sprite; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 14:01:43 - 19.07.2010 11 | */ 12 | public class SpriteBackground extends EntityBackground { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public SpriteBackground(final Sprite pSprite) { 26 | super(pSprite); 27 | } 28 | 29 | public SpriteBackground(final float pRed, final float pGreen, final float pBlue, final Sprite pSprite) { 30 | super(pRed, pGreen, pBlue, pSprite); 31 | } 32 | 33 | // =========================================================== 34 | // Getter & Setter 35 | // =========================================================== 36 | 37 | public Sprite getSprite() { 38 | return (Sprite)this.mEntity; 39 | } 40 | 41 | // =========================================================== 42 | // Methods for/from SuperClass/Interfaces 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Methods 47 | // =========================================================== 48 | 49 | // =========================================================== 50 | // Inner and Anonymous Classes 51 | // =========================================================== 52 | } 53 | -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/background/modifier/IBackgroundModifier.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene.background.modifier; 2 | 3 | import org.andengine.entity.scene.background.IBackground; 4 | import org.andengine.util.modifier.IModifier; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 14:55:54 - 03.09.2010 12 | */ 13 | public interface IBackgroundModifier extends IModifier { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Methods 20 | // =========================================================== 21 | 22 | @Override 23 | public IBackgroundModifier deepCopy() throws DeepCopyNotSupportedException; 24 | 25 | // =========================================================== 26 | // Inner and Anonymous Classes 27 | // =========================================================== 28 | 29 | public static interface IBackgroundModifierListener extends IModifierListener{ 30 | // =========================================================== 31 | // Constants 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods 36 | // =========================================================== 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/menu/animator/IMenuAnimator.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene.menu.animator; 2 | 3 | import java.util.ArrayList; 4 | 5 | import org.andengine.entity.scene.menu.item.IMenuItem; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 10:50:36 - 02.04.2010 13 | */ 14 | public interface IMenuAnimator { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | public static final IMenuAnimator DEFAULT = new AlphaMenuAnimator(); 20 | 21 | // =========================================================== 22 | // Methods 23 | // =========================================================== 24 | 25 | public void prepareAnimations(final ArrayList pMenuItems, final float pCameraWidth, final float pCameraHeight); 26 | public void buildAnimations(final ArrayList pMenuItems, final float pCameraWidth, final float pCameraHeight); 27 | } 28 | -------------------------------------------------------------------------------- /src/org/andengine/entity/scene/menu/item/IMenuItem.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.scene.menu.item; 2 | 3 | import org.andengine.entity.shape.IAreaShape; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 13:27:16 - 07.07.2010 11 | */ 12 | public interface IMenuItem extends IAreaShape { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public int getID(); 22 | public abstract void onSelected(); 23 | public abstract void onUnselected(); 24 | } 25 | -------------------------------------------------------------------------------- /src/org/andengine/entity/shape/IAreaShape.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.shape; 2 | 3 | 4 | /** 5 | * (c) Zynga 2011 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 19:01:16 - 07.08.2011 9 | */ 10 | public interface IAreaShape extends IShape { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public float getWidth(); 20 | public float getHeight(); 21 | 22 | public float getWidthScaled(); 23 | public float getHeightScaled(); 24 | 25 | public void setHeight(final float pHeight); 26 | public void setWidth(final float pWidth); 27 | public void setSize(final float pWidth, final float pHeight); 28 | } 29 | -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/batch/vbo/ISpriteBatchVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.batch.vbo; 2 | 3 | import org.andengine.opengl.texture.region.ITextureRegion; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 12:35:06 - 29.03.2012 11 | */ 12 | public interface ISpriteBatchVertexBufferObject extends IVertexBufferObject { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public int getBufferDataOffset(); 22 | public void setBufferDataOffset(final int pBufferDataOffset); 23 | 24 | public void addWithPackedColor(final ITextureRegion pTextureRegion, final float pX1, final float pY1, final float pX2, final float pY2, final float pColorABGRPackedInt); 25 | public void addWithPackedColor(final ITextureRegion pTextureRegion, final float pX1, final float pY1, final float pX2, final float pY2, final float pX3, final float pY3, final float pX4, final float pY4, final float pColorABGRPackedInt); 26 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/vbo/IDiamondSpriteVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.vbo; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 18:43:22 - 28.03.2012 8 | */ 9 | public interface IDiamondSpriteVertexBufferObject extends ISpriteVertexBufferObject { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/vbo/ISpriteVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.vbo; 2 | 3 | import org.andengine.entity.sprite.Sprite; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 18:40:47 - 28.03.2012 11 | */ 12 | public interface ISpriteVertexBufferObject extends IVertexBufferObject { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void onUpdateColor(final Sprite pSprite); 22 | public void onUpdateVertices(final Sprite pSprite); 23 | public void onUpdateTextureCoordinates(final Sprite pSprite); 24 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/vbo/ITiledSpriteVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.vbo; 2 | 3 | import org.andengine.entity.sprite.TiledSprite; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 18:39:06 - 28.03.2012 10 | */ 11 | public interface ITiledSpriteVertexBufferObject extends ISpriteVertexBufferObject { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public void onUpdateColor(final TiledSprite pTiledSprite); 21 | public void onUpdateVertices(final TiledSprite pTiledSprite); 22 | public void onUpdateTextureCoordinates(final TiledSprite pTiledSprite); 23 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/vbo/IUncoloredSpriteVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.vbo; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 18:37:49 - 28.03.2012 9 | */ 10 | public interface IUncoloredSpriteVertexBufferObject extends ISpriteVertexBufferObject { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/sprite/vbo/IUniformColorSpriteVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.sprite.vbo; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 18:35:57 - 28.03.2012 9 | */ 10 | public interface IUniformColorSpriteVertexBufferObject extends ISpriteVertexBufferObject { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/text/AutoWrap.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.text; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 12:36:44 - 29.03.2012 8 | */ 9 | public enum AutoWrap { 10 | // =========================================================== 11 | // Elements 12 | // =========================================================== 13 | 14 | NONE, 15 | WORDS, 16 | LETTERS, 17 | CJK; 18 | 19 | // =========================================================== 20 | // Constants 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Fields 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Constructors 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } -------------------------------------------------------------------------------- /src/org/andengine/entity/text/exception/OutOfCharactersException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.text.exception; 2 | 3 | 4 | /** 5 | * (c) Zynga 2011 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 17:53:31 - 01.11.2011 9 | */ 10 | public class OutOfCharactersException extends TextException { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | private static final long serialVersionUID = 3076821980884912905L; 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public OutOfCharactersException() { 26 | super(); 27 | } 28 | 29 | public OutOfCharactersException(final String pMessage) { 30 | super(pMessage); 31 | } 32 | 33 | public OutOfCharactersException(final Throwable pThrowable) { 34 | super(pThrowable); 35 | } 36 | 37 | public OutOfCharactersException(final String pMessage, final Throwable pThrowable) { 38 | super(pMessage, pThrowable); 39 | } 40 | 41 | // =========================================================== 42 | // Getter & Setter 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Methods for/from SuperClass/Interfaces 47 | // =========================================================== 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } 57 | -------------------------------------------------------------------------------- /src/org/andengine/entity/text/exception/TextException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.text.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 17:53:31 - 01.11.2011 10 | */ 11 | public class TextException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = -412281825916020126L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public TextException() { 27 | super(); 28 | } 29 | 30 | public TextException(final String pMessage) { 31 | super(pMessage); 32 | } 33 | 34 | public TextException(final Throwable pThrowable) { 35 | super(pThrowable); 36 | } 37 | 38 | public TextException(final String pMessage, final Throwable pThrowable) { 39 | super(pMessage, pThrowable); 40 | } 41 | 42 | // =========================================================== 43 | // Getter & Setter 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/entity/text/vbo/ITextVertexBufferObject.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.text.vbo; 2 | 3 | import org.andengine.entity.text.Text; 4 | import org.andengine.opengl.vbo.IVertexBufferObject; 5 | 6 | /** 7 | * 8 | * (c) Zynga 2012 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 12:38:05 - 29.03.2012 12 | */ 13 | public interface ITextVertexBufferObject extends IVertexBufferObject { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Methods 20 | // =========================================================== 21 | 22 | public void onUpdateColor(final Text pText); 23 | public void onUpdateVertices(final Text pText); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/org/andengine/entity/util/FPSCounter.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.util; 2 | 3 | import org.andengine.engine.handler.IUpdateHandler; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 19:52:31 - 09.03.2010 11 | */ 12 | public class FPSCounter implements IUpdateHandler { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | protected float mSecondsElapsed; 22 | 23 | protected int mFrames; 24 | 25 | // =========================================================== 26 | // Constructors 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | public float getFPS() { 34 | return this.mFrames / this.mSecondsElapsed; 35 | } 36 | 37 | // =========================================================== 38 | // Methods for/from SuperClass/Interfaces 39 | // =========================================================== 40 | 41 | @Override 42 | public void onUpdate(final float pSecondsElapsed) { 43 | this.mFrames++; 44 | this.mSecondsElapsed += pSecondsElapsed; 45 | } 46 | 47 | @Override 48 | public void reset() { 49 | this.mFrames = 0; 50 | this.mSecondsElapsed = 0; 51 | } 52 | 53 | // =========================================================== 54 | // Methods 55 | // =========================================================== 56 | 57 | // =========================================================== 58 | // Inner and Anonymous Classes 59 | // =========================================================== 60 | } 61 | -------------------------------------------------------------------------------- /src/org/andengine/entity/util/FrameCounter.java: -------------------------------------------------------------------------------- 1 | package org.andengine.entity.util; 2 | 3 | import org.andengine.engine.handler.IUpdateHandler; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:00:55 - 22.06.2010 11 | */ 12 | public class FrameCounter implements IUpdateHandler { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | private int mFrames; 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Getter & Setter 29 | // =========================================================== 30 | 31 | public int getFrames() { 32 | return this.mFrames; 33 | } 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | @Override 40 | public void onUpdate(final float pSecondsElapsed) { 41 | this.mFrames++; 42 | } 43 | 44 | @Override 45 | public void reset() { 46 | this.mFrames = 0; 47 | } 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } 57 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/SensorDelay.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor; 2 | 3 | import android.hardware.SensorManager; 4 | 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 11:14:38 - 31.10.2010 12 | */ 13 | public enum SensorDelay { 14 | // =========================================================== 15 | // Elements 16 | // =========================================================== 17 | 18 | NORMAL(SensorManager.SENSOR_DELAY_NORMAL), 19 | UI(SensorManager.SENSOR_DELAY_UI), 20 | GAME(SensorManager.SENSOR_DELAY_GAME), 21 | FASTEST(SensorManager.SENSOR_DELAY_FASTEST); 22 | 23 | // =========================================================== 24 | // Constants 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Fields 29 | // =========================================================== 30 | 31 | private final int mDelay; 32 | 33 | // =========================================================== 34 | // Constructors 35 | // =========================================================== 36 | 37 | private SensorDelay(final int pDelay) { 38 | this.mDelay = pDelay; 39 | } 40 | 41 | // =========================================================== 42 | // Getter & Setter 43 | // =========================================================== 44 | 45 | public int getDelay() { 46 | return this.mDelay; 47 | } 48 | 49 | // =========================================================== 50 | // Methods for/from SuperClass/Interfaces 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Methods 55 | // =========================================================== 56 | 57 | // =========================================================== 58 | // Inner and Anonymous Classes 59 | // =========================================================== 60 | } 61 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/acceleration/AccelerationSensorOptions.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.acceleration; 2 | 3 | import org.andengine.input.sensor.SensorDelay; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:10:34 - 31.10.2010 11 | */ 12 | public class AccelerationSensorOptions { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | final SensorDelay mSensorDelay; 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public AccelerationSensorOptions(final SensorDelay pSensorDelay) { 28 | this.mSensorDelay = pSensorDelay; 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | public SensorDelay getSensorDelay() { 36 | return this.mSensorDelay; 37 | } 38 | 39 | // =========================================================== 40 | // Methods for/from SuperClass/Interfaces 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Methods 45 | // =========================================================== 46 | 47 | // =========================================================== 48 | // Inner and Anonymous Classes 49 | // =========================================================== 50 | } 51 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/acceleration/IAccelerationListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.acceleration; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 16:58:38 - 10.03.2010 9 | */ 10 | public interface IAccelerationListener { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void onAccelerationAccuracyChanged(final AccelerationData pAccelerationData); 20 | public void onAccelerationChanged(final AccelerationData pAccelerationData); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/location/ILocationListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.location; 2 | 3 | import android.location.Location; 4 | import android.location.LocationListener; 5 | import android.os.Bundle; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 10:39:23 - 31.10.2010 13 | */ 14 | public interface ILocationListener { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | /** 24 | * @see {@link LocationListener#onProviderEnabled(String)} 25 | */ 26 | public void onLocationProviderEnabled(); 27 | 28 | /** 29 | * @see {@link LocationListener#onLocationChanged(Location)} 30 | */ 31 | public void onLocationChanged(final Location pLocation); 32 | 33 | public void onLocationLost(); 34 | 35 | /** 36 | * @see {@link LocationListener#onProviderDisabled(String)} 37 | */ 38 | public void onLocationProviderDisabled(); 39 | 40 | /** 41 | * @see {@link LocationListener#onStatusChanged(String, int, android.os.Bundle)} 42 | */ 43 | public void onLocationProviderStatusChanged(final LocationProviderStatus pLocationProviderStatus, final Bundle pBundle); 44 | } 45 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/location/LocationProviderStatus.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.location; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 10:55:57 - 31.10.2010 9 | */ 10 | public enum LocationProviderStatus { 11 | // =========================================================== 12 | // Elements 13 | // =========================================================== 14 | 15 | AVAILABLE, 16 | OUT_OF_SERVICE, 17 | TEMPORARILY_UNAVAILABLE; 18 | 19 | // =========================================================== 20 | // Constants 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Fields 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Constructors 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } 47 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/orientation/IOrientationListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.orientation; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 11:30:42 - 25.05.2010 9 | */ 10 | public interface IOrientationListener { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void onOrientationAccuracyChanged(final OrientationData pOrientationData); 20 | public void onOrientationChanged(final OrientationData pOrientationData); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/input/sensor/orientation/OrientationSensorOptions.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.sensor.orientation; 2 | 3 | import org.andengine.input.sensor.SensorDelay; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:12:36 - 31.10.2010 11 | */ 12 | public class OrientationSensorOptions { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | final SensorDelay mSensorDelay; 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public OrientationSensorOptions(final SensorDelay pSensorDelay) { 28 | this.mSensorDelay = pSensorDelay; 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | public SensorDelay getSensorDelay() { 36 | return this.mSensorDelay; 37 | } 38 | 39 | // =========================================================== 40 | // Methods for/from SuperClass/Interfaces 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Methods 45 | // =========================================================== 46 | 47 | // =========================================================== 48 | // Inner and Anonymous Classes 49 | // =========================================================== 50 | } 51 | -------------------------------------------------------------------------------- /src/org/andengine/input/touch/controller/ITouchController.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.touch.controller; 2 | 3 | import org.andengine.engine.handler.IUpdateHandler; 4 | 5 | import android.view.MotionEvent; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 20:23:45 - 13.07.2010 13 | */ 14 | public interface ITouchController extends IUpdateHandler { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | public void setTouchEventCallback(final ITouchEventCallback pTouchEventCallback); 24 | 25 | public void onHandleMotionEvent(final MotionEvent pMotionEvent); 26 | 27 | // =========================================================== 28 | // Inner and Anonymous Classes 29 | // =========================================================== 30 | } 31 | -------------------------------------------------------------------------------- /src/org/andengine/input/touch/controller/ITouchEventCallback.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.touch.controller; 2 | 3 | import org.andengine.input.touch.TouchEvent; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 16:44:26 - 04.04.2012 10 | */ 11 | public interface ITouchEventCallback { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public boolean onTouchEvent(final TouchEvent pTouchEvent); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/input/touch/controller/SingleTouchController.java: -------------------------------------------------------------------------------- 1 | package org.andengine.input.touch.controller; 2 | 3 | import android.view.MotionEvent; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 20:23:33 - 13.07.2010 11 | */ 12 | public class SingleTouchController extends BaseTouchController { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public SingleTouchController() { 26 | 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods for/from SuperClass/Interfaces 35 | // =========================================================== 36 | 37 | @Override 38 | public void onHandleMotionEvent(final MotionEvent pMotionEvent) { 39 | this.fireTouchEvent(pMotionEvent.getX(), pMotionEvent.getY(), pMotionEvent.getAction(), 0, pMotionEvent); 40 | } 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/exception/GLFrameBufferException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.exception; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 10:47:22 - 13.02.2012 9 | */ 10 | public class GLFrameBufferException extends GLException { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | private static final long serialVersionUID = -8910272713633644676L; 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public GLFrameBufferException(final int pError) { 26 | super(pError); 27 | } 28 | 29 | public GLFrameBufferException(final int pError, final String pString) { 30 | super(pError, pString); 31 | } 32 | 33 | // =========================================================== 34 | // Getter & Setter 35 | // =========================================================== 36 | 37 | // =========================================================== 38 | // Methods for/from SuperClass/Interfaces 39 | // =========================================================== 40 | 41 | // =========================================================== 42 | // Methods 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Inner and Anonymous Classes 47 | // =========================================================== 48 | } 49 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/font/FontLibrary.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.font; 2 | 3 | import org.andengine.util.adt.map.Library; 4 | 5 | import android.util.SparseArray; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 11:52:26 - 20.08.2010 13 | */ 14 | public class FontLibrary extends Library { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public FontLibrary() { 28 | super(); 29 | } 30 | 31 | public FontLibrary(final int pInitialCapacity) { 32 | super(pInitialCapacity); 33 | } 34 | 35 | // =========================================================== 36 | // Getter & Setter 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods for/from SuperClass/Interfaces 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Methods 45 | // =========================================================== 46 | 47 | public void loadFonts(final FontManager pFontManager) { 48 | final SparseArray items = this.mItems; 49 | for(int i = items.size() - 1; i >= 0; i--) { 50 | final Font font = items.valueAt(i); 51 | if(font != null) { 52 | pFontManager.loadFont(font); 53 | } 54 | } 55 | } 56 | 57 | // =========================================================== 58 | // Inner and Anonymous Classes 59 | // =========================================================== 60 | } 61 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/font/IFont.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.font; 2 | 3 | import org.andengine.opengl.font.exception.LetterNotFoundException; 4 | import org.andengine.opengl.texture.ITexture; 5 | 6 | /** 7 | * (c) Zynga 2011 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 12:15:25 - 03.11.2011 11 | */ 12 | public interface IFont { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public void load(); 22 | public void unload(); 23 | 24 | public ITexture getTexture(); 25 | 26 | public float getLineHeight(); 27 | 28 | public Letter getLetter(final char pChar) throws LetterNotFoundException; 29 | } 30 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/font/exception/FontException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.font.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 17:53:31 - 01.11.2011 10 | */ 11 | public class FontException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = 2766566088383545102L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public FontException() { 27 | super(); 28 | } 29 | 30 | public FontException(final String pMessage) { 31 | super(pMessage); 32 | } 33 | 34 | public FontException(final Throwable pThrowable) { 35 | super(pThrowable); 36 | } 37 | 38 | public FontException(final String pMessage, final Throwable pThrowable) { 39 | super(pMessage, pThrowable); 40 | } 41 | 42 | // =========================================================== 43 | // Getter & Setter 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/font/exception/LetterNotFoundException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.font.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 12:19:24 - 03.11.2011 8 | */ 9 | public class LetterNotFoundException extends FontException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = 5260601170771253529L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public LetterNotFoundException() { 25 | super(); 26 | } 27 | 28 | public LetterNotFoundException(final String pMessage) { 29 | super(pMessage); 30 | } 31 | 32 | public LetterNotFoundException(final Throwable pThrowable) { 33 | super(pThrowable); 34 | } 35 | 36 | public LetterNotFoundException(final String pMessage, final Throwable pThrowable) { 37 | super(pMessage, pThrowable); 38 | } 39 | 40 | // =========================================================== 41 | // Getter & Setter 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods for/from SuperClass/Interfaces 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/shader/exception/ShaderProgramCompileException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.shader.exception; 2 | /** 3 | * (c) Zynga 2011 4 | * 5 | * @author Nicolas Gramlich 6 | * @since 02:31:53 - 07.08.2011 7 | */ 8 | public class ShaderProgramCompileException extends ShaderProgramException { 9 | // =========================================================== 10 | // Constants 11 | // =========================================================== 12 | 13 | private static final long serialVersionUID = 8284346688949370359L; 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Constructors 21 | // =========================================================== 22 | 23 | public ShaderProgramCompileException(final String pMessage, final String pSource) { 24 | super("Reason: " + pMessage + "\nSource:\n##########################\n" + pSource + "\n##########################"); 25 | } 26 | 27 | // =========================================================== 28 | // Getter & Setter 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Methods for/from SuperClass/Interfaces 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Inner and Anonymous Classes 41 | // =========================================================== 42 | } 43 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/shader/exception/ShaderProgramException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.shader.exception; 2 | 3 | import org.andengine.util.exception.AndEngineRuntimeException; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 02:33:27 - 07.08.2011 10 | */ 11 | public class ShaderProgramException extends AndEngineRuntimeException { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | private static final long serialVersionUID = 2377158902169370516L; 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public ShaderProgramException(final String pMessage) { 27 | super(pMessage); 28 | } 29 | 30 | public ShaderProgramException(final String pMessage, final ShaderProgramException pShaderProgramException) { 31 | super(pMessage, pShaderProgramException); 32 | } 33 | 34 | // =========================================================== 35 | // Getter & Setter 36 | // =========================================================== 37 | 38 | // =========================================================== 39 | // Methods for/from SuperClass/Interfaces 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/shader/exception/ShaderProgramLinkException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.shader.exception; 2 | /** 3 | * (c) Zynga 2011 4 | * 5 | * @author Nicolas Gramlich 6 | * @since 02:31:54 - 07.08.2011 7 | */ 8 | public class ShaderProgramLinkException extends ShaderProgramException { 9 | // =========================================================== 10 | // Constants 11 | // =========================================================== 12 | 13 | private static final long serialVersionUID = 5418521931032742504L; 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Constructors 21 | // =========================================================== 22 | 23 | public ShaderProgramLinkException(final String pMessage) { 24 | super(pMessage); 25 | } 26 | 27 | public ShaderProgramLinkException(final String pMessage, final ShaderProgramException pShaderProgramException) { 28 | super(pMessage, pShaderProgramException); 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } 47 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/shader/source/IShaderSource.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.shader.source; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 16:24:57 - 10.10.2011 10 | */ 11 | public interface IShaderSource { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public String getShaderSource(final GLState pGLState); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/shader/source/StringShaderSource.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.shader.source; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 16:26:08 - 10.10.2011 10 | */ 11 | public class StringShaderSource implements IShaderSource { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | private final String mShaderSource; 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public StringShaderSource(final String pShaderSource) { 27 | this.mShaderSource = pShaderSource; 28 | } 29 | 30 | // =========================================================== 31 | // Getter & Setter 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods for/from SuperClass/Interfaces 36 | // =========================================================== 37 | 38 | @Override 39 | public String getShaderSource(final GLState pGLState) { 40 | return this.mShaderSource; 41 | } 42 | 43 | // =========================================================== 44 | // Methods 45 | // =========================================================== 46 | 47 | // =========================================================== 48 | // Inner and Anonymous Classes 49 | // =========================================================== 50 | } 51 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/ITextureStateListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 11:25:58 - 05.04.2012 9 | */ 10 | public interface ITextureStateListener { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void onLoadedToHardware(final ITexture pTexture); 20 | public void onUnloadedFromHardware(final ITexture pTexture); 21 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/TextureStateAdapter.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture; 2 | 3 | import org.andengine.opengl.texture.atlas.source.ITextureAtlasSource; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 11:28:20 - 05.04.2012 10 | */ 11 | public class TextureStateAdapter implements ITextureStateListener { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | @Override 32 | public void onLoadedToHardware(final ITexture pTexture) { 33 | 34 | } 35 | 36 | @Override 37 | public void onUnloadedFromHardware(final ITexture pTexture) { 38 | 39 | } 40 | 41 | // =========================================================== 42 | // Methods 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Inner and Anonymous Classes 47 | // =========================================================== 48 | } 49 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/atlas/bitmap/source/IBitmapTextureAtlasSource.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.atlas.bitmap.source; 2 | 3 | import org.andengine.opengl.texture.atlas.source.ITextureAtlasSource; 4 | 5 | import android.graphics.Bitmap; 6 | import android.graphics.Bitmap.Config; 7 | 8 | /** 9 | * (c) 2010 Nicolas Gramlich 10 | * (c) 2011 Zynga Inc. 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 12:08:52 - 09.03.2010 14 | */ 15 | public interface IBitmapTextureAtlasSource extends ITextureAtlasSource { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | 24 | @Override 25 | public IBitmapTextureAtlasSource deepCopy(); 26 | 27 | public Bitmap onLoadBitmap(final Config pBitmapConfig); 28 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/atlas/bitmap/source/decorator/shape/IBitmapTextureAtlasSourceDecoratorShape.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.atlas.bitmap.source.decorator.shape; 2 | 3 | import org.andengine.opengl.texture.atlas.bitmap.source.decorator.BaseBitmapTextureAtlasSourceDecorator.TextureAtlasSourceDecoratorOptions; 4 | 5 | import android.graphics.Canvas; 6 | import android.graphics.Paint; 7 | 8 | /** 9 | * (c) 2010 Nicolas Gramlich 10 | * (c) 2011 Zynga Inc. 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 12:47:40 - 04.01.2011 14 | */ 15 | public interface IBitmapTextureAtlasSourceDecoratorShape { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | 24 | public void onDecorateBitmap(final Canvas pCanvas, final Paint pPaint, final TextureAtlasSourceDecoratorOptions pDecoratorOptions); 25 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/atlas/source/ITextureAtlasSource.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.atlas.source; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 11:46:56 - 12.07.2011 10 | */ 11 | public interface ITextureAtlasSource { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public int getTextureX(); 21 | public int getTextureY(); 22 | public void setTextureX(final int pTextureX); 23 | public void setTextureY(final int pTextureY); 24 | 25 | public int getTextureWidth(); 26 | public int getTextureHeight(); 27 | public void setTextureWidth(final int pTextureWidth); 28 | public void setTextureHeight(final int pTextureHeight); 29 | 30 | public ITextureAtlasSource deepCopy(); 31 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/region/BaseTextureRegion.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.region; 2 | 3 | import org.andengine.opengl.texture.ITexture; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 14:29:59 - 08.03.2010 11 | */ 12 | public abstract class BaseTextureRegion implements ITextureRegion { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | protected final ITexture mTexture; 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public BaseTextureRegion(final ITexture pTexture) { 28 | this.mTexture = pTexture; 29 | } 30 | 31 | @Override 32 | public abstract ITextureRegion deepCopy(); 33 | 34 | // =========================================================== 35 | // Getter & Setter 36 | // =========================================================== 37 | 38 | // =========================================================== 39 | // Methods for/from SuperClass/Interfaces 40 | // =========================================================== 41 | 42 | @Override 43 | public ITexture getTexture() { 44 | return this.mTexture; 45 | } 46 | 47 | // =========================================================== 48 | // Methods 49 | // =========================================================== 50 | 51 | // =========================================================== 52 | // Inner and Anonymous Classes 53 | // =========================================================== 54 | } 55 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/region/ITextureRegion.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.region; 2 | 3 | import org.andengine.opengl.texture.ITexture; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:07:17 - 07.08.2011 10 | */ 11 | public interface ITextureRegion { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public float getTextureX(); 21 | public float getTextureY(); 22 | 23 | public void setTextureX(final float pTextureX); 24 | public void setTextureY(final float pTextureY); 25 | public void setTexturePosition(final float pTextureX, final float pTextureY); 26 | 27 | /** 28 | * Note: Takes {@link ITextureRegion#getScale()} into account! 29 | */ 30 | public float getWidth(); 31 | /** 32 | * Note: Takes {@link ITextureRegion#getScale()} into account! 33 | */ 34 | public float getHeight(); 35 | 36 | public void setTextureWidth(final float pTextureWidth); 37 | public void setTextureHeight(final float pTextureHeight); 38 | public void setTextureSize(final float pTextureWidth, final float pTextureHeight); 39 | 40 | public void set(final float pTextureX, final float pTextureY, final float pTextureWidth, final float pTextureHeight); 41 | 42 | public float getU(); 43 | public float getU2(); 44 | public float getV(); 45 | public float getV2(); 46 | 47 | public boolean isScaled(); 48 | public float getScale(); 49 | public boolean isRotated(); 50 | 51 | public ITexture getTexture(); 52 | 53 | public ITextureRegion deepCopy(); 54 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/texture/region/TextureRegionLibrary.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.texture.region; 2 | 3 | import org.andengine.util.adt.map.Library; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:52:26 - 20.08.2010 11 | */ 12 | public class TextureRegionLibrary extends Library { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public TextureRegionLibrary(final int pInitialCapacity) { 26 | super(pInitialCapacity); 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | @Override 34 | public TextureRegion get(final int pID) { 35 | return (TextureRegion) super.get(pID); 36 | } 37 | 38 | public TiledTextureRegion getTiled(final int pID) { 39 | return (TiledTextureRegion) this.mItems.get(pID); 40 | } 41 | 42 | // =========================================================== 43 | // Methods for/from SuperClass/Interfaces 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Methods 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Inner and Anonymous Classes 52 | // =========================================================== 53 | } 54 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/VertexUtils.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 11:18:30 - 10.02.2012 8 | */ 9 | public class VertexUtils { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Fields 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Constructors 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Getter & Setter 24 | // =========================================================== 25 | 26 | // =========================================================== 27 | // Methods for/from SuperClass/Interfaces 28 | // =========================================================== 29 | 30 | // =========================================================== 31 | // Methods 32 | // =========================================================== 33 | 34 | /** 35 | * @param pVertices 36 | * @param pVertexOffset 37 | * @param pVertexStride 38 | * @param pVertexIndex 39 | * @return the value of the pVertexOffset-th attribute of the pVertexIndex-th vertex. 40 | */ 41 | public static float getVertex(final float[] pVertices, final int pVertexOffset, final int pVertexStride, final int pVertexIndex) { 42 | return pVertices[(pVertexIndex * pVertexStride) + pVertexOffset]; 43 | } 44 | 45 | // =========================================================== 46 | // Inner and Anonymous Classes 47 | // =========================================================== 48 | } 49 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/AndroidVersionCodeGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | import org.andengine.util.adt.data.operator.IntOperator; 5 | 6 | import android.os.Build; 7 | 8 | /** 9 | * (c) Zynga 2011 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 17:21:13 - 10.10.2011 13 | */ 14 | public class AndroidVersionCodeGLCriteria extends IntGLCriteria { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public AndroidVersionCodeGLCriteria(final IntOperator pIntOperator, final int pAndroidVersionCode) { 28 | super(pIntOperator, pAndroidVersionCode); 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | @Override 40 | protected int getActualCriteria(final GLState pGLState) { 41 | return Build.VERSION.SDK_INT; 42 | } 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/BuildModelGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | import org.andengine.util.adt.data.operator.StringOperator; 5 | 6 | import android.os.Build; 7 | 8 | /** 9 | * (c) Zynga 2011 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 17:25:47 - 10.10.2011 13 | */ 14 | public class BuildModelGLCriteria extends StringGLCriteria { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | public BuildModelGLCriteria(final StringOperator pStringOperator, final String pBuildModel) { 28 | super(pStringOperator, pBuildModel); 29 | } 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods for/from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | @Override 40 | protected String getActualCriteria(final GLState pGLState) { 41 | return Build.MODEL; 42 | } 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/GLExtensionsGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | import org.andengine.util.adt.data.operator.StringOperator; 5 | 6 | /** 7 | * (c) Zynga 2011 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 21:02:01 - 10.10.2011 11 | */ 12 | public class GLExtensionsGLCriteria extends StringGLCriteria { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public GLExtensionsGLCriteria(final StringOperator pStringOperator, final String pGLExtensions) { 26 | super(pStringOperator, pGLExtensions); 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods for/from SuperClass/Interfaces 35 | // =========================================================== 36 | 37 | @Override 38 | protected String getActualCriteria(final GLState pGLState) { 39 | return pGLState.getExtensions(); 40 | } 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/GLRendererGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | import org.andengine.util.adt.data.operator.StringOperator; 5 | 6 | /** 7 | * (c) Zynga 2011 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 17:04:27 - 10.10.2011 11 | */ 12 | public class GLRendererGLCriteria extends StringGLCriteria { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public GLRendererGLCriteria(final StringOperator pStringOperator, final String pGLRenderer) { 26 | super(pStringOperator, pGLRenderer); 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods for/from SuperClass/Interfaces 35 | // =========================================================== 36 | 37 | @Override 38 | protected String getActualCriteria(final GLState pGLState) { 39 | return pGLState.getRenderer(); 40 | } 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/GLVersionGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | import org.andengine.util.adt.data.operator.StringOperator; 5 | 6 | /** 7 | * (c) Zynga 2011 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 16:52:33 - 10.10.2011 11 | */ 12 | public class GLVersionGLCriteria extends StringGLCriteria { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | public GLVersionGLCriteria(final StringOperator pStringOperator, final String pExpectedGLVersion) { 26 | super(pStringOperator, pExpectedGLVersion); 27 | } 28 | 29 | // =========================================================== 30 | // Getter & Setter 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods for/from SuperClass/Interfaces 35 | // =========================================================== 36 | 37 | @Override 38 | protected String getActualCriteria(final GLState pGLState) { 39 | return pGLState.getVersion(); 40 | } 41 | 42 | // =========================================================== 43 | // Methods 44 | // =========================================================== 45 | 46 | // =========================================================== 47 | // Inner and Anonymous Classes 48 | // =========================================================== 49 | } 50 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/IGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 16:43:34 - 10.10.2011 10 | */ 11 | public interface IGLCriteria { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | public boolean isMet(final GLState pGLState); 21 | 22 | // =========================================================== 23 | // Inner and Anonymous Classes 24 | // =========================================================== 25 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/LogicalAndGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 18:15:55 - 12.10.2011 10 | */ 11 | public class LogicalAndGLCriteria implements IGLCriteria { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | private final IGLCriteria[] mGLCriterias; 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public LogicalAndGLCriteria(final IGLCriteria ... pGLCriterias) { 27 | this.mGLCriterias = pGLCriterias; 28 | } 29 | 30 | // =========================================================== 31 | // Getter & Setter 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods for/from SuperClass/Interfaces 36 | // =========================================================== 37 | 38 | @Override 39 | public boolean isMet(final GLState pGLState) { 40 | for(final IGLCriteria gLCriteria : this.mGLCriterias) { 41 | if(!gLCriteria.isMet(pGLState)) { 42 | return false; 43 | } 44 | } 45 | return true; 46 | } 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/util/criteria/LogicalOrGLCriteria.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.util.criteria; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 18:10:26 - 12.10.2011 10 | */ 11 | public class LogicalOrGLCriteria implements IGLCriteria { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | private final IGLCriteria[] mGLCriterias; 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | public LogicalOrGLCriteria(final IGLCriteria ... pGLCriterias) { 27 | this.mGLCriterias = pGLCriterias; 28 | } 29 | 30 | // =========================================================== 31 | // Getter & Setter 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods for/from SuperClass/Interfaces 36 | // =========================================================== 37 | 38 | @Override 39 | public boolean isMet(final GLState pGLState) { 40 | for(final IGLCriteria gLCriteria : this.mGLCriterias) { 41 | if(gLCriteria.isMet(pGLState)) { 42 | return true; 43 | } 44 | } 45 | return false; 46 | } 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/opengl/vbo/DrawType.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.vbo; 2 | 3 | import android.opengl.GLES20; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 15:41:14 - 27.03.2012 10 | */ 11 | public enum DrawType { 12 | // =========================================================== 13 | // Elements 14 | // =========================================================== 15 | 16 | STATIC(GLES20.GL_STATIC_DRAW), 17 | DYNAMIC(GLES20.GL_DYNAMIC_DRAW), 18 | STREAM(GLES20.GL_STREAM_DRAW); 19 | 20 | // =========================================================== 21 | // Constants 22 | // =========================================================== 23 | 24 | private final int mUsage; 25 | 26 | // =========================================================== 27 | // Fields 28 | // =========================================================== 29 | 30 | // =========================================================== 31 | // Constructors 32 | // =========================================================== 33 | 34 | private DrawType(final int pUsage) { 35 | this.mUsage = pUsage; 36 | } 37 | 38 | // =========================================================== 39 | // Getter & Setter 40 | // =========================================================== 41 | 42 | public int getUsage() { 43 | return this.mUsage; 44 | } 45 | 46 | // =========================================================== 47 | // Methods for/from SuperClass/Interfaces 48 | // =========================================================== 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } -------------------------------------------------------------------------------- /src/org/andengine/opengl/view/IRendererListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.opengl.view; 2 | 3 | import org.andengine.opengl.util.GLState; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:57:29 - 08.03.2010 11 | */ 12 | public interface IRendererListener { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | public void onSurfaceCreated(final GLState pGlState); 18 | public void onSurfaceChanged(final GLState pGlState, final int pWidth, final int pHeight); 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | } -------------------------------------------------------------------------------- /src/org/andengine/ui/activity/LayoutGameActivity.java: -------------------------------------------------------------------------------- 1 | package org.andengine.ui.activity; 2 | 3 | import org.andengine.opengl.view.RenderSurfaceView; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 10:18:50 - 06.10.2010 11 | */ 12 | public abstract class LayoutGameActivity extends BaseGameActivity { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | protected abstract int getLayoutID(); 34 | protected abstract int getRenderSurfaceViewID(); 35 | 36 | @Override 37 | protected void onSetContentView() { 38 | super.setContentView(this.getLayoutID()); 39 | 40 | this.mRenderSurfaceView = (RenderSurfaceView) this.findViewById(this.getRenderSurfaceViewID()); 41 | 42 | this.mRenderSurfaceView.setRenderer(this.mEngine, this); 43 | } 44 | 45 | // =========================================================== 46 | // Methods 47 | // =========================================================== 48 | 49 | // =========================================================== 50 | // Inner and Anonymous Classes 51 | // =========================================================== 52 | } 53 | -------------------------------------------------------------------------------- /src/org/andengine/util/Constants.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 13:52:21 - 08.03.2010 9 | */ 10 | public interface Constants { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | public static final String DEBUGTAG = "AndEngine"; 16 | 17 | public static final int VERTEX_INDEX_X = 0; 18 | public static final int VERTEX_INDEX_Y = 1; 19 | 20 | // =========================================================== 21 | // Methods 22 | // =========================================================== 23 | } 24 | -------------------------------------------------------------------------------- /src/org/andengine/util/DialogUtils.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | import android.app.Dialog; 4 | import android.view.WindowManager; 5 | 6 | /** 7 | * (c) 2010 Nicolas Gramlich 8 | * (c) 2011 Zynga Inc. 9 | * 10 | * @author Nicolas Gramlich 11 | * @since 13:04:09 - 12.05.2011 12 | */ 13 | public class DialogUtils { 14 | // =========================================================== 15 | // Constants 16 | // =========================================================== 17 | 18 | // =========================================================== 19 | // Fields 20 | // =========================================================== 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | // =========================================================== 27 | // Getter & Setter 28 | // =========================================================== 29 | 30 | // =========================================================== 31 | // Methods for/from SuperClass/Interfaces 32 | // =========================================================== 33 | 34 | // =========================================================== 35 | // Methods 36 | // =========================================================== 37 | 38 | public static void keepScreenOn(final Dialog pDialog) { 39 | pDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); 40 | } 41 | 42 | // =========================================================== 43 | // Inner and Anonymous Classes 44 | // =========================================================== 45 | } 46 | -------------------------------------------------------------------------------- /src/org/andengine/util/HorizontalAlign.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 10:47:33 - 11.05.2010 9 | */ 10 | public enum HorizontalAlign { 11 | // =========================================================== 12 | // Elements 13 | // =========================================================== 14 | 15 | LEFT, 16 | CENTER, 17 | RIGHT; 18 | 19 | // =========================================================== 20 | // Constants 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Fields 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Constructors 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } 47 | -------------------------------------------------------------------------------- /src/org/andengine/util/IMatcher.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 12:32:22 - 26.12.2010 9 | */ 10 | public interface IMatcher { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public boolean matches(final T pObject); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/org/andengine/util/VerticalAlign.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 15:15:23 - 24.07.2010 9 | */ 10 | public enum VerticalAlign { 11 | // =========================================================== 12 | // Elements 13 | // =========================================================== 14 | 15 | TOP, 16 | CENTER, 17 | BOTTOM; 18 | 19 | // =========================================================== 20 | // Constants 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Fields 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Constructors 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Getter & Setter 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Methods from SuperClass/Interfaces 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods 41 | // =========================================================== 42 | 43 | // =========================================================== 44 | // Inner and Anonymous Classes 45 | // =========================================================== 46 | } 47 | -------------------------------------------------------------------------------- /src/org/andengine/util/ViewUtils.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | /** 9 | * (c) 2010 Nicolas Gramlich 10 | * (c) 2011 Zynga Inc. 11 | * 12 | * @author Nicolas Gramlich 13 | * @since 20:55:35 - 08.09.2009 14 | */ 15 | public final class ViewUtils { 16 | // =========================================================== 17 | // Constants 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Fields 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Constructors 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Getter & Setter 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Methods for/from SuperClass/Interfaces 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Methods 38 | // =========================================================== 39 | 40 | public static final View inflate(final Context pContext, final int pLayoutID){ 41 | return LayoutInflater.from(pContext).inflate(pLayoutID, null); 42 | } 43 | 44 | public static final View inflate(final Context pContext, final int pLayoutID, final ViewGroup pViewGroup){ 45 | return LayoutInflater.from(pContext).inflate(pLayoutID, pViewGroup, true); 46 | } 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/bounds/IBounds.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.bounds; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 7:45:19 AM - Oct 10, 2011 8 | */ 9 | public interface IBounds { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | } 18 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/bounds/IFloatBounds.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.bounds; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 7:42:02 AM - Oct 10, 2011 8 | */ 9 | public interface IFloatBounds extends IBounds { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public float getXMin(); 19 | public float getYMin(); 20 | public float getXMax(); 21 | public float getYMax(); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/bounds/IIntBounds.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.bounds; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 7:42:02 AM - Oct 10, 2011 8 | */ 9 | public interface IIntBounds extends IBounds { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public int getXMin(); 19 | public int getYMin(); 20 | public int getXMax(); 21 | public int getYMax(); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/data/DataUtils.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.data; 2 | 3 | 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:01:49 - 20.03.2011 11 | */ 12 | public final class DataUtils { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | public static final int unsignedByteToInt(final byte pByte) { 34 | return pByte & 0xFF; 35 | } 36 | 37 | // =========================================================== 38 | // Methods 39 | // =========================================================== 40 | 41 | // =========================================================== 42 | // Inner and Anonymous Classes 43 | // =========================================================== 44 | } 45 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/io/in/AssetInputStreamOpener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.io.in; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import android.content.res.AssetManager; 7 | 8 | /** 9 | * (c) Zynga 2012 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 12:05:38 - 02.03.2012 13 | */ 14 | public class AssetInputStreamOpener implements IInputStreamOpener { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | private final AssetManager mAssetManager; 24 | private final String mAssetPath; 25 | 26 | // =========================================================== 27 | // Constructors 28 | // =========================================================== 29 | 30 | public AssetInputStreamOpener(final AssetManager pAssetManager, final String pAssetPath) { 31 | this.mAssetManager = pAssetManager; 32 | this.mAssetPath = pAssetPath; 33 | } 34 | 35 | // =========================================================== 36 | // Getter & Setter 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods for/from SuperClass/Interfaces 41 | // =========================================================== 42 | 43 | @Override 44 | public InputStream open() throws IOException { 45 | return this.mAssetManager.open(this.mAssetPath); 46 | } 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/io/in/IInputStreamOpener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.io.in; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:54:25 - 02.03.2012 11 | */ 12 | public interface IInputStreamOpener { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public InputStream open() throws IOException; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/io/in/ResourceInputStreamOpener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.io.in; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import android.content.res.Resources; 7 | 8 | /** 9 | * (c) Zynga 2012 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 12:07:14 - 02.03.2012 13 | */ 14 | public class ResourceInputStreamOpener implements IInputStreamOpener { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | private final Resources mResources; 24 | private final int mResourceID; 25 | 26 | // =========================================================== 27 | // Constructors 28 | // =========================================================== 29 | 30 | public ResourceInputStreamOpener(final Resources pResources, final int pResourceID) { 31 | this.mResources = pResources; 32 | this.mResourceID = pResourceID; 33 | } 34 | 35 | // =========================================================== 36 | // Getter & Setter 37 | // =========================================================== 38 | 39 | // =========================================================== 40 | // Methods for/from SuperClass/Interfaces 41 | // =========================================================== 42 | 43 | @Override 44 | public InputStream open() throws IOException { 45 | return this.mResources.openRawResource(this.mResourceID); 46 | } 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/IFloatList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 11:14:45 - 27.01.2012 8 | */ 9 | public interface IFloatList { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public boolean isEmpty(); 19 | public float get(final int pIndex) throws ArrayIndexOutOfBoundsException; 20 | public void add(final float pItem); 21 | public void add(final int pIndex, final float pItem) throws ArrayIndexOutOfBoundsException; 22 | public float remove(final int pIndex) throws ArrayIndexOutOfBoundsException; 23 | public int size(); 24 | public void clear(); 25 | public float[] toArray(); 26 | } -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/IIntList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 19:21:53 - 03.05.2012 8 | */ 9 | public interface IIntList { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public boolean isEmpty(); 19 | public float get(final int pIndex) throws ArrayIndexOutOfBoundsException; 20 | public void add(final int pItem); 21 | public void add(final int pIndex, final int pItem) throws ArrayIndexOutOfBoundsException; 22 | public float remove(final int pIndex) throws ArrayIndexOutOfBoundsException; 23 | public int size(); 24 | public void clear(); 25 | public int[] toArray(); 26 | } -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/IList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 15:27:16 - 01.02.2012 8 | */ 9 | public interface IList { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public boolean isEmpty(); 19 | public T get(final int pIndex) throws IndexOutOfBoundsException; 20 | public void set(final int pIndex, final T pItem) throws IndexOutOfBoundsException; 21 | public int indexOf(final T pItem); 22 | public void add(final T pItem); 23 | public void add(final int pIndex, final T pItem) throws IndexOutOfBoundsException; 24 | public boolean remove(final T pItem); 25 | public T removeFirst(); 26 | public T removeLast(); 27 | public T remove(final int pIndex) throws IndexOutOfBoundsException; 28 | public int size(); 29 | public void clear(); 30 | } 31 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/ILongList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 19:36:57 - 03.05.2012 8 | */ 9 | public interface ILongList { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public boolean isEmpty(); 19 | public float get(final int pIndex) throws ArrayIndexOutOfBoundsException; 20 | public void add(final long pItem); 21 | public void add(final int pIndex, final long pItem) throws ArrayIndexOutOfBoundsException; 22 | public float remove(final int pIndex) throws ArrayIndexOutOfBoundsException; 23 | public int size(); 24 | public void clear(); 25 | public long[] toArray(); 26 | } -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/ISortedList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 15:37:19 - 01.02.2012 9 | */ 10 | public interface ISortedList extends IList { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | } 19 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/list/IUniqueList.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.list; 2 | 3 | 4 | /** 5 | * (c) Zynga 2012 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 15:37:19 - 01.02.2012 9 | */ 10 | public interface IUniqueList extends IList { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | } 19 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/pool/RunnablePoolItem.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.pool; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 23:46:50 - 27.08.2010 9 | */ 10 | public abstract class RunnablePoolItem extends PoolItem implements Runnable { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Constructors 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Getter & Setter 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Methods for/from SuperClass/Interfaces 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Methods 33 | // =========================================================== 34 | 35 | // =========================================================== 36 | // Inner and Anonymous Classes 37 | // =========================================================== 38 | } -------------------------------------------------------------------------------- /src/org/andengine/util/adt/queue/IQueue.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.queue; 2 | 3 | import org.andengine.util.adt.list.IList; 4 | 5 | /** 6 | * (c) Zynga 2012 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 15:00:30 - 24.01.2012 10 | */ 11 | public interface IQueue extends IList { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public T peek(); 21 | public T poll(); 22 | public void enter(final T pItem); 23 | public void enter(final int pIndex, final T pItem) throws IndexOutOfBoundsException; 24 | } 25 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/queue/ISortedQueue.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.queue; 2 | 3 | import org.andengine.util.adt.list.ISortedList; 4 | 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:37:19 - 01.02.2012 11 | */ 12 | public interface ISortedQueue extends IQueue, ISortedList { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/queue/IUniqueQueue.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.queue; 2 | 3 | import org.andengine.util.adt.list.ISortedList; 4 | 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 15:37:19 - 01.02.2012 11 | */ 12 | public interface IUniqueQueue extends IQueue, ISortedList { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/spatial/ISpatialItem.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.spatial; 2 | 3 | import org.andengine.util.adt.bounds.IBounds; 4 | 5 | 6 | /** 7 | * (c) Zynga 2011 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 20:23:12 - 07.10.2011 11 | */ 12 | public interface ISpatialItem { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public B getBounds(); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/util/adt/transformation/TransformationPool.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.transformation; 2 | 3 | import org.andengine.util.adt.pool.GenericPool; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 23:07:53 - 23.02.2011 11 | */ 12 | public class TransformationPool { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | private static final GenericPool POOL = new GenericPool() { 22 | @Override 23 | protected Transformation onAllocatePoolItem() { 24 | return new Transformation(); 25 | } 26 | }; 27 | 28 | // =========================================================== 29 | // Constructors 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Getter & Setter 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Methods for/from SuperClass/Interfaces 38 | // =========================================================== 39 | 40 | public static Transformation obtain() { 41 | return POOL.obtainPoolItem(); 42 | } 43 | 44 | public static void recycle(final Transformation pTransformation) { 45 | pTransformation.setToIdentity(); 46 | POOL.recyclePoolItem(pTransformation); 47 | } 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } -------------------------------------------------------------------------------- /src/org/andengine/util/adt/trie/ITrie.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.adt.trie; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 12:18:44 - 30.01.2012 8 | */ 9 | public interface ITrie { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | // =========================================================== 15 | // Methods 16 | // =========================================================== 17 | 18 | public void add(final CharSequence pCharSequence); 19 | public void add(final CharSequence pCharSequence, final int pStart, final int pEnd); 20 | public boolean contains(final CharSequence pCharSequence); 21 | public boolean contains(final CharSequence pCharSequence, final int pStart, final int pEnd); 22 | /* TODO public void clear(); */ 23 | /* TODO public boolean remove(final CharSequence pCharSequence); */ 24 | /* TODO public boolean remove(final CharSequence pCharSequence, final int pStart, final int pEnd); */ 25 | } 26 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/hull/IHullAlgorithm.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.hull; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 13:46:22 - 14.09.2010 10 | */ 11 | public interface IHullAlgorithm { 12 | // =========================================================== 13 | // Final Fields 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | /** 21 | * @param pVertices a interleaved float[] containing vertex data. 22 | * @param pVertexCount the amount of vertices to look at in pVertices. 23 | * @param pVertexOffsetX the offset of the x-coordinate in a vertex. 24 | * @param pVertexOffsetY the offset of the y-coordinate in a vertex. 25 | * @param pStride the stride between each vertex. 26 | * @return 27 | */ 28 | public int computeHull(final float[] pVertices, final int pVertexCount, final int pVertexOffsetX, final int pVertexOffsetY, final int pStride); 29 | } 30 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/ICostFunction.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 23:00:24 - 16.08.2010 9 | */ 10 | public interface ICostFunction { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Fields 17 | // =========================================================== 18 | 19 | public float getCost(final IPathFinderMap pPathFinderMap, final int pFromX, final int pFromY, final int pToX, final int pToY, final T pEntity); 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/IPathFinderMap.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 23:00:24 - 16.08.2010 10 | */ 11 | public interface IPathFinderMap { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | public boolean isBlocked(final int pX, final int pY, final T pEntity); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/astar/EuclideanHeuristic.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path.astar; 2 | 3 | import org.andengine.util.algorithm.path.IPathFinderMap; 4 | 5 | import android.util.FloatMath; 6 | 7 | /** 8 | * (c) 2010 Nicolas Gramlich 9 | * (c) 2011 Zynga Inc. 10 | * 11 | * @author Nicolas Gramlich 12 | * @since 22:58:01 - 16.08.2010 13 | */ 14 | public class EuclideanHeuristic implements IAStarHeuristic { 15 | // =========================================================== 16 | // Constants 17 | // =========================================================== 18 | 19 | // =========================================================== 20 | // Fields 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Constructors 25 | // =========================================================== 26 | 27 | // =========================================================== 28 | // Getter & Setter 29 | // =========================================================== 30 | 31 | // =========================================================== 32 | // Methods for/from SuperClass/Interfaces 33 | // =========================================================== 34 | 35 | @Override 36 | public float getExpectedRestCost(final IPathFinderMap pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) { 37 | final float dX = pToX - pFromX; 38 | final float dY = pToY - pFromY; 39 | 40 | return FloatMath.sqrt(dX * dX + dY * dY); 41 | } 42 | 43 | // =========================================================== 44 | // Methods 45 | // =========================================================== 46 | 47 | // =========================================================== 48 | // Inner and Anonymous Classes 49 | // =========================================================== 50 | } 51 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/astar/IAStarHeuristic.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path.astar; 2 | 3 | import org.andengine.util.algorithm.path.IPathFinderMap; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 22:59:20 - 16.08.2010 11 | */ 12 | public interface IAStarHeuristic { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | public float getExpectedRestCost(final IPathFinderMap pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY); 22 | } 23 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/astar/ManhattanHeuristic.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path.astar; 2 | 3 | import org.andengine.util.algorithm.path.IPathFinderMap; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 22:58:01 - 16.08.2010 11 | */ 12 | public class ManhattanHeuristic implements IAStarHeuristic { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | @Override 34 | public float getExpectedRestCost(final IPathFinderMap pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) { 35 | return Math.abs(pFromX - pToX) + Math.abs(pFromY - pToY); 36 | } 37 | 38 | // =========================================================== 39 | // Methods 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Inner and Anonymous Classes 44 | // =========================================================== 45 | } 46 | -------------------------------------------------------------------------------- /src/org/andengine/util/algorithm/path/astar/NullHeuristic.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.algorithm.path.astar; 2 | 3 | import org.andengine.util.algorithm.path.IPathFinderMap; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 22:58:01 - 16.08.2010 11 | */ 12 | public class NullHeuristic implements IAStarHeuristic { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | @Override 34 | public float getExpectedRestCost(final IPathFinderMap pPathFinderMap, final T pEntity, final int pFromX, final int pFromY, final int pToX, final int pToY) { 35 | return 0; 36 | } 37 | 38 | // =========================================================== 39 | // Methods 40 | // =========================================================== 41 | 42 | // =========================================================== 43 | // Inner and Anonymous Classes 44 | // =========================================================== 45 | } 46 | -------------------------------------------------------------------------------- /src/org/andengine/util/call/AsyncCallable.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.call; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 15:00:30 - 14.05.2010 9 | * @param 10 | */ 11 | public interface AsyncCallable { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | /** 21 | * Computes a result asynchronously, return values and exceptions are to be handled through the callbacks. 22 | * This method is expected to return almost immediately, after starting a {@link Thread} or similar. 23 | * 24 | * @return computed result 25 | * @throws Exception if unable to compute a result 26 | */ 27 | public void call(final Callback pCallback, final Callback pExceptionCallback); 28 | } -------------------------------------------------------------------------------- /src/org/andengine/util/call/Callable.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.call; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 20:52:44 - 03.01.2010 9 | */ 10 | public interface Callable { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | /** 20 | * Computes a result, or throws an exception if unable to do so. 21 | * 22 | * @return the computed result. 23 | * @throws Exception if unable to compute a result. 24 | */ 25 | public T call() throws Exception; 26 | } -------------------------------------------------------------------------------- /src/org/andengine/util/call/Callback.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.call; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 09:40:55 - 14.12.2009 9 | */ 10 | public interface Callback { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void onCallback(final T pCallbackValue); 20 | } -------------------------------------------------------------------------------- /src/org/andengine/util/call/ParameterCallable.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.call; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 23:40:42 - 27.12.2010 9 | */ 10 | public interface ParameterCallable { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | // =========================================================== 16 | // Methods 17 | // =========================================================== 18 | 19 | public void call(final T pParameter); 20 | } -------------------------------------------------------------------------------- /src/org/andengine/util/color/ColorPool.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.color; 2 | 3 | import org.andengine.util.adt.pool.GenericPool; 4 | 5 | /** 6 | * (c) Zynga 2011 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 2:25:20 - 12.08.2011 10 | */ 11 | public class ColorPool extends GenericPool { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | 32 | @Override 33 | protected Color onAllocatePoolItem() { 34 | return new Color(Color.WHITE); 35 | } 36 | 37 | @Override 38 | protected void onHandleRecycleItem(final Color pColor) { 39 | pColor.setChecking(Color.WHITE); 40 | 41 | super.onHandleRecycleItem(pColor); 42 | } 43 | 44 | // =========================================================== 45 | // Methods 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Inner and Anonymous Classes 50 | // =========================================================== 51 | } 52 | -------------------------------------------------------------------------------- /src/org/andengine/util/color/constants/ColorConstants.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.color.constants; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 10:21:46 - 19.07.2010 9 | */ 10 | public interface ColorConstants { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | public static final float COLOR_FACTOR_INT_TO_FLOAT = 255.0f; 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | } 21 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/AndEngineException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 02:40:26 - 07.08.2011 8 | */ 9 | public class AndEngineException extends Exception { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = 6577340337732194722L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public AndEngineException() { 25 | super(); 26 | } 27 | 28 | public AndEngineException(final String pMessage) { 29 | super(pMessage); 30 | } 31 | 32 | public AndEngineException(final Throwable pThrowable) { 33 | super(pThrowable); 34 | } 35 | 36 | public AndEngineException(final String pMessage, final Throwable pThrowable) { 37 | super(pMessage, pThrowable); 38 | } 39 | 40 | // =========================================================== 41 | // Getter & Setter 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods for/from SuperClass/Interfaces 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/AndEngineRuntimeException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 02:40:26 - 07.08.2011 8 | */ 9 | public class AndEngineRuntimeException extends RuntimeException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | public static final long serialVersionUID = -4325207483842883006L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | 25 | public AndEngineRuntimeException() { 26 | super(); 27 | } 28 | 29 | public AndEngineRuntimeException(final String pMessage) { 30 | super(pMessage); 31 | } 32 | 33 | public AndEngineRuntimeException(final Throwable pThrowable) { 34 | super(pThrowable); 35 | } 36 | 37 | public AndEngineRuntimeException(final String pMessage, final Throwable pThrowable) { 38 | super(pMessage, pThrowable); 39 | } 40 | 41 | // =========================================================== 42 | // Getter & Setter 43 | // =========================================================== 44 | 45 | // =========================================================== 46 | // Methods for/from SuperClass/Interfaces 47 | // =========================================================== 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } 57 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/CancelledException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2012 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 16:33:53 - 23.04.2012 8 | */ 9 | public class CancelledException extends AndEngineException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = -78123211381435596L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | // =========================================================== 25 | // Getter & Setter 26 | // =========================================================== 27 | 28 | // =========================================================== 29 | // Methods for/from SuperClass/Interfaces 30 | // =========================================================== 31 | 32 | // =========================================================== 33 | // Methods 34 | // =========================================================== 35 | 36 | // =========================================================== 37 | // Inner and Anonymous Classes 38 | // =========================================================== 39 | } 40 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/MethodNotSupportedException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 18:13:32 - 26.12.2011 8 | */ 9 | public class MethodNotSupportedException extends AndEngineRuntimeException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = 1248621152476879759L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public MethodNotSupportedException() { 25 | 26 | } 27 | 28 | public MethodNotSupportedException(final String pMessage) { 29 | super(pMessage); 30 | } 31 | 32 | public MethodNotSupportedException(final Throwable pThrowable) { 33 | super(pThrowable); 34 | } 35 | 36 | public MethodNotSupportedException(final String pMessage, final Throwable pThrowable) { 37 | super(pMessage, pThrowable); 38 | } 39 | 40 | // =========================================================== 41 | // Getter & Setter 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods for/from SuperClass/Interfaces 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/MethodNotYetImplementedException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 12:25:52 - 03.11.2011 8 | */ 9 | public class MethodNotYetImplementedException extends AndEngineRuntimeException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = -4308430823868086531L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public MethodNotYetImplementedException() { 25 | 26 | } 27 | 28 | public MethodNotYetImplementedException(final String pMessage) { 29 | super(pMessage); 30 | } 31 | 32 | public MethodNotYetImplementedException(final Throwable pThrowable) { 33 | super(pThrowable); 34 | } 35 | 36 | public MethodNotYetImplementedException(final String pMessage, final Throwable pThrowable) { 37 | super(pMessage, pThrowable); 38 | } 39 | 40 | // =========================================================== 41 | // Getter & Setter 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods for/from SuperClass/Interfaces 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/exception/NullBitmapException.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.exception; 2 | 3 | /** 4 | * (c) Zynga 2011 5 | * 6 | * @author Nicolas Gramlich 7 | * @since 14:52:38 - 16.09.2011 8 | */ 9 | public class NullBitmapException extends AndEngineRuntimeException { 10 | // =========================================================== 11 | // Constants 12 | // =========================================================== 13 | 14 | private static final long serialVersionUID = -2183655622078988389L; 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | // =========================================================== 21 | // Constructors 22 | // =========================================================== 23 | 24 | public NullBitmapException() { 25 | 26 | } 27 | 28 | public NullBitmapException(final String pMessage) { 29 | super(pMessage); 30 | } 31 | 32 | public NullBitmapException(final Throwable pThrowable) { 33 | super(pThrowable); 34 | } 35 | 36 | public NullBitmapException(final String pMessage, final Throwable pThrowable) { 37 | super(pMessage, pThrowable); 38 | } 39 | 40 | // =========================================================== 41 | // Getter & Setter 42 | // =========================================================== 43 | 44 | // =========================================================== 45 | // Methods for/from SuperClass/Interfaces 46 | // =========================================================== 47 | 48 | // =========================================================== 49 | // Methods 50 | // =========================================================== 51 | 52 | // =========================================================== 53 | // Inner and Anonymous Classes 54 | // =========================================================== 55 | } 56 | -------------------------------------------------------------------------------- /src/org/andengine/util/level/IEntityLoader.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.level; 2 | 3 | import org.andengine.entity.IEntity; 4 | import org.xml.sax.Attributes; 5 | 6 | /** 7 | * (c) Zynga 2012 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 18:38:40 - 18.04.2012 11 | */ 12 | public interface IEntityLoader { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Methods 19 | // =========================================================== 20 | 21 | public IEntity onLoadEntity(final String pEntityName, final Attributes pAttributes); 22 | } -------------------------------------------------------------------------------- /src/org/andengine/util/level/constants/LevelConstants.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.level.constants; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 14:23:27 - 11.10.2010 10 | */ 11 | public interface LevelConstants { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | public static final String TAG_LEVEL = "level"; 17 | public static final String TAG_LEVEL_ATTRIBUTE_NAME = "name"; 18 | public static final String TAG_LEVEL_ATTRIBUTE_UID = "uid"; 19 | public static final String TAG_LEVEL_ATTRIBUTE_WIDTH = "width"; 20 | public static final String TAG_LEVEL_ATTRIBUTE_HEIGHT = "height"; 21 | 22 | // =========================================================== 23 | // Methods 24 | // =========================================================== 25 | } 26 | -------------------------------------------------------------------------------- /src/org/andengine/util/math/MathConstants.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.math; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 16:49:25 - 26.07.2010 9 | */ 10 | public interface MathConstants { 11 | // =========================================================== 12 | // Constants 13 | // =========================================================== 14 | 15 | public static final float PI = (float) Math.PI; 16 | 17 | public static float PI_TWICE = PI * 2.0f; 18 | public static float PI_HALF = PI * 0.5f; 19 | 20 | public static final float DEG_TO_RAD = PI / 180.0f; 21 | public static final float RAD_TO_DEG = 180.0f / PI; 22 | 23 | // =========================================================== 24 | // Methods 25 | // =========================================================== 26 | } 27 | -------------------------------------------------------------------------------- /src/org/andengine/util/mime/MIMEType.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.mime; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Nicolas Gramlich 8 | * @since 14:58:20 - 10.01.2011 9 | */ 10 | public enum MIMEType { 11 | // =========================================================== 12 | // Elements 13 | // =========================================================== 14 | 15 | JPEG("image/jpeg"), 16 | GIF("image/gif"), 17 | PNG("image/png"); 18 | 19 | // =========================================================== 20 | // Constants 21 | // =========================================================== 22 | 23 | // =========================================================== 24 | // Fields 25 | // =========================================================== 26 | 27 | private final String mTypeString; 28 | 29 | // =========================================================== 30 | // Constructors 31 | // =========================================================== 32 | 33 | private MIMEType(final String pTypeString) { 34 | this.mTypeString = pTypeString; 35 | } 36 | 37 | // =========================================================== 38 | // Getter & Setter 39 | // =========================================================== 40 | 41 | public String getTypeString() { 42 | return this.mTypeString; 43 | } 44 | 45 | // =========================================================== 46 | // Methods for/from SuperClass/Interfaces 47 | // =========================================================== 48 | 49 | // =========================================================== 50 | // Methods 51 | // =========================================================== 52 | 53 | // =========================================================== 54 | // Inner and Anonymous Classes 55 | // =========================================================== 56 | } 57 | -------------------------------------------------------------------------------- /src/org/andengine/util/modifier/ease/EaseLinear.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.modifier.ease; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Gil 8 | * @author Nicolas Gramlich 9 | * @since 16:50:40 - 26.07.2010 10 | */ 11 | public class EaseLinear implements IEaseFunction { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Fields 18 | // =========================================================== 19 | 20 | private static EaseLinear INSTANCE; 21 | 22 | // =========================================================== 23 | // Constructors 24 | // =========================================================== 25 | 26 | private EaseLinear() { 27 | 28 | } 29 | 30 | public static EaseLinear getInstance() { 31 | if(INSTANCE == null) { 32 | INSTANCE = new EaseLinear(); 33 | } 34 | return INSTANCE; 35 | } 36 | 37 | // =========================================================== 38 | // Getter & Setter 39 | // =========================================================== 40 | 41 | // =========================================================== 42 | // Methods for/from SuperClass/Interfaces 43 | // =========================================================== 44 | 45 | @Override 46 | public float getPercentage(final float pSecondsElapsed, final float pDuration) { 47 | return pSecondsElapsed / pDuration; 48 | } 49 | 50 | // =========================================================== 51 | // Methods 52 | // =========================================================== 53 | 54 | // =========================================================== 55 | // Inner and Anonymous Classes 56 | // =========================================================== 57 | } 58 | -------------------------------------------------------------------------------- /src/org/andengine/util/modifier/ease/IEaseFunction.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.modifier.ease; 2 | 3 | /** 4 | * (c) 2010 Nicolas Gramlich 5 | * (c) 2011 Zynga Inc. 6 | * 7 | * @author Gil 8 | * @author Nicolas Gramlich 9 | * @since 17:13:17 - 26.07.2010 10 | */ 11 | public interface IEaseFunction { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | public float getPercentage(final float pSecondsElapsed, final float pDuration); 21 | } 22 | -------------------------------------------------------------------------------- /src/org/andengine/util/modifier/util/ModifierUtils.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.modifier.util; 2 | 3 | import org.andengine.util.modifier.IModifier; 4 | 5 | /** 6 | * (c) 2010 Nicolas Gramlich 7 | * (c) 2011 Zynga Inc. 8 | * 9 | * @author Nicolas Gramlich 10 | * @since 11:16:36 - 03.09.2010 11 | */ 12 | public class ModifierUtils { 13 | // =========================================================== 14 | // Constants 15 | // =========================================================== 16 | 17 | // =========================================================== 18 | // Fields 19 | // =========================================================== 20 | 21 | // =========================================================== 22 | // Constructors 23 | // =========================================================== 24 | 25 | // =========================================================== 26 | // Getter & Setter 27 | // =========================================================== 28 | 29 | // =========================================================== 30 | // Methods for/from SuperClass/Interfaces 31 | // =========================================================== 32 | 33 | // =========================================================== 34 | // Methods 35 | // =========================================================== 36 | 37 | public static float getSequenceDurationOfModifier(final IModifier[] pModifiers){ 38 | float duration = Float.MIN_VALUE; 39 | 40 | for(int i = pModifiers.length - 1; i >= 0; i--) { 41 | duration += pModifiers[i].getDuration(); 42 | } 43 | 44 | return duration; 45 | } 46 | 47 | // =========================================================== 48 | // Inner and Anonymous Classes 49 | // =========================================================== 50 | } 51 | -------------------------------------------------------------------------------- /src/org/andengine/util/progress/IProgressListener.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.progress; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 18:07:35 - 09.07.2009 10 | */ 11 | public interface IProgressListener { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | public static final int PROGRESS_MIN = 0; 17 | public static final int PROGRESS_MAX = 100; 18 | 19 | // =========================================================== 20 | // Methods 21 | // =========================================================== 22 | 23 | /** 24 | * @param pProgress between 0 and 100. 25 | */ 26 | public void onProgressChanged(final int pProgress); 27 | } -------------------------------------------------------------------------------- /src/org/andengine/util/progress/ProgressCallable.java: -------------------------------------------------------------------------------- 1 | package org.andengine.util.progress; 2 | 3 | 4 | /** 5 | * (c) 2010 Nicolas Gramlich 6 | * (c) 2011 Zynga Inc. 7 | * 8 | * @author Nicolas Gramlich 9 | * @since 20:52:44 - 03.01.2010 10 | */ 11 | public interface ProgressCallable { 12 | // =========================================================== 13 | // Constants 14 | // =========================================================== 15 | 16 | // =========================================================== 17 | // Methods 18 | // =========================================================== 19 | 20 | /** 21 | * Computes a result, or throws an exception if unable to do so. 22 | * @param pProgressListener 23 | * @return computed result 24 | * @throws Exception if unable to compute a result 25 | */ 26 | public T call(final IProgressListener pProgressListener) throws Exception; 27 | } --------------------------------------------------------------------------------