Skip to content

Commit

Permalink
Prepare for release.
Browse files Browse the repository at this point in the history
Update version in strings and manifest.
Disable billing debugging.

Use Main.res from LanderView.
  • Loading branch information
pilot51 committed Sep 23, 2011
1 parent 93f3c18 commit 241b759
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pilot51.lander"
android:versionCode="2"
android:versionCode="3"
android:versionName="@string/app_version">
<uses-sdk
android:minSdkVersion="3"
Expand Down
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Lander</string>
<string name="app_version">1.0.1</string>
<string name="app_version">1.1.0</string>
<string name="word_new">New</string>
<string name="restart">Restart</string>
<string name="options">Options</string>
Expand Down
55 changes: 26 additions & 29 deletions src/com/pilot51/lander/LanderView.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
Expand Down Expand Up @@ -344,7 +343,6 @@ public void surfaceDestroyed(SurfaceHolder holder) {

private DecimalFormat df2 = new DecimalFormat("0.00"); // Fixed to 2 decimal places

private Resources res;
private Drawable landerPict, safe, dead;
private boolean bColorEndImg, bLanderBox, bRotation;
private Path path;
Expand Down Expand Up @@ -382,24 +380,23 @@ private LanderThread(SurfaceHolder surfaceHolder, Context context, Handler handl

rand = new Random(System.currentTimeMillis());

res = context.getResources();
hLanderPict = res.getDrawable(R.drawable.lander);
hBFlamePict = res.getDrawable(R.drawable.bflame);
hLFlamePict = res.getDrawable(R.drawable.lflame);
hRFlamePict = res.getDrawable(R.drawable.rflame);
hCrash1 = res.getDrawable(R.drawable.crash1);
hCrash2 = res.getDrawable(R.drawable.crash2);
hCrash3 = res.getDrawable(R.drawable.crash3);
hExpl = new Drawable[] {res.getDrawable(R.drawable.expl1),
res.getDrawable(R.drawable.expl2),
res.getDrawable(R.drawable.expl3),
res.getDrawable(R.drawable.expl4),
res.getDrawable(R.drawable.expl5),
res.getDrawable(R.drawable.expl6),
res.getDrawable(R.drawable.expl7),
res.getDrawable(R.drawable.expl8),
res.getDrawable(R.drawable.expl9),
res.getDrawable(R.drawable.expl10)};
hLanderPict = Main.res.getDrawable(R.drawable.lander);
hBFlamePict = Main.res.getDrawable(R.drawable.bflame);
hLFlamePict = Main.res.getDrawable(R.drawable.lflame);
hRFlamePict = Main.res.getDrawable(R.drawable.rflame);
hCrash1 = Main.res.getDrawable(R.drawable.crash1);
hCrash2 = Main.res.getDrawable(R.drawable.crash2);
hCrash3 = Main.res.getDrawable(R.drawable.crash3);
hExpl = new Drawable[] {Main.res.getDrawable(R.drawable.expl1),
Main.res.getDrawable(R.drawable.expl2),
Main.res.getDrawable(R.drawable.expl3),
Main.res.getDrawable(R.drawable.expl4),
Main.res.getDrawable(R.drawable.expl5),
Main.res.getDrawable(R.drawable.expl6),
Main.res.getDrawable(R.drawable.expl7),
Main.res.getDrawable(R.drawable.expl8),
Main.res.getDrawable(R.drawable.expl9),
Main.res.getDrawable(R.drawable.expl10)};
if (bColorEndImg) {
safe = getResources().getDrawable(R.drawable.safe_color);
dead = getResources().getDrawable(R.drawable.dead_color);
Expand Down Expand Up @@ -577,35 +574,35 @@ private void endGameDialog() {
setFiringThrust(false);
setFiringLeft(false);
setFiringRight(false);
String msg = res.getString(R.string.end_crash) + "\n";
String msg = Main.res.getString(R.string.end_crash) + "\n";
switch (byEndGameState) {
case END_SAFE:
msg = res.getString(R.string.end_safe);
msg = Main.res.getString(R.string.end_safe);
break;
case END_CRASHV:
switch (new Random().nextInt(3)) {
case 0:
msg += res.getString(R.string.end_crashv1);
msg += Main.res.getString(R.string.end_crashv1);
break;
case 1:
msg += res.getString(R.string.end_crashv2);
msg += Main.res.getString(R.string.end_crashv2);
break;
case 2:
msg += res.getString(R.string.end_crashv3);
msg += Main.res.getString(R.string.end_crashv3);
break;
}
break;
case END_CRASHH:
msg += res.getString(R.string.end_crashh);
msg += Main.res.getString(R.string.end_crashh);
break;
case END_CRASHA:
msg += res.getString(R.string.end_crasha);
msg += Main.res.getString(R.string.end_crasha);
break;
case END_CRASHS:
msg += res.getString(R.string.end_crashs);
msg += Main.res.getString(R.string.end_crashs);
break;
case END_OUTOFRANGE:
msg = res.getString(R.string.end_outofrange);
msg = Main.res.getString(R.string.end_outofrange);
break;
}
setScreenText(HANDLE_DIALOG, msg);
Expand Down
2 changes: 1 addition & 1 deletion src/com/pilot51/lander/billing/Consts.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ public static PurchaseState valueOf(int index) {
public static final String BILLING_RESPONSE_REQUEST_ID = "REQUEST_ID";
public static long BILLING_RESPONSE_INVALID_REQUEST_ID = -1;

public static final boolean DEBUG = true; // TODO Disable before release
public static final boolean DEBUG = false;
}

0 comments on commit 241b759

Please sign in to comment.