14 #ifndef MULTIPLAYER_CREATE_ENGINE_HPP_INCLUDED
15 #define MULTIPLAYER_CREATE_ENGINE_HPP_INCLUDED
23 #include <boost/scoped_ptr.hpp>
31 namespace depcheck {
class manager; }
40 (USER_MAP,
"user_map")
41 (USER_SCENARIO,
"user_scenario")
42 (RANDOM_MAP,
"random_map")
43 (CAMPAIGN,
"campaign")
44 (SP_CAMPAIGN,
"sp_campaign")
47 virtual
bool can_launch_game() const = 0;
53 virtual
std::
string name() const;
54 virtual
std::
string icon() const;
56 virtual
std::
string id() const;
60 const
config& data() const;
68 void operator=(const level&);
77 bool can_launch_game()
const;
83 int num_players()
const;
89 boost::scoped_ptr<gamemap>
map_;
126 const config& generator_data()
const;
135 bool generate_whole_scenario()
const;
153 bool can_launch_game()
const;
159 void mark_if_completed();
165 int min_players()
const;
166 int max_players()
const;
202 void init_generated_level_data();
204 void prepare_for_new_level();
205 void prepare_for_era_and_mods();
206 void prepare_for_scenario();
207 void prepare_for_campaign(
const std::string& difficulty);
208 void prepare_for_saved_game();
210 void prepare_for_other();
212 std::string select_campaign_difficulty(
int set_value = -1);
215 void apply_level_filter(
int players);
216 void reset_level_filters();
219 int player_num_filter()
const;
221 std::vector<level_ptr> get_levels_by_type_unfiltered(
level::TYPE type)
const;
224 std::vector<std::string> levels_menu_item_names()
const;
225 std::vector<std::string> extras_menu_item_names(
226 const MP_EXTRA extra_type,
bool escape_markup =
true)
const;
228 level& current_level()
const;
234 void set_current_level(
const size_t index);
236 void set_current_era_index(
const size_t index,
bool force =
false);
237 void set_current_mod_index(
const size_t index);
239 size_t current_era_index()
const;
240 size_t current_mod_index()
const;
242 const std::vector<extras_metadata_ptr>&
243 get_const_extras_by_type(
const MP_EXTRA extra_type)
const;
244 std::vector<extras_metadata_ptr>&
245 get_extras_by_type(
const MP_EXTRA extra_type);
247 bool toggle_current_mod(
bool force =
false);
249 bool generator_assigned()
const;
250 void generator_user_config(
CVideo& v);
256 const depcheck::manager& dependency_manager()
const;
258 void init_active_mods();
259 std::vector<std::string>& active_mods();
269 void init_all_levels();
270 void init_extras(
const MP_EXTRA extra_type);
271 void apply_level_filters();
273 size_t map_level_index(
size_t index)
const;
301 std::vector<extras_metadata_ptr>
eras_;
302 std::vector<extras_metadata_ptr>
mods_;
boost::shared_ptr< extras_metadata > extras_metadata_ptr
TYPE
UNSCALED : image will be drawn "as is" without changing size, even in case of redraw SCALED_TO_ZOOM :...
std::vector< extras_metadata_ptr > mods_
boost::shared_ptr< campaign > campaign_ptr
size_t current_era_index_
GLuint GLuint GLsizei GLenum type
virtual std::string name() const
std::vector< std::string > user_scenario_names_
MAKE_ENUM(TYPE,(SCENARIO,"scenario")(USER_MAP,"user_map")(USER_SCENARIO,"user_scenario")(RANDOM_MAP,"random_map")(CAMPAIGN,"campaign")(SP_CAMPAIGN,"sp_campaign")) virtual bool can_launch_game() const =0
bool generate_whole_scenario_
std::vector< size_t > user_maps_filtered_
boost::shared_ptr< random_map > random_map_ptr
void set_data(const config &data)
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
std::vector< random_map_ptr > random_maps_
Definitions for the interface to Wesnoth Markup Language (WML).
std::vector< size_t > scenarios_filtered_
std::string level_name_filter_
std::vector< scenario_ptr > scenarios_
level::TYPE current_level_type_
Encapsulates the map of the game.
size_t current_mod_index_
virtual void set_metadata()=0
std::vector< size_t > random_maps_filtered_
virtual surface create_image_surface(const SDL_Rect &image_rect)=0
boost::shared_ptr< level > level_ptr
map_generator * create_map_generator(const std::string &name, const config &cfg)
virtual bool allow_era_choice() const
std::vector< campaign_ptr > sp_campaigns_
std::vector< user_map_ptr > user_maps_
level(const config &data)
boost::shared_ptr< scenario > scenario_ptr
std::vector< std::string > user_map_names_
boost::scoped_ptr< depcheck::manager > dependency_manager_
std::vector< size_t > sp_campaigns_filtered_
std::vector< scenario_ptr > user_scenarios_
GLuint const GLchar * name
boost::shared_ptr< user_map > user_map_ptr
std::vector< extras_metadata_ptr > eras_
boost::scoped_ptr< gamemap > map_
void operator=(const level &)
std::vector< size_t > campaigns_filtered_
virtual std::string description() const
virtual std::string icon() const
std::vector< size_t > user_scenarios_filtered_
virtual std::string id() const
std::string generator_name_
A config object defines a single node in a WML file, with access to child nodes.
size_t current_level_index_
Defines the MAKE_ENUM macro.
GLsizei const GLcharARB ** string
std::vector< campaign_ptr > campaigns_
boost::scoped_ptr< map_generator > generator_