summaryrefslogtreecommitdiff
path: root/music_gui.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 /music_gui.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 'music_gui.c')
-rw-r--r--music_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/music_gui.c b/music_gui.c
index 4cf254b43..81302355c 100644
--- a/music_gui.c
+++ b/music_gui.c
@@ -132,8 +132,8 @@ static void SelectSongToPlay(void)
i = 500;
do {
uint32 r = InteractiveRandom();
- byte *a = &_cur_playlist[r & 0x1F];
- byte *b = &_cur_playlist[(r >> 8)&0x1F];
+ byte *a = &_cur_playlist[GB(r, 0, 5)];
+ byte *b = &_cur_playlist[GB(r, 8, 5)];
if (*a != 0 && *b != 0) {
byte t = *a;