summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-01-08 22:46:42 +0000
committerplanetmaker <planetmaker@openttd.org>2013-01-08 22:46:42 +0000
commitc24374f99c22d9420d6d182ff835f07a5b954b48 (patch)
tree7043ad53c941668339a0949867e10888f9e54f16 /src/saveload
parent89a2ba2a6d25e605c391e7343ba66090ee9f26de (diff)
downloadopenttd-c24374f99c22d9420d6d182ff835f07a5b954b48.tar.xz
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp10
-rw-r--r--src/saveload/cargopacket_sl.cpp2
-rw-r--r--src/saveload/oldloader.cpp4
-rw-r--r--src/saveload/oldloader_sl.cpp4
-rw-r--r--src/saveload/saveload.cpp16
-rw-r--r--src/saveload/town_sl.cpp2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 3a8e58ab4..15c44d392 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -713,8 +713,8 @@ bool AfterLoadGame()
/* If Load Scenario / New (Scenario) Game is used,
* a company does not exist yet. So create one here.
- * 1 exeption: network-games. Those can have 0 companies
- * But this exeption is not true for non dedicated network_servers! */
+ * 1 exception: network-games. Those can have 0 companies
+ * But this exception is not true for non-dedicated network servers! */
if (!Company::IsValidID(COMPANY_FIRST) && (!_networking || (_networking && _network_server && !_network_dedicated))) {
DoStartupNewCompany(false);
Company *c = Company::Get(COMPANY_FIRST);
@@ -821,7 +821,7 @@ bool AfterLoadGame()
case STATION_OILRIG: {
/* Very old savegames sometimes have phantom oil rigs, i.e.
- * an oil rig which got shut down, but not completly removed from
+ * an oil rig which got shut down, but not completely removed from
* the map
*/
TileIndex t1 = TILE_ADDXY(t, 0, 1);
@@ -1275,7 +1275,7 @@ bool AfterLoadGame()
}
/* From 32 on we save the industry who made the farmland.
- * To give this prettyness to old savegames, we remove all farmfields and
+ * To give this prettiness to old savegames, we remove all farmfields and
* plant new ones. */
if (IsSavegameVersionBefore(32)) {
Industry *i;
@@ -1831,7 +1831,7 @@ bool AfterLoadGame()
if (HasStationRail(t)) SetRailStationReservation(t, false);
break;
- case MP_TUNNELBRIDGE: // Clear PBS reservation on tunnels/birdges
+ case MP_TUNNELBRIDGE: // Clear PBS reservation on tunnels/bridges
if (GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL) SetTunnelBridgeReservation(t, false);
break;
diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp
index e36cede7c..092301e95 100644
--- a/src/saveload/cargopacket_sl.cpp
+++ b/src/saveload/cargopacket_sl.cpp
@@ -22,7 +22,7 @@
{
if (IsSavegameVersionBefore(44)) {
Vehicle *v;
- /* If we remove a station while cargo from it is still enroute, payment calculation will assume
+ /* If we remove a station while cargo from it is still en route, payment calculation will assume
* 0, 0 to be the source of the cargo, resulting in very high payments usually. v->source_xy
* stores the coordinates, preserving them even if the station is removed. However, if a game is loaded
* where this situation exists, the cargo-source information is lost. in this case, we set the source
diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp
index 2ea24f33b..f6ebb48bc 100644
--- a/src/saveload/oldloader.cpp
+++ b/src/saveload/oldloader.cpp
@@ -78,7 +78,7 @@ byte ReadByte(LoadgameState *ls)
which means that we have a chunk, which starts with a length
byte. If that byte is negative, we have to repeat the next byte
that many times ( + 1). Else, we need to read that amount of bytes.
- Works pretty good if you have many zero's behind eachother */
+ Works pretty well if you have many zeros behind each other */
if (ls->chunk_size == 0) {
/* Read new chunk */
@@ -235,7 +235,7 @@ static inline bool CheckOldSavegameType(FILE *f, char *temp, const char *last, u
}
bool ret = VerifyOldNameChecksum(temp, len);
- temp[len - 2] = '\0'; // name is nul-terminated in savegame, but it's better to be sure
+ temp[len - 2] = '\0'; // name is null-terminated in savegame, but it's better to be sure
str_validate(temp, last);
return ret;
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index 0ee7eea2b..8cc670d23 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -626,7 +626,7 @@ static bool LoadOldOrder(LoadgameState *ls, int num)
if (o->IsType(OT_NOTHING)) {
delete o;
} else {
- /* Relink the orders to eachother (in the orders for one vehicle are behind eachother,
+ /* Relink the orders to each other (in the orders for one vehicle are behind each other,
* with an invalid order (OT_NOTHING) as indication that it is the last order */
Order *prev = Order::GetIfValid(num - 1);
if (prev != NULL) prev->next = o;
@@ -637,7 +637,7 @@ static bool LoadOldOrder(LoadgameState *ls, int num)
static bool LoadOldAnimTileList(LoadgameState *ls, int num)
{
- /* This is sligthly hackish - we must load a chunk into an array whose
+ /* This is slightly hackish - we must load a chunk into an array whose
* address isn't static, but instead pointed to by _animated_tile_list.
* To achieve that, create an OldChunks list on the stack on the fly.
* The list cannot be static because the value of _animated_tile_list
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index ac8a7e81b..7fa763a86 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1204,7 +1204,7 @@ static size_t ReferenceToInt(const void *obj, SLRefType rt)
if (obj == NULL) return 0;
switch (rt) {
- case REF_VEHICLE_OLD: // Old vehicles we save as new onces
+ case REF_VEHICLE_OLD: // Old vehicles we save as new ones
case REF_VEHICLE: return ((const Vehicle*)obj)->index + 1;
case REF_STATION: return ((const Station*)obj)->index + 1;
case REF_TOWN: return ((const Town*)obj)->index + 1;
@@ -1392,7 +1392,7 @@ static inline bool SlSkipVariableOnLoad(const SaveLoad *sld)
* Calculate the size of an object.
* @param object to be measured
* @param sld The SaveLoad description of the object so we know how to manipulate it
- * @return size of given objetc
+ * @return size of given object
*/
size_t SlCalcObjLength(const void *object, const SaveLoad *sld)
{
@@ -2087,7 +2087,7 @@ struct ZlibSaveFilter : SaveFilter {
* "Conditional jump or move depends on uninitialised value(s)" kind:
* According to the author of zlib it is not a bug and it won't be fixed.
* http://groups.google.com/group/comp.compression/browse_thread/thread/b154b8def8c2a3ef/cdf9b8729ce17ee2
- * [Mark Adler, Feb 24 2004, 'zlib-1.2.1 valgrind warnings' in the newgroup comp.compression]
+ * [Mark Adler, Feb 24 2004, 'zlib-1.2.1 valgrind warnings' in the newsgroup comp.compression]
*/
int r = deflate(&this->z, mode);
@@ -2274,7 +2274,7 @@ static const SaveLoadFormat _saveload_formats[] = {
* Higher compression levels are possible, and might improve savegame size by up to 25%, but are also up to 10 times slower.
* The next significant reduction in file size is at level 4, but that is already 4 times slower. Level 3 is primarily 50%
* slower while not improving the filesize, while level 0 and 1 are faster, but don't reduce savegame size much.
- * It's OTTX and not e.g. OTTL because liblzma is part of xz-utils and .tar.xz is prefered over .tar.lzma. */
+ * It's OTTX and not e.g. OTTL because liblzma is part of xz-utils and .tar.xz is preferred over .tar.lzma. */
{"lzma", TO_BE32X('OTTX'), CreateLoadFilter<LZMALoadFilter>, CreateSaveFilter<LZMASaveFilter>, 0, 2, 9},
#else
{"lzma", TO_BE32X('OTTX'), NULL, NULL, 0, 0, 0},
@@ -2472,10 +2472,10 @@ void WaitTillSaved()
/**
* Actually perform the saving of the savegame.
- * General tactic is to first save the game to memory, then write it to file
+ * General tactics is to first save the game to memory, then write it to file
* using the writer, either in threaded mode if possible, or single-threaded.
* @param writer The filter to write the savegame to.
- * @param threaded Whether to try to perform the saving asynchroniously.
+ * @param threaded Whether to try to perform the saving asynchronously.
* @return Return the result of the action. #SL_OK or #SL_ERROR
*/
static SaveOrLoadResult DoSave(SaveFilter *writer, bool threaded)
@@ -2506,7 +2506,7 @@ static SaveOrLoadResult DoSave(SaveFilter *writer, bool threaded)
/**
* Save the game using a (writer) filter.
* @param writer The filter to write the savegame to.
- * @param threaded Whether to try to perform the saving asynchroniously.
+ * @param threaded Whether to try to perform the saving asynchronously.
* @return Return the result of the action. #SL_OK or #SL_ERROR
*/
SaveOrLoadResult SaveWithFilter(SaveFilter *writer, bool threaded)
@@ -2568,7 +2568,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
_sl_version = TO_BE32(hdr[1]) >> 16;
/* Minor is not used anymore from version 18.0, but it is still needed
* in versions before that (4 cases) which can't be removed easy.
- * Therefor it is loaded, but never saved (or, it saves a 0 in any scenario). */
+ * Therefore it is loaded, but never saved (or, it saves a 0 in any scenario). */
_sl_minor_version = (TO_BE32(hdr[1]) >> 8) & 0xFF;
DEBUG(sl, 1, "Loading savegame version %d", _sl_version);
diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp
index c0cb59994..de52604f5 100644
--- a/src/saveload/town_sl.cpp
+++ b/src/saveload/town_sl.cpp
@@ -44,7 +44,7 @@ void RebuildTownCaches()
if (GetHouseNorthPart(house_id) == 0) town->cache.num_houses++;
}
- /* Update the population and num_house dependant values */
+ /* Update the population and num_house dependent values */
FOR_ALL_TOWNS(town) {
UpdateTownRadius(town);
UpdateTownCargoes(town);