~ubuntu-branches/ubuntu/precise/pingus/precise

« back to all changes in this revision

Viewing changes to src/editor/editor_level.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-02-28 19:44:25 UTC
  • mfrom: (4.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080228194425-e8ilohlijv02kgcf
Tags: 0.7.2-2
* Fix FTBFS with gcc-4.3 by adding the missing include in
  src/input/evdev_device.cpp (Closes: #462238):
   + debian/patches/20_fix_FTBFS_with_gcc-4.3.
* Rename former patch so that the filename reflects the order in which
  the patches are applied:
   - debian/patches/data_dir.patch
   + debian/patches/10_fix_data_directory.
* Bump Standards-Version from 3.7.2 to 3.7.3, no changes needed.
* Add a dh_desktop call in the arch-dep part of debian/rules.
* Adjust the “missing-dep-for-interpreter guile” override since lintian
  now lists an alternative for that dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  $Id: editor_level.hpp 3198 2007-09-21 13:43:46Z grumbel $
 
2
//
 
3
//  Pingus - A free Lemmings clone
 
4
//  Copyright (C) 2007 Jason Green <jave27@gmail.com>,
 
5
//                     Ingo Ruhnke <grumbel@gmx.de>
 
6
//
 
7
//  This program is free software; you can redistribute it and/or
 
8
//  modify it under the terms of the GNU General Public License
 
9
//  as published by the Free Software Foundation; either version 2
 
10
//  of the License, or (at your option) any later version.
 
11
//
 
12
//  This program is distributed in the hope that it will be useful,
 
13
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
//  GNU General Public License for more details.
 
16
//
 
17
//  You should have received a copy of the GNU General Public License
 
18
//  along with this program; if not, write to the Free Software
 
19
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
20
 
 
21
#ifndef HEADER_PINGUS_EDITOR_EDITORLEVEL_HXX
 
22
#define HEADER_PINGUS_EDITOR_EDITORLEVEL_HXX
 
23
 
 
24
#include <vector>
 
25
#include "level_impl.hpp"
 
26
 
 
27
class Pathname;
 
28
 
 
29
namespace Editor {
 
30
 
 
31
class LevelObj;
 
32
class EditorScreen;
 
33
 
 
34
class EditorLevel
 
35
{
 
36
private:
 
37
  EditorScreen* editor;
 
38
  
 
39
public:
 
40
  /** Construct new blank level */
 
41
  EditorLevel(EditorScreen* editor);
 
42
 
 
43
  /** Destructor */
 
44
  ~EditorLevel();
 
45
 
 
46
  /** Sets default values */
 
47
  void clear();
 
48
 
 
49
  /** Verify that level is valid */
 
50
  bool is_valid();
 
51
 
 
52
  /** Save the level to a file.  Returns true if successful */
 
53
  bool save_level(const std::string& filename);
 
54
 
 
55
  /** Load an existing level from a file */
 
56
  void load_level(const Pathname& pathname);
 
57
 
 
58
  Size get_size() const;
 
59
  void set_size(const Size& s);
 
60
        
 
61
  /** Return LevelImpl */
 
62
  LevelImpl* get_level_impl() { return impl; }
 
63
 
 
64
  void set_description(const std::string& str);
 
65
  void set_levelname(const std::string& str);
 
66
  void set_author(const std::string& str);
 
67
 
 
68
  std::string get_description() const;
 
69
  std::string get_levelname() const;
 
70
  std::string get_author() const;
 
71
 
 
72
  void set_number_of_pingus(int i);
 
73
  void set_number_to_save(int i);
 
74
 
 
75
  int get_number_of_pingus() const;
 
76
  int get_number_to_save() const;
 
77
 
 
78
  int get_time() const;
 
79
  int get_difficulty() const;
 
80
  std::string get_comment() const;
 
81
  std::string get_music() const;
 
82
 
 
83
  void set_time(int);
 
84
  void set_difficulty(int);
 
85
  void set_comment(const std::string&);
 
86
  void set_music(const std::string&);
 
87
 
 
88
  void set_action(const std::string& actionname, int count); 
 
89
  std::map<std::string, int> get_actions() const;
 
90
 
 
91
private:
 
92
  LevelImpl* impl;
 
93
 
 
94
private:
 
95
  EditorLevel (const EditorLevel&);
 
96
  EditorLevel& operator= (const EditorLevel&);
 
97
};
 
98
 
 
99
} // Editor namespace
 
100
 
 
101
#endif
 
102
 
 
103
/* EOF */