summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dedicated.c2
-rw-r--r--engine.c4
-rw-r--r--fileio.c2
-rw-r--r--gfx.c4
-rw-r--r--md5.h2
-rw-r--r--misc.c2
-rw-r--r--os2.c14
-rw-r--r--settings_gui.c2
-rw-r--r--ship_cmd.c4
-rw-r--r--sprite.h2
-rw-r--r--station.h4
-rw-r--r--stdafx.h2
-rw-r--r--table/namegen.h30
-rw-r--r--table/station_land.h2
-rw-r--r--train_cmd.c4
-rw-r--r--tree_cmd.c2
-rw-r--r--unix.c4
-rw-r--r--vehicle.c26
-rw-r--r--vehicle_gui.c6
-rw-r--r--widget.c2
-rw-r--r--win32.c2
21 files changed, 61 insertions, 61 deletions
diff --git a/dedicated.c b/dedicated.c
index 223015a14..87075a3f3 100644
--- a/dedicated.c
+++ b/dedicated.c
@@ -32,7 +32,7 @@
# define STDIN 0 /* file descriptor for standard input */
#endif
#ifdef __MORPHOS__
-/* voids the fork, option will be disabled for morphos build anyway, because MorphOS
+/* voids the fork, option will be disabled for morphos build anyway, because MorphOS
* doesn't support forking (could only implemented with lots of code changes here).
*/
int morphos_dummy_fork() { return -1; }
diff --git a/engine.c b/engine.c
index bd3a3fd08..734f507dc 100644
--- a/engine.c
+++ b/engine.c
@@ -119,7 +119,7 @@ void AddTypeToEngines()
{
Engine *e;
uint32 counter = 0;
-
+
for(e=_engines; e != endof(_engines); e++, counter++) {
e->type = VEH_Train;
@@ -187,7 +187,7 @@ void StartupEngines()
e->flags |= ENGINE_AVAILABLE;
e->player_avail = 0;
}
-
+
/* This sets up type for the engine
It is needed if you want to ask the engine what type it is
It should hopefully be the same as when you ask a vehicle what it is
diff --git a/fileio.c b/fileio.c
index 27a22b193..6fc6f6742 100644
--- a/fileio.c
+++ b/fileio.c
@@ -110,7 +110,7 @@ void FioOpenFile(int slot, const char *filename)
for(s=buf + strlen(_path.data_dir) - 1; *s != 0; s++)
*s = tolower(*s);
f = fopen(buf, "rb");
-
+
#if defined SECOND_DATA_DIR
// tries in the 2nd data directory
if (f == NULL) {
diff --git a/gfx.c b/gfx.c
index 2c5691f25..24beee010 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1507,7 +1507,7 @@ void DoPaletteAnimations()
/* Amount of colors to be rotated.
* A few more for the DOS palette, because the water colors are
* 245-254 for DOS and 217-226 for Windows. */
- int c = _use_dos_palette?38:28;
+ int c = _use_dos_palette?38:28;
int j;
int i;
const ExtraPaletteValues *ev = &_extra_palette_values;
@@ -1594,7 +1594,7 @@ void DoPaletteAnimations()
j+=3;
if (j == 15) j = 0;
}
-
+
// Glittery water DOS
s = ev->b;
if (_opt.landscape == LT_CANDY) s = ev->bc;
diff --git a/md5.h b/md5.h
index 698c995d8..3baa4dcdf 100644
--- a/md5.h
+++ b/md5.h
@@ -71,7 +71,7 @@ typedef struct md5_state_s {
} md5_state_t;
#ifdef __cplusplus
-extern "C"
+extern "C"
{
#endif
diff --git a/misc.c b/misc.c
index 67bc2c8ff..b0b9d0eb6 100644
--- a/misc.c
+++ b/misc.c
@@ -189,7 +189,7 @@ void InitializeGame()
_autoreplace_array[i] = i;
AddTypeToEngines(); // make sure all engines have a type
-
+
SetObjectToPlace(1, 0, 0, 0);
_pause = 0;
diff --git a/os2.c b/os2.c
index 6de5e01bc..c426d28fc 100644
--- a/os2.c
+++ b/os2.c
@@ -56,7 +56,7 @@ static DIR *my_opendir(char *path, char *file)
{
char paths[MAX_PATH];
- append_path(paths, path, file);
+ append_path(paths, path, file);
return opendir(paths);
}
@@ -179,7 +179,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
{
_dos_setdrive(disk, &total);
_dos_getdrive(&disk2);
-
+
if (disk == disk2)
{
fios = FiosAlloc();
@@ -299,7 +299,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
{
_dos_setdrive(disk, &total);
_dos_getdrive(&disk2);
-
+
if (disk == disk2)
{
fios = FiosAlloc();
@@ -384,7 +384,7 @@ StringID FiosGetDescText(const char **path)
{
struct diskfree_t free;
char drive;
-
+
*path = _fios_path;
drive = *path[0] - 'A'+1;
@@ -486,7 +486,7 @@ void ShowInfo(const char *str)
HAB hab;
HMQ hmq;
ULONG rc;
-
+
// init PM env.
hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
@@ -503,7 +503,7 @@ void ShowOSErrorBox(const char *buf)
HAB hab;
HMQ hmq;
ULONG rc;
-
+
// init PM env.
hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
@@ -579,7 +579,7 @@ void DeterminePaths()
_path.gm_dir = str_fmt("%sgm\\", _path.game_data_dir);
_path.data_dir = str_fmt("%sdata\\", _path.game_data_dir);
_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
-
+
#if defined CUSTOM_LANG_DIR
// sets the search path for lng files to the custom one
_path.lang_dir = malloc( MAX_PATH );
diff --git a/settings_gui.c b/settings_gui.c
index 3bcf5ea9e..1ec1d6075 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -68,7 +68,7 @@ static int GetCurRes()
static inline bool RoadVehiclesAreBuilt(void)
{
Vehicle *v;
- FOR_ALL_VEHICLES(v) {
+ FOR_ALL_VEHICLES(v) {
if (v->type == VEH_Road) return true;
}
return false;
diff --git a/ship_cmd.c b/ship_cmd.c
index 52e710d64..d336031bb 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -996,7 +996,7 @@ int32 CmdRefitShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->u.ship.state != 0x80)
return_cmd_error(STR_980B_SHIP_MUST_BE_STOPPED_IN);
}
-
+
cost = 0;
if (IS_HUMAN_PLAYER(v->owner) && (byte)p2 != v->cargo_type) {
cost = _price.ship_base >> 7;
@@ -1006,7 +1006,7 @@ int32 CmdRefitShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
//autorefitted ships wants to keep the cargo
//it will be checked if the cargo is valid in CmdRenewVehicle
if (!(SkipStoppedInDepotCheck))
- v->cargo_count = 0;
+ v->cargo_count = 0;
v->cargo_type = (byte)p2;
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
}
diff --git a/sprite.h b/sprite.h
index 8b17fa943..da446b20a 100644
--- a/sprite.h
+++ b/sprite.h
@@ -73,7 +73,7 @@ struct DeterministicSpriteGroup {
} operation;
byte add_val;
byte divmod_val;
-
+
// And apply it to this:
byte num_ranges;
struct DeterministicSpriteGroupRange *ranges; // Dynamically allocated
diff --git a/station.h b/station.h
index cd460d961..c6a9179e5 100644
--- a/station.h
+++ b/station.h
@@ -82,9 +82,9 @@ enum {
CA_AIR_SMALL = 4,
CA_AIR_LARGE = 5,
CA_DOCK = 5,
- CA_AIR_METRO = 6,
+ CA_AIR_METRO = 6,
CA_AIR_INTER = 8,
-};
+};
void ModifyStationRatingAround(TileIndex tile, byte owner, int amount, uint radius);
diff --git a/stdafx.h b/stdafx.h
index 74ff39877..4f1325bdc 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -37,7 +37,7 @@
#endif
#ifdef __MORPHOS__
-// morphos defines certain amiga defines per default, we undefine them
+// morphos defines certain amiga defines per default, we undefine them
// here to make the rest of source less messy and more clear what is
// required for morphos and what for amigaos
# ifdef amigaos
diff --git a/table/namegen.h b/table/namegen.h
index af0c9888c..74f85c69b 100644
--- a/table/namegen.h
+++ b/table/namegen.h
@@ -37,14 +37,14 @@ static const char *name_original_english_2[] = {
"W"
};
-static const char *name_original_english_3[] = {
- "ar",
- "a",
- "e",
- "in",
+static const char *name_original_english_3[] = {
+ "ar",
+ "a",
+ "e",
+ "in",
"on",
"u",
- "un",
+ "un",
"en"
};
@@ -107,7 +107,7 @@ static const char *name_additional_english_prefix[] = {
static const char *name_additional_english_1a[] = {
"Pen",
- "Lough",
+ "Lough",
"Stam",
"Aber",
"Acc",
@@ -180,18 +180,18 @@ static const char *name_additional_english_1b1[] = {
"W"
};
-static const char *name_additional_english_1b2[] = {
- "ar",
- "a",
- "e",
- "in",
+static const char *name_additional_english_1b2[] = {
+ "ar",
+ "a",
+ "e",
+ "in",
"on",
"u",
"o",
"ee",
"es",
"ea",
- "un",
+ "un",
"en"
};
@@ -603,8 +603,8 @@ static const char *name_german_4_an_der[] = {
"Saale",
"Elbe"
};
-
-static const char *name_german_4_am[] = {
+
+static const char *name_german_4_am[] = {
"Main"
};
diff --git a/table/station_land.h b/table/station_land.h
index 14b70ec25..2852edc2c 100644
--- a/table/station_land.h
+++ b/table/station_land.h
@@ -490,7 +490,7 @@ const DrawTileSeqStruct _station_display_datas_088[] = {
// runway tiles
const DrawTileSeqStruct _station_display_datas_089[] = {
- { 0, 0, 0, 16, 1, 6, 0x8A68 }, // fences
+ { 0, 0, 0, 16, 1, 6, 0x8A68 }, // fences
TILE_SEQ_END()
};
diff --git a/train_cmd.c b/train_cmd.c
index 257d8714c..686ce0bbf 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1072,14 +1072,14 @@ int32 CmdRefitRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
p2 = p2 & 0xFF;
SET_EXPENSES_TYPE(EXPENSES_TRAIN_RUN);
-
+
v = &_vehicles[p1];
if (!CheckOwnership(v->owner) || ((CheckStoppedInDepot(v) < 0) && !(SkipStoppedInDepotCheck)))
return CMD_ERROR;
cost = 0;
num = 0;
-
+
do {
/* XXX: We also refit all the attached wagons en-masse if they
* can be refitted. This is how TTDPatch does it. TODO: Have
diff --git a/tree_cmd.c b/tree_cmd.c
index dc60dd7f5..b7316312c 100644
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -81,7 +81,7 @@ static void DoPlaceMoreTrees(uint tile)
/* Only on tiles within 13 squares from tile,
on clear tiles, and NOT on farm-tiles or rocks */
- if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) &&
+ if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) &&
(_map5[cur_tile] & 0x1F) != 0x0F && (_map5[cur_tile] & 0x1C) != 8) {
PlaceTree(cur_tile, r, dist <= 6 ? 0xC0 : 0);
}
diff --git a/unix.c b/unix.c
index a463e0050..1606571e8 100644
--- a/unix.c
+++ b/unix.c
@@ -25,7 +25,7 @@ ULONG __stack = (1024*1024)*2; // maybe not that much is needed actually ;)
#ifdef __AMIGA__
#warning add stack symbol to avoid that user needs to set stack manually (tokai)
-// ULONG __stack =
+// ULONG __stack =
#endif
static char *_fios_path;
@@ -506,7 +506,7 @@ void DeterminePaths()
_path.data_dir = str_fmt("%sdata/", _path.game_data_dir);
_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
_log_file = str_fmt("%sopenttd.log", _path.personal_dir);
-
+
#if defined CUSTOM_LANG_DIR
// sets the search path for lng files to the custom one
_path.lang_dir = malloc( MAX_PATH );
diff --git a/vehicle.c b/vehicle.c
index 6ea7cfa60..253504741 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1409,17 +1409,17 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
This is a nice way to send 32 bit and only use 16 bit
the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
uint16 new_engine_type = (uint16)(p2 & 0xFFFF);
- uint32 autorefit_money = (p2 >> 16) * 100000;
+ uint32 autorefit_money = (p2 >> 16) * 100000;
Vehicle *v = DEREF_VEHICLE(p1);
int cost, build_cost;
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
-
-
+
+
// first we make sure that it's a valid type the user requested
// check that it's an engine that is in the engine array
if (new_engine_type >= TOTAL_NUM_ENGINES ) return CMD_ERROR;
-
+
// check that the new vehicle type is the same as the original one
if (v->type != DEREF_ENGINE(new_engine_type)->type) return CMD_ERROR;
@@ -1466,7 +1466,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
Engine *e;
e = DEREF_ENGINE(new_engine_type);
-
+
// TODO make it check if refit is possible before actually doing it
/* We do not really buy a new vehicle, we upgrade the old one */
@@ -1474,7 +1474,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
byte cargo_type = v->cargo_type;
v->engine_type = new_engine_type;
v->max_age = e->lifelength * 366;
-
+
/* Update limits of the vehicle (for when upgraded) */
switch (v->type) {
case VEH_Train:
@@ -1489,7 +1489,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->max_speed = rvi->max_speed;
v->u.rail.railtype = e->railtype;
-
+
// 0x0100 means that we skip the check for being stopped inside the depot
// since we do not stop it for autorefitting
if (v->cargo_type != cargo_type && capacity) {
@@ -1521,7 +1521,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->cargo_type = svi->cargo_type;
v->cargo_cap = svi->capacity;
v->max_speed = svi->max_speed;
-
+
// 0x0100 means that we skip the check for being stopped inside the depot
// since we do not stop it for autorefitting
if (v->cargo_type != cargo_type)
@@ -1559,7 +1559,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->cargo_count = v->cargo_cap;
}
}
-
+
v->reliability = e->reliability;
v->reliability_spd_dec = e->reliability_spd_dec;
v->age = 0;
@@ -1580,7 +1580,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
void MaybeReplaceVehicle(Vehicle *v)
{
uint32 new_engine_and_autoreplace_money;
-
+
if (v->owner != _local_player)
return;
// uncomment next line if you want to see what engine type just entered a depot
@@ -1597,7 +1597,7 @@ void MaybeReplaceVehicle(Vehicle *v)
}
/* Now replace the vehicle */
_current_player = v->owner;
-
+
/* makes the variable to inform about how much money the player wants to have left after replacing
and which engine to replace with
the first 16 bit is the money. Since we know the last 5 digits is 0, they are thrown away.
@@ -1605,9 +1605,9 @@ void MaybeReplaceVehicle(Vehicle *v)
This is a nice way to send 32 bit and only use 16 bit
the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
new_engine_and_autoreplace_money = ((_patches.autorenew_money / 100000) << 16) + _autoreplace_array[v->engine_type];
-
+
assert(v->type == DEREF_ENGINE(_autoreplace_array[v->engine_type])->type);
-
+
if ( v->type != VEH_Train ) {
DoCommandP(v->tile, v->index, new_engine_and_autoreplace_money, NULL, CMD_REPLACE_VEHICLE | CMD_SHOW_NO_ERROR);
} else {
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 8dc9fd7f4..0f64ed7cb 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -364,7 +364,7 @@ static void SetupScrollStuffForReplaceWindow(Window *w)
sel[0] = WP(w,replaceveh_d).sel_index[0];
sel[1] = WP(w,replaceveh_d).sel_index[1];
-
+
switch (WP(w,replaceveh_d).vehicletype) {
case VEH_Train: {
railtype = WP(w,replaceveh_d).railtype;
@@ -510,10 +510,10 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
sel[0] = sel1;
sel[1] = sel2;
-
+
selected_id[0] = selected_id1;
selected_id[1] = selected_id2;
-
+
switch (WP(w,replaceveh_d).vehicletype) {
case VEH_Train: {
byte railtype = WP(w,replaceveh_d).railtype;
diff --git a/widget.c b/widget.c
index 17c168523..593058b41 100644
--- a/widget.c
+++ b/widget.c
@@ -408,7 +408,7 @@ void DrawWindowWidgets(Window *w)
case WWT_RESIZEBOX: {
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
-
+
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, 0);
DrawSprite(SPR_WINDOW_RESIZE, r.left + 3, r.top + 3);
break;
diff --git a/win32.c b/win32.c
index 3b3fb0894..309576196 100644
--- a/win32.c
+++ b/win32.c
@@ -1461,7 +1461,7 @@ static void Win32InitializeExceptions()
}
#else
/* Get rid of unused variable warnings.. ShowOSErrorBox
- * is now used twice, once in MSVC, and once in all other Win
+ * is now used twice, once in MSVC, and once in all other Win
* compilers (cygwin, mingw, etc.) */
void ShowOSErrorBox(const char *buf)
{