diff options
author | Darkvater <Darkvater@openttd.org> | 2006-04-22 12:40:25 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-04-22 12:40:25 +0000 |
commit | 97ab1b2aa9e9df41649de9d754441f04693512ae (patch) | |
tree | 74322444c4e9068f80822e3a4837e1a345bcc6f1 /saveload.c | |
parent | 919e0b80a77fa86286b0c9e3b55177f2badb5f52 (diff) | |
download | openttd-97ab1b2aa9e9df41649de9d754441f04693512ae.tar.xz |
(svn r4524) - Codechange: Use GB() macros for getting the saveload file/memory types
Diffstat (limited to 'saveload.c')
-rw-r--r-- | saveload.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/saveload.c b/saveload.c index a29c3990f..0087db17e 100644 --- a/saveload.c +++ b/saveload.c @@ -101,7 +101,7 @@ static inline uint32 SlGetOffs(void) {return _sl.offs_base - (_sl.bufe - _sl.buf static inline byte SlCalcConvMemLen(VarType conv) { static const byte conv_mem_size[] = {1, 1, 1, 2, 2, 4, 4, 8, 8, 0}; - byte length = (conv >> 4) & 0xF; + byte length = GB(conv, 4, 4); assert(length < lengthof(conv_mem_size)); return conv_mem_size[length]; } @@ -113,7 +113,7 @@ static inline byte SlCalcConvMemLen(VarType conv) static inline byte SlCalcConvFileLen(VarType conv) { static const byte conv_file_size[] = {1, 1, 2, 2, 4, 4, 8, 8, 2}; - byte length = conv & 0xF; + byte length = GB(conv, 0, 4); assert(length < lengthof(conv_file_size)); return conv_file_size[length]; } |