Author: mordante
Date: Sat Oct 16 21:53:45 2010
New Revision: 47064

URL: http://svn.gna.org/viewcvs/wesnoth?rev=47064&view=rev
Log:
Remove the now unused titlescreen.* files.

Removed:
    trunk/src/titlescreen.cpp
    trunk/src/titlescreen.hpp
Modified:
    trunk/po/wesnoth/POTFILES.in
    trunk/src/CMakeLists.txt
    trunk/src/Makefile.am
    trunk/src/SConscript

Modified: trunk/po/wesnoth/POTFILES.in
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/po/wesnoth/POTFILES.in?rev=47064&r1=47063&r2=47064&view=diff
==============================================================================
--- trunk/po/wesnoth/POTFILES.in (original)
+++ trunk/po/wesnoth/POTFILES.in Sat Oct 16 21:53:45 2010
@@ -178,7 +178,6 @@
 src/theme.cpp
 src/thread.cpp
 src/time_of_day.cpp
-src/titlescreen.cpp
 src/tod_manager.cpp
 src/tools/cutter.cpp
 src/tools/dummy_video.cpp

Modified: trunk/src/CMakeLists.txt
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/CMakeLists.txt?rev=47064&r1=47063&r2=47064&view=diff
==============================================================================
--- trunk/src/CMakeLists.txt (original)
+++ trunk/src/CMakeLists.txt Sat Oct 16 21:53:45 2010
@@ -501,7 +501,6 @@
        storyscreen/render.cpp
        team.cpp
        terrain_filter.cpp
-       titlescreen.cpp
        tod_manager.cpp
        tooltips.cpp
        unit.cpp

Modified: trunk/src/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/Makefile.am?rev=47064&r1=47063&r2=47064&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Sat Oct 16 21:53:45 2010
@@ -274,7 +274,6 @@
        team.cpp \
        terrain_filter.cpp \
        text.cpp \
-       titlescreen.cpp \
        tod_manager.cpp \
        tooltips.cpp \
        unit.cpp \

Modified: trunk/src/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=47064&r1=47063&r2=47064&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Sat Oct 16 21:53:45 2010
@@ -255,7 +255,6 @@
     storyscreen/render.cpp
     team.cpp
     terrain_filter.cpp
-    titlescreen.cpp
     tod_manager.cpp
     unit.cpp
     unit_abilities.cpp

