MOHAWK: Changed Myst intro stack to behave like the original. ie fully skippable intro.
svn-id: r55164
This commit is contained in:
parent
12b44f2fc0
commit
1a18e99e69
8 changed files with 134 additions and 45 deletions
|
@ -292,7 +292,6 @@ Common::Error MohawkEngine_Myst::run() {
|
|||
|
||||
// Set the cursor
|
||||
_cursor->setCursor(_currentCursor);
|
||||
_cursor->showCursor();
|
||||
|
||||
Common::Event event;
|
||||
while (!shouldQuit()) {
|
||||
|
@ -371,6 +370,40 @@ Common::Error MohawkEngine_Myst::run() {
|
|||
return Common::kNoError;
|
||||
}
|
||||
|
||||
bool MohawkEngine_Myst::skippableWait(uint32 duration) {
|
||||
uint32 end = _system->getMillis() + duration;
|
||||
bool skipped = false;
|
||||
|
||||
while (_system->getMillis() < end && !skipped) {
|
||||
Common::Event event;
|
||||
while (_system->getEventManager()->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
skipped = true;
|
||||
break;
|
||||
case Common::EVENT_KEYDOWN:
|
||||
switch (event.kbd.keycode) {
|
||||
case Common::KEYCODE_SPACE:
|
||||
pauseGame();
|
||||
break;
|
||||
case Common::KEYCODE_ESCAPE:
|
||||
skipped = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Cut down on CPU usage
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
|
||||
return skipped;
|
||||
}
|
||||
|
||||
void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcSound, uint16 linkDstSound) {
|
||||
debug(2, "changeToStack(%d)", stack);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue