[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src unit.cpp unit.hpp playturn.cpp acti...
From: |
ott |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src unit.cpp unit.hpp playturn.cpp acti... |
Date: |
Mon, 01 Aug 2005 11:18:37 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: ott <address@hidden> 05/08/01 15:18:37
Modified files:
src : unit.cpp unit.hpp playturn.cpp actions.cpp
Log message:
tweak and refactor end of turn warning semantics
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.157&tr2=1.158&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.hpp.diff?tr1=1.72&tr2=1.73&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.388&tr2=1.389&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.232&tr2=1.233&r1=text&r2=text
Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.232 wesnoth/src/actions.cpp:1.233
--- wesnoth/src/actions.cpp:1.232 Sat Jul 30 18:57:05 2005
+++ wesnoth/src/actions.cpp Mon Aug 1 15:18:37 2005
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.232 2005/07/30 18:57:05 Sirp Exp $ */
+/* $Id: actions.cpp,v 1.233 2005/08/01 15:18:37 ott Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -2015,7 +2015,7 @@
//units with goto commands that have already done their gotos this turn
//(i.e. don't have full movement left) should be red
- if(u.movement_left() < u.total_movement() && u.get_goto().valid()) {
+ if(u.has_moved() && u.has_goto()) {
return false;
}
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.388 wesnoth/src/playturn.cpp:1.389
--- wesnoth/src/playturn.cpp:1.388 Sun Jul 31 23:56:05 2005
+++ wesnoth/src/playturn.cpp Mon Aug 1 15:18:37 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.388 2005/07/31 23:56:05 ott Exp $ */
+/* $Id: playturn.cpp,v 1.389 2005/08/01 15:18:37 ott Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -1300,7 +1300,7 @@
partmoved_units = true;
}
- if(un->second.has_moved()) {
+ if(un->second.has_moved() && ! un->second.has_goto()) {
some_units_have_moved = true;
}
}
@@ -1308,11 +1308,9 @@
//Ask for confirmation if the player hasn't made any moves (other than
gotos).
if(preferences::confirm_no_moves() && ! some_units_have_moved) {
- if (recorder.ncommands() == start_ncmd_) {
- const int res = gui::show_dialog(gui_,NULL,"",_("You
have not started your turn yet. Do you really want to end your turn?"),
gui::YES_NO);
- if(res != 0) {
- return;
- }
+ const int res = gui::show_dialog(gui_,NULL,"",_("You have not
started your turn yet. Do you really want to end your turn?"), gui::YES_NO);
+ if(res != 0) {
+ return;
}
}
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.157 wesnoth/src/unit.cpp:1.158
--- wesnoth/src/unit.cpp:1.157 Sun Jul 31 23:56:05 2005
+++ wesnoth/src/unit.cpp Mon Aug 1 15:18:37 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.157 2005/07/31 23:56:05 ott Exp $ */
+/* $Id: unit.cpp,v 1.158 2005/08/01 15:18:37 ott Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -490,6 +490,11 @@
bool unit::has_moved() const
{
return this->movement_left() != this->total_movement();
+}
+
+bool unit::has_goto() const
+{
+ return this->get_goto().valid();
}
bool unit::emits_zoc() const
Index: wesnoth/src/unit.hpp
diff -u wesnoth/src/unit.hpp:1.72 wesnoth/src/unit.hpp:1.73
--- wesnoth/src/unit.hpp:1.72 Sun Jul 31 23:56:05 2005
+++ wesnoth/src/unit.hpp Mon Aug 1 15:18:37 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.hpp,v 1.72 2005/07/31 23:56:05 ott Exp $ */
+/* $Id: unit.hpp,v 1.73 2005/08/01 15:18:37 ott Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -91,6 +91,7 @@
bool incapacitated() const;
bool has_moved() const;
+ bool has_goto() const;
bool emits_zoc() const;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src unit.cpp unit.hpp playturn.cpp acti...,
ott <=