diff options
author | tron <tron@openttd.org> | 2004-11-14 19:44:06 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-11-14 19:44:06 +0000 |
commit | 249a170acef352b40c7fa67fe65bdc62cbae4ff1 (patch) | |
tree | 42822c6c00e5ddf808a4b35810f9522ad3dcf5ed /saveload.c | |
parent | 200d3fdbe83717437d7dad0fb99b180c3ca103a7 (diff) | |
download | openttd-249a170acef352b40c7fa67fe65bdc62cbae4ff1.tar.xz |
(svn r607) -Patch: [ 985102 ] static cleanup
Thanks to lvoge
Diffstat (limited to 'saveload.c')
-rw-r--r-- | saveload.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/saveload.c b/saveload.c index e3efc54fd..6b0462019 100644 --- a/saveload.c +++ b/saveload.c @@ -113,38 +113,38 @@ void SlWriteByte(byte v) *_sl.bufp++ = v; } -int SlReadUint16() +static int SlReadUint16() { int x = SlReadByte() << 8; return x | SlReadByte(); } -uint32 SlReadUint32() +static uint32 SlReadUint32() { uint32 x = SlReadUint16() << 16; return x | SlReadUint16(); } -uint64 SlReadUint64() +static uint64 SlReadUint64() { uint32 x = SlReadUint32(); uint32 y = SlReadUint32(); return (uint64)x << 32 | y; } -void SlWriteUint16(uint16 v) +static void SlWriteUint16(uint16 v) { SlWriteByte((byte)(v >> 8)); SlWriteByte((byte)v); } -void SlWriteUint32(uint32 v) +static void SlWriteUint32(uint32 v) { SlWriteUint16((uint16)(v >> 16)); SlWriteUint16((uint16)v); } -void SlWriteUint64(uint64 x) +static void SlWriteUint64(uint64 x) { SlWriteUint32((uint32)(x >> 32)); SlWriteUint32((uint32)x); @@ -260,7 +260,7 @@ void SlSetLength(uint length) } } -void SlCopyBytes(void *ptr, size_t length) +static void SlCopyBytes(void *ptr, size_t length) { byte *p = (byte*)ptr; @@ -664,7 +664,7 @@ static void SlSaveChunk(const ChunkHandler *ch) } } -void SlSaveChunks() +static void SlSaveChunks() { const ChunkHandler *ch; const ChunkHandler * const * chsc; @@ -702,7 +702,7 @@ static const ChunkHandler *SlFindChunkHandler(uint32 id) return NULL; } -void SlLoadChunks() +static void SlLoadChunks() { uint32 id; const ChunkHandler *ch; @@ -953,7 +953,7 @@ static const ReferenceSetup _ref_setup[] = { {_towns,sizeof(_towns[0])}, }; -uint ReferenceToInt(void *v, uint t) +static uint ReferenceToInt(void *v, uint t) { if (v == NULL) return 0; return ((byte*)v - (byte*)_ref_setup[t].base) / _ref_setup[t].size + 1; |