00001 /* $Id: game_preferences.hpp 26500 2008-05-09 22:28:12Z mordante $ */ 00002 /* 00003 Copyright (C) 2003 - 2008 by David White <dave@whitevine.net> 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 version 2 00008 or at your option any later version. 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY. 00011 00012 See the COPYING file for more details. 00013 */ 00014 #ifndef GAME_PREFERENCES_HPP_INCLUDED 00015 #define GAME_PREFERENCES_HPP_INCLUDED 00016 00017 class gamemap; 00018 class game_state; 00019 class team; 00020 class unit_map; 00021 00022 #include "game_config.hpp" 00023 #include "preferences.hpp" 00024 #include "terrain_translation.hpp" 00025 00026 #include <string> 00027 #include <utility> 00028 #include <set> 00029 00030 namespace preferences { 00031 00032 struct manager 00033 { 00034 manager(); 00035 ~manager(); 00036 00037 base_manager base; 00038 }; 00039 00040 bool show_lobby_join(const std::string& sender, const std::string& message); 00041 int lobby_joins(); 00042 void _set_lobby_joins(int show); 00043 enum { SHOW_NONE, SHOW_FRIENDS, SHOW_ALL }; 00044 00045 std::string get_friends(); 00046 std::string get_ignores(); 00047 bool add_friend(const std::string nick); 00048 bool add_ignore(const std::string nick); 00049 void remove_friend(const std::string nick); 00050 void remove_ignore(const std::string nick); 00051 void clear_friends(); 00052 void clear_ignores(); 00053 bool is_friend(const std::string nick); 00054 bool is_ignored(const std::string nick); 00055 00056 bool sort_list(); 00057 void _set_sort_list(bool show); 00058 00059 bool iconize_list(); 00060 void _set_iconize_list(bool show); 00061 00062 const std::vector<game_config::server_info>& server_list(); 00063 00064 const std::string network_host(); 00065 void set_network_host(const std::string& host); 00066 00067 unsigned int get_ping_timeout(); 00068 void set_ping_timeout(unsigned int timeout); 00069 00070 const std::string campaign_server(); 00071 void set_campaign_server(const std::string& host); 00072 00073 const std::string login(); 00074 void set_login(const std::string& username); 00075 00076 bool turn_dialog(); 00077 void set_turn_dialog(bool ison); 00078 00079 bool show_combat(); 00080 00081 bool allow_observers(); 00082 void set_allow_observers(bool value); 00083 00084 bool use_map_settings(); 00085 void set_use_map_settings(bool value); 00086 00087 bool random_start_time(); 00088 void set_random_start_time(bool value); 00089 00090 bool fog(); 00091 void set_fog(bool value); 00092 00093 bool shroud(); 00094 void set_shroud(bool value); 00095 00096 int turns(); 00097 void set_turns(int value); 00098 00099 bool skip_mp_replay(); 00100 void set_skip_mp_replay(bool value); 00101 00102 bool countdown(); 00103 void set_countdown(bool value); 00104 int countdown_init_time(); 00105 void set_countdown_init_time(int value); 00106 int countdown_turn_bonus(); 00107 void set_countdown_turn_bonus(int value); 00108 int countdown_reservoir_time(); 00109 void set_countdown_reservoir_time(int value); 00110 int countdown_action_bonus(); 00111 void set_countdown_action_bonus(int value); 00112 00113 int village_gold(); 00114 void set_village_gold(int value); 00115 00116 int xp_modifier(); 00117 void set_xp_modifier(int value); 00118 00119 int era(); 00120 void set_era(int value); 00121 00122 int map(); 00123 void set_map(int value); 00124 00125 bool show_ai_moves(); 00126 void set_show_ai_moves(bool value); 00127 00128 void set_show_side_colours(bool value); 00129 bool show_side_colours(); 00130 00131 bool save_replays(); 00132 void set_save_replays(bool value); 00133 00134 bool delete_saves(); 00135 void set_delete_saves(bool value); 00136 00137 void set_ask_delete_saves(bool value); 00138 bool ask_delete_saves(); 00139 00140 void set_autosavemax(int value); 00141 int autosavemax(); 00142 00143 const int INFINITE_AUTO_SAVES = 61; 00144 00145 bool show_floating_labels(); 00146 void set_show_floating_labels(bool value); 00147 00148 bool message_private(); 00149 void set_message_private(bool value); 00150 00151 bool show_tip_of_day(); 00152 00153 bool show_haloes(); 00154 void set_show_haloes(bool value); 00155 00156 00157 bool flip_time(); 00158 void set_flip_time(bool value); 00159 00160 bool upload_log(); 00161 void set_upload_log(bool value); 00162 const std::string upload_id(); 00163 00164 // Multiplayer functions 00165 std::string get_chat_timestamp(const time_t& t); 00166 bool chat_timestamping(); 00167 void set_chat_timestamping(bool value); 00168 00169 int chat_lines(); 00170 void set_chat_lines(int lines); 00171 00172 bool compress_saves(); 00173 00174 std::set<std::string> &encountered_units(); 00175 std::set<t_translation::t_terrain> &encountered_terrains(); 00176 00177 std::string custom_command(); 00178 void set_custom_command(const std::string& command); 00179 00180 std::vector<std::string>* get_history(const std::string& id); 00181 00182 std::string client_type(); 00183 00184 std::string clock_format(); 00185 00186 void set_theme(const std::string& theme); 00187 const std::string theme(); 00188 00189 bool compare_resolutions(const std::pair<int,int>& lhs, const std::pair<int,int>& rhs); 00190 00191 // Ask for end turn confirmation 00192 bool yellow_confirm(); 00193 bool green_confirm(); 00194 bool confirm_no_moves(); 00195 00196 // Add all recruitable units as encountered so that information 00197 // about them are displayed to the user in the help system. 00198 void encounter_recruitable_units(std::vector<team>& teams); 00199 // Add all units that exist at the start to the encountered units so 00200 // that information about them are displayed to the user in the help 00201 // system. 00202 void encounter_start_units(unit_map& units); 00203 // Add all units that are recallable as encountred units. 00204 void encounter_recallable_units(game_state& gamestate); 00205 // Add all terrains on the map as encountered terrains. 00206 void encounter_map_terrain(gamemap& map); 00207 } 00208 00209 #endif
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |