From ac66e3e28f35c6939d3af68d1f0e26eb9b34e377 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 20 Jul 2005 15:29:28 +0000 Subject: (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read --- music_gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'music_gui.c') 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; -- cgit v1.2.3-70-g09d2