~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/gui/driver.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include "splash-window.h"
27
27
#include "game-window.h"
28
 
#include "../game-parameters.h"
 
28
#include "game-lobby-dialog.h"
 
29
#include "new-network-game-download-window.h"
 
30
#include "game-parameters.h"
29
31
 
30
32
// takes care of setting up the splash window and the game window, the
31
33
// interaction between them and the model classes
 
34
// it also takes care of the game lobby window.
32
35
class Driver: public sigc::trackable
33
36
{
34
37
 public:
35
 
    Driver();
 
38
    Driver(std::string load_filename);
36
39
    ~Driver();
37
40
 
 
41
    void run();
 
42
    static std::string create_and_dump_scenario(const std::string &file, 
 
43
                                                const GameParameters &g);
 
44
  
38
45
 private:
39
46
    std::auto_ptr<GameWindow> game_window;
 
47
    std::auto_ptr<GameLobbyDialog> game_lobby_dialog;
40
48
    std::auto_ptr<SplashWindow> splash_window;
 
49
    std::auto_ptr<NewNetworkGameDownloadWindow> download_window;
 
50
    std::string d_load_filename;
 
51
    sigc::connection heartbeat_conn;
 
52
    Player::Type robot_player_type;
 
53
    unsigned int number_of_robots;
 
54
    std::string game_scenario_downloaded;
 
55
    sigc::signal<void, std::string> game_scenario_received;
 
56
    sigc::signal<void, Player*> player_replaced;
41
57
 
42
58
    void on_new_game_requested(GameParameters g);
43
 
    void on_new_network_game_requested(std::string filename, bool has_ops);
 
59
    void on_new_campaign_requested(GameParameters g);
 
60
    void on_new_remote_network_game_requested(std::string host, unsigned short port, std::string nick);
 
61
    void on_new_hosted_network_game_requested(GameParameters g, int port, std::string nick);
 
62
    void on_new_pbm_game_requested(GameParameters g);
 
63
    void on_game_scenario_downloaded(std::string filename);
 
64
    void on_game_scenario_received(std::string path);
44
65
    void on_load_requested(std::string filename);
45
66
    void on_quit_requested();
46
67
 
47
68
    void on_game_ended();
 
69
    void on_next_scenario(std::string scenario, int gold, std::list<Hero*> heroes, std::string player_name);
48
70
 
49
71
    void init_game_window();
 
72
 
 
73
 
 
74
    void on_hosted_player_sat_down(Player *player);
 
75
    void on_hosted_player_stood_up(Player *player);
 
76
    void on_client_player_sat_down(Player *player);
 
77
    void on_client_player_stood_up(Player *player);
 
78
    void on_server_went_away();
 
79
    void on_client_could_not_connect();
 
80
 
 
81
    GameScenario *new_game(GameParameters g);
 
82
    GameScenario *load_game(std::string file_path);
 
83
    void stress_test();
 
84
    void stressTestNextRound();
 
85
 
 
86
    void lordsawaromatic(std::string host, unsigned short port, Player::Type type, int num_players);
 
87
    void on_game_scenario_received_for_robots(std::string path);
 
88
  
 
89
 
 
90
    void heartbeat();
 
91
 
 
92
    void on_client_player_chat(std::string message);
 
93
    void on_hosted_player_chat(std::string message);
 
94
 
 
95
    void on_show_lobby_requested();
 
96
 
 
97
    void start_network_game_requested(GameScenario *game_scenario,
 
98
                                      NextTurnNetworked *next_turn);
 
99
 
 
100
    void on_player_unavailable(Player *p);
50
101
};
51
102
 
52
103