mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
ASYLUM: HiveControl puzzle: add completion checks
This commit is contained in:
parent
be21e4e028
commit
1fc9a8a837
@ -237,9 +237,17 @@ bool PuzzleHiveControl::mouseLeftDown(const AsylumEvent &) {
|
||||
getSound()->playSound(getWorld()->graphicResourceIds[83], false, Config.sfxVolume - 10);
|
||||
++_frameIndexes[kElementSwirlRim];
|
||||
|
||||
error("[PuzzleHiveControl::mouseLeftDown] Not implemented");
|
||||
//if (_frameIndexes[kElementSwirlRim] == 12)
|
||||
// ...
|
||||
// Check for puzzle completion
|
||||
if (_frameIndexes[kElementSwirlRim] == 12) {
|
||||
getSound()->stop(getWorld()->graphicResourceIds[73]);
|
||||
getSound()->stop(getWorld()->graphicResourceIds[74]);
|
||||
|
||||
getScreen()->clear();
|
||||
getScreen()->setupTransTables(3, getWorld()->cellShadeMask1, getWorld()->cellShadeMask2, getWorld()->cellShadeMask3);
|
||||
getScreen()->selectTransTable(1);
|
||||
|
||||
_vm->switchEventHandler(getScene());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -252,8 +260,18 @@ bool PuzzleHiveControl::mouseLeftDown(const AsylumEvent &) {
|
||||
if (_glyphFlags[1][_leverPosition]) {
|
||||
getSound()->playSound(getWorld()->graphicResourceIds[83], false, Config.sfxVolume - 10);
|
||||
++_frameIndexes[kElementSwirlRim];
|
||||
//if (_frameIndexes[kElementSwirlRim] == 12)
|
||||
// ...
|
||||
|
||||
// Check for puzzle completion
|
||||
if (_frameIndexes[kElementSwirlRim] == 12) {
|
||||
getSound()->stop(getWorld()->graphicResourceIds[73]);
|
||||
getSound()->stop(getWorld()->graphicResourceIds[74]);
|
||||
|
||||
getScreen()->clear();
|
||||
getScreen()->setupTransTables(3, getWorld()->cellShadeMask1, getWorld()->cellShadeMask2, getWorld()->cellShadeMask3);
|
||||
getScreen()->selectTransTable(1);
|
||||
|
||||
_vm->switchEventHandler(getScene());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -408,8 +426,7 @@ void PuzzleHiveControl::updateScreen() {
|
||||
_frameIndexes[kElementWingLeft1 + 2*i] = (_frameIndexes[kElementWingLeft1 + 2*i] + 1) % GraphicResource::getFrameCount(_vm, getWorld()->graphicResourceIds[kElementWingLeft1 + 2*i]);
|
||||
if (_frameIndexes[kElementWingRight1 + 2*i] != GraphicResource::getFrameCount(_vm, getWorld()->graphicResourceIds[kElementWingRight1 + 2*i]) - 1)
|
||||
_frameIndexes[kElementWingRight1 + 2*i] = (_frameIndexes[kElementWingRight1 + 2*i] + 1) % GraphicResource::getFrameCount(_vm, getWorld()->graphicResourceIds[kElementWingRight1 + 2*i]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (_frameIndexes[kElementWingLeft1 + 2*i] > 0) {
|
||||
--_frameIndexes[kElementWingLeft1 + 2*i];
|
||||
if (_resetFlag && _frameIndexes[kElementWingLeft1 + 2*i] == 0 && !reseted) {
|
||||
|
Loading…
Reference in New Issue
Block a user