[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src display.cpp network.cpp network_wor...
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src display.cpp network.cpp network_wor... |
Date: |
Thu, 10 Mar 2005 15:59:20 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 05/03/10 20:59:20
Modified files:
src : display.cpp network.cpp network_worker.cpp
playturn.cpp preferences.cpp preferences.hpp
race.cpp race.hpp unit.cpp unit.hpp
unit_types.cpp
src/serialization: binary_wml.cpp parser.cpp string_utils.cpp
src/server : server.cpp
Log message:
dos2unix
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.293&tr2=1.294&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network.cpp.diff?tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.340&tr2=1.341&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.cpp.diff?tr1=1.139&tr2=1.140&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.hpp.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/race.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/race.hpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.126&tr2=1.127&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.hpp.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_types.cpp.diff?tr1=1.86&tr2=1.87&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/binary_wml.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/parser.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/server.cpp.diff?tr1=1.71&tr2=1.72&r1=text&r2=text
Patches:
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.293 wesnoth/src/display.cpp:1.294
--- wesnoth/src/display.cpp:1.293 Wed Mar 9 22:58:18 2005
+++ wesnoth/src/display.cpp Thu Mar 10 20:59:19 2005
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.293 2005/03/09 22:58:18 ydirson Exp $ */
+/* $Id: display.cpp,v 1.294 2005/03/10 20:59:19 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -876,15 +876,15 @@
} else if(i->image.empty() == false) {
// Draw an image element
surface
img(image::get_image(i->image,image::UNSCALED));
-
- if(report_num == reports::TIME_OF_DAY
&& img != NULL && preferences::flip_time()) {
- img = flip_surface(img);
- }
+
+ if(report_num == reports::TIME_OF_DAY
&& img != NULL && preferences::flip_time()) {
+ img = flip_surface(img);
+ }
if(img == NULL) {
ERR_DP << "could not find image
for report: '" << i->image << "'\n";
continue;
- }
+ }
area.x = x;
area.y = y;
Index: wesnoth/src/network.cpp
diff -u wesnoth/src/network.cpp:1.54 wesnoth/src/network.cpp:1.55
--- wesnoth/src/network.cpp:1.54 Thu Mar 10 20:06:20 2005
+++ wesnoth/src/network.cpp Thu Mar 10 20:59:20 2005
@@ -270,7 +270,7 @@
throw network::error("Could not add socket to socket set");
}
- sockets.push_back(connect);
+ sockets.push_back(connect);
wassert(schemas.count(connect) == 0);
schemas.insert(std::pair<network::connection,schema_pair>(connect,schema_pair()));
@@ -359,7 +359,7 @@
throw network::error("Could not send initial
handshake");
}
- sockets.push_back(connect);
+ sockets.push_back(connect);
wassert(schemas.count(connect) == 0);
schemas.insert(std::pair<network::connection,schema_pair>(connect,schema_pair()));
return connect;
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.20 wesnoth/src/network_worker.cpp:1.21
--- wesnoth/src/network_worker.cpp:1.20 Wed Mar 2 22:13:53 2005
+++ wesnoth/src/network_worker.cpp Thu Mar 10 20:59:20 2005
@@ -107,7 +107,7 @@
for(; itor != itor_end; ++itor) {
socket_state_map::iterator lock_it =
sockets_locked.find((*itor)->sock);
wassert(lock_it !=
sockets_locked.end());
- if(lock_it->second == SOCKET_READY) {
+ if(lock_it->second == SOCKET_READY) {
lock_it->second = SOCKET_LOCKED;
sent_buf = *itor;
sock = sent_buf->sock;
@@ -121,7 +121,7 @@
for(; itor != itor_end; ++itor) {
socket_state_map::iterator
lock_it = sockets_locked.find(*itor);
wassert(lock_it !=
sockets_locked.end());
- if(lock_it->second ==
SOCKET_READY) {
+ if(lock_it->second ==
SOCKET_READY) {
lock_it->second =
SOCKET_LOCKED;
sock = *itor;
pending_receives.erase(itor);
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.340 wesnoth/src/playturn.cpp:1.341
--- wesnoth/src/playturn.cpp:1.340 Thu Mar 10 20:43:48 2005
+++ wesnoth/src/playturn.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.340 2005/03/10 20:43:48 ydirson Exp $ */
+/* $Id: playturn.cpp,v 1.341 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2436,19 +2436,19 @@
gui_.invalidate_unit();
}
}
- } else if(game_config::debug && cmd == "create" &&
map_.on_board(last_hex_)) {
- const game_data::unit_type_map::const_iterator i =
gameinfo_.unit_types.find(data);
- if(i == gameinfo_.unit_types.end()) {
- return;
- }
-
- units_.erase(last_hex_);
-
units_.insert(std::pair<gamemap::location,unit>(last_hex_,unit(&i->second,1,false)));
- gui_.invalidate(last_hex_);
- gui_.invalidate_unit();
- } else if(game_config::debug && cmd == "gold") {
-
current_team().spend_gold(-lexical_cast_default<int>(data,1000));
- gui_.redraw_everything();
+ } else if(game_config::debug && cmd == "create" &&
map_.on_board(last_hex_)) {
+ const game_data::unit_type_map::const_iterator i =
gameinfo_.unit_types.find(data);
+ if(i == gameinfo_.unit_types.end()) {
+ return;
+ }
+
+ units_.erase(last_hex_);
+
units_.insert(std::pair<gamemap::location,unit>(last_hex_,unit(&i->second,1,false)));
+ gui_.invalidate(last_hex_);
+ gui_.invalidate_unit();
+ } else if(game_config::debug && cmd == "gold") {
+
current_team().spend_gold(-lexical_cast_default<int>(data,1000));
+ gui_.redraw_everything();
}
}
Index: wesnoth/src/preferences.cpp
diff -u wesnoth/src/preferences.cpp:1.139 wesnoth/src/preferences.cpp:1.140
--- wesnoth/src/preferences.cpp:1.139 Wed Mar 9 22:58:18 2005
+++ wesnoth/src/preferences.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: preferences.cpp,v 1.139 2005/03/09 22:58:18 ydirson Exp $ */
+/* $Id: preferences.cpp,v 1.140 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -708,16 +708,16 @@
haloes = value;
prefs["show_haloes"] = value ? "yes" : "no";
}
-
-bool flip_time()
-{
- return prefs["flip_time"] == "yes";
-}
-
-void set_flip_time(bool value)
-{
- prefs["flip_time"] = value ? "yes" : "no";
-}
+
+bool flip_time()
+{
+ return prefs["flip_time"] == "yes";
+}
+
+void set_flip_time(bool value)
+{
+ prefs["flip_time"] = value ? "yes" : "no";
+}
bool show_fps()
{
@@ -796,7 +796,7 @@
gui::button fullscreen_button_, turbo_button_, show_ai_moves_button_,
show_grid_button_, show_floating_labels_button_,
turn_dialog_button_,
turn_bell_button_, show_team_colours_button_,
show_colour_cursors_button_,
- show_haloing_button_, video_mode_button_, hotkeys_button_,
gamma_button_,
+ show_haloing_button_, video_mode_button_, hotkeys_button_,
gamma_button_,
flip_time_button_;
gui::label music_label_, sound_label_, scroll_label_, gamma_label_;
unsigned slider_label_width_;
@@ -821,7 +821,7 @@
show_haloing_button_(disp, _("Show Haloing Effects"),
gui::button::TYPE_CHECK),
video_mode_button_(disp, _("Video Mode")),
hotkeys_button_(disp, _("Hotkeys")),
- gamma_button_(disp, _("Adjust Gamma"), gui::button::TYPE_CHECK),
+ gamma_button_(disp, _("Adjust Gamma"), gui::button::TYPE_CHECK),
flip_time_button_(disp, _("Reverse Time Graphics"),
gui::button::TYPE_CHECK),
music_label_(disp, _("Music Volume:")), sound_label_(disp, _("SFX
Volume:")),
scroll_label_(disp, _("Scroll Speed:")), gamma_label_(disp,
_("Gamma:")),
@@ -882,9 +882,9 @@
show_team_colours_button_.set_check(show_side_colours());
show_team_colours_button_.set_help_string(_("Show a colored circle
around the base of each unit to show which side it is on"));
-
- flip_time_button_.set_check(flip_time());
- flip_time_button_.set_help_string(_("Choose whether the sun moves
left-to-right or right-to-left"));
+
+ flip_time_button_.set_check(flip_time());
+ flip_time_button_.set_help_string(_("Choose whether the sun moves
left-to-right or right-to-left"));
show_colour_cursors_button_.set_check(use_colour_cursors());
show_colour_cursors_button_.set_help_string(_("Use colored mouse
cursors (may be slower)"));
@@ -921,7 +921,7 @@
gamma_label_.set_location(rect.x, ypos);
SDL_Rect gamma_rect = { rect.x + slider_label_width_, ypos,
rect.w - slider_label_width_ - border, 0 };
- gamma_slider_.set_location(gamma_rect);
+ gamma_slider_.set_location(gamma_rect);
ypos += 50; flip_time_button_.set_location(rect.x,ypos);
ypos += 50; show_floating_labels_button_.set_location(rect.x, ypos);
ypos += 50; show_colour_cursors_button_.set_location(rect.x, ypos);
@@ -977,8 +977,8 @@
bool hide_gamma = !adjust_gamma();
gamma_slider_.hide(hide_gamma);
gamma_label_.hide(hide_gamma);
- }
- if (flip_time_button_.pressed())
+ }
+ if (flip_time_button_.pressed())
set_flip_time(flip_time_button_.checked());
set_sound_volume(sound_slider_.value());
set_music_volume(music_slider_.value());
@@ -1011,7 +1011,7 @@
show_colour_cursors_button_.hide(hide_display);
show_haloing_button_.hide(hide_display);
fullscreen_button_.hide(hide_display);
- video_mode_button_.hide(hide_display);
+ video_mode_button_.hide(hide_display);
flip_time_button_.hide(hide_display);
bool hide_sound = tab_ != SOUND_TAB;
Index: wesnoth/src/preferences.hpp
diff -u wesnoth/src/preferences.hpp:1.51 wesnoth/src/preferences.hpp:1.52
--- wesnoth/src/preferences.hpp:1.51 Thu Mar 10 20:54:56 2005
+++ wesnoth/src/preferences.hpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: preferences.hpp,v 1.51 2005/03/10 20:54:56 ydirson Exp $ */
+/* $Id: preferences.hpp,v 1.52 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -148,9 +148,9 @@
bool show_fps();
void set_show_fps(bool value);
-
- bool flip_time();
- void set_flip_time(bool value);
+
+ bool flip_time();
+ void set_flip_time(bool value);
bool compress_saves();
Index: wesnoth/src/race.cpp
diff -u wesnoth/src/race.cpp:1.15 wesnoth/src/race.cpp:1.16
--- wesnoth/src/race.cpp:1.15 Thu Mar 3 21:52:39 2005
+++ wesnoth/src/race.cpp Thu Mar 10 20:59:20 2005
@@ -7,8 +7,8 @@
#include <cstdlib>
namespace {
-
-config::child_list empty_traits;
+
+config::child_list empty_traits;
void add_prefixes(const wide_string& str, size_t length, markov_prefix_map&
res)
{
@@ -119,11 +119,11 @@
{
return
utils::wstring_to_string(markov_generate_name(next_[gender],chain_size_,12));
}
-
-const config::child_list& unit_race::additional_traits() const
-{
- return *traits_;
-}
+
+const config::child_list& unit_race::additional_traits() const
+{
+ return *traits_;
+}
int unit_race::num_traits() const { return ntraits_; }
Index: wesnoth/src/race.hpp
diff -u wesnoth/src/race.hpp:1.5 wesnoth/src/race.hpp:1.6
--- wesnoth/src/race.hpp:1.5 Thu Mar 3 21:52:39 2005
+++ wesnoth/src/race.hpp Thu Mar 10 20:59:20 2005
@@ -21,7 +21,7 @@
const std::string& name() const;
std::string generate_name(GENDER gender) const;
-
+
const config::child_list& additional_traits() const;
int num_traits() const;
@@ -34,8 +34,8 @@
markov_prefix_map next_[NUM_GENDERS];
int chain_size_;
- bool not_living_;
-
+ bool not_living_;
+
const config::child_list* traits_;
};
Index: wesnoth/src/serialization/binary_wml.cpp
diff -u wesnoth/src/serialization/binary_wml.cpp:1.2
wesnoth/src/serialization/binary_wml.cpp:1.3
--- wesnoth/src/serialization/binary_wml.cpp:1.2 Tue Mar 8 02:27:14 2005
+++ wesnoth/src/serialization/binary_wml.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: binary_wml.cpp,v 1.2 2005/03/08 02:27:14 Sirp Exp $ */
+/* $Id: binary_wml.cpp,v 1.3 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -11,8 +11,8 @@
See the COPYING file for more details.
*/
-
-#include "global.hpp"
+
+#include "global.hpp"
#include "config.hpp"
#include "log.hpp"
Index: wesnoth/src/serialization/parser.cpp
diff -u wesnoth/src/serialization/parser.cpp:1.3
wesnoth/src/serialization/parser.cpp:1.4
--- wesnoth/src/serialization/parser.cpp:1.3 Tue Mar 8 02:28:12 2005
+++ wesnoth/src/serialization/parser.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: parser.cpp,v 1.3 2005/03/08 02:28:12 Sirp Exp $ */
+/* $Id: parser.cpp,v 1.4 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -10,8 +10,8 @@
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
-*/
-
+*/
+
#include "global.hpp"
#include "config.hpp"
Index: wesnoth/src/serialization/string_utils.cpp
diff -u wesnoth/src/serialization/string_utils.cpp:1.8
wesnoth/src/serialization/string_utils.cpp:1.9
--- wesnoth/src/serialization/string_utils.cpp:1.8 Tue Mar 8 02:30:06 2005
+++ wesnoth/src/serialization/string_utils.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.cpp,v 1.8 2005/03/08 02:30:06 Sirp Exp $ */
+/* $Id: string_utils.cpp,v 1.9 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -472,14 +472,14 @@
{
wide_string res;
- try {
- utf8_iterator i1(src);
- const utf8_iterator i2(utf8_iterator::end(src));
-
- //equivalent to res.insert(res.end(),i1,i2) which doesn't work
on VC++6.
- while(i1 != i2) {
- push_back(res,*i1);
- ++i1;
+ try {
+ utf8_iterator i1(src);
+ const utf8_iterator i2(utf8_iterator::end(src));
+
+ //equivalent to res.insert(res.end(),i1,i2) which doesn't work
on VC++6.
+ while(i1 != i2) {
+ push_back(res,*i1);
+ ++i1;
}
}
catch(invalid_utf8_exception e) {
Index: wesnoth/src/server/server.cpp
diff -u wesnoth/src/server/server.cpp:1.71 wesnoth/src/server/server.cpp:1.72
--- wesnoth/src/server/server.cpp:1.71 Sat Mar 5 10:54:25 2005
+++ wesnoth/src/server/server.cpp Thu Mar 10 20:59:20 2005
@@ -23,11 +23,11 @@
#include <vector>
#include <signal.h>
-
-#ifndef WIN32
-#include <sys/types.h>
-#include <unistd.h>
-#endif
+
+#ifndef WIN32
+#include <sys/types.h>
+#include <unistd.h>
+#endif
namespace {
@@ -886,7 +886,7 @@
port = atoi(argv[++arg]);
} else if(val == "--help" || val == "-h") {
std::cout << "usage: " << argv[0]
- << " [options]\n"
+ << " [options]\n"
<< " -d --daemon Runs wesnothd
as a daemon\n"
<< " --fifo file Sets the path
for the FIFO used to communicate with the server\n"
<< " -m, --max_packet_size n Sets the
maximal packet size to n\n"
@@ -905,22 +905,22 @@
}
fifo_path = argv[arg];
- } else if(val == "--daemon" || val == "-d") {
-#ifdef WIN32
- std::cerr << "Running as a daemon is not supported on
this platform\n";
- return -1;
-#else
- const pid_t pid = fork();
- if(pid < 0) {
- std::cerr << "Could not fork and run as a
daemon\n";
- return -1;
- } else if(pid > 0) {
- std::cout << "Started wesnothd as a daemon with
process id " << pid << "\n";
- return 0;
- }
-
- setsid();
-#endif
+ } else if(val == "--daemon" || val == "-d") {
+#ifdef WIN32
+ std::cerr << "Running as a daemon is not supported on
this platform\n";
+ return -1;
+#else
+ const pid_t pid = fork();
+ if(pid < 0) {
+ std::cerr << "Could not fork and run as a
daemon\n";
+ return -1;
+ } else if(pid > 0) {
+ std::cout << "Started wesnothd as a daemon with
process id " << pid << "\n";
+ return 0;
+ }
+
+ setsid();
+#endif
} else if(val[0] == '-') {
std::cerr << "unknown option: " << val << "\n";
return 0;
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.126 wesnoth/src/unit.cpp:1.127
--- wesnoth/src/unit.cpp:1.126 Wed Mar 9 22:58:18 2005
+++ wesnoth/src/unit.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.126 2005/03/09 22:58:18 ydirson Exp $ */
+/* $Id: unit.cpp,v 1.127 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -154,10 +154,10 @@
std::vector<std::string> description;
- for(std::vector<config*>::const_iterator j = traits.begin(); j !=
traits.end(); ++j) {
+ for(std::vector<config*>::const_iterator j = traits.begin(); j !=
traits.end(); ++j) {
modifications_.add_child("trait",**j);
}
-
+
apply_modifications();
}
@@ -1164,8 +1164,8 @@
void unit::apply_modifications()
{
log_scope("apply mods");
- modificationDescriptions_.clear();
-
+ modificationDescriptions_.clear();
+
std::vector<std::string> descriptions;
for(size_t i = 0; i != NumModificationTypes; ++i) {
@@ -1173,25 +1173,25 @@
const config::child_list& mods =
modifications_.get_children(mod);
for(config::child_list::const_iterator j = mods.begin(); j !=
mods.end(); ++j) {
log_scope("add mod");
- add_modification(ModificationTypes[i],**j,true);
-
- const std::string& name = (**j)["name"];
- if(name.empty() == false) {
- descriptions.push_back(name);
- }
- }
- }
-
- traitsDescription_ = "";
-
- //we want to make sure the description always has a consistent ordering
- std::sort(descriptions.begin(),descriptions.end());
- for(std::vector<std::string>::const_iterator j = descriptions.begin();
j != descriptions.end(); ++j) {
- if(j != descriptions.begin()) {
- traitsDescription_ += ", ";
- }
-
- traitsDescription_ += gettext(j->c_str());
+ add_modification(ModificationTypes[i],**j,true);
+
+ const std::string& name = (**j)["name"];
+ if(name.empty() == false) {
+ descriptions.push_back(name);
+ }
+ }
+ }
+
+ traitsDescription_ = "";
+
+ //we want to make sure the description always has a consistent ordering
+ std::sort(descriptions.begin(),descriptions.end());
+ for(std::vector<std::string>::const_iterator j = descriptions.begin();
j != descriptions.end(); ++j) {
+ if(j != descriptions.begin()) {
+ traitsDescription_ += ", ";
+ }
+
+ traitsDescription_ += gettext(j->c_str());
}
}
Index: wesnoth/src/unit.hpp
diff -u wesnoth/src/unit.hpp:1.61 wesnoth/src/unit.hpp:1.62
--- wesnoth/src/unit.hpp:1.61 Mon Feb 28 03:44:44 2005
+++ wesnoth/src/unit.hpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.hpp,v 1.61 2005/02/28 03:44:44 Sirp Exp $ */
+/* $Id: unit.hpp,v 1.62 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -226,7 +226,7 @@
void reset_modifications();
void apply_modifications();
void remove_temporary_modifications();
- void generate_traits();
+ void generate_traits();
void generate_traits_description();
};
Index: wesnoth/src/unit_types.cpp
diff -u wesnoth/src/unit_types.cpp:1.86 wesnoth/src/unit_types.cpp:1.87
--- wesnoth/src/unit_types.cpp:1.86 Wed Mar 9 22:58:18 2005
+++ wesnoth/src/unit_types.cpp Thu Mar 10 20:59:20 2005
@@ -1,4 +1,4 @@
-/* $Id: unit_types.cpp,v 1.86 2005/03/09 22:58:18 ydirson Exp $ */
+/* $Id: unit_types.cpp,v 1.87 2005/03/10 20:59:20 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -579,18 +579,18 @@
const race_map::const_iterator race_it = races.find(cfg["race"]);
if(race_it != races.end()) {
- race_ = &race_it->second;
- if(race_ != NULL) {
- const config::child_list& traits =
race_->additional_traits();
-
possibleTraits_.insert(possibleTraits_.end(),traits.begin(),traits.end());
+ race_ = &race_it->second;
+ if(race_ != NULL) {
+ const config::child_list& traits =
race_->additional_traits();
+
possibleTraits_.insert(possibleTraits_.end(),traits.begin(),traits.end());
}
} else {
static const unit_race dummy_race;
race_ = &dummy_race;
- }
-
- //insert any traits that are just for this unit type
- const config::child_list& unit_traits = cfg.get_children("trait");
+ }
+
+ //insert any traits that are just for this unit type
+ const config::child_list& unit_traits = cfg.get_children("trait");
possibleTraits_.insert(possibleTraits_.end(),unit_traits.begin(),unit_traits.end());
abilities_ = utils::split(cfg_["ability"]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src display.cpp network.cpp network_wor...,
Yann Dirson <=