diff options
author | tron <tron@openttd.org> | 2005-07-20 15:29:28 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-20 15:29:28 +0000 |
commit | ac66e3e28f35c6939d3af68d1f0e26eb9b34e377 (patch) | |
tree | a82679a91beaee405777f0f3c5e3c45814f1ea5d /strings.c | |
parent | f432314fa907d4f3ee63537d399bad64a35033bd (diff) | |
download | openttd-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); |