mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
SUPERNOVA: Implements Return To Launcher
This commit is contained in:
parent
72791ddbee
commit
18abc4702a
@ -351,7 +351,7 @@ void GameManager::processInput(Common::KeyState &state) {
|
||||
case Common::KEYCODE_x:
|
||||
if (state.flags & Common::KBD_ALT) {
|
||||
// quit game
|
||||
_vm->_gameRunning = false;
|
||||
_vm->quitGame();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -104,7 +104,6 @@ SupernovaEngine::SupernovaEngine(OSystem *syst)
|
||||
, _imageIndex(0)
|
||||
, _sectionIndex(0)
|
||||
, _delay(33)
|
||||
, _gameRunning(true)
|
||||
, _screenWidth(320)
|
||||
, _screenHeight(200)
|
||||
, _messageDisplayed(false)
|
||||
@ -143,7 +142,7 @@ Common::Error SupernovaEngine::run() {
|
||||
CursorMan.replaceCursorPalette(initVGAPalette, 0, 16);
|
||||
CursorMan.showMouse(true);
|
||||
|
||||
while (_gameRunning) {
|
||||
while (!shouldQuit()) {
|
||||
uint32 start = _system->getMillis();
|
||||
updateEvents();
|
||||
_gm->executeRoom();
|
||||
@ -169,11 +168,6 @@ void SupernovaEngine::updateEvents() {
|
||||
_gm->_keyPressed = false;
|
||||
while (g_system->getEventManager()->pollEvent(_event)) {
|
||||
switch (_event.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
case Common::EVENT_RTL:
|
||||
_gameRunning = false;
|
||||
break;
|
||||
|
||||
case Common::EVENT_KEYDOWN:
|
||||
_gm->_keyPressed = true;
|
||||
if (_event.kbd.keycode == Common::KEYCODE_d &&
|
||||
@ -183,7 +177,6 @@ void SupernovaEngine::updateEvents() {
|
||||
if (_event.kbd.keycode == Common::KEYCODE_x &&
|
||||
(_event.kbd.flags & Common::KBD_CTRL)) {
|
||||
// TODO: Draw exit box
|
||||
_gameRunning = false;
|
||||
}
|
||||
|
||||
_gm->processInput(_event.kbd);
|
||||
@ -208,6 +201,15 @@ void SupernovaEngine::updateEvents() {
|
||||
}
|
||||
}
|
||||
|
||||
bool SupernovaEngine::hasFeature(EngineFeature f) const {
|
||||
switch (f) {
|
||||
case kSupportsRTL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void SupernovaEngine::initData() {
|
||||
// Images
|
||||
for (int i = 0; i < 44; ++i)
|
||||
|
@ -93,7 +93,6 @@ public:
|
||||
} _soundSamples[kAudioNumSamples];
|
||||
Common::MemoryReadStream *_soundMusic[2];
|
||||
Common::Event _event;
|
||||
bool _gameRunning;
|
||||
int _screenWidth;
|
||||
int _screenHeight;
|
||||
|
||||
@ -134,6 +133,8 @@ public:
|
||||
void command_print();
|
||||
|
||||
Common::MemoryReadStream *convertToMod(const char *filename, int version = 1);
|
||||
|
||||
virtual bool hasFeature(EngineFeature f) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user