Added a new '-t' commandline option to set TEMPO_BASE (note: In decimal, not hex.. should fix).
svn-id: r3641
This commit is contained in:
parent
ddad6760a5
commit
945d81761b
3 changed files with 17 additions and 7 deletions
1
scumm.h
1
scumm.h
|
@ -800,6 +800,7 @@ struct Scumm {
|
||||||
ScummDebugger *_debugger;
|
ScummDebugger *_debugger;
|
||||||
void *_gui; /* actually a pointer to a Gui */
|
void *_gui; /* actually a pointer to a Gui */
|
||||||
|
|
||||||
|
int _gameTempo;
|
||||||
int _lastLoadedRoom;
|
int _lastLoadedRoom;
|
||||||
int _roomResource;
|
int _roomResource;
|
||||||
byte _encbyte;
|
byte _encbyte;
|
||||||
|
|
|
@ -195,6 +195,7 @@ void Scumm::scummMain(int argc, char **argv) {
|
||||||
_minHeapThreshold = 400000;
|
_minHeapThreshold = 400000;
|
||||||
|
|
||||||
_gameDataPath = NULL;
|
_gameDataPath = NULL;
|
||||||
|
_gameTempo = 0;
|
||||||
|
|
||||||
parseCommandLine(argc, argv);
|
parseCommandLine(argc, argv);
|
||||||
|
|
||||||
|
@ -413,6 +414,9 @@ void Scumm::parseCommandLine(int argc, char **argv) {
|
||||||
case 'p':
|
case 'p':
|
||||||
_gameDataPath = argv[++i];
|
_gameDataPath = argv[++i];
|
||||||
break;
|
break;
|
||||||
|
case 't':
|
||||||
|
_gameTempo = atoi(s+1);
|
||||||
|
goto NextArg;
|
||||||
default:
|
default:
|
||||||
ShowHelpAndExit:;
|
ShowHelpAndExit:;
|
||||||
printf(
|
printf(
|
||||||
|
@ -421,6 +425,7 @@ ShowHelpAndExit:;
|
||||||
"\tscummvm [-b<num>] [-p path] game\n"
|
"\tscummvm [-b<num>] [-p path] game\n"
|
||||||
"Flags:\n"
|
"Flags:\n"
|
||||||
"\tb<num> - start in that room\n"
|
"\tb<num> - start in that room\n"
|
||||||
|
"\tt<num> - Set music tempo. Suggested: 1F0000\n"
|
||||||
"\tf - fullscreen mode\n");
|
"\tf - fullscreen mode\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1059,8 +1059,12 @@ int Player::start_seq_sound(int sound) {
|
||||||
|
|
||||||
void Player::set_tempo(uint32 b) {
|
void Player::set_tempo(uint32 b) {
|
||||||
uint32 i,j;
|
uint32 i,j;
|
||||||
|
printf("is: %d\n", _se->_s->_gameTempo);
|
||||||
|
if (_se->_s->_gameTempo < 1000)
|
||||||
i = TEMPO_BASE;
|
i = TEMPO_BASE;
|
||||||
|
else
|
||||||
|
i = _se->_s->_gameTempo;
|
||||||
|
printf("Tempo set to: %d\n", i);
|
||||||
j = _tempo = b;
|
j = _tempo = b;
|
||||||
|
|
||||||
while (i&0xFFFF0000 || j&0xFFFF0000) { i>>=1; j>>=1; }
|
while (i&0xFFFF0000 || j&0xFFFF0000) { i>>=1; j>>=1; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue