Remove the unused SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE flag
svn-id: r49161
This commit is contained in:
parent
db74441d55
commit
7cd9a23c0d
4 changed files with 2 additions and 20 deletions
|
@ -920,22 +920,6 @@ bool Console::cmdRestoreGame(int argc, const char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Console::cmdRestartGame(int argc, const char **argv) {
|
bool Console::cmdRestartGame(int argc, const char **argv) {
|
||||||
if (argc != 2) {
|
|
||||||
DebugPrintf("Restarts the game. There are two ways to restart a SCI game:\n");
|
|
||||||
DebugPrintf("%s play - calls the game object's play() method\n", argv[0]);
|
|
||||||
DebugPrintf("%s replay - calls the replay() methody\n", argv[0]);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!scumm_stricmp(argv[1], "play")) {
|
|
||||||
_engine->_gamestate->restarting_flags |= SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE;
|
|
||||||
} else if (!scumm_stricmp(argv[1], "replay")) {
|
|
||||||
_engine->_gamestate->restarting_flags &= ~SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE;
|
|
||||||
} else {
|
|
||||||
DebugPrintf("Invalid usage of %s\n", argv[0]);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
_engine->_gamestate->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW;
|
_engine->_gamestate->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW;
|
||||||
script_abort_flag = 1;
|
script_abort_flag = 1;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ namespace Sci {
|
||||||
|
|
||||||
reg_t kRestartGame(EngineState *s, int argc, reg_t *argv) {
|
reg_t kRestartGame(EngineState *s, int argc, reg_t *argv) {
|
||||||
s->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW;
|
s->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW;
|
||||||
s->restarting_flags &= ~SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE; // This appears to help
|
|
||||||
|
|
||||||
s->shrinkStackToBase();
|
s->shrinkStackToBase();
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,7 @@ enum {
|
||||||
enum {
|
enum {
|
||||||
SCI_GAME_IS_NOT_RESTARTING = 0,
|
SCI_GAME_IS_NOT_RESTARTING = 0,
|
||||||
SCI_GAME_WAS_RESTARTED = 1,
|
SCI_GAME_WAS_RESTARTED = 1,
|
||||||
SCI_GAME_IS_RESTARTING_NOW = 2,
|
SCI_GAME_IS_RESTARTING_NOW = 2
|
||||||
SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE = 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileHandle {
|
class FileHandle {
|
||||||
|
|
|
@ -1701,7 +1701,7 @@ static EngineState *_game_run(EngineState *&s) {
|
||||||
send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
|
send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
|
||||||
|
|
||||||
script_abort_flag = 0;
|
script_abort_flag = 0;
|
||||||
s->restarting_flags = SCI_GAME_WAS_RESTARTED | SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE;
|
s->restarting_flags = SCI_GAME_WAS_RESTARTED;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
successor = s->successor;
|
successor = s->successor;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue