mirror of https://github.com/OpenTTD/OpenTTD
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
parent
8cc7aa9aa0
commit
27cee58ab8
|
@ -3011,9 +3011,9 @@ do_some_terraform:
|
||||||
bridge_len = GetBridgeLength(tile, p->ai.cur_tile_a); // tile
|
bridge_len = GetBridgeLength(tile, p->ai.cur_tile_a); // tile
|
||||||
|
|
||||||
/* Figure out what (road)bridge type to build
|
/* Figure out what (road)bridge type to build
|
||||||
start with best bridge, then go down to worse and worse bridges
|
* start with best bridge, then go down to worse and worse bridges
|
||||||
unnecessary to check for worse bridge (i=0), since AI will always build that.
|
* unnecessary to check for worse bridge (i=0), since AI will always build that.
|
||||||
AI is so fucked up that fixing this small thing will probably not solve a thing
|
*AI is so fucked up that fixing this small thing will probably not solve a thing
|
||||||
*/
|
*/
|
||||||
for (i = 10; i != 0; i--) {
|
for (i = 10; i != 0; i--) {
|
||||||
if (CheckBridge_Stuff(i, bridge_len)) {
|
if (CheckBridge_Stuff(i, bridge_len)) {
|
||||||
|
|
|
@ -2105,7 +2105,7 @@ void UpdateAirplanesOnNewStation(Station *st)
|
||||||
if (v->type == VEH_Aircraft && v->subtype <= 2) {
|
if (v->type == VEH_Aircraft && v->subtype <= 2) {
|
||||||
if (v->u.air.targetairport == st->index) { // if heading to this airport
|
if (v->u.air.targetairport == st->index) { // if heading to this airport
|
||||||
/* update position of airplane. If plane is not flying, landing, or taking off
|
/* update position of airplane. If plane is not flying, landing, or taking off
|
||||||
you cannot delete airport, so it doesn't matter
|
*you cannot delete airport, so it doesn't matter
|
||||||
*/
|
*/
|
||||||
if (v->u.air.state >= FLYING) { // circle around
|
if (v->u.air.state >= FLYING) { // circle around
|
||||||
v->u.air.pos = v->u.air.previous_pos = ap->entry_point;
|
v->u.air.pos = v->u.air.previous_pos = ap->entry_point;
|
||||||
|
|
|
@ -340,7 +340,7 @@ static int32 ClearTile_Industry(TileIndex tile, byte flags)
|
||||||
{
|
{
|
||||||
Industry *i = GetIndustryByTile(tile);
|
Industry *i = GetIndustryByTile(tile);
|
||||||
|
|
||||||
/* * water can destroy industries
|
/* water can destroy industries
|
||||||
* in editor you can bulldoze industries
|
* in editor you can bulldoze industries
|
||||||
* with magic_bulldozer cheat you can destroy industries
|
* with magic_bulldozer cheat you can destroy industries
|
||||||
* (area around OILRIG is water, so water shouldn't flood it
|
* (area around OILRIG is water, so water shouldn't flood it
|
||||||
|
|
|
@ -62,10 +62,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
//
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
/* Memory required for the wrkmem parameter.
|
/* Memory required for the wrkmem parameter.
|
||||||
* When the required size is 0, you can also pass a NULL pointer.
|
* When the required size is 0, you can also pass a NULL pointer.
|
||||||
*/
|
*/
|
||||||
|
|
2
npf.c
2
npf.c
|
@ -64,7 +64,7 @@ static uint NTPHash(uint key1, uint key2)
|
||||||
/**
|
/**
|
||||||
* Calculates a hash value for use in the NPF.
|
* Calculates a hash value for use in the NPF.
|
||||||
* @param key1 The TileIndex of the tile to hash
|
* @param key1 The TileIndex of the tile to hash
|
||||||
* @param key1 The Trackdir of the track on the tile.
|
* @param key2 The Trackdir of the track on the tile.
|
||||||
*
|
*
|
||||||
* @todo Think of a better hash.
|
* @todo Think of a better hash.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -341,7 +341,7 @@ static bool ini_save(const char *filename, IniFile *ini)
|
||||||
assert(item->value != NULL);
|
assert(item->value != NULL);
|
||||||
if (item->comment != NULL) fputs(item->comment, f);
|
if (item->comment != NULL) fputs(item->comment, f);
|
||||||
|
|
||||||
//*Don't give an equal sign to list items that don't have a parameter */
|
/* Don't give an equal sign to list items that don't have a parameter */
|
||||||
if (group->type == IGT_LIST && *item->value == '\0') {
|
if (group->type == IGT_LIST && *item->value == '\0') {
|
||||||
fprintf(f, "%s\n", item->name);
|
fprintf(f, "%s\n", item->name);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -30,8 +30,8 @@ static FileList files_dos = {
|
||||||
{ "dosdummy.grf", {0x07, 0x01, 0xe6, 0xc4, 0x07, 0x6a, 0x5b, 0xc3, 0xf4, 0x9f, 0x01, 0xad, 0x21, 0x6c, 0xa0, 0xc2} }, // 4890 - 4895 inclusive
|
{ "dosdummy.grf", {0x07, 0x01, 0xe6, 0xc4, 0x07, 0x6a, 0x5b, 0xc3, 0xf4, 0x9f, 0x01, 0xad, 0x21, 0x6c, 0xa0, 0xc2} }, // 4890 - 4895 inclusive
|
||||||
{ "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive
|
{ "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive
|
||||||
{ NULL, { 0 } }
|
{ NULL, { 0 } }
|
||||||
},
|
}, {
|
||||||
{ { "TRGC.GRF", {0xed, 0x44, 0x66, 0x37, 0xe0, 0x34, 0x10, 0x4c, 0x55, 0x59, 0xb3, 0x2c, 0x18, 0xaf, 0xe7, 0x8d} },
|
{ "TRGC.GRF", {0xed, 0x44, 0x66, 0x37, 0xe0, 0x34, 0x10, 0x4c, 0x55, 0x59, 0xb3, 0x2c, 0x18, 0xaf, 0xe7, 0x8d} },
|
||||||
{ "TRGH.GRF", {0xee, 0x66, 0x16, 0xfb, 0x0e, 0x6e, 0xf6, 0xb2, 0x48, 0x92, 0xc5, 0x8c, 0x93, 0xd8, 0x6f, 0xc9} },
|
{ "TRGH.GRF", {0xee, 0x66, 0x16, 0xfb, 0x0e, 0x6e, 0xf6, 0xb2, 0x48, 0x92, 0xc5, 0x8c, 0x93, 0xd8, 0x6f, 0xc9} },
|
||||||
{ "TRGT.GRF", {0xfc, 0xde, 0x1d, 0x7e, 0x8a, 0x74, 0x19, 0x7d, 0x72, 0xa6, 0x26, 0x95, 0x88, 0x4b, 0x90, 0x9e} }
|
{ "TRGT.GRF", {0xfc, 0xde, 0x1d, 0x7e, 0x8a, 0x74, 0x19, 0x7d, 0x72, 0xa6, 0x26, 0x95, 0x88, 0x4b, 0x90, 0x9e} }
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,8 @@ static FileList files_win = {
|
||||||
{ "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive
|
{ "nsignalsw.grf", {0x65, 0xb9, 0xd7, 0x30, 0x56, 0x06, 0xcc, 0x9e, 0x27, 0x57, 0xc8, 0xe4, 0x9b, 0xb3, 0x66, 0x81} }, // 4896 - 5381 inclusive
|
||||||
{ NULL, { 0 } },
|
{ NULL, { 0 } },
|
||||||
{ NULL, { 0 } }
|
{ NULL, { 0 } }
|
||||||
},
|
}, {
|
||||||
{ { "TRGCR.GRF", {0x36, 0x68, 0xf4, 0x10, 0xc7, 0x61, 0xa0, 0x50, 0xb5, 0xe7, 0x09, 0x5a, 0x2b, 0x14, 0x87, 0x9b} },
|
{ "TRGCR.GRF", {0x36, 0x68, 0xf4, 0x10, 0xc7, 0x61, 0xa0, 0x50, 0xb5, 0xe7, 0x09, 0x5a, 0x2b, 0x14, 0x87, 0x9b} },
|
||||||
{ "TRGHR.GRF", {0x06, 0xbf, 0x2b, 0x7a, 0x31, 0x76, 0x6f, 0x04, 0x8b, 0xaa, 0xc2, 0xeb, 0xe4, 0x34, 0x57, 0xb1} },
|
{ "TRGHR.GRF", {0x06, 0xbf, 0x2b, 0x7a, 0x31, 0x76, 0x6f, 0x04, 0x8b, 0xaa, 0xc2, 0xeb, 0xe4, 0x34, 0x57, 0xb1} },
|
||||||
{ "TRGTR.GRF", {0xde, 0x53, 0x65, 0x05, 0x17, 0xfe, 0x66, 0x1c, 0xea, 0xa3, 0x13, 0x8c, 0x6e, 0xdb, 0x0e, 0xb8} }
|
{ "TRGTR.GRF", {0xde, 0x53, 0x65, 0x05, 0x17, 0xfe, 0x66, 0x1c, 0xea, 0xa3, 0x13, 0x8c, 0x6e, 0xdb, 0x0e, 0xb8} }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1171,7 +1171,7 @@ static void DrawTrainDetailsWindow(Window *w)
|
||||||
} while ((u = GetNextVehicle(u)) != NULL);
|
} while ((u = GetNextVehicle(u)) != NULL);
|
||||||
|
|
||||||
/* set scroll-amount seperately from counting, as to not
|
/* set scroll-amount seperately from counting, as to not
|
||||||
compute num double for more carriages of the same type
|
* compute num double for more carriages of the same type
|
||||||
*/
|
*/
|
||||||
if (det_tab == 3) {
|
if (det_tab == 3) {
|
||||||
for (i = 0; i != NUM_CARGO; i++) {
|
for (i = 0; i != NUM_CARGO; i++) {
|
||||||
|
|
|
@ -414,8 +414,8 @@ not_valid_below:;
|
||||||
YapfNotifyTrackLayoutChange(tile_start, AxisToTrack(direction));
|
YapfNotifyTrackLayoutChange(tile_start, AxisToTrack(direction));
|
||||||
|
|
||||||
/* for human player that builds the bridge he gets a selection to choose from bridges (DC_QUERY_COST)
|
/* for human player that builds the bridge he gets a selection to choose from bridges (DC_QUERY_COST)
|
||||||
It's unnecessary to execute this command every time for every bridge. So it is done only
|
* It's unnecessary to execute this command every time for every bridge. So it is done only
|
||||||
and cost is computed in "bridge_gui.c". For AI, Towns this has to be of course calculated
|
* and cost is computed in "bridge_gui.c". For AI, Towns this has to be of course calculated
|
||||||
*/
|
*/
|
||||||
if (!(flags & DC_QUERY_COST)) {
|
if (!(flags & DC_QUERY_COST)) {
|
||||||
const Bridge *b = &_bridge[bridge_type];
|
const Bridge *b = &_bridge[bridge_type];
|
||||||
|
|
|
@ -339,7 +339,7 @@ Vehicle *AllocateVehicle(void)
|
||||||
/** Allocates a lot of vehicles and frees them again
|
/** Allocates a lot of vehicles and frees them again
|
||||||
* @param vl pointer to an array of vehicles to get allocated. Can be NULL if the vehicles aren't needed (makes it test only)
|
* @param vl pointer to an array of vehicles to get allocated. Can be NULL if the vehicles aren't needed (makes it test only)
|
||||||
* @param num number of vehicles to allocate room for
|
* @param num number of vehicles to allocate room for
|
||||||
* returns true if there is room to allocate all the vehicles
|
* @return true if there is room to allocate all the vehicles
|
||||||
*/
|
*/
|
||||||
bool AllocateVehicles(Vehicle **vl, int num)
|
bool AllocateVehicles(Vehicle **vl, int num)
|
||||||
{
|
{
|
||||||
|
@ -1759,7 +1759,7 @@ static int32 ReplaceVehicle(Vehicle **w, byte flags)
|
||||||
* (used to be called autorenew)
|
* (used to be called autorenew)
|
||||||
* @param v The vehicle to replace
|
* @param v The vehicle to replace
|
||||||
* if the vehicle is a train, v needs to be the front engine
|
* if the vehicle is a train, v needs to be the front engine
|
||||||
* return value is a pointer to the new vehicle, which is the same as the argument if nothing happened
|
* @return pointer to the new vehicle, which is the same as the argument if nothing happened
|
||||||
*/
|
*/
|
||||||
static void MaybeReplaceVehicle(Vehicle *v)
|
static void MaybeReplaceVehicle(Vehicle *v)
|
||||||
{
|
{
|
||||||
|
|
|
@ -465,7 +465,8 @@ static int CDECL VehicleValueSorter(const void *a, const void *b)
|
||||||
|
|
||||||
/* if show_outdated is selected, it do not sort psudo engines properly but it draws all engines
|
/* if show_outdated is selected, it do not sort psudo engines properly but it draws all engines
|
||||||
* if used compined with show_cars set to false, it will work as intended. Replace window do it like that
|
* if used compined with show_cars set to false, it will work as intended. Replace window do it like that
|
||||||
* this was a big hack even before show_outdated was added. Stupid newgrf :p */
|
* this was a big hack even before show_outdated was added. Stupid newgrf :p
|
||||||
|
*/
|
||||||
static void train_engine_drawing_loop(int *x, int *y, int *pos, int *sel, EngineID *selected_id, RailType railtype,
|
static void train_engine_drawing_loop(int *x, int *y, int *pos, int *sel, EngineID *selected_id, RailType railtype,
|
||||||
uint8 lines_drawn, bool is_engine, bool show_cars, bool show_outdated, bool show_compatible)
|
uint8 lines_drawn, bool is_engine, bool show_cars, bool show_outdated, bool show_compatible)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue