[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src gamestatus.cpp gamestatus.hpp multi...
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src gamestatus.cpp gamestatus.hpp multi... |
Date: |
Sat, 26 Mar 2005 12:24:42 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 05/03/26 17:24:42
Modified files:
src : gamestatus.cpp gamestatus.hpp
multiplayer_connect.cpp
Log message:
Move the function out of the header, and correct related dependencies.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gamestatus.cpp.diff?tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gamestatus.hpp.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.133&tr2=1.134&r1=text&r2=text
Patches:
Index: wesnoth/src/gamestatus.cpp
diff -u wesnoth/src/gamestatus.cpp:1.66 wesnoth/src/gamestatus.cpp:1.67
--- wesnoth/src/gamestatus.cpp:1.66 Sat Mar 26 14:07:16 2005
+++ wesnoth/src/gamestatus.cpp Sat Mar 26 17:24:42 2005
@@ -1,4 +1,4 @@
-/* $Id: gamestatus.cpp,v 1.66 2005/03/26 14:07:16 silene Exp $ */
+/* $Id: gamestatus.cpp,v 1.67 2005/03/26 17:24:42 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -33,6 +33,15 @@
#include <iterator>
#include <sstream>
+player_info* game_state::get_player(const std::string& id) {
+ std::map< std::string, player_info >::iterator found = players.find(id);
+ if (found == players.end()) {
+ LOG_STREAM(warn, engine) << "player " << id << " does not
exist.\n";
+ return NULL;
+ } else
+ return &found->second;
+}
+
time_of_day::time_of_day(const config& cfg)
: lawful_bonus(atoi(cfg["lawful_bonus"].c_str())),
image(cfg["image"]), name(cfg["name"]), id(cfg["id"]),
Index: wesnoth/src/gamestatus.hpp
diff -u wesnoth/src/gamestatus.hpp:1.40 wesnoth/src/gamestatus.hpp:1.41
--- wesnoth/src/gamestatus.hpp:1.40 Sat Mar 26 17:10:32 2005
+++ wesnoth/src/gamestatus.hpp Sat Mar 26 17:24:42 2005
@@ -1,4 +1,4 @@
-/* $Id: gamestatus.hpp,v 1.40 2005/03/26 17:10:32 silene Exp $ */
+/* $Id: gamestatus.hpp,v 1.41 2005/03/26 17:24:42 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -13,7 +13,6 @@
#ifndef GAME_STATUS_HPP_INCLUDED
#define GAME_STATUS_HPP_INCLUDED
-#include "log.hpp"
#include "unit.hpp"
#include <time.h>
@@ -112,16 +111,7 @@
std::map<std::string, player_info> players;
// Return the Nth player, or NULL if no such player exists
- player_info* get_player(const std::string& id) {
- std::map<std::string, player_info>::iterator
found=players.find(id);
-
- if(found==players.end()) {
- LOG_STREAM(warn, engine) << "player " << id << " does
not exist." << std::endl;
- return NULL;
- } else {
- return &found->second;
- }
- }
+ player_info* get_player(const std::string& id);
config variables; //variables that have been set
std::string difficulty; //the difficulty level the game is being played
on.
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.133
wesnoth/src/multiplayer_connect.cpp:1.134
--- wesnoth/src/multiplayer_connect.cpp:1.133 Sat Mar 26 17:10:32 2005
+++ wesnoth/src/multiplayer_connect.cpp Sat Mar 26 17:24:42 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.133 2005/03/26 17:10:32 silene Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.134 2005/03/26 17:24:42 silene Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -17,6 +17,7 @@
#include "font.hpp"
#include "game_config.hpp"
#include "gettext.hpp"
+#include "log.hpp"
#include "multiplayer_connect.hpp"
#include "preferences.hpp"
#include "replay.hpp"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src gamestatus.cpp gamestatus.hpp multi...,
Guillaume Melquiond <=