From 67a5cd0b185158ca4926c8cb45f1735a1001e00b Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 31 Jan 2011 20:27:33 +0000 Subject: (svn r21932) -Document: some tidbits related to vehicles --- src/saveload/afterload.cpp | 5 +++++ src/saveload/oldloader_sl.cpp | 11 +++++++++++ src/saveload/vehicle_sl.cpp | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 679b0244f..35a5579ba 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -473,6 +473,11 @@ static uint FixVehicleInclination(Vehicle *v, Direction dir) return 1U << GVF_GOINGUP_BIT; } +/** + * Perform a (large) amount of savegame conversion *magic* in order to + * load older savegames and to fill the caches for various purposes. + * @return True iff conversion went without a problem. + */ bool AfterLoadGame() { SetSignalHandlers(); diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index f6572cd8f..e846c1ce5 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -163,6 +163,11 @@ static void FixOldTowns() static StringID *_old_vehicle_names; +/** + * Convert the old style vehicles into something that resembles + * the old new style savegames. Then #AfterLoadGame can handle + * the rest of the conversion. + */ void FixOldVehicles() { Vehicle *v; @@ -1212,6 +1217,12 @@ static const OldChunks vehicle_chunk[] = { OCL_END() }; +/** + * Load the vehicles of an old style savegame. + * @param ls State (buffer) of the currently loaded game. + * @param num The number of vehicles to load. + * @return True iff loading went without problems. + */ bool LoadOldVehicle(LoadgameState *ls, int num) { /* Read the TTDPatch flags, because we need some info from it */ diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 61dece380..8abcb916b 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -22,7 +22,7 @@ #include -/* +/** * Link front and rear multiheaded engines to each other * This is done when loading a savegame */ -- cgit v1.2.3-54-g00ecf