[Scummvm-cvs-logs] SF.net SVN: scummvm:[36200] scummvm/trunk/engines/tinsel/music.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Feb 2 19:32:36 CET 2009
Revision: 36200
http://scummvm.svn.sourceforge.net/scummvm/?rev=36200&view=rev
Author: fingolfin
Date: 2009-02-02 18:32:36 +0000 (Mon, 02 Feb 2009)
Log Message:
-----------
Fixed warning about implicit signed -> unsigned integer conversion
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/music.cpp
Modified: scummvm/trunk/engines/tinsel/music.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/music.cpp 2009-02-02 15:40:11 UTC (rev 36199)
+++ scummvm/trunk/engines/tinsel/music.cpp 2009-02-02 18:32:36 UTC (rev 36200)
@@ -41,12 +41,15 @@
#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 {
//--------------------------- Midi data -------------------------------------
@@ -851,23 +854,16 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list