HDB: Shift HDB::save() and HDB::loadSaveFile...
...to saveload.cpp
This commit is contained in:
parent
c00223a6e9
commit
0ae4cb1ea7
2 changed files with 20 additions and 20 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue