summaryrefslogtreecommitdiff
path: root/strings.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-20 15:29:28 +0000
committertron <tron@openttd.org>2005-07-20 15:29:28 +0000
commitac66e3e28f35c6939d3af68d1f0e26eb9b34e377 (patch)
treea82679a91beaee405777f0f3c5e3c45814f1ea5d /strings.c
parentf432314fa907d4f3ee63537d399bad64a35033bd (diff)
downloadopenttd-ac66e3e28f35c6939d3af68d1f0e26eb9b34e377.tar.xz
(svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings.c b/strings.c
index e73969332..756290940 100644
--- a/strings.c
+++ b/strings.c
@@ -179,8 +179,8 @@ static const char *GetStringPtr(StringID string)
// should set those bits.
char *GetStringWithArgs(char *buffr, uint string, const int32 *argv)
{
- uint index = string & 0x7FF;
- uint tab = (string >> 11) & 0x1F;
+ uint index = GB(string, 0, 11);
+ uint tab = GB(string, 11, 5);
if (!(string & 0xFFFF)) {
error("!invalid string id 0 in GetString");