[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src actions.cpp actions.hpp ai.cpp ai_a...
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src actions.cpp actions.hpp ai.cpp ai_a... |
Date: |
Sat, 27 Nov 2004 03:48:15 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/11/27 08:41:50
Modified files:
src : actions.cpp actions.hpp ai.cpp ai_attack.cpp
playturn.cpp replay.cpp
Log message:
Remove two unused parameters from actions.cpp.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.168&tr2=1.169&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.hpp.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai.cpp.diff?tr1=1.125&tr2=1.126&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai_attack.cpp.diff?tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.299&tr2=1.300&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/replay.cpp.diff?tr1=1.86&tr2=1.87&r1=text&r2=text
Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.168 wesnoth/src/actions.cpp:1.169
--- wesnoth/src/actions.cpp:1.168 Thu Nov 25 19:50:51 2004
+++ wesnoth/src/actions.cpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.168 2004/11/25 19:50:51 ydirson Exp $ */
+/* $Id: actions.cpp,v 1.169 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -191,7 +191,6 @@
int attack_with,
std::map<gamemap::location,unit>& units,
const gamestatus& state,
- const game_data& info,
gamemap::TERRAIN attacker_terrain_override,
bool include_strings)
{
@@ -561,13 +560,13 @@
}
void attack(display& gui, const gamemap& map,
- std::vector<team>& teams,
+ std::vector<team>& teams,
gamemap::location attacker,
gamemap::location defender,
- int attack_with,
- std::map<gamemap::location,unit>& units,
- const gamestatus& state,
- const game_data& info, bool player_is_attacker)
+ int attack_with,
+ std::map<gamemap::location,unit>& units,
+ const gamestatus& state,
+ const game_data& info)
{
//stop the user from issuing any commands while the units are fighting
const command_disabler disable_commands;
@@ -591,8 +590,8 @@
static const std::string night_invisible("nightstalk");
a->second.remove_flag(night_invisible);
- battle_stats stats = evaluate_battle_stats(map,attacker,defender,
-
attack_with,units,state,info);
+ battle_stats stats = evaluate_battle_stats(map, attacker, defender,
+ attack_with, units, state);
statistics::attack_context attack_stats(a->second,d->second,stats);
Index: wesnoth/src/actions.hpp
diff -u wesnoth/src/actions.hpp:1.45 wesnoth/src/actions.hpp:1.46
--- wesnoth/src/actions.hpp:1.45 Wed Aug 25 02:59:50 2004
+++ wesnoth/src/actions.hpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.hpp,v 1.45 2004/08/25 02:59:50 Sirp Exp $ */
+/* $Id: actions.hpp,v 1.46 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -83,19 +83,18 @@
int attack_with,
std::map<gamemap::location,unit>& units,
const gamestatus& state,
- const game_data& info,
gamemap::TERRAIN attacker_terrain_override=0,
bool include_strings=true);
//attack: executes an attack.
void attack(display& gui, const gamemap& map,
- std::vector<team>& teams,
+ std::vector<team>& teams,
gamemap::location attacker,
gamemap::location defender,
int attack_with,
std::map<gamemap::location,unit>& units,
const gamestatus& state,
- const game_data& info, bool player_is_attacker);
+ const game_data& info);
//given the location of a village, will return the 0-based index of the team
//that currently owns it, and -1 if it is unowned.
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.125 wesnoth/src/ai.cpp:1.126
--- wesnoth/src/ai.cpp:1.125 Sun Nov 21 21:15:56 2004
+++ wesnoth/src/ai.cpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.125 2004/11/21 21:15:56 silene Exp $ */
+/* $Id: ai.cpp,v 1.126 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -110,7 +110,7 @@
int best_attack_rating = -1;
int best_attack = -1;
for(size_t n = 0; n != attacks.size(); ++n) {
- const battle_stats stats =
evaluate_battle_stats(get_info().map,attacker,defender,n,get_info().units,get_info().state,get_info().gameinfo,0,false);
+ const battle_stats stats =
evaluate_battle_stats(get_info().map, attacker, defender, n, get_info().units,
get_info().state, 0, false);
const int attack_rating =
stats.damage_defender_takes*stats.nattacks*stats.chance_to_hit_defender;
if(best_attack == -1 || attack_rating >
best_attack_rating) {
best_attack = n;
@@ -924,7 +924,7 @@
recorder.add_attack(u,target,weapon);
game_events::fire("attack",u,target);
-
attack(info_.disp,info_.map,info_.teams,u,target,weapon,info_.units,info_.state,info_.gameinfo,false);
+ attack(info_.disp, info_.map, info_.teams, u, target, weapon,
info_.units, info_.state, info_.gameinfo);
check_victory(info_.units,info_.teams);
dialogs::advance_unit(info_.gameinfo,info_.map,info_.units,u,info_.disp,true);
Index: wesnoth/src/ai_attack.cpp
diff -u wesnoth/src/ai_attack.cpp:1.54 wesnoth/src/ai_attack.cpp:1.55
--- wesnoth/src/ai_attack.cpp:1.54 Thu Nov 18 22:00:12 2004
+++ wesnoth/src/ai_attack.cpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: ai_attack.cpp,v 1.54 2004/11/18 22:00:12 ydirson Exp $ */
+/* $Id: ai_attack.cpp,v 1.55 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -281,8 +281,8 @@
int a_hitpoints = itor->second.hitpoints();
for(size_t a = 0; a != attacks.size(); ++a) {
- const battle_stats stats =
evaluate_battle_stats(map_,att,def,a,units_,
-
state_,gameinfo_,terrain,false);
+ const battle_stats stats = evaluate_battle_stats(map_, att,
def, a, units_,
+ state_,
terrain, false);
//TODO: improve this rating formula!
const double rating =
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.299 wesnoth/src/playturn.cpp:1.300
--- wesnoth/src/playturn.cpp:1.299 Thu Nov 25 23:10:08 2004
+++ wesnoth/src/playturn.cpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.299 2004/11/25 23:10:08 ydirson Exp $ */
+/* $Id: playturn.cpp,v 1.300 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -578,9 +578,8 @@
attacks_in_range.push_back(a);
- stats.push_back(evaluate_battle_stats(
- map_,selected_hex_,hex,
-
a,units_,status_,gameinfo_));
+ stats.push_back(evaluate_battle_stats(map_,
selected_hex_, hex,
+ a, units_,
status_));
int weapon_rating = stats.back().chance_to_hit_defender
*
stats.back().damage_defender_takes *
stats.back().nattacks;
@@ -680,7 +679,7 @@
recorder.add_attack(selected_hex_,hex,res);
try {
-
attack(gui_,map_,teams_,selected_hex_,hex,res,units_,status_,gameinfo_,true);
+
attack(gui_,map_,teams_,selected_hex_,hex,res,units_,status_,gameinfo_);
} catch(end_level_exception&) {
//if the level ends due to a unit being killed,
still see if
//either the attacker or defender should advance
Index: wesnoth/src/replay.cpp
diff -u wesnoth/src/replay.cpp:1.86 wesnoth/src/replay.cpp:1.87
--- wesnoth/src/replay.cpp:1.86 Sun Nov 21 22:00:06 2004
+++ wesnoth/src/replay.cpp Sat Nov 27 08:41:49 2004
@@ -1,4 +1,4 @@
-/* $Id: replay.cpp,v 1.86 2004/11/21 22:00:06 silene Exp $ */
+/* $Id: replay.cpp,v 1.87 2004/11/27 08:41:49 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -896,7 +896,7 @@
tgt = units.find(dst);
if(u != units.end() && tgt != units.end()) {
-
attack(disp,map,teams,src,dst,weapon_num,units,state,gameinfo,false);
+ attack(disp, map, teams, src, dst, weapon_num,
units, state, gameinfo);
}
u = units.find(src);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp actions.hpp ai.cpp ai_a...,
Guillaume Melquiond <=