1
// $Id: editor_level.hpp 3198 2007-09-21 13:43:46Z grumbel $
3
// Pingus - A free Lemmings clone
4
// Copyright (C) 2007 Jason Green <jave27@gmail.com>,
5
// Ingo Ruhnke <grumbel@gmx.de>
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.
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.
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.
21
#ifndef HEADER_PINGUS_EDITOR_EDITORLEVEL_HXX
22
#define HEADER_PINGUS_EDITOR_EDITORLEVEL_HXX
25
#include "level_impl.hpp"
40
/** Construct new blank level */
41
EditorLevel(EditorScreen* editor);
46
/** Sets default values */
49
/** Verify that level is valid */
52
/** Save the level to a file. Returns true if successful */
53
bool save_level(const std::string& filename);
55
/** Load an existing level from a file */
56
void load_level(const Pathname& pathname);
58
Size get_size() const;
59
void set_size(const Size& s);
61
/** Return LevelImpl */
62
LevelImpl* get_level_impl() { return impl; }
64
void set_description(const std::string& str);
65
void set_levelname(const std::string& str);
66
void set_author(const std::string& str);
68
std::string get_description() const;
69
std::string get_levelname() const;
70
std::string get_author() const;
72
void set_number_of_pingus(int i);
73
void set_number_to_save(int i);
75
int get_number_of_pingus() const;
76
int get_number_to_save() const;
79
int get_difficulty() const;
80
std::string get_comment() const;
81
std::string get_music() const;
84
void set_difficulty(int);
85
void set_comment(const std::string&);
86
void set_music(const std::string&);
88
void set_action(const std::string& actionname, int count);
89
std::map<std::string, int> get_actions() const;
95
EditorLevel (const EditorLevel&);
96
EditorLevel& operator= (const EditorLevel&);