Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
This commit is contained in:
parent
51a8978455
commit
3c82b6578f
10 changed files with 212 additions and 227 deletions
|
@ -56,8 +56,6 @@
|
|||
|
||||
namespace Sci {
|
||||
|
||||
extern int g_loadFromLauncher;
|
||||
|
||||
SciEngine *g_sci = 0;
|
||||
|
||||
|
||||
|
@ -259,9 +257,9 @@ Common::Error SciEngine::run() {
|
|||
|
||||
// Check whether loading a savestate was requested
|
||||
if (ConfMan.hasKey("save_slot")) {
|
||||
g_loadFromLauncher = ConfMan.getInt("save_slot");
|
||||
_gamestate->loadFromLauncher = ConfMan.getInt("save_slot");
|
||||
} else {
|
||||
g_loadFromLauncher = -1;
|
||||
_gamestate->loadFromLauncher = -1;
|
||||
}
|
||||
|
||||
game_run(&_gamestate); // Run the game
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue