mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
Add opcode
svn-id: r12795
This commit is contained in:
parent
e98d5983da
commit
36c9dc8b5b
@ -584,7 +584,7 @@ protected:
|
||||
void o6_rename();
|
||||
void o6_writeFile();
|
||||
void o6_findAllObjects();
|
||||
void o6_unknownE0();
|
||||
void o6_setVolume();
|
||||
void o6_unknownE1();
|
||||
void o6_unknownE4();
|
||||
void o6_seekFile();
|
||||
|
@ -329,7 +329,7 @@ void ScummEngine_v6he::setupOpcodes() {
|
||||
OPCODE(o6_deleteFile),
|
||||
OPCODE(o6_rename),
|
||||
/* E0 */
|
||||
OPCODE(o6_unknownE0),
|
||||
OPCODE(o6_setVolume),
|
||||
OPCODE(o6_unknownE1),
|
||||
OPCODE(o6_localizeArray),
|
||||
OPCODE(o6_pickVarRandom),
|
||||
@ -1114,16 +1114,21 @@ void ScummEngine_v6he::o6_unknownE1() {
|
||||
push(area);
|
||||
}
|
||||
|
||||
void ScummEngine_v6he::o6_unknownE0() {
|
||||
int a = fetchScriptByte();
|
||||
a -= 222;
|
||||
if (a != 0) {
|
||||
a -= 2;
|
||||
if (a != 0)
|
||||
return;
|
||||
warning("o6_unknownE0(%d) stub", pop());
|
||||
} else {
|
||||
warning("o6_uknownE0, sound volume %d stub", pop());
|
||||
void ScummEngine_v6he::o6_setVolume() {
|
||||
byte subOp = fetchScriptByte();
|
||||
int soundVolumeMaster;
|
||||
int volume = pop();
|
||||
switch (subOp) {
|
||||
case 222:
|
||||
if (_imuse)
|
||||
_imuse->set_music_volume(volume);
|
||||
else
|
||||
_mixer->setMusicVolume(volume);
|
||||
break;
|
||||
case 224:
|
||||
soundVolumeMaster = ConfMan.getInt("master_volume");
|
||||
_mixer->setVolume(volume * soundVolumeMaster / 255);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user