diff options
author | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
commit | 24c4d5b06d231785db01500360c26815d8fe4d15 (patch) | |
tree | 757477dbdc02025cc29690a4e66e40f872cab02b /src/oldloader.cpp | |
parent | 36bb92ae241403d61dc7a3e5a1696b615be61395 (diff) | |
download | openttd-24c4d5b06d231785db01500360c26815d8fe4d15.tar.xz |
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
Diffstat (limited to 'src/oldloader.cpp')
-rw-r--r-- | src/oldloader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp index 5082900c9..4ccfc8cd0 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -27,7 +27,7 @@ enum { OLD_MAP_SIZE = 256 * 256 }; -typedef struct LoadgameState { +struct LoadgameState { FILE *file; uint chunk_size; @@ -41,10 +41,10 @@ typedef struct LoadgameState { uint total_read; bool failed; -} LoadgameState; +}; /* OldChunk-Type */ -typedef enum OldChunkTypes { +enum OldChunkType { OC_SIMPLE = 0, OC_NULL = 1, OC_CHUNK = 2, @@ -78,20 +78,20 @@ typedef enum OldChunkTypes { OC_TILE = OC_VAR_U32 | OC_FILE_U16, OC_END = 0 ///< End of the whole chunk, all 32bits set to zero -} OldChunkType; +}; DECLARE_ENUM_AS_BIT_SET(OldChunkType); typedef bool OldChunkProc(LoadgameState *ls, int num); -typedef struct OldChunks { +struct OldChunks { OldChunkType type; ///< Type of field uint32 amount; ///< Amount of fields void *ptr; ///< Pointer where to save the data (may only be set if offset is 0) uint offset; ///< Offset from basepointer (may only be set if ptr is NULL) OldChunkProc *proc; ///< Pointer to function that is called with OC_CHUNK -} OldChunks; +}; /* If it fails, check lines above.. */ assert_compile(sizeof(TileIndex) == 4); |