diff options
author | tron <tron@openttd.org> | 2005-11-16 13:11:28 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-16 13:11:28 +0000 |
commit | ef7fb8b515315d53582f64a6b46d04162a8e89a2 (patch) | |
tree | 658be9e3a7c385d16ddddacc093d3d9fe27855d0 /oldloader.c | |
parent | d09db07ca1a0b3a828eb57dd1cc11915d099f1de (diff) | |
download | openttd-ef7fb8b515315d53582f64a6b46d04162a8e89a2.tar.xz |
(svn r3205) Some more uses for GB/SB
Diffstat (limited to 'oldloader.c')
-rw-r--r-- | oldloader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oldloader.c b/oldloader.c index 214d0dddf..b11482891 100644 --- a/oldloader.c +++ b/oldloader.c @@ -193,7 +193,7 @@ static bool LoadChunk(LoadgameState *ls, void *base, const OldChunks *chunks) uint32 res = 0; /* Reading from the file: bit 16 to 23 have the FILE */ - switch (((chunk->type >> 16) & 0xFF) << 16) { + switch (GB(chunk->type, 16, 8) << 16) { case OC_FILE_I8: res = ReadByte(ls); res = (int8)res; @@ -234,7 +234,7 @@ static bool LoadChunk(LoadgameState *ls, void *base, const OldChunks *chunks) assert(base_ptr != NULL || chunk->ptr != NULL); /* Writing to the var: bit 8 till 15 have the VAR */ - switch (((chunk->type >> 8) & 0xFF) << 8) { + switch (GB(chunk->type, 8, 8) << 8) { case OC_VAR_I8: /* Write the data */ if (chunk->ptr != NULL) { |