From ef7fb8b515315d53582f64a6b46d04162a8e89a2 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 16 Nov 2005 13:11:28 +0000 Subject: (svn r3205) Some more uses for GB/SB --- oldloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oldloader.c') 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) { -- cgit v1.2.3-54-g00ecf