# HG changeset patch # User rubidium # Date 1156791183 0 # Node ID 4175805666a548c75707e5053da2310f307add98 # Parent 2ee8e92ef389428a9af9f8922f3277c7c73633cb (svn r6204) -Cleanup: replace non-indentation with spaces; like '}else {' -> '} else {', tabs between code and comment, etc. diff -r 2ee8e92ef389 -r 4175805666a5 ai/default/default.c --- a/ai/default/default.c Mon Aug 28 12:57:33 2006 +0000 +++ b/ai/default/default.c Mon Aug 28 18:53:03 2006 +0000 @@ -2419,7 +2419,7 @@ cost = DoCommand(tile, p->ai.wagon_list[i], 0, DC_EXEC, CMD_SELL_RAIL_WAGON); assert(!CmdFailed(cost)); } - p->ai.state = AIS_0; + p->ai.state = AIS_0; } return; } @@ -2459,7 +2459,7 @@ if (p->ai.num_want_fullload != 0 && (is_pass || i == 0)) order.flags |= OF_FULL_LOAD; - DoCommand(0, loco_id + (i << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); + DoCommand(0, loco_id + (i << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); } DoCommand(0, loco_id, 0, DC_EXEC, CMD_START_STOP_TRAIN); @@ -2472,7 +2472,7 @@ // p->ai.loco_id = INVALID_VEHICLE; p->ai.wagon_list[0] = INVALID_VEHICLE; } else { - p->ai.state = AIS_0; + p->ai.state = AIS_0; } } @@ -2499,8 +2499,8 @@ int rad; if (_patches.modified_catchment) { - rad = CA_TRUCK; //Same as CA_BUS at the moment? - } else { //change that at some point? + rad = CA_TRUCK; // Same as CA_BUS at the moment? + } else { // change that at some point? rad = 4; } @@ -3010,11 +3010,11 @@ p->ai.cur_tile_a = arf.bridge_end_tile; bridge_len = GetBridgeLength(tile, p->ai.cur_tile_a); // tile - /* Figure out what (road)bridge type to build - 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. - AI is so fucked up that fixing this small thing will probably not solve a thing - */ + /* Figure out what (road)bridge type to build + * 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. + *AI is so fucked up that fixing this small thing will probably not solve a thing + */ for (i = 10; i != 0; i--) { if (CheckBridge_Stuff(i, bridge_len)) { int32 cost = DoCommand(tile, p->ai.cur_tile_a, i + (0x80 << 8), DC_AUTO, CMD_BUILD_BRIDGE); @@ -3191,7 +3191,7 @@ if (p->ai.num_want_fullload != 0 && (is_pass || i == 0)) order.flags |= OF_FULL_LOAD; - DoCommand(0, loco_id + (i << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); + DoCommand(0, loco_id + (i << 16), PackOrder(&order), DC_EXEC, CMD_INSERT_ORDER); } DoCommand(0, loco_id, 0, DC_EXEC, CMD_START_STOP_ROADVEH); @@ -3320,8 +3320,8 @@ int rad; if (_patches.modified_catchment) { - rad = CA_AIR_LARGE; //I Have NFI what airport the - } else { //AI is going to build here + rad = CA_AIR_LARGE; // I Have NFI what airport the + } else { // AI is going to build here rad = 4; } diff -r 2ee8e92ef389 -r 4175805666a5 aircraft_cmd.c --- a/aircraft_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/aircraft_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -1897,8 +1897,8 @@ 1. group 0 -- TERM_GROUP1_block (check block) 2. group 1 -- TERM_GROUP2_ENTER_block (check block) First in line is checked first, group 0. If the block (TERM_GROUP1_block) is free, it - looks at the corresponding terminals of that group. If no free ones are found, other - possible groups are checked (in this case group 1, since that is after group 0). If that + looks at the corresponding terminals of that group. If no free ones are found, other + possible groups are checked (in this case group 1, since that is after group 0). If that fails, then attempt fails and plane waits */ if (Airport->terminals[0] > 1) { @@ -1992,7 +1992,7 @@ // The blocks for helipads start after the last terminal (MAX_TERMINALS) return FreeTerminal(v, MAX_TERMINALS, GetNumHelipads(Airport) + MAX_TERMINALS); } - return false; // it shouldn't get here anytime, but just to be sure + return false; // it shouldn't get here anytime, but just to be sure } static void AircraftEventHandler(Vehicle *v, int loop) @@ -2103,11 +2103,11 @@ const AirportFTAClass *ap = GetAirport(st->airport_type); FOR_ALL_VEHICLES(v) { if (v->type == VEH_Aircraft && v->subtype <= 2) { - 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 - you cannot delete airport, so it doesn't matter - */ - if (v->u.air.state >= FLYING) { // circle around + 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 + *you cannot delete airport, so it doesn't matter + */ + if (v->u.air.state >= FLYING) { // circle around v->u.air.pos = v->u.air.previous_pos = ap->entry_point; v->u.air.state = FLYING; // landing plane needs to be reset to flying height (only if in pause mode upgrade, diff -r 2ee8e92ef389 -r 4175805666a5 aircraft_gui.c --- a/aircraft_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/aircraft_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -197,7 +197,7 @@ DoCommandP(w->window_number, sel_eng, 0, CcBuildAircraft, CMD_BUILD_AIRCRAFT | CMD_MSG(STR_A008_CAN_T_BUILD_AIRCRAFT)); } break; - case 6: { /* rename */ + case 6: { /* rename */ EngineID sel_eng = WP(w,buildtrain_d).sel_engine; if (sel_eng != INVALID_ENGINE) { WP(w,buildtrain_d).rename_engine = sel_eng; @@ -882,7 +882,7 @@ case 4: if (!HASBIT(w->disabled_state, 4) && - WP(w,traindepot_d).sel != INVALID_VEHICLE) { + WP(w,traindepot_d).sel != INVALID_VEHICLE) { Vehicle *v; HandleButtonClick(w, 4); @@ -1227,6 +1227,6 @@ void ShowVehWithSharedOrdersAircraft(Vehicle *v) { - if (v->orders == NULL) return; // no shared list to show + if (v->orders == NULL) return; // no shared list to show ShowPlayerAircraftLocal(v->owner, INVALID_STATION, v->orders->index, true); } diff -r 2ee8e92ef389 -r 4175805666a5 airport.c --- a/airport.c Mon Aug 28 12:57:33 2006 +0000 +++ b/airport.c Mon Aug 28 18:53:03 2006 +0000 @@ -216,7 +216,7 @@ curr = terminals; while (i-- > 0) { curr++; - assert(*curr != 0); //we don't want to have an empty group + assert(*curr != 0); //we don't want to have an empty group nofterminals += *curr; } @@ -394,7 +394,7 @@ "TERM8", "HELIPAD3", "HELIPAD4", - "DUMMY" // extra heading for 255 + "DUMMY" // extra heading for 255 }; diff -r 2ee8e92ef389 -r 4175805666a5 aystar.c --- a/aystar.c Mon Aug 28 12:57:33 2006 +0000 +++ b/aystar.c Mon Aug 28 18:53:03 2006 +0000 @@ -79,7 +79,7 @@ /* * Checks one tile and calculate his f-value * return values: - * AYSTAR_DONE : indicates we are done + * AYSTAR_DONE : indicates we are done */ int AyStarMain_CheckTile(AyStar *aystar, AyStarNode *current, OpenListNode *parent) { @@ -140,12 +140,12 @@ * This function is the core of AyStar. It handles one item and checks * his neighbour items. If they are valid, they are added to be checked too. * return values: - * AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path - * has been found. - * AYSTAR_LIMIT_REACHED : Indicates that the max_nodes limit has been - * reached. - * AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found. - * AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try. + * AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path + * has been found. + * AYSTAR_LIMIT_REACHED : Indicates that the max_nodes limit has been + * reached. + * AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found. + * AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try. */ int AyStarMain_Loop(AyStar *aystar) { @@ -224,9 +224,9 @@ /* * This is the function you call to run AyStar. * return values: - * AYSTAR_FOUND_END_NODE : indicates we found an end node. - * AYSTAR_NO_PATH : indicates that there was no path found. - * AYSTAR_STILL_BUSY : indicates we have done some checked, that we did not found the path yet, and that we still have items left to try. + * AYSTAR_FOUND_END_NODE : indicates we found an end node. + * AYSTAR_NO_PATH : indicates that there was no path found. + * AYSTAR_STILL_BUSY : indicates we have done some checked, that we did not found the path yet, and that we still have items left to try. * When the algorithm is done (when the return value is not AYSTAR_STILL_BUSY) * aystar->clear() is called. Note that when you stop the algorithm halfway, * you should still call clear() yourself! @@ -287,10 +287,10 @@ // That is why it can stay this high init_BinaryHeap(&aystar->OpenListQueue, 102400); - aystar->addstart = AyStarMain_AddStartNode; - aystar->main = AyStarMain_Main; - aystar->loop = AyStarMain_Loop; - aystar->free = AyStarMain_Free; - aystar->clear = AyStarMain_Clear; - aystar->checktile = AyStarMain_CheckTile; + aystar->addstart = AyStarMain_AddStartNode; + aystar->main = AyStarMain_Main; + aystar->loop = AyStarMain_Loop; + aystar->free = AyStarMain_Free; + aystar->clear = AyStarMain_Clear; + aystar->checktile = AyStarMain_CheckTile; } diff -r 2ee8e92ef389 -r 4175805666a5 aystar.h --- a/aystar.h Mon Aug 28 12:57:33 2006 +0000 +++ b/aystar.h Mon Aug 28 18:53:03 2006 +0000 @@ -5,7 +5,7 @@ * AyStar is a fast pathfinding routine and is used for things like * AI_pathfinding and Train_pathfinding. * For more information about AyStar (A* Algorithm), you can look at - * http://en.wikipedia.org/wiki/A-star_search_algorithm + * http://en.wikipedia.org/wiki/A-star_search_algorithm */ #ifndef AYSTAR_H @@ -55,8 +55,8 @@ /* * This function is called to check if the end-tile is found * return values can be: - * AYSTAR_FOUND_END_NODE : indicates this is the end tile - * AYSTAR_DONE : indicates this is not the end tile (or direction was wrong) + * AYSTAR_FOUND_END_NODE : indicates this is the end tile + * AYSTAR_DONE : indicates this is not the end tile (or direction was wrong) */ /* * The 2nd parameter should be OpenListNode, and NOT AyStarNode. AyStarNode is @@ -71,8 +71,8 @@ /* * This function is called to calculate the G-value for AyStar Algorithm. * return values can be: - * AYSTAR_INVALID_NODE : indicates an item is not valid (e.g.: unwalkable) - * Any value >= 0 : the g-value for this tile + * AYSTAR_INVALID_NODE : indicates an item is not valid (e.g.: unwalkable) + * Any value >= 0 : the g-value for this tile */ typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent); @@ -81,7 +81,7 @@ * Mostly, this must result the distance (Manhattan way) between the * current point and the end point * return values can be: - * Any value >= 0 : the h-value for this tile + * Any value >= 0 : the h-value for this tile */ typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent); diff -r 2ee8e92ef389 -r 4175805666a5 bridge_gui.c --- a/bridge_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/bridge_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -134,8 +134,8 @@ errmsg = _error_message; } else { // check which bridges can be built - int bridge_len; // length of the middle parts of the bridge - int tot_bridgedata_len; // total length of bridge + int bridge_len; // length of the middle parts of the bridge + int tot_bridgedata_len; // total length of bridge // get absolute bridge length bridge_len = GetBridgeLength(start, end); @@ -143,7 +143,7 @@ tot_bridgedata_len = CalcBridgeLenCostFactor(tot_bridgedata_len); - for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { // loop for all bridgetypes + for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { // loop for all bridgetypes if (CheckBridge_Stuff(bridge_type, bridge_len)) { const Bridge *b = &_bridge[bridge_type]; // bridge is accepted, add to list diff -r 2ee8e92ef389 -r 4175805666a5 economy.c --- a/economy.c Mon Aug 28 12:57:33 2006 +0000 +++ b/economy.c Mon Aug 28 18:53:03 2006 +0000 @@ -1517,7 +1517,7 @@ p->is_active = false; DeletePlayerWindows(pi); - RebuildVehicleLists(); //Updates the open windows to add the newly acquired vehicles to the lists + RebuildVehicleLists(); //Updates the open windows to add the newly acquired vehicles to the lists } extern int GetAmountOwnedBy(Player *p, byte owner); diff -r 2ee8e92ef389 -r 4175805666a5 engine.h --- a/engine.h Mon Aug 28 12:57:33 2006 +0000 +++ b/engine.h Mon Aug 28 18:53:03 2006 +0000 @@ -27,7 +27,7 @@ // for when the 'powered wagon' callback fails. But it should really also determine what // kind of visual effect to generate for a vehicle (default, steam, diesel, electric). // Same goes for the callback result, which atm is only used to check if a wagon is powered. - byte shorten_factor; // length on main map for this type is 8 - shorten_factor + byte shorten_factor; // length on main map for this type is 8 - shorten_factor byte user_def_data; ///! Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles } RailVehicleInfo; @@ -99,7 +99,7 @@ byte preview_wait; byte railtype; byte player_avail; - byte type; // type, ie VEH_Road, VEH_Train, etc. Same as in vehicle.h + byte type; // type, ie VEH_Road, VEH_Train, etc. Same as in vehicle.h } Engine; /** diff -r 2ee8e92ef389 -r 4175805666a5 gui.h --- a/gui.h Mon Aug 28 12:57:33 2006 +0000 +++ b/gui.h Mon Aug 28 18:53:03 2006 +0000 @@ -125,7 +125,7 @@ void BuildFileList(void); void SetFiosType(const byte fiostype); -/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ +/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ extern const byte _fios_colors[]; /* network gui */ diff -r 2ee8e92ef389 -r 4175805666a5 industry_cmd.c --- a/industry_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/industry_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -340,11 +340,11 @@ { Industry *i = GetIndustryByTile(tile); - /* * water can destroy industries - * in editor you can bulldoze industries - * with magic_bulldozer cheat you can destroy industries - * (area around OILRIG is water, so water shouldn't flood it - */ + /* water can destroy industries + * in editor you can bulldoze industries + * with magic_bulldozer cheat you can destroy industries + * (area around OILRIG is water, so water shouldn't flood it + */ if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR && !_cheats.magic_bulldozer.value) || (_current_player == OWNER_WATER && i->type == IT_OIL_RIG)) { @@ -409,7 +409,7 @@ m = _m[tile].m3 + 1; switch (m & 7) { - case 2: SndPlayTileFx(SND_2D_RIP_2, tile); break; + case 2: SndPlayTileFx(SND_2D_RIP_2, tile); break; case 6: SndPlayTileFx(SND_29_RIP, tile); break; } @@ -1903,7 +1903,7 @@ DrawTile_Industry, /* draw_tile_proc */ GetSlopeZ_Industry, /* get_slope_z_proc */ ClearTile_Industry, /* clear_tile_proc */ - GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ + GetAcceptedCargo_Industry, /* get_accepted_cargo_proc */ GetTileDesc_Industry, /* get_tile_desc_proc */ GetTileTrackStatus_Industry, /* get_tile_track_status_proc */ ClickTile_Industry, /* click_tile_proc */ diff -r 2ee8e92ef389 -r 4175805666a5 main_gui.c --- a/main_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/main_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -1310,7 +1310,7 @@ HandleButtonClick(w, e->click.widget); size += _terraform_size; - if (!IS_INT_INSIDE(size, 1, 8 + 1)) return; + if (!IS_INT_INSIDE(size, 1, 8 + 1)) return; _terraform_size = size; SndPlayFx(SND_15_BEEP); diff -r 2ee8e92ef389 -r 4175805666a5 md5.c --- a/md5.c Mon Aug 28 12:57:33 2006 +0000 +++ b/md5.c Mon Aug 28 18:53:03 2006 +0000 @@ -57,7 +57,7 @@ #include "md5.h" #include -#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ +#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #if defined(TTD_BIG_ENDIAN) # define BYTE_ORDER 1 #else @@ -158,7 +158,7 @@ if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif -#if BYTE_ORDER <= 0 /* little-endian */ +#if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned @@ -175,9 +175,9 @@ } #endif #if BYTE_ORDER == 0 - else /* dynamic big-endian */ + else /* dynamic big-endian */ #endif -#if BYTE_ORDER >= 0 /* big-endian */ +#if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the @@ -187,9 +187,9 @@ int i; # if BYTE_ORDER == 0 - X = xbuf; /* (dynamic only) */ + X = xbuf; /* (dynamic only) */ # else -# define xbuf X /* (static only) */ +# define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); diff -r 2ee8e92ef389 -r 4175805666a5 md5.h --- a/md5.h Mon Aug 28 12:57:33 2006 +0000 +++ b/md5.h Mon Aug 28 18:53:03 2006 +0000 @@ -67,9 +67,9 @@ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { - md5_word_t count[2]; /* message length in bits, lsw first */ - md5_word_t abcd[4]; /* digest buffer */ - md5_byte_t buf[64]; /* accumulate block */ + md5_word_t count[2]; /* message length in bits, lsw first */ + md5_word_t abcd[4]; /* digest buffer */ + md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus diff -r 2ee8e92ef389 -r 4175805666a5 minilzo.h --- a/minilzo.h Mon Aug 28 12:57:33 2006 +0000 +++ b/minilzo.h Mon Aug 28 18:53:03 2006 +0000 @@ -62,10 +62,6 @@ #endif -/*********************************************************************** -// -************************************************************************/ - /* Memory required for the wrkmem parameter. * When the required size is 0, you can also pass a NULL pointer. */ diff -r 2ee8e92ef389 -r 4175805666a5 misc_cmd.c --- a/misc_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/misc_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -224,7 +224,7 @@ } /** Transfer funds (money) from one player to another. - * To prevent abuse in multiplayer games you can only send money to other + * To prevent abuse in multiplayer games you can only send money to other * players if you have paid off your loan (either explicitely, or implicitely * given the fact that you have more money than loan). * @param tile unused diff -r 2ee8e92ef389 -r 4175805666a5 namegen.c --- a/namegen.c Mon Aug 28 12:57:33 2006 +0000 +++ b/namegen.c Mon Aug 28 18:53:03 2006 +0000 @@ -761,12 +761,12 @@ { switch (old_town_name_type) { case 0: case 3: /* English, American */ - /* Already OK */ + /* Already OK */ return townnameparts; case 1: /* French */ - /* For some reason 86 needs to be subtracted from townnameparts - * 0000 0000 0000 0000 0000 0000 1111 1111 */ + /* For some reason 86 needs to be subtracted from townnameparts + * 0000 0000 0000 0000 0000 0000 1111 1111 */ return FIXNUM(townnameparts - 86, lengthof(name_french_real), 0); case 2: /* German */ @@ -774,13 +774,13 @@ return townnameparts; case 4: /* Latin-American */ - /* 0000 0000 0000 0000 0000 0000 1111 1111 */ + /* 0000 0000 0000 0000 0000 0000 1111 1111 */ return FIXNUM(townnameparts, lengthof(name_spanish_real), 0); case 5: /* Silly */ - /* NUM_SILLY_1 - lower 16 bits - * NUM_SILLY_2 - upper 16 bits without leading 1 (first 8 bytes) - * 1000 0000 2222 2222 0000 0000 1111 1111 */ + /* NUM_SILLY_1 - lower 16 bits + * NUM_SILLY_2 - upper 16 bits without leading 1 (first 8 bytes) + * 1000 0000 2222 2222 0000 0000 1111 1111 */ return FIXNUM(townnameparts, lengthof(name_silly_1), 0) | FIXNUM(GB(townnameparts, 16, 8), lengthof(name_silly_2), 16); } return 0; diff -r 2ee8e92ef389 -r 4175805666a5 newgrf.c --- a/newgrf.c Mon Aug 28 12:57:33 2006 +0000 +++ b/newgrf.c Mon Aug 28 18:53:03 2006 +0000 @@ -1640,8 +1640,8 @@ static void FeatureMapSpriteGroup(byte *buf, int len) { /* <03> ... [ ]... - * id-list := [] [id-list] - * cargo-list := [cargo-list] + * id-list := [] [id-list] + * cargo-list := [cargo-list] * * B feature see action 0 * B n-id bits 0-6: how many IDs this definition applies to diff -r 2ee8e92ef389 -r 4175805666a5 npf.c --- a/npf.c Mon Aug 28 12:57:33 2006 +0000 +++ b/npf.c Mon Aug 28 18:53:03 2006 +0000 @@ -63,10 +63,10 @@ /** * Calculates a hash value for use in the NPF. - * @param key1 The TileIndex of the tile to hash - * @param key1 The Trackdir of the track on the tile. + * @param key1 The TileIndex of the tile to hash + * @param key2 The Trackdir of the track on the tile. * - * @todo Think of a better hash. + * @todo Think of a better hash. */ static uint NPFHash(uint key1, uint key2) { diff -r 2ee8e92ef389 -r 4175805666a5 openttd.h --- a/openttd.h Mon Aug 28 12:57:33 2006 +0000 +++ b/openttd.h Mon Aug 28 18:53:03 2006 +0000 @@ -129,7 +129,7 @@ */ TRANSPORT_RAIL = 0, TRANSPORT_ROAD = 1, - TRANSPORT_WATER, // = 2 + TRANSPORT_WATER, // = 2 TRANSPORT_END, INVALID_TRANSPORT = 0xff, } TransportType; @@ -239,7 +239,7 @@ int economy; int line_reverse_mode; int disasters; - int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff + int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff } GameDifficulty; enum { diff -r 2ee8e92ef389 -r 4175805666a5 os/macosx/macos.h --- a/os/macosx/macos.h Mon Aug 28 12:57:33 2006 +0000 +++ b/os/macosx/macos.h Mon Aug 28 18:53:03 2006 +0000 @@ -8,8 +8,8 @@ * use ShowMacDialog when you want to control title, message and text on the button * ShowMacAssertDialog is used by assert * ShowMacErrorDialog should be used when an unrecoverable error shows up. It only contains the title, which will should tell what went wrong - * the function then adds text that tells the user to update and then report the bug if it's present in the newest version - * It also quits in a nice way since we call it when we know something happened that will crash OpenTTD (like a needed pointer turns out to be NULL or similar) + * the function then adds text that tells the user to update and then report the bug if it's present in the newest version + * It also quits in a nice way since we call it when we know something happened that will crash OpenTTD (like a needed pointer turns out to be NULL or similar) */ void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel ); void ShowMacAssertDialog ( const char *function, const char *file, const int line, const char *expression ); diff -r 2ee8e92ef389 -r 4175805666a5 rail.h --- a/rail.h Mon Aug 28 12:57:33 2006 +0000 +++ b/rail.h Mon Aug 28 18:53:03 2006 +0000 @@ -119,7 +119,7 @@ TRACKDIR_BIT_LOWER_W = 0x0800, TRACKDIR_BIT_LEFT_N = 0x1000, TRACKDIR_BIT_RIGHT_N = 0x2000, - TRACKDIR_BIT_MASK = 0x3F3F, + TRACKDIR_BIT_MASK = 0x3F3F, INVALID_TRACKDIR_BIT = 0xFFFF, } TrackdirBits; diff -r 2ee8e92ef389 -r 4175805666a5 rail_cmd.c --- a/rail_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/rail_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -59,10 +59,10 @@ /* MAP2 byte: abcd???? => Signal On? Same coding as map3lo * MAP3LO byte: abcd???? => Signal Exists? - * a and b are for diagonals, upper and left, - * one for each direction. (ie a == NE->SW, b == - * SW->NE, or v.v., I don't know. b and c are - * similar for lower and right. + * a and b are for diagonals, upper and left, + * one for each direction. (ie a == NE->SW, b == + * SW->NE, or v.v., I don't know. b and c are + * similar for lower and right. * MAP2 byte: ????abcd => Type of ground. * MAP3LO byte: ????abcd => Type of rail. * MAP5: 00abcdef => rail @@ -721,7 +721,7 @@ return cost; } -/** Build many signals by dragging; AutoSignals +/** Build many signals by dragging; AutoSignals * @param tile start tile of drag * @param p1 end tile of drag * @param p2 various bitstuffed elements @@ -1956,7 +1956,7 @@ if (new_player != OWNER_SPECTATOR) { SetTileOwner(tile, new_player); - } else { + } else { DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR); } } @@ -1986,9 +1986,9 @@ length = v->u.rail.cached_veh_length; fract_coord_leave = - ((_fractcoords_enter[dir] & 0x0F) + // x + ((_fractcoords_enter[dir] & 0x0F) + // x (length + 1) * _deltacoord_leaveoffset[dir]) + - (((_fractcoords_enter[dir] >> 4) + // y + (((_fractcoords_enter[dir] >> 4) + // y ((length + 1) * _deltacoord_leaveoffset[dir+4])) << 4); fract_coord = (x & 0xF) + ((y & 0xF) << 4); diff -r 2ee8e92ef389 -r 4175805666a5 road_gui.c --- a/road_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/road_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -412,7 +412,7 @@ if (WP(w,def_d).close) return; - w->click_state = ((1<<3) << _road_station_picker_orientation) | + w->click_state = ((1<<3) << _road_station_picker_orientation) | ((1<<7) << _station_show_coverage); DrawWindowWidgets(w); diff -r 2ee8e92ef389 -r 4175805666a5 roadveh_cmd.c --- a/roadveh_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/roadveh_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -1393,7 +1393,7 @@ } if (rd.x & 0x40) { - int dir = RoadFindPathToDest(v, v->tile, rd.x & 3); + int dir = RoadFindPathToDest(v, v->tile, rd.x & 3); uint32 r; int tmp; Direction newdir; diff -r 2ee8e92ef389 -r 4175805666a5 roadveh_gui.c --- a/roadveh_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/roadveh_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -656,7 +656,7 @@ FOR_ALL_VEHICLES(v) { if (v->type == VEH_Road && IsRoadVehInDepot(v) && v->tile == tile && - --num < 0 && num >= -w->vscroll.cap * w->hscroll.cap) { + --num < 0 && num >= -w->vscroll.cap * w->hscroll.cap) { DrawRoadVehImage(v, x+24, y, WP(w,traindepot_d).sel); SetDParam(0, v->unitnumber); @@ -1053,7 +1053,7 @@ if (id_v >= vl->list_length) return; // click out of list bound - v = vl->sort_list[id_v]; + v = vl->sort_list[id_v]; assert(v->type == VEH_Road && v->owner == owner); @@ -1161,6 +1161,6 @@ void ShowVehWithSharedOrdersRoadVehicles(Vehicle *v) { - if (v->orders == NULL) return; // no shared list to show + if (v->orders == NULL) return; // no shared list to show ShowPlayerRoadVehiclesLocal(v->owner, INVALID_STATION, v->orders->index, true); } diff -r 2ee8e92ef389 -r 4175805666a5 settings.c --- a/settings.c Mon Aug 28 12:57:33 2006 +0000 +++ b/settings.c Mon Aug 28 18:53:03 2006 +0000 @@ -341,7 +341,7 @@ assert(item->value != NULL); 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') { fprintf(f, "%s\n", item->name); } else { diff -r 2ee8e92ef389 -r 4175805666a5 ship_gui.c --- a/ship_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/ship_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -383,7 +383,7 @@ DoCommandP(w->window_number, sel_eng, 0, CcBuildShip, CMD_BUILD_SHIP | CMD_MSG(STR_980D_CAN_T_BUILD_SHIP)); } break; - case 6: { /* rename */ + case 6: { /* rename */ EngineID sel_eng = WP(w,buildtrain_d).sel_engine; if (sel_eng != INVALID_ENGINE) { WP(w,buildtrain_d).rename_engine = sel_eng; @@ -828,7 +828,7 @@ case 4: if (!HASBIT(w->disabled_state, 4) && - WP(w,traindepot_d).sel != INVALID_VEHICLE) { + WP(w,traindepot_d).sel != INVALID_VEHICLE) { Vehicle *v; HandleButtonClick(w, 4); @@ -1066,7 +1066,7 @@ if (id_v >= vl->list_length) return; // click out of list bound - v = vl->sort_list[id_v]; + v = vl->sort_list[id_v]; assert(v->type == VEH_Ship); @@ -1175,6 +1175,6 @@ void ShowVehWithSharedOrdersShips(Vehicle *v) { - if (v->orders == NULL) return; // no shared list to show + if (v->orders == NULL) return; // no shared list to show ShowPlayerShipsLocal(v->owner, INVALID_STATION, v->orders->index, true); } diff -r 2ee8e92ef389 -r 4175805666a5 station_cmd.c --- a/station_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/station_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -799,7 +799,7 @@ if (tileh != SLOPE_FLAT) { // need to check so the entrance to the station is not pointing at a slope. if ((invalid_dirs&1 && !(tileh & SLOPE_NE) && (uint)w_cur == w) || - (invalid_dirs&2 && !(tileh & SLOPE_SE) && h_cur == 1) || + (invalid_dirs&2 && !(tileh & SLOPE_SE) && h_cur == 1) || (invalid_dirs&4 && !(tileh & SLOPE_SW) && w_cur == 1) || (invalid_dirs&8 && !(tileh & SLOPE_NW) && (uint)h_cur == h)) { return_cmd_error(STR_0007_FLAT_LAND_REQUIRED); @@ -1020,7 +1020,7 @@ //XXX can't we pack this in the "else" part of the if above? if (!CheckStationSpreadOut(st, tile_org, w_org, h_org)) return CMD_ERROR; - } else { + } else { // Create a new station st = AllocateStation(); if (st == NULL) return CMD_ERROR; diff -r 2ee8e92ef389 -r 4175805666a5 strgen/strgen.c --- a/strgen/strgen.c Mon Aug 28 12:57:33 2006 +0000 +++ b/strgen/strgen.c Mon Aug 28 18:53:03 2006 +0000 @@ -39,7 +39,7 @@ uint32 ident; uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h char name[32]; // the international name of this language - char own_name[32]; // the localized name of this language + char own_name[32]; // the localized name of this language char isocode[16]; // the ISO code for the language (not country code) uint16 offsets[32]; // the offsets byte plural_form; // plural form index @@ -451,8 +451,8 @@ {"WEIGHT_S", EmitEscapedByte, 19, 1, 0}, {"FORCE", EmitEscapedByte, 20, 1, 0}, - {"P", EmitPlural, 0, 0, C_DONTCOUNT}, // plural specifier - {"G", EmitGender, 0, 0, C_DONTCOUNT}, // gender specifier + {"P", EmitPlural, 0, 0, C_DONTCOUNT}, // plural specifier + {"G", EmitGender, 0, 0, C_DONTCOUNT}, // gender specifier {"DATE_LONG", EmitSingleByte, 0x82, 1, 0}, {"DATE_SHORT", EmitSingleByte, 0x83, 1, 0}, diff -r 2ee8e92ef389 -r 4175805666a5 strings.c --- a/strings.c Mon Aug 28 12:57:33 2006 +0000 +++ b/strings.c Mon Aug 28 18:53:03 2006 +0000 @@ -41,13 +41,13 @@ typedef struct LanguagePack { uint32 ident; - uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h - char name[32]; // the international name of this language - char own_name[32]; // the localized name of this language - char isocode[16]; // the ISO code for the language (not country code) - uint16 offsets[32]; // the offsets - byte plural_form; // how to compute plural forms - byte pad[3]; // pad header to be a multiple of 4 + uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h + char name[32]; // the international name of this language + char own_name[32]; // the localized name of this language + char isocode[16]; // the ISO code for the language (not country code) + uint16 offsets[32]; // the offsets + byte plural_form; // how to compute plural forms + byte pad[3]; // pad header to be a multiple of 4 char data[VARARRAY_SIZE]; } LanguagePack; diff -r 2ee8e92ef389 -r 4175805666a5 table/files.h --- a/table/files.h Mon Aug 28 12:57:33 2006 +0000 +++ b/table/files.h Mon Aug 28 18:53:03 2006 +0000 @@ -30,8 +30,8 @@ { "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 { 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} }, { "TRGT.GRF", {0xfc, 0xde, 0x1d, 0x7e, 0x8a, 0x74, 0x19, 0x7d, 0x72, 0xa6, 0x26, 0x95, 0x88, 0x4b, 0x90, 0x9e} } } @@ -44,8 +44,8 @@ { "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 } } - }, - { { "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} }, { "TRGTR.GRF", {0xde, 0x53, 0x65, 0x05, 0x17, 0xfe, 0x66, 0x1c, 0xea, 0xa3, 0x13, 0x8c, 0x6e, 0xdb, 0x0e, 0xb8} } } diff -r 2ee8e92ef389 -r 4175805666a5 table/palettes.h --- a/table/palettes.h Mon Aug 28 12:57:33 2006 +0000 +++ b/table/palettes.h Mon Aug 28 18:53:03 2006 +0000 @@ -156,7 +156,7 @@ M( 48, 84, 128) }, { M( 28, 108, 124), M( 32, 112, 128), M( 36, 116, 132), M( 40, 120, 136), M( 44, 124, 140) }, - { M(240, 208, 0), M( 0, 0, 0), M( 0, 0, 0), M( 0, 0, 0) }, + { M(240, 208, 0), M( 0, 0, 0), M( 0, 0, 0), M( 0, 0, 0) }, { M(252, 60, 0), M(252, 84, 0), M(252, 108, 0), M(252, 124, 0), M(252, 148, 0), M(252, 172, 0), M(252, 196, 0) }, { M( 76, 24, 8), M(108, 44, 24), M(144, 72, 52), M(176, 108, 84), diff -r 2ee8e92ef389 -r 4175805666a5 table/sprites.h --- a/table/sprites.h Mon Aug 28 12:57:33 2006 +0000 +++ b/table/sprites.h Mon Aug 28 18:53:03 2006 +0000 @@ -334,7 +334,7 @@ SPR_AIRPORT_RADAR_B = 2690, SPR_AIRPORT_RADAR_C = 2691, SPR_AIRPORT_HELIPAD = SPR_OPENTTD_BASE + 28, - SPR_AIRPORT_HELIDEPOT_OFFICE = 2095, + SPR_AIRPORT_HELIDEPOT_OFFICE = 2095, /* Road Stops */ /* Road stops have a ground tile and 3 buildings, one on each side diff -r 2ee8e92ef389 -r 4175805666a5 table/station_land.h --- a/table/station_land.h Mon Aug 28 12:57:33 2006 +0000 +++ b/table/station_land.h Mon Aug 28 18:53:03 2006 +0000 @@ -674,7 +674,7 @@ // concrete underground static const DrawTileSeqStruct _station_display_datas_0114[] = { { 10, 6, 0, 0, 0, 0, SPR_AIRPORT_HELIPAD }, - { 15, 0, 0, 1, 16, 6, SPR_AIRPORT_FENCE_Y | PALETTE_MODIFIER_COLOR }, // fences bottom + { 15, 0, 0, 1, 16, 6, SPR_AIRPORT_FENCE_Y | PALETTE_MODIFIER_COLOR }, // fences bottom TILE_SEQ_END() }; diff -r 2ee8e92ef389 -r 4175805666a5 tgp.c --- a/tgp.c Mon Aug 28 12:57:33 2006 +0000 +++ b/tgp.c Mon Aug 28 18:53:03 2006 +0000 @@ -198,7 +198,7 @@ #define FOR_ALL_TILES_IN_HEIGHT(h) for (h = _height_map.h; h < &_height_map.h[_height_map.total_size]; h++) /** Noise amplitudes (multiplied by 1024) - * - indexed by "smoothness setting" and log2(frequency) */ + * - indexed by "smoothness setting" and log2(frequency) */ static const amplitude_t _amplitudes_by_smoothness_and_frequency[4][12] = { // Very smooth {1000, 350, 123, 43, 15, 1, 1, 0, 0, 0, 0, 0}, diff -r 2ee8e92ef389 -r 4175805666a5 town_cmd.c --- a/town_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/town_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -676,7 +676,7 @@ tmptile = tile; // Now it contains the direction of the slope - j = -11; // max 11 tile long bridges + j = -11; // max 11 tile long bridges do { if (++j == 0) goto build_road_and_exit; @@ -1555,9 +1555,9 @@ // but this is special, because it can only 'fail' on a DC_EXEC if (IsLocalPlayer()) ShowErrorMessage(STR_BRIBE_FAILED_2, STR_BRIBE_FAILED, 0, 0); - /* decrease by a lot! - * ChangeTownRating is only for stuff in demolishing. Bribe failure should - * be independent of any cheat settings + /* decrease by a lot! + * ChangeTownRating is only for stuff in demolishing. Bribe failure should + * be independent of any cheat settings */ if (t->ratings[_current_player] > RATING_BRIBE_DOWN_TO) { t->ratings[_current_player] = RATING_BRIBE_DOWN_TO; @@ -1659,14 +1659,14 @@ } if (_opt.landscape == LT_HILLY) { - if (TilePixelHeight(t->xy) >= _opt.snow_line && t->act_food == 0 && t->population > 90) + if (TilePixelHeight(t->xy) >= _opt.snow_line && t->act_food == 0 && t->population > 90) return; } else if (_opt.landscape == LT_DESERT) { - if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60) + if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60) return; } - t->growth_rate = m / (t->num_houses / 50 + 1); + t->growth_rate = m / (t->num_houses / 50 + 1); if (m <= t->grow_counter) t->grow_counter = m; @@ -1753,7 +1753,7 @@ { int rating; - // if magic_bulldozer cheat is active, town doesn't penaltize for removing stuff + // if magic_bulldozer cheat is active, town doesn't penaltize for removing stuff if (t == NULL || _current_player >= MAX_PLAYERS || (_cheats.magic_bulldozer.value && add < 0)) { @@ -1778,7 +1778,7 @@ t->ratings[_current_player] = rating; } -/* penalty for removing town-owned stuff */ +/* penalty for removing town-owned stuff */ static const int _default_rating_settings [3][3] = { // ROAD_REMOVE, TUNNELBRIDGE_REMOVE, INDUSTRY_REMOVE { 0, 128, 384}, // Permissive @@ -1790,13 +1790,13 @@ { int modemod; - // if magic_bulldozer cheat is active, town doesn't restrict your destructive actions + // if magic_bulldozer cheat is active, town doesn't restrict your destructive actions if (t == NULL || _current_player >= MAX_PLAYERS || _cheats.magic_bulldozer.value) return true; - /* check if you're allowed to remove the street/bridge/tunnel/industry - * owned by a town no removal if rating is lower than ... depends now on - * difficulty setting. Minimum town rating selected by difficulty level + /* check if you're allowed to remove the street/bridge/tunnel/industry + * owned by a town no removal if rating is lower than ... depends now on + * difficulty setting. Minimum town rating selected by difficulty level */ modemod = _default_rating_settings[_opt.diff.town_council_tolerance][type]; diff -r 2ee8e92ef389 -r 4175805666a5 town_gui.c --- a/town_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/town_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -130,14 +130,14 @@ SetDParam(2, GetPlayerNameString(p->index, 3)); r = t->ratings[p->index]; - (str = STR_3035_APPALLING, r <= RATING_APPALLING) || // Apalling - (str++, r <= RATING_VERYPOOR) || // Very Poor - (str++, r <= RATING_POOR) || // Poor - (str++, r <= RATING_MEDIOCRE) || // Mediocore - (str++, r <= RATING_GOOD) || // Good - (str++, r <= RATING_VERYGOOD) || // Very Good - (str++, r <= RATING_EXCELLENT) || // Excellent - (str++, true); // Outstanding + (str = STR_3035_APPALLING, r <= RATING_APPALLING) || // Apalling + (str++, r <= RATING_VERYPOOR) || // Very Poor + (str++, r <= RATING_POOR) || // Poor + (str++, r <= RATING_MEDIOCRE) || // Mediocore + (str++, r <= RATING_GOOD) || // Good + (str++, r <= RATING_VERYGOOD) || // Very Good + (str++, r <= RATING_EXCELLENT) || // Excellent + (str++, true); // Outstanding SetDParam(4, str); if (t->exclusivity == p->index) // red icon for player with exclusive rights diff -r 2ee8e92ef389 -r 4175805666a5 train_cmd.c --- a/train_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/train_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -95,8 +95,8 @@ if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeOnBridge(u->tile))) engine_has_power = false; if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeOnBridge(u->tile))) wagon_has_power = false; } else if (IsLevelCrossingTile(u->tile)) { - if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeCrossing(u->tile))) engine_has_power = false; - if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeCrossing(u->tile))) wagon_has_power = false; + if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeCrossing(u->tile))) engine_has_power = false; + if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeCrossing(u->tile))) wagon_has_power = false; } else { if (!HasPowerOnRail(u->u.rail.railtype, GetRailType(u->tile))) engine_has_power = false; if (!HasPowerOnRail(v->u.rail.railtype, GetRailType(u->tile))) wagon_has_power = false; @@ -271,13 +271,13 @@ static int GetTrainAcceleration(Vehicle *v, bool mode) { const Vehicle *u; - int num = 0; //number of vehicles, change this into the number of axles later + int num = 0; //number of vehicles, change this into the number of axles later int power = 0; int mass = 0; int max_speed = 2000; int area = 120; int friction = 35; //[1e-3] - int drag_coeff = 20; //[1e-4] + int drag_coeff = 20; //[1e-4] int incl = 0; int resistance; int speed = v->cur_speed; //[mph] @@ -358,7 +358,7 @@ if (u->u.rail.track == 0x80) max_speed = min(max_speed, 61); if (HASBIT(u->u.rail.flags, VRF_GOINGUP)) { - incl += u->u.rail.cached_veh_weight * 60; //3% slope, quite a bit actually + incl += u->u.rail.cached_veh_weight * 60; //3% slope, quite a bit actually } else if (HASBIT(u->u.rail.flags, VRF_GOINGDOWN)) { incl -= u->u.rail.cached_veh_weight * 60; } @@ -810,7 +810,7 @@ TrainConsistChanged(v); UpdateTrainAcceleration(v); - if (!HASBIT(p2, 1)) { // check if the cars should be added to the new vehicle + if (!HASBIT(p2, 1)) { // check if the cars should be added to the new vehicle NormalizeTrainVehInDepot(v); } @@ -1183,7 +1183,7 @@ * we can't loop forever here because next time we reach this line we will have a front engine */ if (src_head != NULL && !IsFrontEngine(src_head) && IsTrainEngine(src_head)) { CmdMoveRailVehicle(0, flags, src_head->index | (INVALID_VEHICLE << 16), 1); - src_head = NULL; // don't do anything more to this train since the new call will do it + src_head = NULL; // don't do anything more to this train since the new call will do it } if (src_head != NULL) { @@ -3670,7 +3670,7 @@ Vehicle *v; FOR_ALL_VEHICLES(v) { if (v->type == VEH_Train) { - SETBIT(v->subtype, 7); // indicates that it's the old format and needs to be converted in the next loop + SETBIT(v->subtype, 7); // indicates that it's the old format and needs to be converted in the next loop } } @@ -3684,18 +3684,18 @@ CLRBIT(u->subtype, 7); switch (u->subtype) { - case 0: /* TS_Front_Engine */ + case 0: /* TS_Front_Engine */ if (rvi->flags & RVI_MULTIHEAD) SetMultiheaded(u); SetFrontEngine(u); SetTrainEngine(u); break; - case 1: /* TS_Artic_Part */ + case 1: /* TS_Artic_Part */ u->subtype = 0; SetArticulatedPart(u); break; - case 2: /* TS_Not_First */ + case 2: /* TS_Not_First */ u->subtype = 0; if (rvi->flags & RVI_WAGON) { // normal wagon @@ -3711,7 +3711,7 @@ SetTrainEngine(u); break; - case 4: /* TS_Free_Car */ + case 4: /* TS_Free_Car */ u->subtype = 0; SetTrainWagon(u); SetFreeWagon(u); diff -r 2ee8e92ef389 -r 4175805666a5 train_gui.c --- a/train_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/train_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -454,7 +454,7 @@ // Number of wagons relative to a standard length wagon (rounded up) SetDParam(0, (v->u.rail.cached_total_length + 7) / 8); - DrawStringRightAligned(w->widget[6].right - 1, y + 4, STR_TINY_BLACK, 0); //Draw the counter + DrawStringRightAligned(w->widget[6].right - 1, y + 4, STR_TINY_BLACK, 0); // Draw the counter /* Draw the pretty flag */ DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, x + 15, y); @@ -474,9 +474,9 @@ /*Draw the train counter */ i = 0; u = v; - do i++; while ( (u=u->next) != NULL); //Determine length of train - SetDParam(0, i); //Set the counter - DrawStringRightAligned(w->widget[6].right - 1, y + 4, STR_TINY_BLACK, 0); //Draw the counter + do i++; while ( (u=u->next) != NULL); // Determine length of train + SetDParam(0, i); // Set the counter + DrawStringRightAligned(w->widget[6].right - 1, y + 4, STR_TINY_BLACK, 0); // Draw the counter y += 14; } } @@ -1020,10 +1020,10 @@ case 5: /* start/stop train */ DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_TRAIN | CMD_MSG(STR_883B_CAN_T_STOP_START_TRAIN)); break; - case 6: /* center main view */ + case 6: /* center main view */ ScrollMainWindowTo(v->x_pos, v->y_pos); break; - case 7: /* goto depot */ + case 7: /* goto depot */ /* TrainGotoDepot has a nice randomizer in the pathfinder, which causes desyncs... */ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT)); break; @@ -1149,7 +1149,7 @@ static void DrawTrainDetailsWindow(Window *w) { const Vehicle *v, *u; - uint16 tot_cargo[NUM_CARGO][2]; // count total cargo ([0]-actual cargo, [1]-total cargo) + uint16 tot_cargo[NUM_CARGO][2]; // count total cargo ([0]-actual cargo, [1]-total cargo) int i,num,x,y,sel; byte det_tab = WP(w, traindetails_d).tab; @@ -1157,7 +1157,7 @@ num = 0; // det_tab == 3 <-- Total Cargo tab - if (det_tab == 3) // reset tot_cargo array to 0 values + if (det_tab == 3) // reset tot_cargo array to 0 values memset(tot_cargo, 0, sizeof(tot_cargo)); u = v = GetVehicle(w->window_number); @@ -1170,15 +1170,15 @@ } } while ((u = GetNextVehicle(u)) != NULL); - /* set scroll-amount seperately from counting, as to not - compute num double for more carriages of the same type + /* set scroll-amount seperately from counting, as to not + * compute num double for more carriages of the same type */ if (det_tab == 3) { for (i = 0; i != NUM_CARGO; i++) { - if (tot_cargo[i][1] > 0) // only count carriages that the train has + if (tot_cargo[i][1] > 0) // only count carriages that the train has num++; } - num++; // needs one more because first line is description string + num++; // needs one more because first line is description string } SetVScrollCount(w, num); @@ -1249,11 +1249,11 @@ for (i = 0; i != NUM_CARGO; i++) { if (tot_cargo[i][1] > 0 && --sel < 0 && sel > -w->vscroll.cap) { y += 14; - // STR_013F_TOTAL_CAPACITY :{LTBLUE}- {CARGO} ({SHORTCARGO}) - SetDParam(0, i); // {CARGO} #1 - SetDParam(1, tot_cargo[i][0]); // {CARGO} #2 - SetDParam(2, i); // {SHORTCARGO} #1 - SetDParam(3, tot_cargo[i][1]); // {SHORTCARGO} #2 + // STR_013F_TOTAL_CAPACITY :{LTBLUE}- {CARGO} ({SHORTCARGO}) + SetDParam(0, i); // {CARGO} #1 + SetDParam(1, tot_cargo[i][0]); // {CARGO} #2 + SetDParam(2, i); // {SHORTCARGO} #1 + SetDParam(3, tot_cargo[i][1]); // {SHORTCARGO} #2 DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY, 0); } } @@ -1275,7 +1275,7 @@ SetDParam(0, v->unitnumber); ShowQueryString(v->string_id, STR_8865_NAME_TRAIN, 31, 150, w->window_class, w->window_number, CS_ALPHANUMERAL); break; - case 6: /* inc serv interval */ + case 6: /* inc serv interval */ mod = _ctrl_pressed? 5 : 10; goto do_change_service_int; @@ -1290,10 +1290,10 @@ DoCommandP(v->tile, v->index, mod, NULL, CMD_CHANGE_SERVICE_INT | CMD_MSG(STR_018A_CAN_T_CHANGE_SERVICING)); break; /* details buttons*/ - case 9: // Cargo - case 10: // Information - case 11: // Capacities - case 12: // Total cargo + case 9: // Cargo + case 10: // Information + case 11: // Capacities + case 12: // Total cargo CLRBIT(w->disabled_state, 9); CLRBIT(w->disabled_state, 10); CLRBIT(w->disabled_state, 11); @@ -1626,6 +1626,6 @@ void ShowVehWithSharedOrdersTrains(Vehicle *v) { - if (v->orders == NULL) return; // no shared list to show + if (v->orders == NULL) return; // no shared list to show ShowPlayerTrainsLocal(v->owner, INVALID_STATION, v->orders->index, true); } diff -r 2ee8e92ef389 -r 4175805666a5 tunnelbridge_cmd.c --- a/tunnelbridge_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/tunnelbridge_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -413,14 +413,14 @@ SetSignalsOnBothDir(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) - 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 - */ + /* 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 + * and cost is computed in "bridge_gui.c". For AI, Towns this has to be of course calculated + */ if (!(flags & DC_QUERY_COST)) { const Bridge *b = &_bridge[bridge_type]; - bridge_len += 2; // begin and end tiles/ramps + bridge_len += 2; // begin and end tiles/ramps if (_current_player < MAX_PLAYERS && !_is_old_ai_player) bridge_len = CalcBridgeLenCostFactor(bridge_len); @@ -1315,7 +1315,7 @@ if (new_player != OWNER_SPECTATOR) { SetTileOwner(tile, new_player); - } else { + } else { if (IsBridge(tile) && IsBridgeMiddle(tile) && IsTransportUnderBridge(tile)) { // the stuff BELOW the middle part is owned by the deleted player. if (GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL) { diff -r 2ee8e92ef389 -r 4175805666a5 vehicle.c --- a/vehicle.c Mon Aug 28 12:57:33 2006 +0000 +++ b/vehicle.c Mon Aug 28 18:53:03 2006 +0000 @@ -37,15 +37,15 @@ #define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6)) /* - * These command macros are used to call vehicle type specific commands with non type specific commands - * it should be used like: DoCommandP(x, y, p1, p2, flags, CMD_STARTSTOP_VEH(v->type)) - * that line will start/stop a vehicle nomatter what type it is - * VEH_Train is used as an offset because the vehicle type values doesn't start with 0 + * These command macros are used to call vehicle type specific commands with non type specific commands + * it should be used like: DoCommandP(x, y, p1, p2, flags, CMD_STARTSTOP_VEH(v->type)) + * that line will start/stop a vehicle nomatter what type it is + * VEH_Train is used as an offset because the vehicle type values doesn't start with 0 */ -#define CMD_BUILD_VEH(x) _veh_build_proc_table[ x - VEH_Train] -#define CMD_SELL_VEH(x) _veh_sell_proc_table[ x - VEH_Train] -#define CMD_REFIT_VEH(x) _veh_refit_proc_table[ x - VEH_Train] +#define CMD_BUILD_VEH(x) _veh_build_proc_table[ x - VEH_Train] +#define CMD_SELL_VEH(x) _veh_sell_proc_table [ x - VEH_Train] +#define CMD_REFIT_VEH(x) _veh_refit_proc_table[ x - VEH_Train] static const uint32 _veh_build_proc_table[] = { CMD_BUILD_RAIL_VEHICLE, @@ -314,7 +314,7 @@ /* We don't use FOR_ALL here, because FOR_ALL skips invalid items. * TODO - This is just a temporary stage, this will be removed. */ - if (*skip_vehicles < (_vehicle_pool.total_items - offset)) { // make sure the offset in the array is not larger than the array itself + if (*skip_vehicles < (_vehicle_pool.total_items - offset)) { // make sure the offset in the array is not larger than the array itself for (v = GetVehicle(offset + *skip_vehicles); v != NULL; v = (v->index + 1 < GetVehiclePoolSize()) ? GetVehicle(v->index + 1) : NULL) { (*skip_vehicles)++; if (!IsValidVehicle(v)) return InitializeVehicle(v); @@ -339,7 +339,7 @@ /** 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 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) { @@ -614,7 +614,7 @@ } #endif //ENABLE_NETWORK - _first_veh_in_depot_list = NULL; // now we are sure it's initialized at the start of each tick + _first_veh_in_depot_list = NULL; // now we are sure it's initialized at the start of each tick FOR_ALL_VEHICLES(v) { _vehicle_tick_procs[v->type - 0x10](v); @@ -624,7 +624,7 @@ v = _first_veh_in_depot_list; while (v != NULL) { Vehicle *w = v->depot_list; - v->depot_list = NULL; // it should always be NULL at the end of each tick + v->depot_list = NULL; // it should always be NULL at the end of each tick MaybeReplaceVehicle(v); v = w; } @@ -1591,7 +1591,7 @@ w->service_interval = v->service_interval; DoCommand(0, (v->index << 16) | w->index, p2 & 1 ? CO_SHARE : CO_COPY, flags, CMD_CLONE_ORDER); } - w_rear = w; // trains needs to know the last car in the train, so they can add more in next loop + w_rear = w; // trains needs to know the last car in the train, so they can add more in next loop } } while (v->type == VEH_Train && (v = GetNextVehicle(v)) != NULL); @@ -1613,10 +1613,10 @@ do { do { if (source->cargo_type != dest->cargo_type) - continue; // cargo not compatible + continue; // cargo not compatible if (dest->cargo_count == dest->cargo_cap) - continue; // the destination vehicle is already full + continue; // the destination vehicle is already full units_moved = min(source->cargo_count, dest->cargo_cap - dest->cargo_count); source->cargo_count -= units_moved; @@ -1660,7 +1660,7 @@ if (flags & DC_EXEC) { CargoID new_cargo_type = old_v->cargo_type; new_v = GetVehicle(_new_vehicle_id); - *w = new_v; //we changed the vehicle, so MaybeReplaceVehicle needs to work on the new one. Now we tell it what the new one is + *w = new_v; //we changed the vehicle, so MaybeReplaceVehicle needs to work on the new one. Now we tell it what the new one is /* refit if needed */ if (old_v->type == VEH_Train && old_v->cargo_cap == 0 && new_v->cargo_cap != 0) { @@ -1710,7 +1710,7 @@ new_v->profit_last_year = old_v->profit_last_year; new_v->service_interval = old_v->service_interval; new_front = true; - new_v->unitnumber = old_v->unitnumber; // use the same unit number + new_v->unitnumber = old_v->unitnumber; // use the same unit number new_v->current_order = old_v->current_order; if (old_v->type == VEH_Train && GetNextVehicle(old_v) != NULL){ @@ -1758,8 +1758,8 @@ /** replaces a vehicle if it's set for autoreplace or is too old * (used to be called autorenew) * @param v The vehicle to replace - * 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 + * if the vehicle is a train, v needs to be the front engine + * @return pointer to the new vehicle, which is the same as the argument if nothing happened */ static void MaybeReplaceVehicle(Vehicle *v) { @@ -1783,7 +1783,7 @@ assert(v->type == VEH_Train || v->type == VEH_Road || v->type == VEH_Ship || v->type == VEH_Aircraft); - assert(v->vehstatus & VS_STOPPED); // the vehicle should have been stopped in VehicleEnteredDepotThisTick() if needed + assert(v->vehstatus & VS_STOPPED); // the vehicle should have been stopped in VehicleEnteredDepotThisTick() if needed if (v->leave_depot_instantly) { // we stopped the vehicle to do this, so we have to remember to start it again when we are done @@ -1855,7 +1855,7 @@ } if (flags & DC_EXEC) { - break; // we are done replacing since the loop ran once with DC_EXEC + break; // we are done replacing since the loop ran once with DC_EXEC } // now we redo the loop, but this time we actually do stuff since we know that we can do it flags |= DC_EXEC; diff -r 2ee8e92ef389 -r 4175805666a5 vehicle.h --- a/vehicle.h Mon Aug 28 12:57:33 2006 +0000 +++ b/vehicle.h Mon Aug 28 18:53:03 2006 +0000 @@ -43,7 +43,7 @@ } EffectVehicle; typedef struct VehicleRail { - uint16 last_speed; // NOSAVE: only used in UI + uint16 last_speed; // NOSAVE: only used in UI uint16 crash_anim_pos; uint16 days_since_order_progr; diff -r 2ee8e92ef389 -r 4175805666a5 vehicle_gui.c --- a/vehicle_gui.c Mon Aug 28 12:57:33 2006 +0000 +++ b/vehicle_gui.c Mon Aug 28 18:53:03 2006 +0000 @@ -281,9 +281,9 @@ /* Variables you need to set before calling this function! -* 1. (byte)_internal_sort_type: sorting criteria to sort on -* 2. (bool)_internal_sort_order: sorting order, descending/ascending -* 3. (uint32)_internal_name_sorter_id: default StringID of the vehicle when no name is set. eg +* 1. (byte)_internal_sort_type: sorting criteria to sort on +* 2. (bool)_internal_sort_order: sorting order, descending/ascending +* 3. (uint32)_internal_name_sorter_id: default StringID of the vehicle when no name is set. eg * STR_SV_TRAIN_NAME for trains or STR_SV_AIRCRAFT_NAME for aircraft */ static int CDECL VehicleUnsortedSorter(const void *a, const void *b) @@ -325,7 +325,7 @@ } } - r = strcmp(buf1, _bufcache); // sort by name + r = strcmp(buf1, _bufcache); // sort by name VEHICLEUNITNUMBERSORTER(r, va, vb); @@ -464,8 +464,9 @@ #define ENGINE_AVAILABLE ((e->flags & 1 && HASBIT(info->climates, _opt.landscape)) || HASBIT(e->player_avail, _local_player)) /* 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 - * this was a big hack even before show_outdated was added. Stupid newgrf :p */ + * 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 + */ 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) { @@ -535,8 +536,8 @@ case VEH_Train: { RailType railtype = _railtype_selected_in_replace_gui; - w->widget[13].color = _player_colors[_local_player]; // sets the colour of that art thing - w->widget[16].color = _player_colors[_local_player]; // sets the colour of that art thing + w->widget[13].color = _player_colors[_local_player]; // sets the colour of that art thing + w->widget[16].color = _player_colors[_local_player]; // sets the colour of that art thing for (i = 0; i < NUM_TRAIN_ENGINES; i++) { EngineID eid = GetRailVehAtPosition(i); @@ -911,7 +912,7 @@ DrawString(145, 87 + w->resize.step_height * w->vscroll.cap, STR_02BD, 0x10); - /* now we draw the two arrays according to what we just counted */ + /* now we draw the two arrays according to what we just counted */ DrawEngineArrayInReplaceWindow(w, x, y, x2, y2, pos, pos2, sel[0], sel[1], selected_id[0], selected_id[1]); WP(w,replaceveh_d).sel_engine[0] = selected_id[0]; diff -r 2ee8e92ef389 -r 4175805666a5 vehicle_gui.h --- a/vehicle_gui.h Mon Aug 28 12:57:33 2006 +0000 +++ b/vehicle_gui.h Mon Aug 28 18:53:03 2006 +0000 @@ -24,8 +24,8 @@ extern const StringID _vehicle_sort_listing[]; typedef struct Listing { - bool order; // Ascending/descending? - byte criteria; // Sorting criteria + bool order; // Ascending/descending? + byte criteria; // Sorting criteria } Listing; typedef struct Sorting { diff -r 2ee8e92ef389 -r 4175805666a5 video/cocoa_v.m --- a/video/cocoa_v.m Mon Aug 28 12:57:33 2006 +0000 +++ b/video/cocoa_v.m Mon Aug 28 18:53:03 2006 +0000 @@ -1849,7 +1849,7 @@ QZ_AskQuit(); - return NSTerminateCancel; // NSTerminateLater ? + return NSTerminateCancel; // NSTerminateLater ? } @end diff -r 2ee8e92ef389 -r 4175805666a5 video/sdl_v.c --- a/video/sdl_v.c Mon Aug 28 12:57:33 2006 +0000 +++ b/video/sdl_v.c Mon Aug 28 18:53:03 2006 +0000 @@ -225,28 +225,28 @@ static const VkMapping _vk_mapping[] = { // Pageup stuff + up/down AM(SDLK_PAGEUP, SDLK_PAGEDOWN, WKC_PAGEUP, WKC_PAGEDOWN), - AS(SDLK_UP, WKC_UP), - AS(SDLK_DOWN, WKC_DOWN), - AS(SDLK_LEFT, WKC_LEFT), - AS(SDLK_RIGHT, WKC_RIGHT), + AS(SDLK_UP, WKC_UP), + AS(SDLK_DOWN, WKC_DOWN), + AS(SDLK_LEFT, WKC_LEFT), + AS(SDLK_RIGHT, WKC_RIGHT), - AS(SDLK_HOME, WKC_HOME), - AS(SDLK_END, WKC_END), + AS(SDLK_HOME, WKC_HOME), + AS(SDLK_END, WKC_END), - AS(SDLK_INSERT, WKC_INSERT), - AS(SDLK_DELETE, WKC_DELETE), + AS(SDLK_INSERT, WKC_INSERT), + AS(SDLK_DELETE, WKC_DELETE), // Map letters & digits AM(SDLK_a, SDLK_z, 'A', 'Z'), AM(SDLK_0, SDLK_9, '0', '9'), - AS(SDLK_ESCAPE, WKC_ESC), - AS(SDLK_PAUSE, WKC_PAUSE), - AS(SDLK_BACKSPACE, WKC_BACKSPACE), + AS(SDLK_ESCAPE, WKC_ESC), + AS(SDLK_PAUSE, WKC_PAUSE), + AS(SDLK_BACKSPACE, WKC_BACKSPACE), - AS(SDLK_SPACE, WKC_SPACE), - AS(SDLK_RETURN, WKC_RETURN), - AS(SDLK_TAB, WKC_TAB), + AS(SDLK_SPACE, WKC_SPACE), + AS(SDLK_RETURN, WKC_RETURN), + AS(SDLK_TAB, WKC_TAB), // Function keys AM(SDLK_F1, SDLK_F12, WKC_F1, WKC_F12), @@ -254,12 +254,12 @@ // Numeric part. // What is the virtual keycode for numeric enter?? AM(SDLK_KP0, SDLK_KP9, WKC_NUM_0, WKC_NUM_9), - AS(SDLK_KP_DIVIDE, WKC_NUM_DIV), - AS(SDLK_KP_MULTIPLY, WKC_NUM_MUL), - AS(SDLK_KP_MINUS, WKC_NUM_MINUS), - AS(SDLK_KP_PLUS, WKC_NUM_PLUS), - AS(SDLK_KP_ENTER, WKC_NUM_ENTER), - AS(SDLK_KP_PERIOD, WKC_NUM_DECIMAL) + AS(SDLK_KP_DIVIDE, WKC_NUM_DIV), + AS(SDLK_KP_MULTIPLY, WKC_NUM_MUL), + AS(SDLK_KP_MINUS, WKC_NUM_MINUS), + AS(SDLK_KP_PLUS, WKC_NUM_PLUS), + AS(SDLK_KP_ENTER, WKC_NUM_ENTER), + AS(SDLK_KP_PERIOD, WKC_NUM_DECIMAL) }; static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym) diff -r 2ee8e92ef389 -r 4175805666a5 video/win32_v.c --- a/video/win32_v.c Mon Aug 28 12:57:33 2006 +0000 +++ b/video/win32_v.c Mon Aug 28 18:53:03 2006 +0000 @@ -91,26 +91,26 @@ AM('A','Z','A','Z'), AM('0','9','0','9'), - AS(VK_ESCAPE, WKC_ESC), - AS(VK_PAUSE, WKC_PAUSE), - AS(VK_BACK, WKC_BACKSPACE), - AM(VK_INSERT,VK_DELETE,WKC_INSERT, WKC_DELETE), + AS(VK_ESCAPE, WKC_ESC), + AS(VK_PAUSE, WKC_PAUSE), + AS(VK_BACK, WKC_BACKSPACE), + AM(VK_INSERT, VK_DELETE, WKC_INSERT, WKC_DELETE), - AS(VK_SPACE, WKC_SPACE), - AS(VK_RETURN, WKC_RETURN), - AS(VK_TAB, WKC_TAB), + AS(VK_SPACE, WKC_SPACE), + AS(VK_RETURN, WKC_RETURN), + AS(VK_TAB, WKC_TAB), // Function keys - AM(VK_F1, VK_F12, WKC_F1, WKC_F12), + AM(VK_F1, VK_F12, WKC_F1, WKC_F12), // Numeric part. // What is the virtual keycode for numeric enter?? - AM(VK_NUMPAD0,VK_NUMPAD9, WKC_NUM_0, WKC_NUM_9), - AS(VK_DIVIDE, WKC_NUM_DIV), - AS(VK_MULTIPLY, WKC_NUM_MUL), - AS(VK_SUBTRACT, WKC_NUM_MINUS), - AS(VK_ADD, WKC_NUM_PLUS), - AS(VK_DECIMAL, WKC_NUM_DECIMAL) + AM(VK_NUMPAD0, VK_NUMPAD9, WKC_NUM_0, WKC_NUM_9), + AS(VK_DIVIDE, WKC_NUM_DIV), + AS(VK_MULTIPLY, WKC_NUM_MUL), + AS(VK_SUBTRACT, WKC_NUM_MINUS), + AS(VK_ADD, WKC_NUM_PLUS), + AS(VK_DECIMAL, WKC_NUM_DECIMAL) }; static uint MapWindowsKey(uint sym) diff -r 2ee8e92ef389 -r 4175805666a5 water_cmd.c --- a/water_cmd.c Mon Aug 28 12:57:33 2006 +0000 +++ b/water_cmd.c Mon Aug 28 18:53:03 2006 +0000 @@ -604,13 +604,13 @@ if (!(v->vehstatus & VS_CRASHED)) { uint16 pass = 0; - if (v->type == VEH_Road) { // flood bus/truck - pass = 1; // driver + if (v->type == VEH_Road) { // flood bus/truck + pass = 1; // driver if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count; v->vehstatus |= VS_CRASHED; - v->u.road.crashed_ctr = 2000; // max 2220, disappear pretty fast + v->u.road.crashed_ctr = 2000; // max 2220, disappear pretty fast RebuildVehicleLists(); } else if (v->type == VEH_Train) { Vehicle *u; diff -r 2ee8e92ef389 -r 4175805666a5 window.h --- a/window.h Mon Aug 28 12:57:33 2006 +0000 +++ b/window.h Mon Aug 28 18:53:03 2006 +0000 @@ -372,7 +372,7 @@ byte sel_index[2]; EngineID sel_engine[2]; uint16 count[2]; - bool wagon_btnstate; // true means engine is selected + bool wagon_btnstate; // true means engine is selected } replaceveh_d; assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(replaceveh_d)); @@ -554,9 +554,9 @@ WWT_MASK = 31, - WWT_PUSHTXTBTN = WWT_TEXTBTN | WWB_PUSHBUTTON, - WWT_PUSHIMGBTN = WWT_IMGBTN | WWB_PUSHBUTTON, - WWT_NODISTXTBTN = WWT_TEXTBTN | WWB_NODISBUTTON, + WWT_PUSHTXTBTN = WWT_TEXTBTN | WWB_PUSHBUTTON, + WWT_PUSHIMGBTN = WWT_IMGBTN | WWB_PUSHBUTTON, + WWT_NODISTXTBTN = WWT_TEXTBTN | WWB_NODISBUTTON, }; #define WIDGETS_END WWT_LAST, RESIZE_NONE, 0, 0, 0, 0, 0, 0, STR_NULL diff -r 2ee8e92ef389 -r 4175805666a5 yapf/autocopyptr.hpp --- a/yapf/autocopyptr.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/autocopyptr.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -19,7 +19,7 @@ protected: typedef Tdata_ Tdata; - struct CItem { + struct CItem { int m_ref_cnt; ///< reference counter Tdata m_data; ///< custom data itself diff -r 2ee8e92ef389 -r 4175805666a5 yapf/binaryheap.hpp --- a/yapf/binaryheap.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/binaryheap.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -142,7 +142,7 @@ child = gap * 2; } // move last item to the proper place - if (m_size > 0) m_items[gap] = &new_item; + if (m_size > 0) m_items[gap] = &new_item; CheckConsistency(); } diff -r 2ee8e92ef389 -r 4175805666a5 yapf/blob.hpp --- a/yapf/blob.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/blob.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -21,7 +21,7 @@ - no thread synchronization at all */ class CBlobBaseSimple { protected: - struct CHdr { + struct CHdr { int m_size; // actual blob size in bytes int m_max_size; // maximum (allocated) size in bytes }; @@ -66,7 +66,7 @@ assert(p != NULL); if (num_bytes > 0) { memcpy(GrowRawSize(num_bytes), p, num_bytes); - } else { + } else { assert(num_bytes >= 0); } } @@ -116,7 +116,7 @@ // ask allocation policy for some reasonable block size int alloc_size = AllocPolicy(min_alloc_size); // allocate new block - CHdr* pNewHdr = RawAlloc(alloc_size); + CHdr* pNewHdr = RawAlloc(alloc_size); // setup header pNewHdr->m_size = RawSize(); pNewHdr->m_max_size = alloc_size - (sizeof(CHdr) + Ttail_reserve); diff -r 2ee8e92ef389 -r 4175805666a5 yapf/countedptr.hpp --- a/yapf/countedptr.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/countedptr.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -74,7 +74,7 @@ FORCEINLINE bool operator == (const CCountedPtr& sp) const {return m_pT == sp.m_pT;} /** yet another way how to test for NULL value */ - FORCEINLINE bool operator != (const CCountedPtr& sp) const {return m_pT != sp.m_pT;} + FORCEINLINE bool operator != (const CCountedPtr& sp) const {return m_pT != sp.m_pT;} /** assign pointer w/o incrementing ref count */ FORCEINLINE void Attach(Tcls* pT) {Release(); m_pT = pT;} diff -r 2ee8e92ef389 -r 4175805666a5 yapf/crc32.hpp --- a/yapf/crc32.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/crc32.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -41,7 +41,7 @@ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, diff -r 2ee8e92ef389 -r 4175805666a5 yapf/yapf.hpp --- a/yapf/yapf.hpp Mon Aug 28 12:57:33 2006 +0000 +++ b/yapf/yapf.hpp Mon Aug 28 18:53:03 2006 +0000 @@ -77,7 +77,7 @@ { CPerformanceTimer* m_pperf; - FORCEINLINE CPerfStartReal(CPerformanceTimer& perf) : m_pperf(&perf) {if (m_pperf != NULL) m_pperf->Start();} + FORCEINLINE CPerfStartReal(CPerformanceTimer& perf) : m_pperf(&perf) {if (m_pperf != NULL) m_pperf->Start();} FORCEINLINE ~CPerfStartReal() {Stop();} FORCEINLINE void Stop() {if (m_pperf != NULL) {m_pperf->Stop(); m_pperf = NULL;}} };