[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src gamestatus.hpp team.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src gamestatus.hpp team.cpp |
Date: |
Sat, 04 Dec 2004 10:20:26 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/12/04 15:14:09
Modified files:
src : gamestatus.hpp team.cpp
Log message:
Switched to new logging system.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gamestatus.hpp.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.cpp.diff?tr1=1.74&tr2=1.75&r1=text&r2=text
Patches:
Index: wesnoth/src/gamestatus.hpp
diff -u wesnoth/src/gamestatus.hpp:1.34 wesnoth/src/gamestatus.hpp:1.35
--- wesnoth/src/gamestatus.hpp:1.34 Fri Dec 3 04:33:56 2004
+++ wesnoth/src/gamestatus.hpp Sat Dec 4 15:14:09 2004
@@ -1,4 +1,4 @@
-/* $Id: gamestatus.hpp,v 1.34 2004/12/03 04:33:56 Sirp Exp $ */
+/* $Id: gamestatus.hpp,v 1.35 2004/12/04 15:14:09 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -13,6 +13,7 @@
#ifndef GAME_STATUS_HPP_INCLUDED
#define GAME_STATUS_HPP_INCLUDED
+#include "log.hpp"
#include "unit.hpp"
#include "unit_types.hpp"
@@ -147,11 +148,10 @@
// Return the Nth player, or NULL if no such player exists
player_info* get_player(const std::string& id) {
- std::cerr << "get_player('" << id << "')\n";
std::map<std::string, player_info>::iterator
found=players.find(id);
if(found==players.end()) {
- std::cerr << "WARNING: player " << id << " does not
exist." << std::endl;
+ lg::warn(lg::engine) << "player " << id << " does not
exist." << std::endl;
return NULL;
} else {
return &found->second;
Index: wesnoth/src/team.cpp
diff -u wesnoth/src/team.cpp:1.74 wesnoth/src/team.cpp:1.75
--- wesnoth/src/team.cpp:1.74 Thu Nov 18 22:00:12 2004
+++ wesnoth/src/team.cpp Sat Dec 4 15:14:09 2004
@@ -1,4 +1,4 @@
-/* $Id: team.cpp,v 1.74 2004/11/18 22:00:12 ydirson Exp $ */
+/* $Id: team.cpp,v 1.75 2004/12/04 15:14:09 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -16,6 +16,7 @@
#include "game_config.hpp"
#include "game_events.hpp"
#include "gamestatus.hpp"
+#include "log.hpp"
#include "network.hpp"
#include "replay.hpp"
#include "team.hpp"
@@ -25,6 +26,8 @@
#include <cstdlib>
#include <sstream>
+#define LOG_NG lg::info(lg::engine)
+
namespace {
std::vector<team>* teams = NULL;
}
@@ -180,8 +183,8 @@
share_view = (cfg["share_view"] == "yes");
share_maps = !share_view && (cfg["share_maps"] != "no");
- std::cerr << "team_info::team_info(...): team_name: " << team_name;
- std::cerr << ", share_maps: " << share_maps << ", share_view: " <<
share_view << ".\n";
+ LOG_NG << "team_info::team_info(...): team_name: " << team_name
+ << ", share_maps: " << share_maps << ", share_view: " <<
share_view << ".\n";
music = cfg["music"];
}
@@ -269,8 +272,8 @@
shroud_.set_enabled(cfg["shroud"] == "yes");
shroud_.read(cfg["shroud_data"]);
- std::cerr << "team::team(...): team_name: " << info_.team_name;
- std::cerr << ", shroud: " << uses_shroud() << ", fog: " << uses_fog()
<< ".\n";
+ LOG_NG << "team::team(...): team_name: " << info_.team_name
+ << ", shroud: " << uses_shroud() << ", fog: " << uses_fog() <<
".\n";
//gold is the maximum of 'gold' and what is given in the config file
if(info_.gold.empty() == false)
@@ -380,7 +383,8 @@
aggression_ = lexical_cast_default<double>(aiparams_["aggression"],0.5);
caution_ = lexical_cast_default<double>(aiparams_["caution"],0.25);
- std::cerr << "for turn " << turn << ", time of day '" << tod.id << "'
set ai_params to: ---\n" << aiparams_.write() << "\n---\n";
+ LOG_NG << "for turn " << turn << ", time of day '" << tod.id << "' set
ai_params to: ---\n"
+ << aiparams_.write() << "\n---\n";
}
void team::spend_gold(int amount)
@@ -678,7 +682,6 @@
}
if(side < 1 || side > int(teams->size())) {
- std::cerr << "invalid side " << side << " throwing
game_error\n";
throw gamestatus::game_error("invalid side found in unit
definition");
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src gamestatus.hpp team.cpp,
Guillaume Melquiond <=