mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-21 01:08:25 +00:00
Added _quitFlag test to Kyra 2 animation and to waitForEvent().
svn-id: r23617
This commit is contained in:
parent
f8d4994dc2
commit
f51fc44e66
@ -652,7 +652,7 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) {
|
||||
void KyraEngine::waitForEvent() {
|
||||
bool finished = false;
|
||||
OSystem::Event event;
|
||||
while (!finished) {
|
||||
while (!finished && !_quitFlag) {
|
||||
while (_system->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case OSystem::EVENT_KEYDOWN:
|
||||
|
@ -36,17 +36,17 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system)
|
||||
KyraEngine_v2::~KyraEngine_v2() {
|
||||
}
|
||||
|
||||
int KyraEngine_v2::go() {
|
||||
int KyraEngine_v2::go() {
|
||||
uint8 pal[768];
|
||||
|
||||
|
||||
WSAMovieV2 *title = new WSAMovieV2(this);
|
||||
title->open("title.WSA", 0, pal);
|
||||
assert(title->opened());
|
||||
|
||||
|
||||
_screen->setScreenPalette(pal);
|
||||
title->setX(0); title->setY(0);
|
||||
title->setDrawPage(0);
|
||||
for (int i = 0; i < 26; ++i) {
|
||||
for (int i = 0; i < 26 && !_quitFlag; ++i) {
|
||||
uint32 nextRun = _system->getMillis() + 6 * _tickLength;
|
||||
title->displayFrame(i);
|
||||
_screen->updateScreen();
|
||||
@ -54,7 +54,7 @@ int KyraEngine_v2::go() {
|
||||
}
|
||||
|
||||
delete title;
|
||||
|
||||
|
||||
waitForEvent();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user