summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-05-01 19:51:52 +0000
committerrubidium <rubidium@openttd.org>2011-05-01 19:51:52 +0000
commit5a620d1c6592057b500f0889eef8949dc1e95e4b (patch)
treedabae6247490fdea860bea292bb8eee49ce46fe4 /src/saveload
parent1a515e6344028854c855671c19f49d8f869eb18f (diff)
downloadopenttd-5a620d1c6592057b500f0889eef8949dc1e95e4b.tar.xz
(svn r22406) -Document: some more "random-ish" tidbits
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/cargopacket_sl.cpp10
-rw-r--r--src/saveload/cheat_sl.cpp7
-rw-r--r--src/saveload/signs_sl.cpp2
-rw-r--r--src/saveload/strings_sl.cpp4
4 files changed, 23 insertions, 0 deletions
diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp
index eafe5346b..e36cede7c 100644
--- a/src/saveload/cargopacket_sl.cpp
+++ b/src/saveload/cargopacket_sl.cpp
@@ -15,6 +15,9 @@
#include "saveload.h"
+/**
+ * Savegame conversion for cargopackets.
+ */
/* static */ void CargoPacket::AfterLoad()
{
if (IsSavegameVersionBefore(44)) {
@@ -101,6 +104,9 @@ const SaveLoad *GetCargoPacketDesc()
return _cargopacket_desc;
}
+/**
+ * Save the cargo packets.
+ */
static void Save_CAPA()
{
CargoPacket *cp;
@@ -111,6 +117,9 @@ static void Save_CAPA()
}
}
+/**
+ * Load the cargo packets.
+ */
static void Load_CAPA()
{
int index;
@@ -121,6 +130,7 @@ static void Load_CAPA()
}
}
+/** Chunk handlers related to cargo packets. */
extern const ChunkHandler _cargopacket_chunk_handlers[] = {
{ 'CAPA', Save_CAPA, Load_CAPA, NULL, NULL, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/cheat_sl.cpp b/src/saveload/cheat_sl.cpp
index 3908e6a71..724c945df 100644
--- a/src/saveload/cheat_sl.cpp
+++ b/src/saveload/cheat_sl.cpp
@@ -14,6 +14,9 @@
#include "saveload.h"
+/**
+ * Save the cheat values.
+ */
static void Save_CHTS()
{
/* Cannot use lengthof because _cheats is of type Cheats, not Cheat */
@@ -28,6 +31,9 @@ static void Save_CHTS()
}
}
+/**
+ * Load the cheat values.
+ */
static void Load_CHTS()
{
Cheat *cht = (Cheat*)&_cheats;
@@ -39,6 +45,7 @@ static void Load_CHTS()
}
}
+/** Chunk handlers related to cheats. */
extern const ChunkHandler _cheat_chunk_handlers[] = {
{ 'CHTS', Save_CHTS, Load_CHTS, NULL, NULL, CH_RIFF | CH_LAST},
};
diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp
index 8aeceddc7..4d98fad81 100644
--- a/src/saveload/signs_sl.cpp
+++ b/src/saveload/signs_sl.cpp
@@ -14,6 +14,7 @@
#include "saveload.h"
+/** Description of a sign within the savegame. */
static const SaveLoad _sign_desc[] = {
SLE_CONDVAR(Sign, name, SLE_NAME, 0, 83),
SLE_CONDSTR(Sign, name, SLE_STR, 0, 84, SL_MAX_VERSION),
@@ -56,6 +57,7 @@ static void Load_SIGN()
}
}
+/** Chunk handlers related to signs. */
extern const ChunkHandler _sign_chunk_handlers[] = {
{ 'SIGN', Save_SIGN, Load_SIGN, NULL, NULL, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp
index beb39e965..07a8ddd9f 100644
--- a/src/saveload/strings_sl.cpp
+++ b/src/saveload/strings_sl.cpp
@@ -115,6 +115,9 @@ void InitializeOldNames()
_old_name_array = CallocT<char>(512 * 32); // 200 * 24 would be enough for TTO savegames
}
+/**
+ * Load the NAME chunk.
+ */
static void Load_NAME()
{
int index;
@@ -124,6 +127,7 @@ static void Load_NAME()
}
}
+/** Chunk handlers related to strings. */
extern const ChunkHandler _name_chunk_handlers[] = {
{ 'NAME', NULL, Load_NAME, NULL, NULL, CH_ARRAY | CH_LAST},
};