The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
game_classification.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2016 by David White <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GAME_CLASSIFICATION_HPP_INCLUDED
16 #define GAME_CLASSIFICATION_HPP_INCLUDED
17 
18 #include "utils/make_enum.hpp"
19 
20 #include <vector>
21 
22 class config;
23 
24 /// The default difficulty setting for campaigns.
25 extern const std::string DEFAULT_DIFFICULTY;
26 
27 //meta information of the game
29 {
30 public:
32  explicit game_classification(const config& cfg);
34 
35  config to_config() const;
36  std::string get_tagname() const;
37  bool is_normal_mp_game() const;
38 
39  std::string label; /**< Name of the game (e.g. name of save file). */
40  std::string version; /**< Version game was created with. */
41  MAKE_ENUM (CAMPAIGN_TYPE, /**< Type of the game - campaign, multiplayer etc. */
42  (SCENARIO, "scenario")
43  (MULTIPLAYER, "multiplayer")
44  (TEST, "test")
45  (TUTORIAL, "tutorial")
46  )
47  CAMPAIGN_TYPE campaign_type;
48  std::string campaign_define; /**< If there is a define the campaign uses to customize data */
49  std::vector<std::string> campaign_xtra_defines; /**< more customization of data */
50  std::string scenario_define; /**< If there is a define the scenario uses to customize data */
51  std::string era_define; /**< If there is a define the era uses to customize data */
52  std::vector<std::string> mod_defines; /**< If there are defines the modifications use to customize data */
53 
54  std::string campaign; /**< the campaign being played */
55 
56  std::string abbrev; /**< the campaign abbreviation */
57  bool end_credits; /**< whether to show the standard credits at the end */
58  std::string end_text; /**< end-of-campaign text */
59  unsigned int end_text_duration; /**< for how long the end-of-campaign text is shown */
60  std::string difficulty; /**< The difficulty level the game is being played on. */
61  std::string random_mode;
62  bool oos_debug;
63 };
64 
65 #endif
unsigned int end_text_duration
for how long the end-of-campaign text is shown
bool end_credits
whether to show the standard credits at the end
std::string label
Name of the game (e.g.
std::string get_tagname() const
const std::string DEFAULT_DIFFICULTY
The default difficulty setting for campaigns.
STL namespace.
std::string campaign_define
If there is a define the campaign uses to customize data.
std::string end_text
end-of-campaign text
std::string campaign
the campaign being played
std::string era_define
If there is a define the era uses to customize data.
std::string abbrev
the campaign abbreviation
std::vector< std::string > campaign_xtra_defines
more customization of data
MAKE_ENUM(CAMPAIGN_TYPE,(SCENARIO,"scenario")(MULTIPLAYER,"multiplayer")(TEST,"test")(TUTORIAL,"tutorial")) CAMPAIGN_TYPE campaign_type
std::string scenario_define
If there is a define the scenario uses to customize data.
std::vector< std::string > mod_defines
If there are defines the modifications use to customize data.
std::string difficulty
The difficulty level the game is being played on.
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
Defines the MAKE_ENUM macro.
GLsizei const GLcharARB ** string
Definition: glew.h:4503
std::string version
Version game was created with.