mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
HYPNO: save/load game state variables and some fixes in boyz
This commit is contained in:
@@ -584,6 +584,21 @@ Common::Error BoyzEngine::saveGameStream(Common::WriteStream *stream, bool isAut
|
||||
stream->writeUint32LE(_score);
|
||||
|
||||
stream->writeUint32LE(_lastLevel);
|
||||
|
||||
stream->writeUint32LE(_sceneState["GS_C5MAP"]);
|
||||
stream->writeUint32LE(_sceneState["GS_WONSHELLGAME"]);
|
||||
stream->writeUint32LE(_sceneState["GS_C36_READY"]);
|
||||
stream->writeUint32LE(_sceneState["GS_MINEMAP"]);
|
||||
stream->writeUint32LE(_sceneState["GS_MINEMAP_VIEWED"]);
|
||||
stream->writeUint32LE(_sceneState["GS_HOTELDONE"]);
|
||||
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_31"]);
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_32"]);
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_33"]);
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_34"]);
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_35"]);
|
||||
stream->writeUint32LE(_sceneState["GS_SEQ_36"]);
|
||||
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
@@ -595,6 +610,19 @@ Common::Error BoyzEngine::loadGameStream(Common::SeekableReadStream *stream) {
|
||||
_score = stream->readUint32LE();
|
||||
_lastLevel = stream->readUint32LE();
|
||||
|
||||
_sceneState["GS_C5MAP"] = stream->readUint32LE();
|
||||
_sceneState["GS_WONSHELLGAME"] = stream->readUint32LE();
|
||||
_sceneState["GS_C36_READY"] = stream->readUint32LE();
|
||||
_sceneState["GS_MINEMAP"] = stream->readUint32LE();
|
||||
_sceneState["GS_MINEMAP_VIEWED"] = stream->readUint32LE();
|
||||
_sceneState["GS_HOTELDONE"] = stream->readUint32LE();
|
||||
|
||||
_sceneState["GS_SEQ_31"] = stream->readUint32LE();
|
||||
_sceneState["GS_SEQ_32"] = stream->readUint32LE();
|
||||
_sceneState["GS_SEQ_33"] = stream->readUint32LE();
|
||||
_sceneState["GS_SEQ_34"] = stream->readUint32LE();
|
||||
_sceneState["GS_SEQ_35"] = stream->readUint32LE();
|
||||
|
||||
_nextLevel = Common::String::format("c%d.mi_", _ids[_lastLevel]);
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ void BoyzEngine::runCode(Code *code) {
|
||||
}
|
||||
|
||||
void BoyzEngine::runMainMenu(Code *code) {
|
||||
resetSceneState();
|
||||
Common::Event event;
|
||||
byte *palette;
|
||||
Graphics::Surface *menu = decodeFrame("preload/mainmenu.smk", 0, &palette);
|
||||
|
||||
@@ -45,6 +45,19 @@ const char *sceneVariablesBoyz[] = {
|
||||
"GS_MINEMAP",
|
||||
"GS_MINEMAP_VIEWED",
|
||||
"GS_HOTELDONE",
|
||||
"GS_SWITCH0",
|
||||
"GS_SWITCH1",
|
||||
"GS_SWITCH2",
|
||||
"GS_SWITCH3",
|
||||
"GS_SWITCH4",
|
||||
"GS_SWITCH5",
|
||||
"GS_SWITCH6",
|
||||
"GS_SWITCH7",
|
||||
"GS_SWITCH8",
|
||||
"GS_SWITCH9",
|
||||
"GS_SWITCH10",
|
||||
"GS_SWITCH11",
|
||||
"GS_SWITCH12",
|
||||
"GS_SEQ_11",
|
||||
"GS_SEQ_12",
|
||||
"GS_SEQ_13",
|
||||
|
||||
Reference in New Issue
Block a user