game_controller_abstract.hpp

Go to the documentation of this file.
00001 /* $Id: game_controller_abstract.hpp 52869 2012-02-03 20:18:33Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2011 - 2012 by Lukasz Dobrogowski <lukasz.dobrogowski@gmail.com>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 #ifndef GAME_CONTROLLER_ABSTRACT_H_INCLUDED
00016 #define GAME_CONTROLLER_ABSTRACT_H_INCLUDED
00017 #include "commandline_options.hpp"
00018 #include "editor/editor_main.hpp"
00019 #include "scoped_resource.hpp"
00020 #include "video.hpp"
00021 #include <string>
00022 
00023 class config;
00024 class game_display;
00025 
00026 class game_controller_abstract
00027 {
00028 public:
00029     game_controller_abstract(const commandline_options &cmdline_opts);
00030     virtual ~game_controller_abstract() {}
00031 
00032     game_display& disp();
00033 
00034     bool init_video();
00035     virtual bool init_config() = 0;
00036     bool init_language();
00037     bool init_joystick();
00038     virtual bool play_test() = 0;
00039     virtual bool play_multiplayer_mode() = 0;
00040     virtual bool play_screenshot_mode() = 0;
00041 
00042     virtual void reload_changed_game_config() = 0;
00043 
00044     virtual bool is_loading() const = 0;
00045     virtual void clear_loaded_game() = 0;
00046     virtual bool load_game() = 0;
00047     virtual void set_tutorial() = 0;
00048 
00049     virtual std::string jump_to_campaign_id() const = 0;
00050     virtual bool new_campaign() = 0;
00051     virtual bool goto_campaign() = 0;
00052     virtual bool goto_multiplayer() = 0;
00053     virtual bool goto_editor() = 0;
00054 
00055     virtual bool play_multiplayer() = 0;
00056     virtual bool change_language() = 0;
00057 
00058     virtual void show_preferences() = 0;
00059 
00060     enum RELOAD_GAME_DATA { RELOAD_DATA, NO_RELOAD_DATA };
00061     virtual void launch_game(RELOAD_GAME_DATA) = 0;
00062     virtual void play_replay() = 0;
00063 
00064     virtual editor::EXIT_STATUS start_editor() = 0;
00065 
00066     virtual const config& game_config() const = 0;
00067 protected:
00068     const commandline_options& cmdline_opts_;
00069 
00070     util::scoped_ptr<game_display> disp_;
00071 
00072     CVideo video_;
00073 };
00074 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:02:52 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs