wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src image.hpp playturn.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src image.hpp playturn.cpp
Date: Sun, 19 Sep 2004 00:09:42 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/09/19 03:50:24

Modified files:
        src            : image.hpp playturn.cpp 

Log message:
        added ':refresh' command

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/image.hpp.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.267&tr2=1.268&r1=text&r2=text

Patches:
Index: wesnoth/src/image.hpp
diff -u wesnoth/src/image.hpp:1.30 wesnoth/src/image.hpp:1.31
--- wesnoth/src/image.hpp:1.30  Thu Aug  5 19:36:43 2004
+++ wesnoth/src/image.hpp       Sun Sep 19 03:50:24 2004
@@ -114,6 +114,8 @@
        typedef std::vector<cache_item<surface> > image_cache;
        typedef std::vector<cache_item<locator> > locator_cache;
 
+       void flush_cache();
+
        ///the image manager is responsible for setting up images, and 
destroying
        ///all images when the program exits. It should probably
        ///be created once for the life of the program 
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.267 wesnoth/src/playturn.cpp:1.268
--- wesnoth/src/playturn.cpp:1.267      Sun Sep 19 02:27:23 2004
+++ wesnoth/src/playturn.cpp    Sun Sep 19 03:50:24 2004
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.267 2004/09/19 02:27:23 Sirp Exp $ */
+/* $Id: playturn.cpp,v 1.268 2004/09/19 03:50:24 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2217,7 +2217,10 @@
        const std::string cmd(str.begin(),i);
        const std::string data(i == str.end() ? str.end() : i+1,str.end());
 
-       if(cmd == "ban") {
+       if(cmd == "refresh") {
+               image::flush_cache();
+               gui_.redraw_everything();
+       } else if(cmd == "ban") {
                config cfg;
                config& ban = cfg.add_child("ban");
                ban["username"] = data;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]