From 701d43b5c208a605465c59e9caf8767df18c3e04 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 14 Oct 2014 01:59:53 +0300 Subject: MADS: Initial implementation of sound driver handling for V2 games --- engines/mads/nebular/menu_nebular.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index a9ed6d3495..6a13cea195 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -922,7 +922,11 @@ void AnimationView::loadNextResource() { const char *chP = strchr(_currentAnimation->_header._soundName.c_str(), '.'); assert(chP); - int driverNum = atoi(chP + 1); + // Handle both Rex naming (xxx.009) and naming in later games (e.g. xxx.ph9) + int driverNum = atoi(chP + 3); + // HACK for Dragon + if (_currentAnimation->_header._soundName == "#SOUND.DRG") + driverNum = 9; _vm->_sound->init(driverNum); } -- cgit v1.2.3