Fix some wrong spelling, mostly in comments.

This commit is contained in:
fendrin 2013-06-23 17:18:29 +02:00
parent d1c6801f36
commit fa86e2e350
54 changed files with 101 additions and 101 deletions

View file

@ -231,7 +231,7 @@ void show_about(display &disp, const std::string &campaign)
int startline = 0;
//TODO: use values proportionnal to screen ?
//TODO: use values proportional to screen ?
// distance from top of map image to top of scrolling text
const int top_margin = 60;
// distance from bottom of scrolling text to bottom of map image
@ -270,7 +270,7 @@ void show_about(display &disp, const std::string &campaign)
int image_count = 0;
int scroll_speed = 4; // scroll_speed*50 = speed of scroll in pixel per second
// initialy redraw all
// Initially redraw all
bool redraw_mapimage = true;
int max_text_width = text_rect.w;

View file

@ -437,7 +437,7 @@ int battle_context::choose_defender_weapon(const unit &attacker,
// Multiple options:
// First pass : get the best weight and the minimum simple rating for this weight.
// simple rating = number of blows * damage per blows (resistance taken in account) * cth * weight
// Elligible attacks for defense should have a simple rating greater or equal to this weight.
// Eligible attacks for defense should have a simple rating greater or equal to this weight.
double max_weight = 0.0;
int min_rating = 0;

View file

@ -294,7 +294,7 @@ namespace { // Private helpers for move_unit()
const map_location::DIRECTION orig_dir_;
const map_location goto_;
// This data tracks the current state as the move is in proress.
// This data tracks the current state as the move is in progress.
int current_side_;
team * current_team_; // Will default to the original team if the moving unit becomes invalid.
bool current_uses_fog_;
@ -1077,7 +1077,7 @@ namespace { // Private helpers for move_unit()
// Sighted units feedback?
if ( playing_team_is_viewing && (enemy_count_ != 0 || friend_count_ != 0) ) {
// Create the message to display (depends on whether firends,
// Create the message to display (depends on whether friends,
// enemies, or both were sighted, and on how many of each).
utils::string_map symbols;
symbols["enemies"] = lexical_cast<std::string>(enemy_count_);
@ -1135,8 +1135,8 @@ namespace { // Private helpers for move_unit()
* instruction. (The unit itself is whatever unit is at the beginning of the
* supplied path.)
*
* @param[in] steps The route to be travelled. The unit to be moved is at the beginning of this route.
* @param[out] move_recorder Will be given the route actually travelled (which might be shorter than the route specified) so it can be stored in the replay.
* @param[in] steps The route to be traveled. The unit to be moved is at the beginning of this route.
* @param[out] move_recorder Will be given the route actually traveled (which might be shorter than the route specified) so it can be stored in the replay.
* @param undo_stack If supplied, then either this movement will be added to the stack or the stack will be cleared.
* @param[in] continued_move If set to true, this is a continuation of an earlier move (movement is not interrupted should units be spotted).
* @param[in] show_move Controls whether or not the movement is animated for the player.

View file

@ -424,7 +424,7 @@ void undo_list::add_recruit(const unit& u, const map_location& loc,
/**
* Adds a shroud update to the undo stack.
* This is called from within commit_vision(), so there should be no need
* for this to be publically visible.
* for this to be publicly visible.
*/
void undo_list::add_update_shroud()
{
@ -661,7 +661,7 @@ bool undo_list::recruit_action::undo(int side, undo_list & /*undos*/)
current_team.set_action_bonus_count(current_team.action_bonus_count() - 1);
// invalidate before erasing allow us
// to also do the ovelerlapped hexes
// to also do the overlapped hexes
gui.invalidate(recruit_loc);
units.erase(recruit_loc);
return true;

View file

@ -172,7 +172,7 @@ shroud_clearer::shroud_clearer() : jamming_(), sightings_(), view_team_(NULL)
/**
* Destructor.
* The purpose of explictly defining this is so we can log an error if the
* The purpose of explicitly defining this is so we can log an error if the
* sighted events were neither fired nor explicitly ignored.
*/
shroud_clearer::~shroud_clearer()
@ -405,7 +405,7 @@ bool shroud_clearer::clear_unit(const map_location &view_loc,
move_unit_spectator * spectator, bool instant)
{
// This is just a translation to the more general interface. It is
// mot inlined so that vision.hpp does not have to include unit.hpp.
// not inlined so that vision.hpp does not have to include unit.hpp.
return clear_unit(view_loc, view_team, viewer.underlying_id(),
viewer.vision(), viewer.get_state(unit::STATE_SLOWED),
viewer.movement_type().get_vision(), viewer.get_location(),

View file

@ -63,7 +63,7 @@ std::vector<std::string> available_addons();
/** Retrieves the names of all installed add-ons. */
std::vector<std::string> installed_addons();
/** Chekc whether the specified add-on is currently installed. */
/** Check whether the specified add-on is currently installed. */
bool is_addon_installed(const std::string& addon_name);
/** Archives an add-on into a config object for campaignd transactions. */

View file

@ -591,7 +591,7 @@ void show_addons_manager_dialog(display& disp, addons_client& client, addons_lis
filter_options.push_back(row);
// Now we enter information for list row display.
// Three fields are truncated to accomodate for GUI1's limitations.
// Three fields are truncated to accommodate for GUI1's limitations.
utils::ellipsis_truncate(display_author, 14);

View file

@ -1038,7 +1038,7 @@ combatant::combat_slice::combat_slice(const std::vector<double> src_summary[2],
/**
* Creates a slice from the sumaries, and associates a number of strikes.
* Creates a slice from the summaries, and associates a number of strikes.
* This version of the constructor creates a slice consisting of everything.
*/
combatant::combat_slice::combat_slice(const std::vector<double> src_summary[2],
@ -1158,7 +1158,7 @@ void forced_levelup(std::vector<double> &hp_dist)
void conditional_levelup(std::vector<double> &hp_dist, double kill_prob)
{
/* If we kill, we will level up. So then the damage we had becomes
less probable since it's now conditional on us not levelling up.
less probable since it's now conditional on us not leveling up.
This doesn't apply to the probability of us dying, of course. */
double scalefactor = 0;
const double chance_to_survive = 1 - hp_dist.front();

View file

@ -277,7 +277,7 @@ public:
*/
struct tile
{
/** Contructor for the tile() structure */
/** Constructor for the tile() structure */
tile();
struct rule_image_rand;

View file

@ -190,7 +190,7 @@ public:
This means we are forced to use CurrentTime in many spots and
are unable to perform many safety checks.
Hence, the code below is not compliant to the ICCCM, and
may ocassionally suffer from race conditions if an X client
may occasionally suffer from race conditions if an X client
is connected to the server over a slow/high-latency link.
This implementation is also very minimal.
The text is assumed to be reasonably small, as INCR transactions

View file

@ -45,7 +45,7 @@ bool string2rgb(const std::string& s, std::vector<Uint32>& result);
* (default: white)
* 3) The minimum shadow shade of a unit's team-color portions
* (default: black)
* 4) A plain high-contrast color, used for the markers on the mini-ma
* 4) A plain high-contrast color, used for the markers on the mini-map
* (default: same as the provided average shade, or gray #808080)
*
* The first three reference colors are used for converting a source palette

View file

@ -38,9 +38,9 @@ public:
boost::optional<std::string> bzip2;
/// Non-empty if --campaign was given on the command line. ID of the campaign we want to start.
boost::optional<std::string> campaign;
/// Non-empty if --campaign-difficulty was given on the command line. Numerical difficulty of the campaign to be played. Dependant on --campaign.
/// Non-empty if --campaign-difficulty was given on the command line. Numerical difficulty of the campaign to be played. Dependent on --campaign.
boost::optional<int> campaign_difficulty;
/// Non-empty if --campaign-scenario was given on the command line. Chooses starting scenario in the campaign to be played. Dependant on --campaign.
/// Non-empty if --campaign-scenario was given on the command line. Chooses starting scenario in the campaign to be played. Dependent on --campaign.
boost::optional<std::string> campaign_scenario;
/// True if --clock was given on the command line. Enables
bool clock;
@ -83,27 +83,27 @@ public:
boost::optional<std::string> logdomains;
/// True if --multiplayer was given on the command line. Goes directly into multiplayer mode.
bool multiplayer;
/// Non-empty if --ai-config was given on the command line. Vector of pairs (side number, value). Dependant on --multiplayer.
/// Non-empty if --ai-config was given on the command line. Vector of pairs (side number, value). Dependent on --multiplayer.
boost::optional<std::vector<boost::tuple<unsigned int, std::string> > > multiplayer_ai_config;
/// Non-empty if --algorithm was given on the command line. Vector of pairs (side number, value). Dependant on --multiplayer.
/// Non-empty if --algorithm was given on the command line. Vector of pairs (side number, value). Dependent on --multiplayer.
boost::optional<std::vector<boost::tuple<unsigned int, std::string> > > multiplayer_algorithm;
/// Non-empty if --controller was given on the command line. Vector of pairs (side number, controller). Dependant on --multiplayer.
/// Non-empty if --controller was given on the command line. Vector of pairs (side number, controller). Dependent on --multiplayer.
boost::optional<std::vector<boost::tuple<unsigned int, std::string> > > multiplayer_controller;
/// Non-empty if --era was given on the command line. Dependant on --multiplayer.
/// Non-empty if --era was given on the command line. Dependent on --multiplayer.
boost::optional<std::string> multiplayer_era;
/// True if --exit-at-and was given on the command line. Dependant on --multiplayer.
/// True if --exit-at-and was given on the command line. Dependent on --multiplayer.
bool multiplayer_exit_at_end;
/// True if --ignore-map-settings was given at the command line. Do not use map settings.
bool multiplayer_ignore_map_settings;
/// Non-empty if --label was given on the command line. Dependant on --multiplayer.
/// Non-empty if --label was given on the command line. Dependent on --multiplayer.
boost::optional<std::string> multiplayer_label;
/// Non-empty if --parm was given on the command line. Vector of pairs (side number, parm name, parm value). Dependant on --multiplayer.
/// Non-empty if --parm was given on the command line. Vector of pairs (side number, parm name, parm value). Dependent on --multiplayer.
boost::optional<std::vector<boost::tuple<unsigned int, std::string, std::string> > > multiplayer_parm;
/// Non-empty if --scenario was given on the command line. Dependant on --multiplayer.
/// Non-empty if --scenario was given on the command line. Dependent on --multiplayer.
boost::optional<std::string> multiplayer_scenario;
/// Non-empty if --side was given on the command line. Vector of pairs (side number, faction id). Dependant on --multiplayer.
/// Non-empty if --side was given on the command line. Vector of pairs (side number, faction id). Dependent on --multiplayer.
boost::optional<std::vector<boost::tuple<unsigned int, std::string> > > multiplayer_side;
/// Non-empty if --turns was given on the command line. Dependant on --multiplayer.
/// Non-empty if --turns was given on the command line. Dependent on --multiplayer.
boost::optional<std::string> multiplayer_turns;
/// Max FPS specified by --max-fps option.
boost::optional<int> max_fps;

View file

@ -135,7 +135,7 @@ config::attribute_value &config::attribute_value::operator=(long long v)
// We can store this as an int.
return *this = static_cast<int>(v);
// Getting to this point should be rare. (Currently, geting here means
// Getting to this point should be rare. (Currently, getting here means
// something like there was so much draining in a campaign that the
// total damage taken is not only negative, but so negative that an
// int cannot hold the value.) So rare that it is not worth precise
@ -178,8 +178,8 @@ config::attribute_value &config::attribute_value::operator=(double v)
namespace {
/**
* Attempts to convert @a source to the template type.
* This is to avoid "overzealous reinterpretation of certain WML strings as
* numeric tpyes" (c.f. bug #19201).
* This is to avoid "overzealous reinterpretations of certain WML strings as
* numeric types" (c.f. bug #19201).
* @returns true if the conversion was successful and the source string
* can be reobtained by streaming the result.
*/
@ -959,7 +959,7 @@ void config::clear()
}
} else {
//reached end of child map for this element - all child nodes
//have beed deleted, so it's safe to clear the map, delete the
//have been deleted, so it's safe to clear the map, delete the
//node and move up one level
state.c->children.clear();
if (state.c != this) delete state.c;

View file

@ -993,7 +993,7 @@ std::string load_game_dialog(display& disp, const config& game_config, bool* sel
gui::dialog_button* change_difficulty_option = NULL;
if(select_difficulty != NULL) {
// implmentation of gui::dialog::add_option, needed for storing a pointer to the option-box
// implementation of gui::dialog::add_option, needed for storing a pointer to the option-box
change_difficulty_option = new gui::dialog_button(disp.video(), _("Change difficulty"), gui::button::TYPE_CHECK);
change_difficulty_option->set_check(false);

View file

@ -473,7 +473,7 @@ int pump_info::ticks(unsigned *refresh_counter, unsigned refresh_rate) {
#if SDL_VERSION_ATLEAST(2,0,0)
/* The contanstants for the minimum and maximum are picked from the headers. */
/* The constants for the minimum and maximum are picked from the headers. */
#define INPUT_MIN 0x200
#define INPUT_MAX 0x8FF

View file

@ -99,7 +99,7 @@ private:
};
class pump_monitor {
//pump_monitors receive notifcation after an events::pump() occurs
//pump_monitors receive notification after an events::pump() occurs
public:
pump_monitor();
virtual ~pump_monitor();

View file

@ -1178,7 +1178,7 @@ std::string get_wml_location(const std::string &filename, const std::string &cur
else if (filename.size() >= 2 && filename[0] == '.' && filename[1] == '/')
{
// If the filename begins with a "./", look in the same directory
// as the file currrently being preprocessed.
// as the file currently being preprocessed.
result = current_dir + filename.substr(2);
}
else if (!game_config::path.empty())

View file

@ -251,7 +251,7 @@ std::string get_independent_image_path(const std::string &filename);
* Returns the appropriate invocation for a Wesnoth-related binary, assuming
* that it is located in the same directory as the running wesnoth binary.
* This is just a string-transformation based on argv[0], so the returned
* program is not guaranteed to actaully exist. '-debug' variants are handled
* program is not guaranteed to actually exist. '-debug' variants are handled
* correctly.
*/
std::string get_program_invocation(const std::string &program_name);

View file

@ -53,7 +53,7 @@
* FLOATING_POINT_EMULATION_TRACER_ENABLE
* This macro allows to place trace markers in the code. When using the markers
* it's possible to gather statistics regarding the code paths being executed.
* This can be used to analyse execution and add branch prediction markers.
* This can be used to analyze execution and add branch prediction markers.
*/
#ifndef FLOATING_POINT_EMULATION_HPP_INCLUDED
@ -351,9 +351,9 @@ struct tidiv<T, 8>
};
/**
* An optimised version of the division operator.
* An optimized version of the division operator.
*
* This version is optimised to maintain the highest numeric stability when
* This version is optimized to maintain the highest numeric stability when
* dividing.
*
* As documented at operator/():
@ -401,7 +401,7 @@ struct tidiv<T, 8>
* * divide.
* * shift the result up by the required number of bits.
*
* The code has some other optimisations as well. On a 2-complement system
* The code has some other optimizations as well. On a 2-complement system
* there are additional tests required for negative and positive values, to
* remove these branches, the code uses a temporary value which contains the
* positive value.
@ -737,7 +737,7 @@ public:
value_ *= rhs.value_;
/*
* There is no need to check the range at this point. The specialised
* There is no need to check the range at this point. The specialized
* version makes a short trip to 64-bit value, so overflowing is not
* possible.
*/
@ -790,7 +790,7 @@ public:
* ---- = --------- = ---- = result
* RHS rhs * sf rhs
*
* Thus in order to get RESULT there needs to be mulitplied by sf:
* Thus in order to get RESULT there needs to be multiplied by sf:
*
* THIS
* RESULT = ---- * sf
@ -975,7 +975,7 @@ operator!=(const double lhs, const tfloat<T, S> rhs)
/**
* Multiply
*
* Specialised for the Sint32 with a shift of 8.
* Specialized for the Sint32 with a shift of 8.
*
* Instead of figuring out the optimal shift before multiplying simply multiply
* as a 64-bit value and then perform the shift. This is rather cheap on the

View file

@ -128,7 +128,7 @@ struct char_block_map
}
/**
* Compresses map by merging consecutive ranges with the same font, even
* if there is some unassociated ranges inbetween.
* if there is some unassociated ranges in-between.
*/
void compress()
{
@ -970,7 +970,7 @@ surface floating_label::create_surface()
// combine foreground text with its background
if(bgalpha_ != 0) {
// background is a dark tootlip box
// background is a dark tooltip box
surface background = create_neutral_surface(foreground->w + border_*2, foreground->h + border_*2);
if (background == NULL) {

View file

@ -51,7 +51,7 @@ token get_token(iterator& i1, iterator i2) {
TOKEN_TYPE t = TOKEN_IDENTIFIER;
//check if this string matches any keyword or an operator
//possible opearators and keywords:
//possible operators and keywords:
// d, or, def, and, not, fai, where, faiend, functions
if( diff == 1 ) {
if( *it == 'd' )
@ -125,7 +125,7 @@ token get_token(iterator& i1, iterator i2) {
if( *i1 >= '0' && *i1 <= '9' ) {
//do nothing
} else {
//look for '.' in case of decimal numer
//look for '.' in case of decimal number
if( *i1 == '.' ) {
//allow only one dot in such expression
if( !dot )
@ -145,7 +145,7 @@ token get_token(iterator& i1, iterator i2) {
} else {
//current character is between ':' and '@'
//possible tokens at this point that we are intersted with:
//possible tokens at this point that we are interested in:
// ; < = > <= >=
if( *i1 == ';' ) {

View file

@ -184,7 +184,7 @@ public:
/// Removes @a this from the fake_units_ list if necessary.
~fake_unit();
/// Place @a this on @a display's fake_units_ deque.
/// Place @a this on @a display's fake_units_ dequeue.
void place_on_game_display(game_display * d);
/// Removes @a this from whatever fake_units_ list it is on (if any).
int remove_from_game_display();
@ -198,7 +198,7 @@ public:
private:
/** Temporarily place a unit on map (moving: can overlap others).
* The temp unit is added at the end of the temporary unit deque,
* The temp unit is added at the end of the temporary unit dequeue,
* and therefore gets drawn last, over other units and temp units.
* Adding the same unit twice isn't allowed.
*/

View file

@ -226,7 +226,7 @@ static void fill_wml_messages_map(std::map<std::string, int>& msg_map, std::stri
}
/**
* Shows a summary of the errors encountered in WML thusfar,
* Shows a summary of the errors encountered in WML so far,
* to avoid a lot of the same messages to be shown.
* Identical messages are shown once, with (between braces)
* the number of times that message was encountered.
@ -289,7 +289,7 @@ typedef std::map<std::string, wml_handler_function> static_wml_action_map;
static static_wml_action_map static_wml_actions;
/**
* WML_HANDLER_FUNCTION macro handles auto registeration for wml handlers
* WML_HANDLER_FUNCTION macro handles auto registration for wml handlers
*
* @param pname wml tag name
* @param pei the variable name of game_events::queued_event object inside function
@ -1716,7 +1716,7 @@ WML_HANDLER_FUNCTION(role, /*event_info*/, cfg)
const bool has_any_types = !types.empty();
std::vector<std::string>::iterator ti = types.begin(),
ti_end = types.end();
// loop to give precendence based on type order
// loop to give precedence based on type order
do {
if (has_any_types) {
item["type"] = *ti;
@ -1741,7 +1741,7 @@ WML_HANDLER_FUNCTION(role, /*event_info*/, cfg)
player_ids.insert((resources::teams->begin() + (side_num - 1))->save_id());
}
}
// loop to give precendence based on type order
// loop to give precedence based on type order
std::vector<std::string>::iterator ti = types.begin();
do {
if (has_any_types) {

View file

@ -259,7 +259,7 @@ class acquaintance;
// that information about them are displayed to the user in the help
// system.
void encounter_start_units(unit_map& units);
// Add all units that are recallable as encountred units.
// Add all units that are recallable as encountered units.
void encounter_recallable_units(std::vector<team>& teams);
// Add all terrains on the map as encountered terrains.
void encounter_map_terrain(gamemap& map);

View file

@ -843,7 +843,7 @@ help_manager::~help_manager()
// map = NULL;
toplevel.clear();
hidden_sections.clear();
// These last numbers must be reset so that the content is regenreated.
// These last numbers must be reset so that the content is regenerated.
// Upon next start.
last_num_encountered_units = -1;
last_num_encountered_terrains = -1;
@ -1466,7 +1466,7 @@ public:
ss << "\n";
}
// Print the extra AMLA upgrage abilities, cross-reference them
// Print the extra AMLA upgrade abilities, cross-reference them
// to their respective topics.
if (!type_.adv_abilities().empty()) {
ss << _("Ability Upgrades: ");
@ -2194,7 +2194,7 @@ int help_menu::process()
int x = mousex - menu::location().x;
const std::string icon_img = expanded(*sec) ? open_section_img : closed_section_img;
// we remove the right tickness (ne present bewteen icon and text)
// we remove the right thickness (ne present between icon and text)
int text_start = style_->item_size(indented_icon(icon_img, sec->level)).w - style_->get_thickness();
// NOTE: if you want to forbid click to the left of the icon
@ -2406,7 +2406,7 @@ void help_text_area::handle_ref_cfg(const config &cfg)
// terrains. This will lead to the unit page generator creating
// invalid references.
//
// Disabling this is a kludgy workaround until the
// Disabling this is a kludgey workaround until the
// encountered_terrains system is fixed
//
// -- Ayin apr 8 2005

View file

@ -40,7 +40,7 @@ void show_help(display &disp, const section &toplevel, const std::string& show_t
/// will be shown if show_topic is the empty string.
void show_help(display &disp, const std::string& show_topic="", int xloc=-1, int yloc=-1);
/// wrapper to add unit prefix and hidding symbol
/// wrapper to add unit prefix and hiding symbol
void show_unit_help(display &disp, const std::string& unit_id, bool hidden = false,
int xloc=-1, int yloc=-1);

View file

@ -867,7 +867,7 @@ REGISTER_MOD_PARSER(O, args)
}
//
// ~R(), ~G() and ~B() are the children of ~CS(). Merely syntatic sugar.
// ~R(), ~G() and ~B() are the children of ~CS(). Merely syntactic sugar.
// Hence they are at the end of the evaluation.
//
// Red component color-shift

View file

@ -86,7 +86,7 @@ const language_def& get_locale();
/** Initializes the list of textdomains from a configuration object */
void init_textdomains(const config& cfg);
/** Initializes certain english strings */
/** Initializes certain English strings */
bool init_strings(const config& cfg);
bool load_language_list();

View file

@ -137,7 +137,7 @@ struct tlexical_cast
* Specialized conversion class.
*
* Specialized for returning strings from an integral type or a pointer to an
* intergral type.
* integral type.
*/
template <typename From>
struct tlexical_cast<

View file

@ -40,7 +40,7 @@ void tlua_jailbreak_exception::rethrow()
/*
* We need to call tlua_jailbreak_exception::clear() after the exception
* is thrown. The most straightforward approach would be a small helper
* class calling clear in its destructor, but alas g++ then compains about
* class calling clear in its destructor, but alas g++ then complains about
* an unused variable. Since we're sure there will be something thrown use
* that fact to make sure the the function is called.
*/

View file

@ -37,7 +37,7 @@ const V& map_get_value_default(const std::map<K,V>& m, const K& key, const V& va
*
* @note Didn't use template<class K, class V> since that has a problem when
* deducting the type when the key is a std::string and the type send is a
* charater string, e.g. "foo". Letting the map deduct the K and V types works.
* character string, e.g. "foo". Letting the map deduct the K and V types works.
*
* @throw std::out_of_range When the key is not in the map.
*

View file

@ -358,7 +358,7 @@ static std::string output_map(const terrain_map& terrain,
namespace {
/**
* Calculates the cost of building a road over terrain. For use in the
* Calculates the cost of building a road over terrain. For use in the
* a_star_search algorithm.
*/
struct road_path_calculator : pathfind::cost_calculator

View file

@ -277,7 +277,7 @@ bool is_cjk_char(const wchar_t c)
//FIXME add range from Japanese-specific and Korean-specific section if you know the characters are used today.
if (ch < 0x2e80) return false; // shorcut for common non-CJK
if (ch < 0x2e80) return false; // shortcut for common non-CJK
return
//Han Ideographs: all except Supplement

View file

@ -117,7 +117,7 @@ std::string span_color(const SDL_Color &color);
/**
* Wrap text.
*
* - If the text exceedes the specified max width, wrap it on a word basis.
* - If the text exceeds the specified max width, wrap it on a word basis.
* - If this is not possible, e.g. the word is too big to fit, wrap it on a
* - char basis.
*/
@ -128,7 +128,7 @@ std::string word_wrap_text(const std::string& unwrapped_text, int font_size,
* Draw text on the screen, fit text to maximum width, no markup, no tooltips.
*
* This method makes sure that the text fits within a given maximum width.
* If a line exceedes this width, it will be wrapped
* If a line exceeds this width, it will be wrapped
* on a word basis if possible, otherwise on a char basis.
* This method is otherwise similar to the draw_text method,
* but it doesn't support special markup or tooltips.

View file

@ -308,7 +308,7 @@ void replay::add_movement(const std::vector<map_location>& steps)
/**
* Modifies the most recently recorded move to indicate that it
* stopped early (due to unforseen circumstances, such as an ambush).
* stopped early (due to unforeseen circumstances, such as an ambush).
* This will be ineffective if @a early_stop is not in the recorded path.
*/
void replay::limit_movement(const map_location& early_stop)

View file

@ -31,7 +31,7 @@ class manager;
/*
* Sound source is an object on a map (a location) which has one or more
* sounds effects associated with it, which are played randomly and with
* appropriate delays, when sound emiting object is visible on screen.
* appropriate delays, when sound emitting object is visible on screen.
*/
class positional_source {
unsigned int last_played_;
@ -100,7 +100,7 @@ public:
/**
* Serializes information into cfg as new children of key
* "sound_source", appendend to existing content.
* "sound_source", appended to existing content.
*/
void write_sourcespecs(config& cfg) const;

View file

@ -137,7 +137,7 @@ void team::team_info::read(const config &cfg)
color = cfg["side"].str();
}
// If arel starting new scenario overide settings from [ai] tags
// If arel starting new scenario override settings from [ai] tags
if (!user_team_name.translatable())
user_team_name = t_string::from_serialized(user_team_name);

View file

@ -86,7 +86,7 @@ terrain_filter::terrain_filter(const terrain_filter& other) :
terrain_filter& terrain_filter::operator=(const terrain_filter& other)
{
// Use copy constructor to make sure we are coherant
// Use copy constructor to make sure we are coherent
if (this != &other) {
this->~terrain_filter();
new (this) terrain_filter(other) ;

View file

@ -789,9 +789,9 @@ static std::string number_to_string_(t_terrain terrain, const int start_position
}
/*
* The initialisation of tcode is done to make gcc-4.7 happy. Otherwise it
* some uninitialised fields might be used. Its analysis are wrong, but
* initialise to keep it happy.
* The initialization of tcode is done to make gcc-4.7 happy. Otherwise it
* some uninitialized fields might be used. Its analysis are wrong, but
* Initialize to keep it happy.
*/
unsigned char tcode[9] = {0};
// Insert the terrain tcode

View file

@ -152,7 +152,7 @@ namespace t_translation {
*@endverbatim
* The underscore is intended for internal use.
* Other letters and characters are not validated but
* users of these letters can get nasty surprices.
* users of these letters can get nasty surprises.
* The * is used as wildcard in some cases.
* The terrain code can be two groups separated by a caret,
* the first group is the base terrain,
@ -214,7 +214,7 @@ namespace t_translation {
* readability it's allowed to pad strings with either spaces
* or tab, however the tab is deprecated.
* * A terrain string contains either a terrain or a terrain and
* starting loction. The following format is used
* starting location. The following format is used
* [S ]T
* S = starting location a positive non-zero number
* T = terrain code (see read_terrain_code)

View file

@ -33,7 +33,7 @@ namespace gui2 {
namespace font {
/**
* Escapses the markup characters in a text.
* Escapes the markup characters in a text.
*
* The markups escaped are the ones used in the pango markup. The special
* characters are @code <>'"&@endcode. They escaping is the same as for HTML.
@ -260,7 +260,7 @@ private:
/** The way too long text is shown depends on this mode. */
PangoEllipsizeMode ellipse_mode_;
/** The alinment of the text. */
/** The alignment of the text. */
PangoAlignment alignment_;
/** The maximum length of the text. */

View file

@ -95,7 +95,7 @@ public:
const std::string& str() const;
const char* c_str() const { return str().c_str(); }
bool translatable() const { return translatable_; }
// Warning: value() may contain platform dependant prefix bytes !
// Warning: value() may contain platform dependent prefix bytes !
// Consider base_str() for a more reliable untranslated string
const std::string& value() const { return value_; }
std::string base_str() const;

View file

@ -599,7 +599,7 @@ unit_ability_list attack_type::get_specials(const std::string& special) const
}
/**
* Returns a vector of names and decriptions for the specials of *this.
* Returns a vector of names and descriptions for the specials of *this.
* Each std::pair in the vector has first = name and second = description.
*
* This uses either the active or inactive name/description for each special,

View file

@ -924,7 +924,7 @@ bool unit_animation::invalidate(frame_parameters& value)
}
} else {
// off screen animations only invalidate their own hex, no propagation,
// but we stil need this to play sounds
// but we still need this to play sounds
overlaped_hex_.insert(src_);
}

View file

@ -134,7 +134,7 @@ class unit_animation
std::vector<int> value2_;
std::map<std::string,particule> sub_anims_;
particule unit_anim_;
/* these are drawing parameters, but for efficiancy reason they are in the anim and not in the particle */
/* these are drawing parameters, but for efficiency reason they are in the anim and not in the particle */
map_location src_;
map_location dst_;
// optimization

View file

@ -135,7 +135,7 @@ static int move_unit_between(const map_location& a, const map_location& b,
int target_time = animator.get_animation_time_potential();
// target_time must be short to avoid jumpy move
// std::cout << "target time: " << target_time << "\n";
// we round it to the next multile of 200
// we round it to the next multiple of 200
target_time += 200;
target_time -= target_time%200;

View file

@ -129,7 +129,7 @@ void unit_healing(unit &healed, const std::vector<unit *> &healers, int healing,
* Returns once animation is played.
*
* This is used for the animate_unit action, but can easily be generalized if
* other wml-decribed animations are needed.
* other wml-described animations are needed.
*/
void wml_animation(const vconfig &cfg,
const map_location& default_location=map_location::null_location);

View file

@ -571,7 +571,7 @@ void unit_frame::redraw(const int frame_time,bool first_time,const map_location
int d2 = display::get_singleton()->hex_size() / 2;
if(first_time ) {
// stuff sthat should be done only once per frame
// stuff that should be done only once per frame
if(!current_data.sound.empty() ) {
sound::play_sound(current_data.sound);
}
@ -761,7 +761,7 @@ std::set<map_location> unit_frame::get_overlaped_hex(const int frame_time,const
const SDL_Rect r = create_rect(my_x, my_y, w, h);
// check if our underlying hexes are invalidated
// if we need to update ourselves because we changed, invalidate our hexes
// and return whether or not our hexs was invalidated
// and return whether or not our hexes was invalidated
// invalidate ourself to be called at redraw time
result.insert(src);
display::rect_of_hexes underlying_hex = disp->hexes_under_rect(r);

View file

@ -152,7 +152,7 @@ class frame_builder {
};
/**
* keep most parameters in a separate class to simplify handling of large
* number of parameters hanling is common for frame level and animation level
* number of parameters handling is common for frame level and animation level
*/
class frame_parsed_parameters {
public:

View file

@ -183,7 +183,7 @@ std::pair<unit_map::unit_iterator, bool> unit_map::insert(unit *p) {
ERR_NG << "\n\nPlease Report this error to https://gna.org/bugs/index.php?18591 "
"\nIn addition to the standard details of operating system and wesnoth version "
"and how it happened, please answer the following questions "
"\n 1. Were you playing mutli-player?"
"\n 1. Were you playing multi-player?"
"\n 2. Did you start/restart/reload the game/scenario?"
"\nThank you for your help in fixing this bug.\n";
}

View file

@ -37,12 +37,12 @@ class unit;
@note The unit_map is implemented as 2 unordered maps storing iterators from a list of reference counted pointers to units.
The unordered maps provide O(1) find times. The list allows arbitrary ordering of units (not yet implemented).
The reference counting is what guarrantees the persistent iterators.
The reference counting is what guarantees the persistent iterators.
Storing an iterator prevents only that dead unit's list location from being recovered.
@note Prefered usages for tight loops follows.
Use the std::pair<iterator, bool> format which checks the preconditions and returns
false in the bool to indicate failure with no change to the unit_map. true indicates sucess and the new iterator is in first.
false in the bool to indicate failure with no change to the unit_map. true indicates success and the new iterator is in first.
Storing the result iterator prevents the old iterator from entering the fallback recovery code.
This is faster than the old methodology of find to check if empty, insert and then find to check for success.
It is the same method as std::map uses, the C++ way.
@ -82,7 +82,7 @@ if(try_add.second){i = try_add.first;}
* iterated upon may be skipped or visited twice.
* @note Iterators prevent ghost units from being collected. So they should
* never be stored into data structures, as it will cause slowdowns!
@note By popular demand iterators are effectively permanant. They are handles and not iterators.
@note By popular demand iterators are effectively permanent. They are handles and not iterators.
Any access might cause a full lookup. Keeping iterators around holds onto memory.
*/
class unit_map {

View file

@ -1084,7 +1084,7 @@ unit_type_data::unit_type_data() :
namespace { // Helpers for set_config()
/**
* Spits out an error message and throws a config::eror.
* Spits out an error message and throws a config::error.
* Called when apply_base_unit() detects a cycle.
* (This exists merely to take the error message out of that function.)
*/
@ -1168,7 +1168,7 @@ namespace { // Helpers for set_config()
}
/**
* Processes [variation] tags of @a ut_cfg, handling inheritence and
* Processes [variation] tags of @a ut_cfg, handling inheritance and
* child clearing.
*/
void handle_variations(config & ut_cfg)

View file

@ -52,7 +52,7 @@ void windows_tray_notification::handle_system_event(const SDL_Event& event)
bool windows_tray_notification::create_tray_icon()
{
// getting hanlde to a 32x32 icon, contained in "WESNOTH_ICON" icon group of wesnoth.exe resources
// getting handle to a 32x32 icon, contained in "WESNOTH_ICON" icon group of wesnoth.exe resources
const HMODULE wesnoth_exe = GetModuleHandle(NULL);
if (wesnoth_exe == NULL) {
return false;

View file

@ -145,7 +145,7 @@ private:
* It may contain parent sections to make it
* easier to find the wanted sections. They are
* listed like [parent][child][section].
* @param key The ommitted key.
* @param key The omitted key.
* @param primary_key The primary key of the section.
* @param primary_value The value of the primary key (mandatory if
* primary key isn't empty).