diff options
author | rubidium <rubidium@openttd.org> | 2009-03-15 00:32:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-15 00:32:18 +0000 |
commit | b25a4f8231f3ded44038ea454a3d4c6a2dc9217d (patch) | |
tree | 776122508c686680b9c97f37ba3cb92ef905d67f /src/saveload | |
parent | d72273d1f3b55df0e301408d630f24ef92ea8479 (diff) | |
download | openttd-b25a4f8231f3ded44038ea454a3d4c6a2dc9217d.tar.xz |
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 12 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 30 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 4 | ||||
-rw-r--r-- | src/saveload/saveload.h | 2 | ||||
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 12 |
5 files changed, 30 insertions, 30 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index eca68c5fd..44fd9f01c 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -752,7 +752,7 @@ bool AfterLoadGame() switch (GetTileType(t)) { case MP_ROAD: if (fix_roadtypes) SetRoadTypes(t, (RoadTypes)GB(_me[t].m7, 5, 3)); - SB(_me[t].m7, 5, 1, GB(_m[t].m3, 7, 1)); //snow/desert + SB(_me[t].m7, 5, 1, GB(_m[t].m3, 7, 1)); // snow/desert switch (GetRoadTileType(t)) { default: NOT_REACHED(); case ROAD_TILE_NORMAL: @@ -1009,7 +1009,7 @@ bool AfterLoadGame() } break; - case MP_STATION: /* Clear PBS reservation on station */ + case MP_STATION: // Clear PBS reservation on station ClrBit(_m[t].m3, 6); break; @@ -1182,7 +1182,7 @@ bool AfterLoadGame() SetIndustryAnimationState(t, _m[t].m1); break; - default: /* No animation states to change */ + default: // No animation states to change break; } } @@ -1649,15 +1649,15 @@ bool AfterLoadGame() } break; - case MP_ROAD: /* Clear PBS reservation on crossing */ + case MP_ROAD: // Clear PBS reservation on crossing if (IsLevelCrossing(t)) SetCrossingReservation(t, false); break; - case MP_STATION: /* Clear PBS reservation on station */ + case MP_STATION: // Clear PBS reservation on station if (IsRailwayStation(t)) SetRailwayStationReservation(t, false); break; - case MP_TUNNELBRIDGE: /* Clear PBS reservation on tunnels/birdges */ + case MP_TUNNELBRIDGE: // Clear PBS reservation on tunnels/birdges if (GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL) SetTunnelBridgeReservation(t, false); break; diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 92f0fbe04..3b0bf185c 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1260,14 +1260,14 @@ bool LoadOldVehicle(LoadgameState *ls, int num) uint type = ReadByte(ls); switch (type) { default: return false; - case 0x00 /*VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; - case 0x25 /* MONORAIL */: - case 0x20 /*VEH_TRAIN */: v = new (_current_vehicle_id) Train(); break; - case 0x21 /*VEH_ROAD */: v = new (_current_vehicle_id) RoadVehicle(); break; - case 0x22 /*VEH_SHIP */: v = new (_current_vehicle_id) Ship(); break; - case 0x23 /*VEH_AIRCRAFT*/: v = new (_current_vehicle_id) Aircraft(); break; - case 0x24 /*VEH_EFFECT */: v = new (_current_vehicle_id) EffectVehicle(); break; - case 0x26 /*VEH_DISASTER*/: v = new (_current_vehicle_id) DisasterVehicle(); break; + case 0x00 /* VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; + case 0x25 /* MONORAIL */: + case 0x20 /* VEH_TRAIN */: v = new (_current_vehicle_id) Train(); break; + case 0x21 /* VEH_ROAD */: v = new (_current_vehicle_id) RoadVehicle(); break; + case 0x22 /* VEH_SHIP */: v = new (_current_vehicle_id) Ship(); break; + case 0x23 /* VEH_AIRCRAFT */: v = new (_current_vehicle_id) Aircraft(); break; + case 0x24 /* VEH_EFFECT */: v = new (_current_vehicle_id) EffectVehicle(); break; + case 0x26 /* VEH_DISASTER */: v = new (_current_vehicle_id) DisasterVehicle(); break; } if (!LoadChunk(ls, v, vehicle_chunk)) return false; @@ -1336,13 +1336,13 @@ bool LoadOldVehicle(LoadgameState *ls, int num) /* Read the vehicle type and allocate the right vehicle */ switch (ReadByte(ls)) { default: NOT_REACHED(); - case 0x00 /*VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; - case 0x10 /*VEH_TRAIN */: v = new (_current_vehicle_id) Train(); break; - case 0x11 /*VEH_ROAD */: v = new (_current_vehicle_id) RoadVehicle(); break; - case 0x12 /*VEH_SHIP */: v = new (_current_vehicle_id) Ship(); break; - case 0x13 /*VEH_AIRCRAFT*/: v = new (_current_vehicle_id) Aircraft(); break; - case 0x14 /*VEH_EFFECT */: v = new (_current_vehicle_id) EffectVehicle(); break; - case 0x15 /*VEH_DISASTER*/: v = new (_current_vehicle_id) DisasterVehicle(); break; + case 0x00 /* VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; + case 0x10 /* VEH_TRAIN */: v = new (_current_vehicle_id) Train(); break; + case 0x11 /* VEH_ROAD */: v = new (_current_vehicle_id) RoadVehicle(); break; + case 0x12 /* VEH_SHIP */: v = new (_current_vehicle_id) Ship(); break; + case 0x13 /* VEH_AIRCRAFT*/: v = new (_current_vehicle_id) Aircraft(); break; + case 0x14 /* VEH_EFFECT */: v = new (_current_vehicle_id) EffectVehicle(); break; + case 0x15 /* VEH_DISASTER*/: v = new (_current_vehicle_id) DisasterVehicle(); break; } if (!LoadChunk(ls, v, vehicle_chunk)) return false; diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index f904d45d1..04b6499e7 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1710,7 +1710,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb) /* General tactic is to first save the game to memory, then use an available writer * to write it to file, either in threaded mode if possible, or single-threaded */ - if (mode == SL_SAVE) { /* SAVE game */ + if (mode == SL_SAVE) { // SAVE game DEBUG(desync, 1, "save: %s\n", filename); fmt = GetSavegameFormat("memory"); // write to memory @@ -1737,7 +1737,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb) return result; } - } else { /* LOAD game */ + } else { // LOAD game assert(mode == SL_LOAD); DEBUG(desync, 1, "load: %s\n", filename); diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index cdfb275a8..38d95db29 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -178,7 +178,7 @@ enum SaveLoadTypes { SL_ARR = 2, SL_STR = 3, SL_LST = 4, - // non-normal save-load types + /* non-normal save-load types */ SL_WRITEBYTE = 8, SL_VEH_INCLUDE = 9, SL_END = 15 diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 2b5bc94dc..4d55a56a6 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -117,26 +117,26 @@ void ConvertOldMultiheadToNew() ClrBit(u->subtype, 7); switch (u->subtype) { - case 0: /* TS_Front_Engine */ + case 0: // TS_Front_Engine if (rvi->railveh_type == RAILVEH_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->railveh_type == RAILVEH_WAGON) { - // normal wagon + /* normal wagon */ SetTrainWagon(u); break; } if (rvi->railveh_type == RAILVEH_MULTIHEAD && rvi->image_index == u->spritenum - 1) { - // rear end of a multiheaded engine + /* rear end of a multiheaded engine */ SetMultiheaded(u); break; } @@ -144,7 +144,7 @@ void ConvertOldMultiheadToNew() SetTrainEngine(u); break; - case 4: /* TS_Free_Car */ + case 4: // TS_Free_Car u->subtype = 0; SetTrainWagon(u); SetFreeWagon(u); |