[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth images/human-longbowman.png images/huma...
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth images/human-longbowman.png images/huma... |
Date: |
Thu, 04 Nov 2004 23:40:53 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 04/11/05 04:34:50
Modified files:
images : human-longbowman.png
human-longbowman-attack-sword.png
human-longbowman-defend.png
human-longbowman-defend-close.png
human-longbowman-attack1.png
human-longbowman-attack2.png
Log message:
Updated human longbowman with proper alpha values.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman-attack-sword.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman-defend.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman-defend-close.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman-attack1.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/images/human-longbowman-attack2.png.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Modified files:
src : game.cpp
src/campaign_server: campaign_server.cpp
Log message:
made the campaign server store the size of campaigns being downloaded
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.160&tr2=1.161&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/campaign_server/campaign_server.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: wesnoth/images/human-longbowman-attack-sword.png
Index: wesnoth/images/human-longbowman-attack1.png
Index: wesnoth/images/human-longbowman-attack2.png
Index: wesnoth/images/human-longbowman-defend-close.png
Index: wesnoth/images/human-longbowman-defend.png
Index: wesnoth/images/human-longbowman.png
Index: wesnoth/src/campaign_server/campaign_server.cpp
diff -u wesnoth/src/campaign_server/campaign_server.cpp:1.6
wesnoth/src/campaign_server/campaign_server.cpp:1.7
--- wesnoth/src/campaign_server/campaign_server.cpp:1.6 Tue Sep 28 23:40:08 2004
+++ wesnoth/src/campaign_server/campaign_server.cpp Fri Nov 5 04:34:50 2004
@@ -118,7 +118,9 @@
const config* const data =
upload->child("data");
if(data != NULL) {
compression_schema
schema;
-
write_file((*campaign)["filename"],data->write_compressed(schema));
+ const std::string&
filedata = data->write_compressed(schema);
+
write_file((*campaign)["filename"],filedata);
+ (*campaign)["size"] =
lexical_cast<std::string>(filedata.size());
}
write_file(file_,cfg_.write());
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.160 wesnoth/src/game.cpp:1.161
--- wesnoth/src/game.cpp:1.160 Tue Nov 2 19:07:55 2004
+++ wesnoth/src/game.cpp Fri Nov 5 04:34:50 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.160 2004/11/02 19:07:55 gruikya Exp $ */
+/* $Id: game.cpp,v 1.161 2004/11/05 04:34:50 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1043,7 +1043,7 @@
}
std::vector<std::string> campaigns, options;
- options.push_back(_(",Name,Version,Author,Downloads"));
+ options.push_back(_(",Name,Version,Author,Downloads,Size"));
const config::child_list& cmps =
campaigns_cfg->get_children("campaign");
const std::vector<std::string>& publish_options =
available_campaigns();
@@ -1058,8 +1058,25 @@
delete_options.push_back(name);
}
+ size_t size =
lexical_cast_default<size_t>((**i)["size"],0);
+ std::string size_str = "";
+
+ if(size > 0) {
+ std::string size_postfix = _("B");
+ if(size > 1024) {
+ size /= 1024;
+ size_postfix = _("KB");
+ if(size > 1024) {
+ size /= 1024;
+ size_postfix = _("MB");
+ }
+ }
+
+ size_str = lexical_cast<std::string>(size) +
size_postfix;
+ }
+
std::replace(name.begin(),name.end(),'_',' ');
- options.push_back("&" + (**i)["icon"] + "," + name +
"," + (**i)["version"] + "," + (**i)["author"] + "," + (**i)["downloads"]);
+ options.push_back("&" + (**i)["icon"] + "," + name +
"," + (**i)["version"] + "," + (**i)["author"] + "," + (**i)["downloads"] + ","
+ size_str);
}
for(std::vector<std::string>::const_iterator j =
publish_options.begin(); j != publish_options.end(); ++j) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth images/human-longbowman.png images/huma...,
David White <=