[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src help.cpp unit_types.cpp
From: |
Cedric Duval |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src help.cpp unit_types.cpp |
Date: |
Fri, 15 Oct 2004 04:46:40 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Cedric Duval <address@hidden> 04/10/15 08:39:33
Modified files:
src : help.cpp unit_types.cpp
Log message:
* Fixed assumption that "no advance" == 500 XP required, in help code.
* Replaced atoi with lexical_cast_default (500 chosen "arbitrarily", in
reference to old customs, but the value is not really significant)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/help.cpp.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_types.cpp.diff?tr1=1.68&tr2=1.69&r1=text&r2=text
Patches:
Index: wesnoth/src/help.cpp
diff -u wesnoth/src/help.cpp:1.33 wesnoth/src/help.cpp:1.34
--- wesnoth/src/help.cpp:1.33 Mon Sep 27 00:24:41 2004
+++ wesnoth/src/help.cpp Fri Oct 15 08:39:33 2004
@@ -623,8 +623,7 @@
<< _("Alignment") << ": "
<< type.alignment_description(type.alignment())
<< jump(30);
- if (type.experience_needed() != 500) {
- // 500 is apparently used when the units cannot
advance.
+ if (type.can_advance()) {
ss << _("Required XP") << ": " <<
type.experience_needed();
}
Index: wesnoth/src/unit_types.cpp
diff -u wesnoth/src/unit_types.cpp:1.68 wesnoth/src/unit_types.cpp:1.69
--- wesnoth/src/unit_types.cpp:1.68 Wed Sep 29 00:19:05 2004
+++ wesnoth/src/unit_types.cpp Fri Oct 15 08:39:33 2004
@@ -1,4 +1,4 @@
-/* $Id: unit_types.cpp,v 1.68 2004/09/29 00:19:05 Sirp Exp $ */
+/* $Id: unit_types.cpp,v 1.69 2004/10/15 08:39:33 cedricd Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -844,7 +844,7 @@
int unit_type::experience_needed() const
{
- return (atoi(cfg_["experience"].c_str())*experience_modifier)/100;
+ return
(lexical_cast_default<int>(cfg_["experience"],500)*experience_modifier)/100;
}
std::vector<std::string> unit_type::advances_to() const
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src help.cpp unit_types.cpp,
Cedric Duval <=