diff options
author | Paweł Kołodziejski | 2004-01-12 07:48:39 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-01-12 07:48:39 +0000 |
commit | 441fc1a0d7e2244fa98875fdd18eb2afaf37dfab (patch) | |
tree | 33383cb5936d7cca2270d391be8445541c0a354e /scumm/imuse_digi | |
parent | 14eeb574d3eb0a2ad236eeb43fdeeadcba41cd1f (diff) | |
download | scummvm-rg350-441fc1a0d7e2244fa98875fdd18eb2afaf37dfab.tar.gz scummvm-rg350-441fc1a0d7e2244fa98875fdd18eb2afaf37dfab.tar.bz2 scummvm-rg350-441fc1a0d7e2244fa98875fdd18eb2afaf37dfab.zip |
some changes to ft music sequences
svn-id: r12332
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r-- | scumm/imuse_digi/dimuse.cpp | 53 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse.h | 5 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_tables.cpp | 412 |
3 files changed, 338 insertions, 132 deletions
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp index 7c4fd3f436..e41e5197e8 100644 --- a/scumm/imuse_digi/dimuse.cpp +++ b/scumm/imuse_digi/dimuse.cpp @@ -193,8 +193,16 @@ void IMuseDigital::callback() { void IMuseDigital::switchToNextRegion(int track) { int num_regions = _sound->getNumRegions(_track[track].soundHandle); int num_jumps = _sound->getNumJumps(_track[track].soundHandle); - if ((_vm->_gameId == GID_FT) && (num_jumps != 0)) { - _track[track].regionOffset = 0; + if (_vm->_gameId == GID_FT) { + if (_track[track].curRegion == -1) { + _track[track].curRegion = 0; + _track[track].regionOffset = 0; + return; + } + if (num_jumps != 0) + _track[track].regionOffset = 0; + else + _track[track].toBeRemoved = true; return; } @@ -508,19 +516,15 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int } } } else if (_vm->_gameId == GID_FT) { - for (l = 0;; l++) { - if (_ftStateMusicTable[l].index == -1) { - return; - } - if (_ftStateMusicTable[l].index == b) { - debug(5, "Play imuse music: %s, %s", _ftStateMusicTable[l].name, _ftStateMusicTable[l].audioname); - if (_ftStateMusicTable[l].audioname[0] != 0) { - for (r = 0; r < _vm->_numAudioNames; r++) { - if (strcmp(_ftStateMusicTable[l].audioname, &_vm->_audioNames[r * 9]) == 0) { - startMusic(r); - parseScriptCmds(12, r, 0x600, _ftStateMusicTable[l].volume, 0, 0, 0, 0); - } - } + if (b > 48) + return; + b--; + debug(5, "Play imuse music: %s, %s", _ftStateMusicTable[b].name, _ftStateMusicTable[b].audioname); + if (_ftStateMusicTable[b].audioname[0] != 0) { + for (r = 0; r < _vm->_numAudioNames; r++) { + if (strcmp(_ftStateMusicTable[b].audioname, &_vm->_audioNames[r * 9]) == 0) { + startMusic(r); + parseScriptCmds(12, r, 0x600, _ftStateMusicTable[b].volume, 0, 0, 0, 0); } } } @@ -549,16 +553,15 @@ void IMuseDigital::parseScriptCmds(int a, int b, int c, int d, int e, int f, int } } } else if (_vm->_gameId == GID_FT) { - for (l = 0; _ftSeqMusicTable[l].index != -1; l++) { - if (_ftSeqMusicTable[l].index == b) { - debug(5, "Play imuse music: %s, %s", _ftSeqMusicTable[l].name, _ftSeqMusicTable[l].audioname); - if (_ftSeqMusicTable[l].audioname[0] != 0) { - for (r = 0; r < _vm->_numAudioNames; r++) { - if (strcmp(_ftSeqMusicTable[l].audioname, &_vm->_audioNames[r * 9]) == 0) { -// startMusic(r); -// parseScriptCmds(12, r, 0x600, _ftSeqMusicTable[l].volume, 0, 0, 0, 0); - } - } + if (b > 53) + return; + b--; + debug(5, "Play imuse sequence: %s, %s", _ftSeqMusicTable[b * 4].name, _ftSeqMusicTable[b * 4].audioname); + if (_ftSeqMusicTable[b * 4].audioname[0] != 0) { + for (r = 0; r < _vm->_numAudioNames; r++) { + if (strcmp(_ftStateMusicTable[b * 4].audioname, &_vm->_audioNames[r * 9]) == 0) { + startMusic(r); + parseScriptCmds(12, r, 0x600, _ftStateMusicTable[b * 4].volume, 0, 0, 0, 0); } } } diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h index c38f25b12a..f1223bed7a 100644 --- a/scumm/imuse_digi/dimuse.h +++ b/scumm/imuse_digi/dimuse.h @@ -137,10 +137,9 @@ struct imuse_music_map { }; struct imuse_ft_music_table { - int index; char audioname[15]; - int unk1; - int volume; + int8 opcode; + int8 volume; char name[30]; }; diff --git a/scumm/imuse_digi/dimuse_tables.cpp b/scumm/imuse_digi/dimuse_tables.cpp index 94dab0964a..9c2184a10b 100644 --- a/scumm/imuse_digi/dimuse_tables.cpp +++ b/scumm/imuse_digi/dimuse_tables.cpp @@ -480,113 +480,317 @@ const imuse_music_table _comiSeqMusicTable[] = { }; const imuse_ft_music_table _ftStateMusicTable[] = { - {0, "", 0, 0, "STATE_NULL" }, - {1, "", 4, 127, "stateKstandOutside" }, - {2, "kinside", 2, 127, "stateKstandInside" }, - {3, "moshop", 3, 64, "stateMoesInside" }, - {4, "melcut", 2, 127, "stateMoesOutside" }, - {5, "mellover", 2, 127, "stateMellonAbove" }, - {6, "radloop", 3, 28, "stateTrailerOutside" }, - {7, "radloop", 3, 58, "stateTrailerInside" }, - {8, "radloop", 3, 127, "stateTodShop" }, - {9, "junkgate", 2, 127, "stateJunkGate" }, - {10, "junkover", 3, 127, "stateJunkAbove" }, - {11, "gastower", 2, 127, "stateGasTower" }, - {12, "", 4, 0, "stateTowerAlarm" }, - {13, "melcut", 2, 127, "stateCopsOnGround" }, - {14, "melcut", 2, 127, "stateCopsAround" }, - {15, "melcut", 2, 127, "stateMoesRuins" }, - {16, "melcut", 2, 127, "stateKstandNight" }, - {17, "trukblu2", 2, 127, "stateTruckerTalk" }, - {18, "stretch", 2, 127, "stateMumblyPeg" }, - {19, "kstand", 2, 100, "stateRanchOutside" }, - {20, "kinside", 2, 127, "stateRanchInside" }, - {21, "desert", 2, 127, "stateWreckedTruck" }, - {22, "opening", 2, 100, "stateGorgeVista" }, - {23, "caveopen", 2, 127, "stateCaveOpen" }, - {24, "cavecut1", 2, 127, "stateCaveOuter" }, - {25, "cavecut1", 1, 127, "stateCaveMiddle" }, - {26, "cave", 2, 127, "stateCaveInner" }, - {27, "corville", 2, 127, "stateCorvilleFront" }, - {28, "mines", 2, 127, "stateMineField" }, - {29, "bunyman3", 2, 127, "stateBunnyStore" }, - {30, "stretch", 2, 127, "stateStretchBen" }, - {31, "saveme", 2, 127, "stateBenPleas" }, - {32, "", 4, 0, "stateBenConvinces" }, - {33, "derby", 3, 127, "stateDemoDerby" }, - {34, "fire", 3, 127, "stateLightMyFire" }, - {35, "derby", 3, 127, "stateDerbyChase" }, - {36, "carparts", 2, 127, "stateVultureCarParts"}, - {37, "cavecut1", 2, 127, "stateVulturesInside" }, - {38, "mines", 2, 127, "stateFactoryRear" }, - {39, "croffice", 2, 127, "stateCorleyOffice" }, - {40, "melcut", 2, 127, "stateCorleyHall" }, - {41, "", 4, 0, "stateProjRoom" }, - {42, "", 4, 0, "stateMMRoom" }, - {43, "bumper", 2, 127, "stateBenOnBumper" }, - {44, "benump", 2, 127, "stateBenOnBack" }, - {45, "plane", 2, 127, "stateInCargoPlane" }, - {46, "saveme", 2, 127, "statePlaneControls" }, - {47, "", 4, 0, "stateCliffHanger1" }, - {48, "", 4, 0, "stateCliffHanger2" }, - {-1, "", 0, 0, "" } + {"", 0, 0, "STATE_NULL" }, + {"", 4, 127, "stateKstandOutside" }, + {"kinside", 2, 127, "stateKstandInside" }, + {"moshop", 3, 64, "stateMoesInside" }, + {"melcut", 2, 127, "stateMoesOutside" }, + {"mellover", 2, 127, "stateMellonAbove" }, + {"radloop", 3, 28, "stateTrailerOutside" }, + {"radloop", 3, 58, "stateTrailerInside" }, + {"radloop", 3, 127, "stateTodShop" }, + {"junkgate", 2, 127, "stateJunkGate" }, + {"junkover", 3, 127, "stateJunkAbove" }, + {"gastower", 2, 127, "stateGasTower" }, + {"", 4, 0, "stateTowerAlarm" }, + {"melcut", 2, 127, "stateCopsOnGround" }, + {"melcut", 2, 127, "stateCopsAround" }, + {"melcut", 2, 127, "stateMoesRuins" }, + {"melcut", 2, 127, "stateKstandNight" }, + {"trukblu2", 2, 127, "stateTruckerTalk" }, + {"stretch", 2, 127, "stateMumblyPeg" }, + {"kstand", 2, 100, "stateRanchOutside" }, + {"kinside", 2, 127, "stateRanchInside" }, + {"desert", 2, 127, "stateWreckedTruck" }, + {"opening", 2, 100, "stateGorgeVista" }, + {"caveopen", 2, 127, "stateCaveOpen" }, + {"cavecut1", 2, 127, "stateCaveOuter" }, + {"cavecut1", 1, 127, "stateCaveMiddle" }, + {"cave", 2, 127, "stateCaveInner" }, + {"corville", 2, 127, "stateCorvilleFront" }, + {"mines", 2, 127, "stateMineField" }, + {"bunyman3", 2, 127, "stateBunnyStore" }, + {"stretch", 2, 127, "stateStretchBen" }, + {"saveme", 2, 127, "stateBenPleas" }, + {"", 4, 0, "stateBenConvinces" }, + {"derby", 3, 127, "stateDemoDerby" }, + {"fire", 3, 127, "stateLightMyFire" }, + {"derby", 3, 127, "stateDerbyChase" }, + {"carparts", 2, 127, "stateVultureCarParts"}, + {"cavecut1", 2, 127, "stateVulturesInside" }, + {"mines", 2, 127, "stateFactoryRear" }, + {"croffice", 2, 127, "stateCorleyOffice" }, + {"melcut", 2, 127, "stateCorleyHall" }, + {"", 4, 0, "stateProjRoom" }, + {"", 4, 0, "stateMMRoom" }, + {"bumper", 2, 127, "stateBenOnBumper" }, + {"benump", 2, 127, "stateBenOnBack" }, + {"plane", 2, 127, "stateInCargoPlane" }, + {"saveme", 2, 127, "statePlaneControls" }, + {"", 4, 0, "stateCliffHanger1" }, + {"", 4, 0, "stateCliffHanger2" }, }; const imuse_ft_music_table _ftSeqMusicTable[] = { - {0, "", 2, 127, "SEQ_NULL" }, - {1, "opening", 2, 127, "seqLogo" }, - {2, "barbeat", 2, 127, "seqOpenFlick" }, - {3, "barwarn", 2, 127, "seqBartender" }, - {4, "benwakes", 2, 127, "seqBenWakes" }, - {5, "barwarn", 2, 127, "seqPhotoScram" }, - {6, "swatben", 2, 127, "seqClimbChain" }, - {7, "dogattak", 2, 127, "seqDogChase" }, - {8, "", 0, 0, "seqDogSquish" }, - {9, "", 0, 0, "seqDogHoist" }, - {10, "cops2", 2, 127, "seqCopsArrive" }, - {11, "cops2", 2, 127, "seqCopsLand" }, - {12, "cops2", 2, 127, "seqCopsLeave" }, - {13, "", 0, 0, "seqCopterFlyby" }, - {14, "bunymrch", 2, 127, "seqCopterCrash" }, - {15, "", 0, 0, "seqMoGetsParts" }, - {16, "", 0, 0, "seqMoFixesBike" }, - {17, "", 0, 0, "seqFirstGoodbye" }, - {18, "trucker", 2, 127, "seqCopRoadblock" }, - {19, "cops2", 2, 127, "seqDivertCops" }, - {20, "barwarn", 2, 127, "seqMurder" }, - {21, "corldie", 2, 127, "seqCorleyDies" }, - {22, "barwarn", 2, 127, "seqTooLateAtMoes" }, - {23, "picture", 2, 127, "seqPicture" }, - {24, "ripintro", 2, 127, "seqNewsReel" }, - {25, "trucker", 2, 127, "seqCopsInspect" }, - {26, "ripdead", 2, 127, "seqHijack" }, - {27, "nesranch", 2, 127, "seqNestolusAtRanch" }, - {28, "scolding", 2, 127, "seqRipLimo" }, - {29, "desert", 2, 127, "seqGorgeTurn" }, - {30, "cavecut1", 2, 127, "seqStealRamp" }, - {31, "vaceamb", 2, 80, "seqCavefishTalk" }, - {32, "castle", 2, 127, "seqArriveCorville" }, - {33, "bunymrch", 2, 105, "seqSingleBunny" }, - {34, "valkyrs", 2, 127, "seqBunnyArmy" }, - {35, "melcut", 2, 127, "seqArriveAtMines" }, - {36, "veltures", 2, 127, "seqArriveAtVultures" }, - {37, "sorry", 2, 127, "seqMakePlan" }, - {38, "makeplan", 2, 127, "seqShowPlan" }, - {39, "castle", 2, 127, "seqDerbyStart" }, - {40, "fire", 3, 127, "seqLightBales" }, - {41, "saveme", 3, 127, "seqNestolusBBQ" }, - {42, "cops2", 2, 127, "seqCallSecurity" }, - {43, "sorry", 2, 127, "seqFilmFail" }, - {44, "sorry", 2, 127, "seqFilmBurn" }, - {45, "caveamb", 2, 127, "seqRipSpeech" }, - {46, "expose", 2, 127, "seqExposeRip" }, - {47, "ripscram", 2, 127, "seqRipEscape" }, - {48, "", 0, 0, "seqRareMoment" }, - {49, "valkyrs", 2, 127, "seqFanBunnies" }, - {50, "ripdead", 2, 127, "seqRipDead" }, - {51, "funeral", 2, 127, "seqFuneral" }, - {52, "bornbad", 2, 127, "seqCredits" }, - {-1, "", 0, 0, "" } + {"", 2, 127, "SEQ_NULL" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"opening", 2, 127, "seqOpenFlick" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"barbeat", 2, 127, "seqBartender" }, + {"barwarn", 2, 127, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"benwakes", 2, 127, "seqBenWakes" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"barwarn", 2, 127, "seqPhotoScram" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"swatben", 2, 127, "seqClimbChain" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"dogattak", 2, 127, "seqDogChase" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 4, 0, "seqDogSquish" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 4, 0, "seqDogHoist" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"cops2", 2, 127, "seqCopsArrive" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"cops2", 2, 127, "seqCopsLand" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"cops2", 2, 127, "seqCopsLeave" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 0, 0, "seqCopterFlyby" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"bunymrch", 2, 127, "seqCopterCrash" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 4, 0, "seqMoGetsParts" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 0, 0, "seqMoFixesBike" }, + {"melcut", 2, 127, "" }, + {"tada", 2, 127, "" }, + {"", 0, 0, "" }, + + {"", 4, 0, "seqFirstGoodbye" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"trucker", 2, 127, "seqCopRoadblock" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"cops2", 2, 127, "seqDivertCops" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"barwarn", 2, 127, "seqMurder" }, + {"murder", 2, 127, "" }, + {"murder2", 2, 127, "" }, + {"", 0, 0, "" }, + + {"corldie", 2, 127, "seqCorleyDies" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"barwarn", 2, 127, "seqTooLateAtMoes" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"picture", 2, 127, "seqPicture" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"ripintro", 2, 127, "seqNewsReel" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"trucker", 2, 127, "seqCopsInspect" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"hosed", 2, 127, "" }, + + {"ripdead", 2, 127, "seqHijack" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"nesranch", 2, 127, "seqNestolusAtRanch" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"scolding", 2, 127, "seqRipLimo" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"desert", 2, 127, "seqGorgeTurn" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"cavecut1", 2, 127, "seqStealRamp" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"caveamb", 2, 80, "seqCavefishTalk" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"castle", 2, 127, "seqArriveCorville" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"bunymrch", 2, 105, "seqSingleBunny" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"valkyrs", 2, 127, "seqBunnyArmy" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"melcut", 2, 127, "seqArriveAtMines" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"veltures", 2, 127, "seqArriveAtVultures" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"sorry", 2, 127, "seqMakePlan" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"makeplan", 2, 127, "seqShowPlan" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"castle", 2, 127, "seqDerbyStart" }, + {"derby", 2, 127, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"fire", 3, 127, "seqLightBales" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"saveme", 3, 127, "seqNestolusBBQ" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"scolding", 2, 127, "" }, + + {"cops2", 2, 127, "seqCallSecurity" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"sorry", 2, 127, "seqFilmFail" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"sorry", 2, 127, "seqFilmBurn" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"caveamb", 2, 85, "seqRipSpeech" }, + {"tada", 2, 127, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"expose", 2, 127, "seqExposeRip" }, + {"", 4, 0, "" }, + {"", 0, 0, "" }, + {"mocoup", 2, 127, "" }, + + {"ripscram", 2, 127, "seqRipEscape" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"", 2, 127, "seqRareMoment" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"valkyrs", 2, 127, "seqFanBunnies" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"ripdead", 2, 127, "seqRipDead" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + {"", 0, 0, "" }, + + {"funeral", 2, 127, "seqFuneral" }, + {"", 2, 127, "" }, + {"moshop", 3, 64, "" }, + {"", 0, 0, "" }, + + {"bornbad", 2, 127, "seqCredits" }, + {"hammvox", 0, 0, "" }, + {"legavox", 0, 0, "" }, + {"chances", 0, 0, "" }, }; #endif |