diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 37f5570..d95f03b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="2" + android:versionName="1.1" > Помощь Помощь Справка и помощь - v1.1 | 23-JAN-2017 + v1.1 | 04-FEB-2017 Иконка AstroSmash Портирование с Java ME (J2ME) MIDlet на Android OS с использованием отрисовки с помощью канваса SurfaceView:\n• © 2016 S. \"EXL\" KLS\nemail: exl@bk.ru\nemail: exlmotodev@gmail.com\n\nИсходный код:\nhttp://github.com/EXL/AstroSmash\n\nСтатья про портирование AstroSmash:\nhttp://exlmoto.ru/astrosmash-droid\n\nБлагодарности:\n• Данилу Медведеву за идею и поддержку;\n• Никите Прокопчику за классные фотографии;\n• mvb06\'у за тестирование APK-пакета;\n• baat\'у за помощь и поддержку;\n• Zorge.R\'у за хостинг, терпение и помощь. Два снаряда diff --git a/res/values/strings.xml b/res/values/strings.xml index ebea52a..085b703 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -33,7 +33,7 @@ Help Help Game About & Help - v1.1 | 23-JAN-2017 + v1.1 | 04-FEB-2017 Icon AstroSmash Porting from Java ME (J2ME) MIDlet to Android OS application with using SurfaceView Canvas drawing:\n• © 2016 S. \"EXL\" KLS\nemail: exl@bk.ru\nemail: exlmotodev@gmail.com\n\nSource Code:\nhttp://github.com/EXL/AstroSmash\n\nArticle About Porting AstroSmash:\nhttp://exlmoto.ru/astrosmash-droid\n\nThanks to:\n• Danil Medvedev for idea and support;\n• Nikita Prokopchik for cool photos;\n• mvb06 for testing APK-package;\n• baat for help and support;\n• Zorge.R for hosting, patience and help. Double Fire diff --git a/src/ru/exlmoto/astrosmash/AstroSmashEngine/GameWorld.java b/src/ru/exlmoto/astrosmash/AstroSmashEngine/GameWorld.java index ff7009e..c577029 100644 --- a/src/ru/exlmoto/astrosmash/AstroSmashEngine/GameWorld.java +++ b/src/ru/exlmoto/astrosmash/AstroSmashEngine/GameWorld.java @@ -226,18 +226,18 @@ public void fireBullet() { } protected void tickBullets(long paramLong) { - // try { - for (int i = 0; i < this.m_vecFlyingBullets.size(); i++) { - Collidable localCollidable = this.m_vecFlyingBullets.elementAt(i); - localCollidable.tick(paramLong, this); - int j = localCollidable.getY() + localCollidable.getHeight(); - if (j <= 0) { - sendBulletToHell(localCollidable); + try { + for (int i = 0; i < this.m_vecFlyingBullets.size(); i++) { + Collidable localCollidable = this.m_vecFlyingBullets.elementAt(i); + localCollidable.tick(paramLong, this); + int j = localCollidable.getY() + localCollidable.getHeight(); + if (j <= 0) { + sendBulletToHell(localCollidable); + } } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { + localArrayIndexOutOfBoundsException.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { - // localArrayIndexOutOfBoundsException.printStackTrace(); - // } } protected void paintMessage(Canvas canvas, Paint paint, String paramString1, String paramString2) { @@ -263,14 +263,14 @@ protected void paintMessage(Canvas canvas, Paint paint, String paramString1, Str } protected void paintFlyingBullets(Canvas canvas, Paint paint) { - // try { - for (int i = 0; i < this.m_vecFlyingBullets.size(); i++) { - Collidable localCollidable = this.m_vecFlyingBullets.elementAt(i); - localCollidable.paint(canvas, paint); + try { + for (int i = 0; i < this.m_vecFlyingBullets.size(); i++) { + Collidable localCollidable = this.m_vecFlyingBullets.elementAt(i); + localCollidable.paint(canvas, paint); + } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { + localArrayIndexOutOfBoundsException.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { - // localArrayIndexOutOfBoundsException.printStackTrace(); - // } } protected void hyperSpace() { @@ -278,42 +278,42 @@ protected void hyperSpace() { } protected void tickEnemies(long paramLong) { - // try { - for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { - Enemy localEnemy2 = this.m_vecFlyingEnemies.elementAt(i); - localEnemy2.tick(paramLong, this); - if ((localEnemy2.getY() + localEnemy2.getHeight() >= this.m_groundHeight) || (localEnemy2.getX() + localEnemy2.getWidth() >= this.m_nScreenWidth) || (localEnemy2.getY() < 0) || (localEnemy2.getX() < 0)) { - if ((localEnemy2.getY() + localEnemy2.getHeight() >= this.m_groundHeight) || (localEnemy2.getY() < 0)) { - updateScore(localEnemy2.getGroundScore()); - } - this.m_EnemiesToRecycleStack.push(localEnemy2); - if ((localEnemy2.getEnemyTypeId() == 8) || (localEnemy2.getEnemyTypeId() == 9)) { - this.m_ship.setCollided(true); - shipDestroyed(); - updateScore(-100); - break; - } - } else { - if (this.m_ship.intersects(localEnemy2)) { - shipDestroyed(); - updateScore(-100); - break; - } - for (int k = 0; k < this.m_vecFlyingBullets.size(); k++) { - Collidable localCollidable = this.m_vecFlyingBullets.elementAt(k); - if (localCollidable.intersects(localEnemy2, 1, 2)) { - AstroSmashLauncher.doVibrate(AstroSmashLauncher.VIBRATE_SHORT); - AstroSmashLauncher.playSound(AstroSmashLauncher.SOUND_HIT); - updateScore(localEnemy2.getHitScore()); - sendBulletToHell(localCollidable); + try { + for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { + Enemy localEnemy2 = this.m_vecFlyingEnemies.elementAt(i); + localEnemy2.tick(paramLong, this); + if ((localEnemy2.getY() + localEnemy2.getHeight() >= this.m_groundHeight) || (localEnemy2.getX() + localEnemy2.getWidth() >= this.m_nScreenWidth) || (localEnemy2.getY() < 0) || (localEnemy2.getX() < 0)) { + if ((localEnemy2.getY() + localEnemy2.getHeight() >= this.m_groundHeight) || (localEnemy2.getY() < 0)) { + updateScore(localEnemy2.getGroundScore()); + } + this.m_EnemiesToRecycleStack.push(localEnemy2); + if ((localEnemy2.getEnemyTypeId() == 8) || (localEnemy2.getEnemyTypeId() == 9)) { + this.m_ship.setCollided(true); + shipDestroyed(); + updateScore(-100); break; } + } else { + if (this.m_ship.intersects(localEnemy2)) { + shipDestroyed(); + updateScore(-100); + break; + } + for (int k = 0; k < this.m_vecFlyingBullets.size(); k++) { + Collidable localCollidable = this.m_vecFlyingBullets.elementAt(k); + if (localCollidable.intersects(localEnemy2, 1, 2)) { + AstroSmashLauncher.doVibrate(AstroSmashLauncher.VIBRATE_SHORT); + AstroSmashLauncher.playSound(AstroSmashLauncher.SOUND_HIT); + updateScore(localEnemy2.getHitScore()); + sendBulletToHell(localCollidable); + break; + } + } } } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { + localArrayIndexOutOfBoundsException.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { - // localArrayIndexOutOfBoundsException.printStackTrace(); - // } sendWaitingEnemiesToFactory(); if (!this.m_bSuspendEnemies) { if (this.m_vecFlyingEnemies.size() < MAX_NUM_ENEMIES[this.m_nLevel]) { @@ -378,14 +378,14 @@ protected void sendDeadEnemyToHell(Enemy paramEnemy) { } protected void paintEnemies(Canvas canvas, Paint paint) { - // try { - for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { - Enemy localEnemy = this.m_vecFlyingEnemies.elementAt(i); - localEnemy.paint(canvas, paint); + try { + for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { + Enemy localEnemy = this.m_vecFlyingEnemies.elementAt(i); + localEnemy.paint(canvas, paint); + } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { + localArrayIndexOutOfBoundsException.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) { - // localArrayIndexOutOfBoundsException.printStackTrace(); - // } } protected void sendBulletToHell(Collidable paramCollidable) { @@ -396,23 +396,23 @@ protected void sendBulletToHell(Collidable paramCollidable) { protected void shipDestroyed() { AstroSmashLauncher.doVibrate(AstroSmashLauncher.VIBRATE_LONG); AstroSmashLauncher.playSound(AstroSmashLauncher.SOUND_SHIP); - // try { - for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { - Enemy enemy = this.m_vecFlyingEnemies.elementAt(i); - this.m_EnemiesToRecycleStack.push(enemy); + try { + for (int i = 0; i < this.m_vecFlyingEnemies.size(); i++) { + Enemy enemy = this.m_vecFlyingEnemies.elementAt(i); + this.m_EnemiesToRecycleStack.push(enemy); + } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException1) { + localArrayIndexOutOfBoundsException1.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException1) { - // localArrayIndexOutOfBoundsException1.printStackTrace(); - // } sendWaitingEnemiesToFactory(); - // try { - for (int j = 0; j < this.m_vecFlyingBullets.size(); j++) { - Collidable collidable = this.m_vecFlyingBullets.elementAt(j); - this.m_BulletsToRecycleStack.push(collidable); + try { + for (int j = 0; j < this.m_vecFlyingBullets.size(); j++) { + Collidable collidable = this.m_vecFlyingBullets.elementAt(j); + this.m_BulletsToRecycleStack.push(collidable); + } + } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException2) { + localArrayIndexOutOfBoundsException2.printStackTrace(); } - // } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException2) { - // localArrayIndexOutOfBoundsException2.printStackTrace(); - // } this.m_vecFlyingBullets.removeAllElements(); while (!this.m_BulletsToRecycleStack.empty()) { Collidable localCollidable = this.m_BulletsToRecycleStack.pop();