NEVERHOOD: More work on saveload, saving works, loading not yet (from the GMM, in-game isn't finished yet)

This commit is contained in:
johndoe123 2012-11-22 00:33:38 +00:00 committed by Willem Jan Palenstijn
parent c182688e44
commit 99e15e4005
5 changed files with 52 additions and 40 deletions

View file

@ -26,6 +26,7 @@
#include "graphics/thumbnail.h"
#include "neverhood/neverhood.h"
#include "neverhood/gamevars.h"
namespace Neverhood {
@ -90,7 +91,10 @@ void NeverhoodEngine::savegame(const char *filename, const char *description) {
out->writeUint32LE(playTime);
// Header end
// TODO
_gameVars->setGlobalVar(0x108A4870, _gameState.sceneNum);
_gameVars->setGlobalVar(0x82C80875, _gameState.which);
_gameVars->saveState(out);
out->finalize();
delete out;
@ -115,7 +119,7 @@ void NeverhoodEngine::loadgame(const char *filename) {
g_engine->setTotalPlayTime(header.playTime * 1000);
// TODO
_gameVars->loadState(in);
delete in;