HDB: Shift HDB::save() and HDB::loadSaveFile...

...to saveload.cpp
This commit is contained in:
Nipun Garg 2019-07-11 00:50:02 +05:30 committed by Eugene Sandulenko
parent c00223a6e9
commit 0ae4cb1ea7
2 changed files with 20 additions and 20 deletions

View file

@ -131,26 +131,6 @@ bool HDBGame::init() {
return true; return true;
} }
void HDBGame::save(Common::OutSaveFile *out) {
out->write(_currentMapname, 64);
out->write(_lastMapname, 64);
out->write(_currentLuaName, 64);
out->writeSint32LE(_actionMode);
out->writeByte(_changeLevel);
out->write(_changeMapname, 64);
out->write(_inMapName, 32);
}
void HDBGame::loadSaveFile(Common::InSaveFile *in) {
in->read(_currentMapname, 64);
in->read(_lastMapname, 64);
in->read(_currentLuaName, 64);
_actionMode = in->readSint32LE();
_changeLevel = in->readByte();
in->read(_changeMapname, 64);
in->read(_inMapName, 32);
}
/* /*
Changes the current GameState to the next one. Changes the current GameState to the next one.
Game State Transitions are deterministic: each state can Game State Transitions are deterministic: each state can

View file

@ -160,4 +160,24 @@ void HDBGame::loadGame(Common::InSaveFile *in) {
_gfx->turnOffFade(); _gfx->turnOffFade();
} }
void HDBGame::save(Common::OutSaveFile *out) {
out->write(_currentMapname, 64);
out->write(_lastMapname, 64);
out->write(_currentLuaName, 64);
out->writeSint32LE(_actionMode);
out->writeByte(_changeLevel);
out->write(_changeMapname, 64);
out->write(_inMapName, 32);
}
void HDBGame::loadSaveFile(Common::InSaveFile *in) {
in->read(_currentMapname, 64);
in->read(_lastMapname, 64);
in->read(_currentLuaName, 64);
_actionMode = in->readSint32LE();
_changeLevel = in->readByte();
in->read(_changeMapname, 64);
in->read(_inMapName, 32);
}
} // End of Namespace } // End of Namespace