Skip to content

Commit

Permalink
TINSEL: Discworld Noir: Support for opcode 217. (#2988)
Browse files Browse the repository at this point in the history
This adds support for opcode 217. I have made the assumption that it's
voiceover, and given it an enum value to reflect that. This enables
voiceover to be played in the opening movie.
  • Loading branch information
lkramer committed May 3, 2021
1 parent f56cbc2 commit 3126597
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions engines/tinsel/tinlib.cpp
Expand Up @@ -153,7 +153,7 @@ enum MASTER_LIB_CODES {
TRYPLAYSAMPLE, UNDIMMUSIC, UNHOOKSCENE, UNTAGACTOR, VIBRATE, WAITFRAME, WAITKEY,
WAITSCROLL, WAITTIME, WALK, WALKED, WALKEDPOLY, WALKEDTAG, WALKINGACTOR, WALKPOLY,
WALKTAG, WALKXPOS, WALKYPOS, WHICHCD, WHICHINVENTORY, ZZZZZZ, DEC3D, DECINVMAIN,
ADDNOTEBOOK, ADDINV3, ADDCONV, SET3DTEXTURE, FADEMUSIC, HIGHEST_LIBCODE
ADDNOTEBOOK, ADDINV3, ADDCONV, SET3DTEXTURE, FADEMUSIC, VOICEOVER, HIGHEST_LIBCODE
};

static const MASTER_LIB_CODES DW1DEMO_CODES[] = {
Expand Down Expand Up @@ -4503,8 +4503,8 @@ NoirMapping translateNoirLibCode(int libCode, int32 *pp) {
pp -= mapping.numArgs - 1;
debug(7, "%s(0x%08X)", mapping.name, pp[0]);
break;
case 217: // STUBBED
mapping = NoirMapping{"217", ZZZZZZ, 1};
case 217:
mapping = NoirMapping{"VOICEOVER", VOICEOVER, 1};
pp -= mapping.numArgs - 1;
debug(7, "%s(0x%08X)", mapping.name, pp[0]);
break;
Expand Down Expand Up @@ -5488,6 +5488,11 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
TalkOrSay(coroParam, IS_SAYAT, pp[3], pp[1], pp[2], 0, pp[0], pp[4], pic->escOn, pic->myEscape);
return -5;

case VOICEOVER:
// Noir only
TalkOrSay(coroParam, IS_SAY, pp[0], 0, 0, 0, SystemVar(SV_USER2), false, pic->escOn, pic->myEscape);
return -1;

case SCALINGREELS:
// Common to both DW1 & DW2
pp -= 6; // 7 parameters
Expand Down

0 comments on commit 3126597

Please sign in to comment.