~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/bridgelist.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 * is implemented as a singleton because many classes use it for looking up
29
29
 * bridges.
30
30
 */
31
 
class Bridgelist : public LocationList<Bridge>, public sigc::trackable
 
31
class Bridgelist : public LocationList<Bridge*>, public sigc::trackable
32
32
{
33
33
    public:
 
34
        //! The xml tag of this object in a saved-game file.
 
35
        static std::string d_tag; 
 
36
 
34
37
        //! Return the singleton instance.  Create a new one if needed.
35
38
        static Bridgelist* getInstance();
36
39
 
43
46
        //! Saves the list of Bridge objects to the opened saved-game file.
44
47
        bool save(XML_Helper* helper) const;
45
48
 
 
49
        //! Determines what the right Bridge::Type should be for the given tile.
 
50
        /**
 
51
         * Scans the surrounding tiles to see which bridge picture fits best.
 
52
         *
 
53
         * @param tile  The position on the game map to calculate a bridge type
 
54
         *              for.
 
55
         *
 
56
         * @return The Bridge::Type that makes the most sense for the given 
 
57
         *         tile.
 
58
         */
 
59
        int calculateType(Vector<int> t);
46
60
    protected:
47
61
        //! Default constructor.
48
62
        Bridgelist();