mirror of https://github.com/OpenTTD/OpenTTD
Codechange: remove unneeded dereference chunk type flag
parent
266b733095
commit
87e228b8b5
|
@ -129,7 +129,6 @@ bool LoadChunk(LoadgameState *ls, void *base, const OldChunks *chunks)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t *ptr = (uint8_t*)chunk->ptr;
|
uint8_t *ptr = (uint8_t*)chunk->ptr;
|
||||||
if (chunk->type & OC_DEREFERENCE_POINTER) ptr = *(uint8_t**)ptr;
|
|
||||||
|
|
||||||
for (uint i = 0; i < chunk->amount; i++) {
|
for (uint i = 0; i < chunk->amount; i++) {
|
||||||
/* Handle simple types */
|
/* Handle simple types */
|
||||||
|
|
|
@ -70,12 +70,6 @@ enum OldChunkType : uint32_t {
|
||||||
|
|
||||||
OC_TILE = OC_VAR_U32 | OC_FILE_U16,
|
OC_TILE = OC_VAR_U32 | OC_FILE_U16,
|
||||||
|
|
||||||
/**
|
|
||||||
* Dereference the pointer once before writing to it,
|
|
||||||
* so we do not have to use big static arrays.
|
|
||||||
*/
|
|
||||||
OC_DEREFERENCE_POINTER = 1U << 31,
|
|
||||||
|
|
||||||
OC_END = 0, ///< End of the whole chunk, all 32 bits set to zero
|
OC_END = 0, ///< End of the whole chunk, all 32 bits set to zero
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue