~ubuntu-branches/ubuntu/raring/lordsawar/raring

« back to all changes in this revision

Viewing changes to src/temple.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Gonéri Le Bouder
  • Date: 2008-06-17 11:15:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617111526-yjyvu9df50zmpdo0
Tags: 0.0.9-1
[ Barry deFreese ]
* New upstream release.
  + Fixes gcc-4.3 builds so drop ftbfs_gcc-4.3_fix.diff.
  + Add new build-dependency for libgnet-dev.
* Add simple man page for new lordsawar-tile-editor.
* Add desktop file for lordsawar-tile-editor.
* Remove French translation on install.

[ Gonéri Le Bouder ]
* bump Debian Policy to 3.8.0. No change needed.
* fix wording in the 0.0.8-3 entry of the Debian changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2001, 2003 Michael Bartl
 
2
// Copyright (C) 2002, 2003, 2004, 2005, 2006 Ulf Lorenz
 
3
// Copyright (C) 2006 Andrea Paternesi
 
4
// Copyright (C) 2007, 2008 Ben Asselstine
 
5
//
1
6
//  This program is free software; you can redistribute it and/or modify
2
7
//  it under the terms of the GNU General Public License as published by
3
8
//  the Free Software Foundation; either version 2 of the License, or
10
15
//
11
16
//  You should have received a copy of the GNU General Public License
12
17
//  along with this program; if not, write to the Free Software
13
 
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
 
19
//  02110-1301, USA.
14
20
 
15
21
#ifndef TEMPLE_H
16
22
#define TEMPLE_H
17
23
 
 
24
#define DEFAULT_TEMPLE_NAME  "Shrine"
 
25
 
18
26
#include <string>
19
 
#include "Location.h"
 
27
#include "NamedLocation.h"
20
28
 
21
29
class Stack;
22
30
class Quest;
23
31
 
24
 
/** A temple is the place where heroes can get quests or have their armies
25
 
  * blessed. It doesn't extend the Location class very much...
26
 
  */
27
 
 
28
 
class Temple : public Location
 
32
//! A temple on the game map.
 
33
/** 
 
34
 * A temple is the place where heroes can get quests or have their armies
 
35
 * blessed.
 
36
 */
 
37
class Temple : public NamedLocation
29
38
{
30
39
    public:
31
 
        /** Default constructor
32
 
          * 
33
 
          * @param pos          the location of the temple
34
 
          * @param name         the name of the temple (AFAIR unused)
35
 
          */
36
 
        Temple(Vector<int> pos, std::string name = "Shrine", int type=0);
37
 
 
38
 
        //! Loading constructor. See XML_Helper
 
40
        //! Default constructor.
 
41
        /**
 
42
         * @param pos          The location of the temple on the game map.
 
43
         * @param name         The name of the temple.
 
44
         * @param type         The type of the temple.  This should always
 
45
         *                     be 0.
 
46
         */
 
47
        Temple(Vector<int> pos, std::string name = DEFAULT_TEMPLE_NAME, 
 
48
               int type = 0);
 
49
        //! Copy constructor.
 
50
        Temple(const Temple&);
 
51
        //! Loading constructor.
 
52
        /**
 
53
         * @param helper  The opened saved-game file to load the temple from.
 
54
         */
39
55
        Temple(XML_Helper* helper);
40
 
        Temple(const Temple&);
 
56
        //! Destructor.
41
57
        ~Temple();
42
58
 
43
 
        //! Returns the type of the temple
 
59
        //! Returns the type of the temple.
44
60
        int getType() {return d_type;};
45
61
 
46
 
        //! Returns the type of the temple
 
62
        //! Returns the type of the temple.
47
63
        void setType(int type) {d_type=type;};
48
64
 
49
 
        //! Dummy function. May be extended in the future.
50
 
        bool searchable(){return true;}
 
65
        //! Returns whether or not the temple can be searched.
 
66
        /**
 
67
         * @note Temples can always be searched in this game.
 
68
         */
 
69
        bool searchable() {return true;}
51
70
 
52
 
        //! Save the temple data.
 
71
        //! Save the temple to the opened saved-game file.
53
72
        bool save(XML_Helper* helper) const;
54
73
 
55
74
    protected:
 
75
        
 
76
        //! The type of the temple.
 
77
        /**
 
78
         * The temple always has a type of 0, because there is only one kind
 
79
         * of temple in the game.
 
80
         */
56
81
        int d_type;
57
82
};
58
83