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

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

[Wesnoth-cvs-commits] wesnoth src/help.cpp src/terrain.hpp src/terrai...


From: ott
Subject: [Wesnoth-cvs-commits] wesnoth src/help.cpp src/terrain.hpp src/terrai...
Date: Sat, 16 Jul 2005 14:51:56 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     ott <address@hidden>    05/07/16 18:51:56

Modified files:
        src            : help.cpp terrain.hpp terrain.cpp 
        data           : terrain.cfg 

Log message:
        fix terrain list in unit help

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/help.cpp.diff?tr1=1.110&tr2=1.111&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/terrain.hpp.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/terrain.cpp.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/terrain.cfg.diff?tr1=1.61&tr2=1.62&r1=text&r2=text

Patches:
Index: wesnoth/data/terrain.cfg
diff -u wesnoth/data/terrain.cfg:1.61 wesnoth/data/terrain.cfg:1.62
--- wesnoth/data/terrain.cfg:1.61       Sat Jul 16 14:47:24 2005
+++ wesnoth/data/terrain.cfg    Sat Jul 16 18:51:56 2005
@@ -115,6 +115,7 @@
 name= _ "Desert"
 char=I
 light=true
+aliasof=d
 [/terrain]
 
 [terrain]
Index: wesnoth/src/help.cpp
diff -u wesnoth/src/help.cpp:1.110 wesnoth/src/help.cpp:1.111
--- wesnoth/src/help.cpp:1.110  Sun Jul  3 22:10:49 2005
+++ wesnoth/src/help.cpp        Sat Jul 16 18:51:56 2005
@@ -876,7 +876,7 @@
        }
        else if (generator == "weapon_specials") {
                res = generate_weapon_special_topics();
-       }
+       }
 //  terrain topics removed for now, since they aren't release-quality
 //     else if (generator == "terrains") {
 //             res = generate_terrains_topics();
@@ -1206,7 +1206,7 @@
                                if (terrain == gamemap::FOGGED || terrain == 
gamemap::VOID_TERRAIN)
                                        continue;
                                const terrain_type& info = 
map->get_terrain_info(terrain);
-                               if (!info.is_alias()) {
+                               if (!info.is_alias() && info.is_nonnull()) {
                                        std::vector<item> row;
                                        const std::string& name = info.name();
                                        const int moves = 
movement_type.movement_cost(*map,terrain);
Index: wesnoth/src/terrain.cpp
diff -u wesnoth/src/terrain.cpp:1.30 wesnoth/src/terrain.cpp:1.31
--- wesnoth/src/terrain.cpp:1.30        Sat Jul  2 21:37:19 2005
+++ wesnoth/src/terrain.cpp     Sat Jul 16 18:51:56 2005
@@ -1,4 +1,4 @@
-/* $Id: terrain.cpp,v 1.30 2005/07/02 21:37:19 ott Exp $ */
+/* $Id: terrain.cpp,v 1.31 2005/07/16 18:51:56 ott Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -75,6 +75,11 @@
 char terrain_type::letter() const
 {
        return letter_;
+}
+
+bool terrain_type::is_nonnull() const
+{
+       return (letter_ != 0) && (letter_ != ' ');
 }
 
 const std::string& terrain_type::type() const
Index: wesnoth/src/terrain.hpp
diff -u wesnoth/src/terrain.hpp:1.25 wesnoth/src/terrain.hpp:1.26
--- wesnoth/src/terrain.hpp:1.25        Sat Jul  2 21:37:19 2005
+++ wesnoth/src/terrain.hpp     Sat Jul 16 18:51:56 2005
@@ -1,4 +1,4 @@
-/* $Id: terrain.hpp,v 1.25 2005/07/02 21:37:19 ott Exp $ */
+/* $Id: terrain.hpp,v 1.26 2005/07/16 18:51:56 ott Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -36,6 +36,7 @@
        //the underlying type of the terrain
        const std::string& type() const;
 
+       bool is_nonnull() const;
        bool is_light() const;
        bool is_alias() const;
 




reply via email to

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