Bugfix: Enable menu button after using other keyboard actions.

Reduce number of redraws when engaging combat.
Bump version number for release.

git-svn-id: https://andors-trail.googlecode.com/svn/trunk@191 08aca716-68be-ccc6-4d58-36f5abd142ac
This commit is contained in:
oskar.wiksten@gmail.com
2011-10-21 18:07:35 +00:00
parent 688afd5ff6
commit 4887f984ee
6 changed files with 13 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gpl.rpg.AndorsTrail"
android:versionCode="25"
android:versionName="0.6.10b3"
android:versionName="0.6.10"
android:installLocation="auto"
>
<uses-sdk

View File

@@ -12,7 +12,7 @@
&lt;a href="http://opengameart.org/content/whispers-of-avalon-item-icons"&gt;Additional graphics by Meway, Len Pabin, Auran, Silviyius&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://opengameart.org/content/10-basic-rpg-enemies"&gt;Additional graphics by Stephen Challener (Redshrike)&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://opengameart.org/content/skull"&gt;Additional graphics by Jorge.Avila&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://andors.techby2guys.com/"&gt;Game forums provided by Scott Devaney&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://andorstrail.com/"&gt;Web site provided by Scott Devaney&lt;/a&gt;&lt;br /&gt;
Additional maps done by Michael Schmid&lt;br /&gt;
Additional maps done by Pete Wheeler&lt;br /&gt;
Additional programming by Samuel Plentz&lt;br /&gt;

View File

@@ -20,7 +20,7 @@ public final class AndorsTrailApplication extends Application {
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
public static final int CURRENT_VERSION = 25;
public static final String CURRENT_VERSION_DISPLAY = "0.6.10b3";
public static final String CURRENT_VERSION_DISPLAY = "0.6.10";
public final WorldContext world = new WorldContext();
public final WorldSetup setup = new WorldSetup(world, this);

View File

@@ -64,6 +64,8 @@ public final class CombatController implements VisualEffectCompletedCallback {
model.uiSelections.isInCombat = false;
context.mainActivity.clearMessages();
currentActiveMonster = null;
model.uiSelections.selectedPosition = null;
model.uiSelections.selectedMonster = null;
if (!killedMonsterBags.isEmpty()) {
if (pickupLootBags) {
lootCurrentMonsterBags();
@@ -95,7 +97,9 @@ public final class CombatController implements VisualEffectCompletedCallback {
Coord previousSelection = model.uiSelections.selectedPosition;
if (model.uiSelections.selectedPosition != null) {
model.uiSelections.selectedPosition = null;
context.mainActivity.redrawTile(previousSelection, MainView.REDRAW_TILE_SELECTION_REMOVED);
if (selectedPosition != null && !selectedPosition.equals(previousSelection)) {
context.mainActivity.redrawTile(previousSelection, MainView.REDRAW_TILE_SELECTION_REMOVED);
}
}
context.mainActivity.combatview.updateCombatSelection(selectedMonster, selectedPosition);
model.uiSelections.selectedMonster = selectedMonster;

View File

@@ -110,6 +110,8 @@ public final class CombatView extends RelativeLayout {
statusTextView.setText(res.getString(R.string.combat_status_ap, range.current));
}
public void updateCombatSelection(Monster selectedMonster, Coord selectedMovePosition) {
if (currentMonster == selectedMonster) return;
attackMoveButton.setEnabled(true);
monsterBar.setVisibility(View.INVISIBLE);
currentMonster = null;

View File

@@ -80,7 +80,7 @@ public final class MainView extends SurfaceView implements SurfaceHolder.Callbac
@Override
public boolean onKeyDown(int keyCode, KeyEvent msg) {
if (!model.uiSelections.isMainActivityVisible) return true;
if (!model.uiSelections.isMainActivityVisible) return true;
if (inputController.onKeyboardAction(keyCode)) return true;
else return super.onKeyDown(keyCode, msg);
@@ -91,7 +91,8 @@ public final class MainView extends SurfaceView implements SurfaceHolder.Callbac
if (!model.uiSelections.isMainActivityVisible) return true;
inputController.onKeyboardCancel();
return true;
return super.onKeyUp(keyCode, msg);
}
@Override