From 8272b46b12bb6a7dd101a9801b099d210faeef89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Mon, 17 Nov 2003 18:59:26 +0000 Subject: [PATCH] added music hacks for cmi demo, please test it svn-id: r11323 --- scumm/imuse_digi.cpp | 20 ++++++++++++++++++-- scumm/scumm.h | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/scumm/imuse_digi.cpp b/scumm/imuse_digi.cpp index fc5356ba216..8b65e55863c 100644 --- a/scumm/imuse_digi.cpp +++ b/scumm/imuse_digi.cpp @@ -1030,7 +1030,6 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i debug(5, "ImuseSetState (%d)", b); if (_scumm->_gameId == GID_DIG) { if (b == 1000) { // STATE_NULL - // FIXME: Fade this out properly, in the same increments as the real engine _scumm->_sound->stopBundleMusic(); return 0; } @@ -1048,9 +1047,26 @@ int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, i return 0; } } + } else if (_scumm->_gameId == GID_CMIDEMO) { + if (b == 1000) { // STATE_NULL + _scumm->_sound->stopBundleMusic(); + return 0; + } else if (b == 1001) + _scumm->_sound->playBundleMusic("in1.imx"); + else if (b == 1100) + _scumm->_sound->playBundleMusic("in2.imx"); + else if (b == 1120) + _scumm->_sound->playBundleMusic("out1.imx"); + else if (b == 1140) + _scumm->_sound->playBundleMusic("out2.imx"); + else if (b == 1205) + _scumm->_sound->playBundleMusic("gun.imx"); + else { + warning("imuse digital: set state unknown for cmi demo: %d", b); + return 1; + } } else if (_scumm->_gameId == GID_CMI) { if (b == 1000) { // STATE_NULL - // FIXME: Fade this out properly, in the same increments as the real engine _scumm->_sound->stopBundleMusic(); return 0; } diff --git a/scumm/scumm.h b/scumm/scumm.h index dd7ddc86597..d0bfd2a9380 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -190,7 +190,8 @@ enum ScummGameId { GID_PUTTPUTT, GID_PJSDEMO, GID_MONKEY_SEGA, - GID_FTDEMO + GID_FTDEMO, + GID_CMIDEMO }; #define _maxRooms res.num[rtRoom]