From 24c4d5b06d231785db01500360c26815d8fe4d15 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 7 Mar 2007 12:11:48 +0000 Subject: (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; --- src/oldloader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/oldloader.cpp') 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); -- cgit v1.2.3-54-g00ecf