Fix bug #2721940: "AGI: Gold Rush! Restart Option differs from original"
svn-id: r41243
This commit is contained in:
parent
3ba873c72b
commit
26d8b2bb72
8 changed files with 17 additions and 17 deletions
|
@ -394,8 +394,6 @@ int AgiEngine::agiInit() {
|
|||
|
||||
initWords();
|
||||
|
||||
restartGame = false;
|
||||
|
||||
if (!_menu)
|
||||
_menu = new Menu(this, _gfx, _picture);
|
||||
|
||||
|
@ -679,6 +677,8 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
|
|||
|
||||
_objects = NULL;
|
||||
|
||||
_restartGame = false;
|
||||
|
||||
_oldMode = -1;
|
||||
|
||||
_predictiveDialogRunning = false;
|
||||
|
|
|
@ -808,7 +808,7 @@ public:
|
|||
|
||||
uint8 *_intobj;
|
||||
int _oldMode;
|
||||
bool restartGame;
|
||||
bool _restartGame;
|
||||
|
||||
Menu* _menu;
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void AgiEngine::interpretCycle() {
|
|||
oldSound = getflag(fSoundOn);
|
||||
|
||||
_game.exitAllLogics = false;
|
||||
while (runLogic(0) == 0 && !(shouldQuit() || restartGame)) {
|
||||
while (runLogic(0) == 0 && !(shouldQuit() || _restartGame)) {
|
||||
_game.vars[vWordNotFound] = 0;
|
||||
_game.vars[vBorderTouchObj] = 0;
|
||||
_game.vars[vBorderCode] = 0;
|
||||
|
@ -369,7 +369,7 @@ int AgiEngine::playGame() {
|
|||
saveGame(getSavegameFilename(0), "Autosave");
|
||||
}
|
||||
|
||||
} while (!(shouldQuit() || restartGame));
|
||||
} while (!(shouldQuit() || _restartGame));
|
||||
|
||||
_sound->stopSound();
|
||||
|
||||
|
@ -390,9 +390,9 @@ int AgiEngine::runGame() {
|
|||
if (agiInit() != errOK)
|
||||
break;
|
||||
|
||||
if (restartGame) {
|
||||
if (_restartGame) {
|
||||
setflag(fRestartGame, true);
|
||||
restartGame = false;
|
||||
_restartGame = false;
|
||||
}
|
||||
|
||||
// Set computer type (v20 i.e. vComputer)
|
||||
|
@ -446,7 +446,7 @@ int AgiEngine::runGame() {
|
|||
ec = playGame();
|
||||
_game.state = STATE_LOADED;
|
||||
agiDeinit();
|
||||
} while (restartGame);
|
||||
} while (_restartGame);
|
||||
|
||||
delete _menu;
|
||||
_menu = NULL;
|
||||
|
|
|
@ -385,7 +385,7 @@ int AgiEngine::waitKey() {
|
|||
}
|
||||
|
||||
debugC(3, kDebugLevelInput, "waiting...");
|
||||
while (!(shouldQuit() || restartGame || getflag(fRestoreJustRan))) {
|
||||
while (!(shouldQuit() || _restartGame || getflag(fRestoreJustRan))) {
|
||||
_gfx->pollTimer(); // msdos driver -> does nothing
|
||||
key = doPollKeyboard();
|
||||
if (key == KEY_ENTER || key == KEY_ESCAPE || key == BUTTON_LEFT)
|
||||
|
@ -408,7 +408,7 @@ int AgiEngine::waitAnyKey() {
|
|||
}
|
||||
|
||||
debugC(3, kDebugLevelInput, "waiting... (any key)");
|
||||
while (!(shouldQuit() || restartGame)) {
|
||||
while (!(shouldQuit() || _restartGame)) {
|
||||
_gfx->pollTimer(); // msdos driver -> does nothing
|
||||
key = doPollKeyboard();
|
||||
if (key)
|
||||
|
|
|
@ -1242,7 +1242,7 @@ cmd(restart_game) {
|
|||
g_agi->selectionBox(" Restart game, or continue? \n\n\n", buttons);
|
||||
|
||||
if (sel == 0) {
|
||||
g_agi->restartGame = true;
|
||||
g_agi->_restartGame = true;
|
||||
g_agi->setflag(fRestartGame, true);
|
||||
g_agi->_menu->enableAll();
|
||||
}
|
||||
|
@ -1346,7 +1346,7 @@ cmd(get_string) {
|
|||
|
||||
do {
|
||||
g_agi->mainCycle();
|
||||
} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame));
|
||||
} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->_restartGame));
|
||||
}
|
||||
|
||||
cmd(get_num) {
|
||||
|
@ -1366,7 +1366,7 @@ cmd(get_num) {
|
|||
|
||||
do {
|
||||
g_agi->mainCycle();
|
||||
} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame));
|
||||
} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->_restartGame));
|
||||
|
||||
_v[p1] = atoi(game.strings[MAX_STRINGS]);
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ int AgiEngine::runLogic(int n) {
|
|||
curLogic->cIP = curLogic->sIP;
|
||||
|
||||
timerHack = 0;
|
||||
while (ip < _game.logics[n].size && !(shouldQuit() || restartGame)) {
|
||||
while (ip < _game.logics[n].size && !(shouldQuit() || _restartGame)) {
|
||||
if (_debug.enabled) {
|
||||
if (_debug.steps > 0) {
|
||||
if (_debug.logic0 || n) {
|
||||
|
|
|
@ -230,7 +230,7 @@ int AgiEngine::testIfCode(int lognum) {
|
|||
uint8 p[16] = { 0 };
|
||||
bool end_test = false;
|
||||
|
||||
while (retval && !(shouldQuit() || restartGame) && !end_test) {
|
||||
while (retval && !(shouldQuit() || _restartGame) && !end_test) {
|
||||
if (_debug.enabled && (_debug.logic0 || lognum))
|
||||
debugConsole(lognum, lTEST_MODE, NULL);
|
||||
|
||||
|
|
|
@ -574,7 +574,7 @@ int AgiEngine::selectSlot() {
|
|||
int oldFirstSlot = _firstSlot + 1;
|
||||
int oldActive = active + 1;
|
||||
|
||||
while (!(shouldQuit() || restartGame)) {
|
||||
while (!(shouldQuit() || _restartGame)) {
|
||||
int sbPos = 0;
|
||||
|
||||
// Use the extreme scrollbar positions only if the extreme
|
||||
|
|
|
@ -379,7 +379,7 @@ int AgiEngine::selectionBox(const char *m, const char **b) {
|
|||
AllowSyntheticEvents on(this);
|
||||
|
||||
debugC(4, kDebugLevelText, "selectionBox(): waiting...");
|
||||
while (!(shouldQuit() || restartGame)) {
|
||||
while (!(shouldQuit() || _restartGame)) {
|
||||
for (i = 0; b[i]; i++)
|
||||
_gfx->drawCurrentStyleButton(bx[i], by[i], b[i], i == active, false, i == 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue