TWINE: removed Quit member from ConfigFile

This commit is contained in:
Martin Gerhardy 2020-10-20 21:40:38 +02:00 committed by Eugene Sandulenko
parent 9428284b17
commit a93aafbdc4
3 changed files with 9 additions and 7 deletions

View File

@ -24,6 +24,7 @@
#include "audio/mixer.h"
#include "backends/audiocd/audiocd.h"
#include "common/config-manager.h"
#include "common/events.h"
#include "common/scummsys.h"
#include "common/system.h"
#include "twine/actor.h"
@ -688,7 +689,7 @@ void Menu::mainMenu() {
memset(plasmaEffectPtr, 0, kPlasmaEffectFilesize);
_engine->_hqrdepack->hqrGetEntry(plasmaEffectPtr, Resources::HQR_RESS_FILE, RESSHQR_PLASMAEFFECT);
while (!_engine->cfgfile.Quit) {
while (!_engine->shouldQuit()) {
_engine->_text->initTextBank(0);
_engine->_music->playTrackMusic(9); // LBA's Theme
@ -711,7 +712,9 @@ void Menu::mainMenu() {
break;
}
case kQuit: {
_engine->cfgfile.Quit = 1;
Common::Event event;
event.type = Common::EVENT_QUIT;
_engine->_system->getEventManager()->pushEvent(event);
break;
}
case kBackground: {

View File

@ -350,7 +350,6 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
freezeTime();
_gameState->saveGame(); // auto save game
quitGame = 0;
cfgfile.Quit = 0;
unfreezeTime();
return 0;
}

View File

@ -107,8 +107,6 @@ typedef struct ConfigFile {
int32 AutoAgressive = 0;
/** SceZoom mode type */
int32 SceZoom = 0;
/** Flag to quit the game */
int32 Quit = 0;
/** Flag to toggle Wall Collision */
int32 WallCollision = 0;
} ConfigFile;
@ -205,8 +203,10 @@ public:
/** Initialize all needed stuffs at first time running engine */
void initAll();
void processActorSamplePosition(int32 actorIdx);
/** Game engine main loop
@return true if we want to show credit sequence */
/**
* Game engine main loop
* @return true if we want to show credit sequence
*/
int32 runGameEngine();
/** Allocate video memory, both front and back buffers */
void allocVideoMemory();