Removed: trunk/src/titlescreen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=47063&view=auto
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp (removed)
@@ -1,130 +1,0 @@
-/* $Id$ */
-/*
-   Copyright (C) 2003 - 2010 by David White <[email protected]>
-   Part of the Battle for Wesnoth Project http://www.wesnoth.org/
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY.
-
-   See the COPYING file for more details.
-*/
-
-/**
- *  @file
- *  Shows the titlescreen, with main-menu and tip-of-the-day.
- *
- *  The menu consists of buttons, such als Start-Tutorial, Start-Campaign,
- *  Load-Game, etc.  As decoration, the wesnoth-logo and a landmap in the
- *  background are shown.
- */
-
-#include "titlescreen.hpp"
-
-#include "config.hpp"
-#include "filesystem.hpp"
-#include "foreach.hpp"
-#include "game_preferences.hpp"
-#include "gettext.hpp"
-#include "log.hpp"
-#include "serialization/parser.hpp"
-#include "serialization/preprocessor.hpp"
-#include "serialization/string_utils.hpp"
-#include "util.hpp"
-
-#include <algorithm>
-#include <vector>
-
-static lg::log_domain log_engine("engine");
-#define ERR_NG LOG_STREAM(err, log_engine)
-
-static lg::log_domain log_display("display");
-#define LOG_DP LOG_STREAM(info, log_display)
-#define ERR_DP LOG_STREAM(err, log_display)
-
-static lg::log_domain log_config("config");
-#define LOG_CF LOG_STREAM(info, log_config)
-#define ERR_CF LOG_STREAM(err, log_config)
-
-/** Read the file with the tips-of-the-day. */
-void read_tips_of_day(config& tips_of_day)
-{
-       tips_of_day.clear();
-       LOG_CF << "Loading tips of day\n";
-       try {
-               scoped_istream stream = 
preprocess_file(get_wml_location("hardwired/tips.cfg"));
-               read(tips_of_day, *stream);
-       } catch(config::error&) {
-               ERR_CF << "Could not read data/hardwired/tips.cfg\n";
-       }
-
-       //we shuffle the tips after each initial loading.
-       config::const_child_itors itors = tips_of_day.child_range("tip");
-       if (itors.first != itors.second) {
-               std::vector<config> tips(itors.first, itors.second);
-               std::random_shuffle(tips.begin(), tips.end());
-               tips_of_day.clear();
-               foreach (const config &tip, tips) {
-                       tips_of_day.add_child("tip", tip);
-               }
-       }
-}
-
-/** Go to the next tips-of-the-day */
-void next_tip_of_day(config& tips_of_day, bool reverse)
-{
-       // we just rotate the tip list, to avoid the need to keep track
-       // of the current one, and keep it valid, cycle it, etc...
-       config::const_child_itors itors = tips_of_day.child_range("tip");
-       if (itors.first != itors.second) {
-               std::vector<config> tips(itors.first, itors.second);
-               std::vector<config>::iterator direction =
-                       reverse ? tips.begin() + 1 : tips.end() - 1;
-               std::rotate(tips.begin(), direction, tips.end());
-               tips_of_day.clear();
-               foreach (const config &tip, tips) {
-                       tips_of_day.add_child("tip", tip);
-               }
-       }
-}
-
-const config* get_tip_of_day(config& tips_of_day)
-{
-       if (tips_of_day.empty()) {
-               read_tips_of_day(tips_of_day);
-       }
-
-       // next_tip_of_day rotate tips, so better stay iterator-safe
-       for (int nb_tips = tips_of_day.child_count("tip"); nb_tips > 0;
-            --nb_tips, next_tip_of_day(tips_of_day))
-       {
-               const config &tip = tips_of_day.child("tip");
-               assert(tip);
-
-               const std::vector<std::string> needed_units = 
utils::split(tip["encountered_units"], ',');
-               if (needed_units.empty()) {
-                       return &tip;
-               }
-               const std::set<std::string>& seen_units = 
preferences::encountered_units();
-
-               // test if one of the listed unit types is already encountered
-               // if if's a number, test if we have encountered more than this
-               for (std::vector<std::string>::const_iterator i = 
needed_units.begin();
-                               i != needed_units.end(); ++i) {
-                       int needed_units_nb = lexical_cast_default<int>(*i,-1);
-                       if (needed_units_nb !=-1) {
-                               if (needed_units_nb <= 
static_cast<int>(seen_units.size())) {
-                                       return &tip;
-                               }
-                       } else if (seen_units.find(*i) != seen_units.end()) {
-                               return &tip;
-                       }
-               }
-       }
-       // not tip match, someone forget to put an always-match one
-       return NULL;
-}
-

Removed: trunk/src/titlescreen.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.hpp?rev=47063&view=auto
==============================================================================
--- trunk/src/titlescreen.hpp (original)
+++ trunk/src/titlescreen.hpp (removed)
@@ -1,34 +1,0 @@
-/* $Id$ */
-/*
-   Copyright (C) 2003 - 2010 by David White <[email protected]>
-   Part of the Battle for Wesnoth Project http://www.wesnoth.org/
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY.
-
-   See the COPYING file for more details.
-*/
-
-#ifndef TITLE_HPP_INCLUDED
-#define TITLE_HPP_INCLUDED
-
-class config;
-
-/** Read the file with the tips-of-the-day. */
-void read_tips_of_day(config& tips_of_day);
-
-/** Go to the next tips-of-the-day */
-void next_tip_of_day(config& tips_of_day, bool reverse = false);
-
-/** Return the text for one of the tips-of-the-day. */
-const config* get_tip_of_day(config& tips_of_day);
-
-namespace gui {
-
-}
-
-#endif


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to