Implemented Common::EventManager::pushEvent() to insert fake events into the event queue. Quit and RTL events have been added, and are now tracked by the DefaultEventManager using shouldQuit() and shouldRTL(). AGOS is working with this new implementation, other engines to follow.
svn-id: r32952
This commit is contained in:
parent
b50df858eb
commit
a4f56de13a
13 changed files with 66 additions and 52 deletions
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "common/events.h"
|
||||
|
||||
#include "agos/agos.h"
|
||||
#include "agos/vga.h"
|
||||
|
@ -565,7 +565,7 @@ void AGOSEngine_Elvira1::oe1_look() {
|
|||
lobjFunc(l, "You can see "); /* Show objects */
|
||||
}
|
||||
if (r && (r->flags & 4) && levelOf(i) < 10000) {
|
||||
_quit = true;
|
||||
_eventMan->pushEvent(Common::EVENT_QUIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -944,7 +944,7 @@ restart:
|
|||
windowPutChar(window, *message2);
|
||||
|
||||
if (confirmYesOrNo(120, 62) == 0x7FFF) {
|
||||
_quit = true;
|
||||
_eventMan->pushEvent(Common::EVENT_QUIT);
|
||||
} else {
|
||||
goto restart;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue