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

« back to all changes in this revision

Viewing changes to src/GameScenario.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) 2000, 2001, 2002, 2003 Michael Bartl
 
2
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Ulf Lorenz
 
3
// Copyright (C) 2004, 2006 Andrea Paternesi
 
4
// Copyright (C) 2007, 2008 Ben Asselstine
 
5
// Copyright (C) 2007 Ole Laursen
 
6
//
1
7
//  This program is free software; you can redistribute it and/or modify
2
8
//  it under the terms of the GNU General Public License as published by
3
9
//  the Free Software Foundation; either version 2 of the License, or
10
16
//
11
17
//  You should have received a copy of the GNU General Public License
12
18
//  along with this program; if not, write to the Free Software
13
 
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
 
20
//  02110-1301, USA.
14
21
 
15
22
#ifndef GAME_SCENARIO_H
16
23
#define GAME_SCENARIO_H
22
29
 
23
30
class XML_Helper;
24
31
 
25
 
/** Class to hold several scenario options
26
 
  * 
27
 
  * This class has two functions. On the one hand side, it holds some data
28
 
  * about the current scenario being played (such as the name), on the other
29
 
  * hand it has a kind of supervisor function. Loading and saving works in
30
 
  * a hierarchical way with superior objects (such as the playerlist) saving
31
 
  * their data and then telling inferior objects (such as players) to save
32
 
  * their data as well. GameScenario is kind of the root of the saving or
33
 
  * loading process. For more information about the saving procedure, have
34
 
  * a look at XML_Helper.
35
 
  */
 
32
//! A class to hold several scenario options.
 
33
/** 
 
34
 * This class has two functions. On the one hand side, it holds some data
 
35
 * about the current scenario being played (such as the name), on the other
 
36
 * hand it has a kind of supervisor function. Loading and saving works in
 
37
 * a hierarchical way with superior objects (such as the playerlist) saving
 
38
 * their data and then telling inferior objects (such as players) to save
 
39
 * their data as well. GameScenario is kind of the root of the saving or
 
40
 * loading process. For more information about the saving procedure, have
 
41
 * a look at XML_Helper.
 
42
 */
36
43
 
37
44
class GameScenario: public sigc::trackable
38
45
{
52
59
          * @param broken       set to true if something goes wrong
53
60
          */
54
61
        GameScenario(std::string savegame, bool& broken);
 
62
 
 
63
        GameScenario(XML_Helper &helper, bool &broken);
 
64
 
55
65
        ~GameScenario();
56
66
 
57
67
        //! Returns the number of the current turn.
82
92
          * @return true if all went well, false otherwise
83
93
          */
84
94
        bool saveGame(std::string filename, std::string extension = "sav") const;
 
95
 
 
96
        bool loadWithHelper(XML_Helper &helper);
 
97
        bool saveWithHelper(XML_Helper &helper) const;
 
98
        
85
99
        static bool s_see_opponents_stacks;
86
100
        static bool s_see_opponents_production;
87
101
        static bool s_play_with_quests;