(svn r21932) -Document: some tidbits related to vehicles

This commit is contained in:
rubidium
2011-01-31 20:27:33 +00:00
parent 5a9183c6c5
commit c7939e8a63
6 changed files with 79 additions and 35 deletions

View File

@@ -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();

View File

@@ -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 */

View File

@@ -22,7 +22,7 @@
#include <map>
/*
/**
* Link front and rear multiheaded engines to each other
* This is done when loading a savegame
*/