aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Stewart2018-08-08 20:53:02 -0400
committerFilippos Karapetis2019-05-28 08:08:52 +0300
commitadd9b3e699acf43d2300e6f6fbf119dc1ce85c42 (patch)
treef93325b578ad9880f404b6cb08bed6f51658ce8e /engines
parentc9918c30644c58fc135951a013a387eeca7fd4de (diff)
downloadscummvm-rg350-add9b3e699acf43d2300e6f6fbf119dc1ce85c42.tar.gz
scummvm-rg350-add9b3e699acf43d2300e6f6fbf119dc1ce85c42.tar.bz2
scummvm-rg350-add9b3e699acf43d2300e6f6fbf119dc1ce85c42.zip
STARTREK: Saving for VENG mission
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/awaymission.h61
-rw-r--r--engines/startrek/room.h19
-rw-r--r--engines/startrek/rooms/venga.cpp2
-rw-r--r--engines/startrek/saveload.cpp3
4 files changed, 85 insertions, 0 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 03758279ad..7db9ef8e19 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -712,6 +712,67 @@ struct AwayMission {
bool readAllLogs; // 0x6a
bool field6b; // 0x6b
bool field6c; // 0x6c
+
+ void saveLoadWithSerializer(Common::Serializer &ser) {
+ ser.syncAsByte(usedMedkitOnBrittany);
+ ser.syncAsByte(talkedToBrittany);
+ ser.syncAsByte(brittanyDead);
+ ser.syncAsByte(lookedAtBrittany);
+ ser.syncAsByte(enteredRoom0FirstTime);
+ ser.syncAsSint16LE(missionScore);
+ ser.syncAsByte(bridgeCrewmanDead);
+ ser.syncAsByte(scannedCaptainsChair);
+ ser.syncAsByte(scannedComputerBank);
+ ser.syncAsByte(impulseEnginesOn);
+ ser.syncAsByte(beamState);
+ ser.syncAsByte(enterpriseLeftForDistressCall);
+ ser.syncAsByte(openedPanel);
+ ser.syncAsByte(clearedPanelDebris);
+ ser.syncAsByte(removedPanelDebris);
+ ser.syncAsByte(oilInHypo);
+ ser.syncAsByte(loosenedDebrisWithOil);
+ ser.syncAsByte(poweredSystem);
+ ser.syncAsByte(tricordersPluggedIntoComputer);
+ ser.syncAsByte(captainsLogIndex);
+ ser.syncAsByte(elasiShieldsDown);
+ ser.syncAsByte(torpedoLoaded);
+ ser.syncAsByte(firedTorpedo);
+ ser.syncAsByte(elasiShipDecloaked);
+ ser.syncAsByte(countdownStarted);
+ ser.syncAsByte(toldElasiToBeamOver);
+ ser.syncAsByte(scannedMainComputer);
+ ser.syncAsByte(elasiHailedRepublic);
+ ser.syncAsByte(tookRecordDeckFromAuxilaryControl);
+ ser.syncAsSint16LE(counterUntilElasiBoardWithShieldsDown);
+ ser.syncAsSint16LE(counterUntilElasiAttack);
+ ser.syncAsSint16LE(counterUntilElasiNagToDisableShields);
+ ser.syncAsSint16LE(counterUntilElasiDestroyShip);
+ ser.syncAsSint16LE(counterUntilElasiBoardWithInvitation);
+ ser.syncAsByte(clearedDebris);
+ ser.syncAsByte(lookedAtTurbolift2Door);
+ ser.syncAsByte(kirkShouldSuggestReestablishingPower);
+ ser.syncAsByte(tookHypoFromSickbay);
+ ser.syncAsByte(tookDrillFromSickbay);
+ ser.syncAsByte(clearedDebrisInRoom5);
+ ser.syncAsByte(havePowerPack);
+ ser.syncAsByte(enteredRoom5FirstTime);
+ ser.syncAsByte(askedSpockAboutFire);
+ ser.syncAsByte(junctionCablesConnected);
+ ser.syncAsByte(tookCableFromTransporterRoomHallway);
+ ser.syncAsByte(tookCableFromSickbayHallway);
+ ser.syncAsByte(tookMolecularSaw);
+ ser.syncAsByte(readEngineeringJournal);
+ ser.syncAsByte(tookEngineeringJournal);
+ ser.syncAsByte(engineeringCabinetOpen);
+ ser.syncAsByte(setTransporterCoordinates);
+ ser.syncAsByte(examinedTorpedoControl);
+ ser.syncAsByte(powerPackPluggedIntoTransporter);
+ ser.syncAsByte(field68);
+ ser.syncAsByte(getPointsForHealingBrittany);
+ ser.syncAsByte(readAllLogs);
+ ser.syncAsByte(field6b);
+ ser.syncAsByte(field6c);
+ }
} veng;
};
};
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 33ce30bc27..33c46ce7d6 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -3177,6 +3177,25 @@ public:
// venga (common)
bool walkingToDoor; // 0xcb (veng1), 0xca (veng4)
+
+ void saveLoadWithSerializer(Common::Serializer &ser) {
+ // veng1
+ ser.syncAsByte(doorOpenCounter);
+
+ // veng2
+ ser.syncAsByte(numCrewmenReadyToBeamOut);
+
+ // veng4
+ ser.syncAsByte(usingMedkitOnBrittany);
+
+ // veng6
+ ser.syncAsByte(kirkAndSpockReadyToAttachLeftCable);
+ ser.syncAsByte(kirkAndSpockReadyToAttachRightCable);
+ ser.syncAsByte(cableInUse);
+
+ // venga (common)
+ ser.syncAsByte(walkingToDoor);
+ }
} veng;
} _roomVar;
diff --git a/engines/startrek/rooms/venga.cpp b/engines/startrek/rooms/venga.cpp
index 5922d52b26..99be1456bb 100644
--- a/engines/startrek/rooms/venga.cpp
+++ b/engines/startrek/rooms/venga.cpp
@@ -28,6 +28,8 @@ void Room::vengaTick() {
if (_awayMission->veng.counterUntilElasiBoardWithShieldsDown != 0) {
_awayMission->veng.counterUntilElasiBoardWithShieldsDown--;
if (_awayMission->veng.counterUntilElasiBoardWithShieldsDown == 0 && _awayMission->veng.poweredSystem != 2) {
+ // BUG: Should check you're now lowering the shields in the next phase (this
+ // is only meant for when they initially appear with your shields down)
vengaElasiBeamOver();
return;
}
diff --git a/engines/startrek/saveload.cpp b/engines/startrek/saveload.cpp
index d3018f4920..e1ce99cc8d 100644
--- a/engines/startrek/saveload.cpp
+++ b/engines/startrek/saveload.cpp
@@ -338,6 +338,9 @@ bool StarTrekEngine::saveOrLoadGameData(Common::SeekableReadStream *in, Common::
} else if (_missionName == "SINS") {
_awayMission.sins.saveLoadWithSerializer(ser);
_room->_roomVar.sins.saveLoadWithSerializer(ser);
+ } else if (_missionName == "VENG") {
+ _awayMission.veng.saveLoadWithSerializer(ser);
+ _room->_roomVar.veng.saveLoadWithSerializer(ser);
}
// The action queue