76 OC_UINT32 = OC_VAR_U32 | OC_FILE_U32, |
76 OC_UINT32 = OC_VAR_U32 | OC_FILE_U32, |
77 |
77 |
78 OC_TILE = OC_VAR_U32 | OC_FILE_U16, |
78 OC_TILE = OC_VAR_U32 | OC_FILE_U16, |
79 |
79 |
80 OC_END = 0 ///< End of the whole chunk, all 32bits set to zero |
80 OC_END = 0 ///< End of the whole chunk, all 32bits set to zero |
81 } OldChunkType; |
81 }; |
82 |
82 |
83 DECLARE_ENUM_AS_BIT_SET(OldChunkType); |
83 DECLARE_ENUM_AS_BIT_SET(OldChunkType); |
84 |
84 |
85 typedef bool OldChunkProc(LoadgameState *ls, int num); |
85 typedef bool OldChunkProc(LoadgameState *ls, int num); |
86 |
86 |
87 typedef struct OldChunks { |
87 struct OldChunks { |
88 OldChunkType type; ///< Type of field |
88 OldChunkType type; ///< Type of field |
89 uint32 amount; ///< Amount of fields |
89 uint32 amount; ///< Amount of fields |
90 |
90 |
91 void *ptr; ///< Pointer where to save the data (may only be set if offset is 0) |
91 void *ptr; ///< Pointer where to save the data (may only be set if offset is 0) |
92 uint offset; ///< Offset from basepointer (may only be set if ptr is NULL) |
92 uint offset; ///< Offset from basepointer (may only be set if ptr is NULL) |
93 OldChunkProc *proc; ///< Pointer to function that is called with OC_CHUNK |
93 OldChunkProc *proc; ///< Pointer to function that is called with OC_CHUNK |
94 } OldChunks; |
94 }; |
95 |
95 |
96 /* If it fails, check lines above.. */ |
96 /* If it fails, check lines above.. */ |
97 assert_compile(sizeof(TileIndex) == 4); |
97 assert_compile(sizeof(TileIndex) == 4); |
98 |
98 |
99 static uint32 _bump_assert_value; |
99 static uint32 _bump_assert_value; |