aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-02-02 18:32:36 +0000
committerMax Horn2009-02-02 18:32:36 +0000
commitf969404ff5c0ce9b272d8390298c39f309958386 (patch)
treeb7597416994275a9ef591c14aad94ca548665e71 /engines
parentc59cff9bf3588d2c969a910774facd1fa9276cc0 (diff)
downloadscummvm-rg350-f969404ff5c0ce9b272d8390298c39f309958386.tar.gz
scummvm-rg350-f969404ff5c0ce9b272d8390298c39f309958386.tar.bz2
scummvm-rg350-f969404ff5c0ce9b272d8390298c39f309958386.zip
Fixed warning about implicit signed -> unsigned integer conversion
svn-id: r36200
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/music.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index fa1fb4926f..0fbd935507 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -41,11 +41,14 @@
#include "tinsel/handle.h"
#include "tinsel/sysvar.h"
-#define MUSIC_JUMP (-1)
-#define MUSIC_END (-2)
-#define BLMAGIC (-3458)
+enum {
+ MUSIC_JUMP = -1,
+ MUSIC_END = -2,
-#define DIM_SPEED 8
+ BLMAGIC = -3458,
+
+ DIM_SPEED = 8
+};
namespace Tinsel {
@@ -851,23 +854,16 @@ bool PCMMusicPlayer::getNextChunk() {
id = _scriptNum;
while (id--)
script = scriptBuffer + READ_LE_UINT32(script);
+ snum = FROM_LE_32(script[_scriptIndex]);
- switch (FROM_LE_32(script[_scriptIndex])) {
-
- case MUSIC_END:
+ if (snum == MUSIC_END) {
_state = S_END2;
- break;
+ } else {
+ if (snum == MUSIC_JUMP)
+ _scriptIndex = FROM_LE_32(script[++_scriptIndex]);
- case MUSIC_JUMP:
- _scriptIndex = FROM_LE_32(script[++_scriptIndex]);
- // Fall through
- default:
- if (_forcePlay)
- _state = S_NEW;
- else
- _state = S_NEXT;
+ _state = _forcePlay ? S_NEW : S_NEXT;
_forcePlay = false;
- break;
}
return true;