aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Stewart2018-07-24 22:15:00 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit55725257910d69eec219d12bf68474289526faaa (patch)
tree82fcd6f611b9348b67b7473bbda2122355b1a177 /engines
parentd23965e274497e5c0431c8f8979315f9388da940 (diff)
downloadscummvm-rg350-55725257910d69eec219d12bf68474289526faaa.tar.gz
scummvm-rg350-55725257910d69eec219d12bf68474289526faaa.tar.bz2
scummvm-rg350-55725257910d69eec219d12bf68474289526faaa.zip
STARTREK: Save mission-specific variables
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/awaymission.h1
-rw-r--r--engines/startrek/room.h9
-rw-r--r--engines/startrek/saveload.cpp355
-rw-r--r--engines/startrek/text.h3
4 files changed, 363 insertions, 5 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 6f3125698c..d912af78fa 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -24,6 +24,7 @@
#define STARTREK_AWAYMISSION_H
// All variables here get cleared to 0 upon starting an away mission.
+// NOTE: Any added or changed variables here must be mirrored in "saveload.cpp".
struct AwayMission {
// These timers count down automatically when nonzero. When they reach 0,
// ACTION_TIMER_EXPIRED is invoked with the corresponding index (0-7).
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 0d36e9f6b0..da3788053f 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -2136,8 +2136,9 @@ public:
void trial5UseBlueGem3OnHole3();
void trial5UseMedkitAnywhere();
-private:
+public:
// Room-specific variables. This is memset'ed to 0 when the room is initialized.
+ // NOTE: Any changes here must be reflected in saveload.cpp.
union {
struct {
// demon0
@@ -2147,8 +2148,8 @@ private:
bool movingToBottomDoor; // 0xcd
// demon1
- bool klingonShot[3]; // 0xca
- int numKlingonsKilled;
+ byte klingonShot[3]; // 0xca
+ int16 numKlingonsKilled;
byte attackIndex;
bool kirkShooting;
char d6[10];
@@ -2263,7 +2264,7 @@ private:
// feather1
byte snakeInHole; // 0xca
bool scannedSnake; // 0xcb
- bool crewEscaped[4]; // 0xcc
+ byte crewEscaped[4]; // 0xcc
byte crewmanClimbingVine;
// feather2
diff --git a/engines/startrek/saveload.cpp b/engines/startrek/saveload.cpp
index 4c98667b07..a290d14071 100644
--- a/engines/startrek/saveload.cpp
+++ b/engines/startrek/saveload.cpp
@@ -29,6 +29,7 @@
#include "common/serializer.h"
#include "common/translation.h"
+#include "startrek/room.h"
#include "startrek/startrek.h"
namespace StarTrek {
@@ -286,7 +287,359 @@ bool StarTrekEngine::saveOrLoadGameData(Common::SeekableReadStream *in, Common::
}
ser.syncString(_mapFilename);
- // TODO: awayMissionStruct
+
+ // Away mission struct
+ for (int i = 0; i < 8; i++)
+ ser.syncAsSint16LE(_awayMission.timers[i]);
+ ser.syncAsSint16LE(_awayMission.mouseX);
+ ser.syncAsSint16LE(_awayMission.mouseY);
+ for (int i = 0; i < 4; i++)
+ ser.syncAsSint16LE(_awayMission.crewGetupTimers[i]);
+ ser.syncAsByte(_awayMission.disableWalking);
+ ser.syncAsByte(_awayMission.disableInput);
+ ser.syncAsByte(_awayMission.redshirtDead);
+ ser.syncAsByte(_awayMission.activeAction);
+ ser.syncAsByte(_awayMission.activeObject);
+ ser.syncAsByte(_awayMission.passiveObject);
+ ser.syncAsByte(_awayMission.rdfStillDoDefaultAction);
+ ser.syncAsByte(_awayMission.crewDownBitset);
+ for (int i = 0; i < 4; i++)
+ ser.syncAsByte(_awayMission.crewDirectionsAfterWalk[i]);
+
+ if (_missionName == "DEMON") {
+ ser.syncAsByte(_awayMission.demon.wasRudeToPrelate);
+ ser.syncAsByte(_awayMission.demon.insultedStephen);
+ ser.syncAsByte(_awayMission.demon.field2d);
+ ser.syncAsByte(_awayMission.demon.beatKlingons);
+ ser.syncAsByte(_awayMission.demon.tookKlingonHand);
+ ser.syncAsByte(_awayMission.demon.talkedToPrelate);
+ ser.syncAsByte(_awayMission.demon.stephenWelcomedToStudy);
+ ser.syncAsByte(_awayMission.demon.prelateWelcomedCrew);
+ ser.syncAsByte(_awayMission.demon.askedPrelateAboutSightings);
+ ser.syncAsByte(_awayMission.demon.field37);
+ ser.syncAsByte(_awayMission.demon.mccoyMentionedFlora);
+ ser.syncAsByte(_awayMission.demon.numBouldersGone);
+ ser.syncAsByte(_awayMission.demon.enteredFrom);
+ ser.syncAsByte(_awayMission.demon.repairedHand);
+ ser.syncAsByte(_awayMission.demon.healedMiner);
+ ser.syncAsByte(_awayMission.demon.curedChub);
+ ser.syncAsByte(_awayMission.demon.field3e);
+ ser.syncAsByte(_awayMission.demon.knowAboutHypoDytoxin);
+ ser.syncAsByte(_awayMission.demon.minerDead);
+ ser.syncAsByte(_awayMission.demon.field41);
+ ser.syncAsByte(_awayMission.demon.foundMiner);
+ ser.syncAsByte(_awayMission.demon.field45);
+ ser.syncAsByte(_awayMission.demon.gaveSkullToNauian);
+ ser.syncAsByte(_awayMission.demon.warpsDisabled);
+ ser.syncAsByte(_awayMission.demon.boulder1Gone);
+ ser.syncAsByte(_awayMission.demon.boulder2Gone);
+ ser.syncAsByte(_awayMission.demon.boulder3Gone);
+ ser.syncAsByte(_awayMission.demon.boulder4Gone);
+ ser.syncAsByte(_awayMission.demon.doorOpened);
+ ser.syncAsByte(_awayMission.demon.solvedSunPuzzle);
+ ser.syncAsByte(_awayMission.demon.itemsTakenFromCase);
+ ser.syncAsByte(_awayMission.demon.gotBerries);
+ ser.syncAsByte(_awayMission.demon.madeHypoDytoxin);
+ ser.syncAsByte(_awayMission.demon.metNauian);
+ ser.syncAsByte(_awayMission.demon.gavePointsForDytoxin);
+ ser.syncAsByte(_awayMission.demon.lookedAtComputer);
+ ser.syncAsByte(_awayMission.demon.field56);
+ ser.syncAsByte(_awayMission.demon.foundAlienRoom);
+ ser.syncAsSint16LE(_awayMission.demon.missionScore);
+
+ // demon0
+ ser.syncAsByte(_room->_roomVar.demon.bottomDoorCounter);
+ ser.syncAsByte(_room->_roomVar.demon.topDoorCounter);
+ ser.syncAsByte(_room->_roomVar.demon.movingToTopDoor);
+ ser.syncAsByte(_room->_roomVar.demon.movingToBottomDoor);
+
+ // demon1
+ ser.syncBytes((byte *)_room->_roomVar.demon.klingonShot, 3);
+ ser.syncAsSint16LE(_room->_roomVar.demon.numKlingonsKilled);
+ ser.syncAsByte(_room->_roomVar.demon.attackIndex);
+ ser.syncAsByte(_room->_roomVar.demon.kirkShooting);
+ ser.syncBytes((byte *)_room->_roomVar.demon.d6, 10);
+
+ // demon3
+ ser.syncAsByte(_room->_roomVar.demon.shootingBoulder);
+ ser.syncAsByte(_room->_roomVar.demon.boulder1Shot);
+ ser.syncAsByte(_room->_roomVar.demon.boulderBeingShot);
+ ser.syncAsByte(_room->_roomVar.demon.kirkInPosition);
+ ser.syncAsByte(_room->_roomVar.demon.redshirtInPosition);
+ ser.syncAsByte(_room->_roomVar.demon.spockInPosition);
+ ser.syncAsByte(_room->_roomVar.demon.mccoyInPosition);
+ ser.syncAsByte(_room->_roomVar.demon.inFiringPosition);
+ ser.syncAsByte(_room->_roomVar.demon.kirkPhaserOut);
+ ser.syncBytes((byte *)_room->_roomVar.demon.boulderAnim, 10);
+ ser.syncAsSint16LE(_room->_roomVar.demon.usedPhaserOnDoor);
+
+ // demon4
+ ser.syncAsByte(_room->_roomVar.demon.triedToShootNauian);
+ ser.syncAsByte(_room->_roomVar.demon.nauianEmerged);
+ ser.syncAsByte(_room->_roomVar.demon.disabledSecurity);
+ ser.syncAsByte(_room->_roomVar.demon.cd);
+ ser.syncAsByte(_room->_roomVar.demon.crewReadyToBeamOut);
+ ser.syncAsSint16LE(_room->_roomVar.demon.crewmanUsingPanel);
+
+ // demon5
+ ser.syncAsByte(_room->_roomVar.demon.scannedRoberts);
+ ser.syncAsByte(_room->_roomVar.demon.scannedChub);
+ ser.syncAsByte(_room->_roomVar.demon.scannedGrisnash);
+ ser.syncAsByte(_room->_roomVar.demon.scannedStephen);
+ ser.syncAsByte(_room->_roomVar.demon.numScanned);
+ ser.syncAsByte(_room->_roomVar.demon.numTalkedTo);
+ ser.syncAsByte(_room->_roomVar.demon.talkedToRoberts);
+ ser.syncAsByte(_room->_roomVar.demon.talkedToChub);
+ ser.syncAsByte(_room->_roomVar.demon.talkedToGrisnash);
+ ser.syncAsByte(_room->_roomVar.demon.talkedToStephen);
+
+ // demon6
+ ser.syncAsByte(_room->_roomVar.demon.insultedStephenRecently);
+ ser.syncAsByte(_room->_roomVar.demon.stephenInRoom);
+ ser.syncAsByte(_room->_roomVar.demon.caseOpened);
+
+ // common
+ ser.syncAsByte(_room->_roomVar.demon.movingToDoor);
+ ser.syncAsByte(_room->_roomVar.demon.doorCounter);
+ } else if (_missionName == "TUG") {
+ ser.syncAsSint16LE(_awayMission.tug.missionScore);
+ ser.syncAsSint16LE(_awayMission.tug.field2b);
+ ser.syncAsSint16LE(_awayMission.tug.field2d);
+ ser.syncAsByte(_awayMission.tug.engineerConscious);
+ ser.syncAsByte(_awayMission.tug.field35);
+ ser.syncAsByte(_awayMission.tug.gotWires);
+ ser.syncAsByte(_awayMission.tug.orbitalDecayCounter);
+ ser.syncAsByte(_awayMission.tug.bridgeElasiDrewPhasers);
+ ser.syncAsByte(_awayMission.tug.talkedToCereth);
+ ser.syncAsByte(_awayMission.tug.gotJunkPile);
+ ser.syncAsByte(_awayMission.tug.gotTransmogrifier);
+ ser.syncAsByte(_awayMission.tug.transporterRepaired);
+ ser.syncAsByte(_awayMission.tug.spockExaminedTransporter);
+ ser.syncAsByte(_awayMission.tug.usedTransmogrifierOnTransporter);
+ ser.syncAsByte(_awayMission.tug.bridgeForceFieldDown);
+ ser.syncAsByte(_awayMission.tug.savedPrisoners);
+ ser.syncAsByte(_awayMission.tug.haveBomb);
+ ser.syncAsByte(_awayMission.tug.brigElasiPhasersOnKill);
+ ser.syncAsByte(_awayMission.tug.field4b);
+ ser.syncAsByte(_awayMission.tug.guard1Status);
+ ser.syncAsByte(_awayMission.tug.guard2Status);
+ ser.syncAsByte(_awayMission.tug.field4e);
+ ser.syncBytes(_awayMission.tug.crewmanKilled, 4);
+ ser.syncAsByte(_awayMission.tug.bridgeElasi1Status);
+ ser.syncAsByte(_awayMission.tug.bridgeElasi2Status);
+ ser.syncAsByte(_awayMission.tug.bridgeElasi3Status);
+ ser.syncAsByte(_awayMission.tug.bridgeElasi4Status);
+ ser.syncAsByte(_awayMission.tug.brigForceFieldDown);
+ ser.syncAsByte(_awayMission.tug.field59);
+ ser.syncAsByte(_awayMission.tug.field5b);
+ ser.syncAsByte(_awayMission.tug.elasiSurrendered);
+ ser.syncAsByte(_awayMission.tug.kirkPhaserDrawn);
+ ser.syncAsByte(_awayMission.tug.bridgeWinMethod);
+ ser.syncAsByte(_awayMission.tug.talkedToBrigCrewman);
+
+ // tug2
+ ser.syncAsByte(_room->_roomVar.tug.shootingObject);
+ ser.syncAsByte(_room->_roomVar.tug.shootingTarget);
+ ser.syncAsByte(_room->_roomVar.tug.elasiPhaserOnKill);
+ ser.syncAsByte(_room->_roomVar.tug.shootKirkOverride);
+ } else if (_missionName == "LOVE") {
+ ser.syncAsByte(_awayMission.love.alreadyStartedMission);
+ ser.syncAsByte(_awayMission.love.knowAboutVirus);
+ ser.syncAsByte(_awayMission.love.romulansUnconsciousFromLaughingGas);
+ ser.syncAsByte(_awayMission.love.releasedHumanLaughingGas);
+ ser.syncAsByte(_awayMission.love.releasedRomulanLaughingGas);
+ ser.syncAsByte(_awayMission.love.chamberHasCure);
+ ser.syncAsByte(_awayMission.love.freezerOpen);
+ ser.syncAsByte(_awayMission.love.chamberHasDish);
+ ser.syncAsByte(_awayMission.love.bottleInNozzle);
+ ser.syncAsByte(_awayMission.love.cabinetOpen);
+ ser.syncAsByte(_awayMission.love.gasFeedOn);
+ ser.syncAsByte(_awayMission.love.synthesizerBottleIndex);
+ ser.syncAsByte(_awayMission.love.synthesizerContents);
+ ser.syncAsByte(_awayMission.love.canister1);
+ ser.syncAsByte(_awayMission.love.canister2);
+ ser.syncAsByte(_awayMission.love.servicePanelOpen);
+ ser.syncAsByte(_awayMission.love.gasTankUnscrewed);
+ ser.syncAsByte(_awayMission.love.wrenchTaken);
+ ser.syncAsByte(_awayMission.love.tookN2TankFromServicePanel);
+ ser.syncAsByte(_awayMission.love.field3c);
+ ser.syncAsByte(_awayMission.love.grateRemoved);
+ ser.syncAsByte(_awayMission.love.insulationOnGround);
+ ser.syncAsByte(_awayMission.love.visitedRoomWithRomulans);
+ ser.syncAsByte(_awayMission.love.romulansCured);
+ ser.syncAsByte(_awayMission.love.romulansUnconsciousFromVirus);
+ ser.syncAsByte(_awayMission.love.freedMarcusAndCheever);
+ ser.syncAsByte(_awayMission.love.preaxCured);
+ ser.syncAsByte(_awayMission.love.spockInfectionCounter);
+ ser.syncAsByte(_awayMission.love.spockCured);
+ ser.syncAsByte(_awayMission.love.contactedEnterpriseBeforeCure);
+ ser.syncAsByte(_awayMission.love.contactedEnterpriseAfterCure);
+ ser.syncAsByte(_awayMission.love.spockAccessedConsole);
+ ser.syncAsByte(_awayMission.love.mccoyAccessedConsole);
+ ser.syncAsByte(_awayMission.love.gotPolyberylcarbonate);
+ ser.syncAsByte(_awayMission.love.gotTLDH);
+ ser.syncAsByte(_awayMission.love.gotPointsForOpeningGrate);
+ ser.syncAsByte(_awayMission.love.gotPointsForGassingRomulans);
+ ser.syncAsByte(_awayMission.love.gotCure);
+ ser.syncAsByte(_awayMission.love.gotPointsForHydratingPreax);
+ ser.syncAsByte(_awayMission.love.gotPointsForHydratingRomulans);
+ ser.syncAsSint16LE(_awayMission.love.missionScore);
+
+ // love0
+ ser.syncAsByte(_room->_roomVar.love.heardSummaryOfVirus);
+ ser.syncAsSint16LE(_room->_roomVar.love.consoleCrewman);
+ ser.syncBytes((byte *)_room->_roomVar.love.consoleAnimation, 10);
+ ser.syncAsSint32LE(_room->_roomVar.love.consoleSpeaker);
+ ser.syncAsSint32LE(_room->_roomVar.love.consoleText);
+
+ // love1
+ ser.syncAsSint32LE(_room->_roomVar.love.dyingSpeaker);
+ ser.syncAsSint16LE(_room->_roomVar.love.crewmanUsingFreezerRetX);
+ ser.syncAsSint16LE(_room->_roomVar.love.crewmanUsingFreezerRetY);
+ ser.syncAsSint16LE(_room->_roomVar.love.crewmanUsingDevice);
+ ser.syncAsSint16LE(_room->_roomVar.love.itemInNozzle);
+ ser.syncBytes((byte *)_room->_roomVar.love.bottleAnimation, 10);
+
+ // love2
+ ser.syncAsByte(_room->_roomVar.love.canisterType);
+ ser.syncAsByte(_room->_roomVar.love.cb);
+ ser.syncAsSint16LE(_room->_roomVar.love.canisterItem);
+ ser.syncBytes((byte *)_room->_roomVar.love.canisterAnim, 10);
+ ser.syncAsSint16LE(_room->_roomVar.love.chamberObject);
+ ser.syncBytes((byte *)_room->_roomVar.love.chamberInputAnim, 10);
+ ser.syncBytes((byte *)_room->_roomVar.love.chamberOutputAnim, 10);
+
+ // love3
+ ser.syncAsByte(_room->_roomVar.love.activeCrewman);
+
+ // love4
+ ser.syncAsByte(_room->_roomVar.love.gaveWaterToRomulans);
+
+ // love5
+ ser.syncAsByte(_room->_roomVar.love.numCrewmenReadyToBeamOut);
+
+ // common
+ ser.syncAsByte(_room->_roomVar.love.walkingToDoor);
+ ser.syncAsByte(_room->_roomVar.love.doorOpenCounter);
+ ser.syncAsByte(_room->_roomVar.love.spockAndMccoyReadyToUseCure);
+ ser.syncAsByte(_room->_roomVar.love.cmnXPosToCureSpock);
+ ser.syncAsByte(_room->_roomVar.love.cmnYPosToCureSpock);
+ } else if (_missionName == "MUDD") {
+ ser.syncAsByte(_awayMission.mudd.muddFirstRoomState);
+ ser.syncAsByte(_awayMission.mudd.torpedoLoaded);
+ ser.syncAsByte(_awayMission.mudd.knowAboutTorpedo);
+ ser.syncAsByte(_awayMission.mudd.discoveredBase3System);
+ ser.syncAsByte(_awayMission.mudd.translatedAlienLanguage);
+ ser.syncAsByte(_awayMission.mudd.databaseDestroyed);
+ ser.syncAsByte(_awayMission.mudd.muddInDatabaseRoom);
+ ser.syncAsByte(_awayMission.mudd.muddCurrentlyInsane);
+ ser.syncAsByte(_awayMission.mudd.computerDataErasedOrDestroyed);
+ ser.syncAsByte(_awayMission.mudd.muddErasedDatabase);
+ ser.syncAsByte(_awayMission.mudd.discoveredLenseAndDegrimerFunction);
+ ser.syncAsSint16LE(_awayMission.mudd.torpedoStatus);
+ ser.syncAsByte(_awayMission.mudd.muddUnavailable);
+ ser.syncAsByte(_awayMission.mudd.muddVisitedDatabaseRoom);
+ ser.syncAsByte(_awayMission.mudd.accessedAlienDatabase);
+ ser.syncAsByte(_awayMission.mudd.tookRepairTool);
+ ser.syncAsByte(_awayMission.mudd.gotPointsForDownloadingData);
+ ser.syncAsByte(_awayMission.mudd.contactedEnterpriseFirstTime);
+ ser.syncAsByte(_awayMission.mudd.viewScreenEnabled);
+ ser.syncAsByte(_awayMission.mudd.lifeSupportMalfunctioning);
+ ser.syncAsByte(_awayMission.mudd.numTimesEnteredRoom5);
+ ser.syncAsByte(_awayMission.mudd.gotMemoryDisk);
+ ser.syncAsByte(_awayMission.mudd.gotLense);
+ ser.syncAsByte(_awayMission.mudd.gotDegrimer);
+ ser.syncAsByte(_awayMission.mudd.putCapsuleInMedicalMachine);
+ ser.syncAsByte(_awayMission.mudd.muddUnconscious);
+ ser.syncAsByte(_awayMission.mudd.muddInsanityState);
+ ser.syncAsByte(_awayMission.mudd.muddInhaledGas);
+ ser.syncAsSint16LE(_awayMission.mudd.lifeSupportTimer);
+ ser.syncAsByte(_awayMission.mudd.startedLifeSupportTimer);
+ ser.syncAsByte(_awayMission.mudd.enteredRoom0ForFirstTime);
+ ser.syncAsByte(_awayMission.mudd.gotPointsForLoadingTorpedo);
+ ser.syncAsByte(_awayMission.mudd.gotPointsForPressingRedButton);
+ ser.syncAsByte(_awayMission.mudd.gotPointsForEnablingViewscreen);
+ ser.syncAsByte(_awayMission.mudd.enteredRoom1ForFirstTime);
+ ser.syncAsByte(_awayMission.mudd.repairedLifeSupportGenerator);
+ ser.syncAsSint16LE(_awayMission.mudd.missionScore);
+
+ // mudd3
+ ser.syncAsByte(_room->_roomVar.mudd.suggestedUsingTricorders);
+ ser.syncAsByte(_room->_roomVar.mudd.tricordersUnavailable);
+
+ // mudd4
+ ser.syncAsByte(_room->_roomVar.mudd.usingLeftConsole);
+ ser.syncAsByte(_room->_roomVar.mudd.kirkUsingRightConsole);
+
+ // common
+ ser.syncAsByte(_room->_roomVar.mudd.walkingToDoor);
+ } else if (_missionName == "FEATHER") {
+ ser.syncAsByte(_awayMission.feather.diedFromStalactites);
+ ser.syncAsByte(_awayMission.feather.vineState);
+ ser.syncAsByte(_awayMission.feather.gotRock);
+ ser.syncAsByte(_awayMission.feather.gotSnake);
+ ser.syncAsByte(_awayMission.feather.tookKnife);
+ ser.syncAsByte(_awayMission.feather.field2e);
+ ser.syncAsByte(_awayMission.feather.numRocksThrownAtTlaoxac);
+ ser.syncAsByte(_awayMission.feather.gotFern);
+ ser.syncAsByte(_awayMission.feather.holeBlocked);
+ ser.syncAsByte(_awayMission.feather.tlaoxacTestPassed);
+ ser.syncAsByte(_awayMission.feather.knockedOutTlaoxac);
+ ser.syncAsByte(_awayMission.feather.waterMonsterRetreated);
+ ser.syncAsByte(_awayMission.feather.showedSnakeToTlaoxac);
+ ser.syncAsSint16LE(_awayMission.feather.missionScore);
+
+ // feather1
+ ser.syncAsByte(_room->_roomVar.feather.snakeInHole);
+ ser.syncAsByte(_room->_roomVar.feather.scannedSnake);
+ ser.syncBytes(_room->_roomVar.feather.crewEscaped, 4);
+ ser.syncAsByte(_room->_roomVar.feather.crewmanClimbingVine);
+
+ // feather2
+ ser.syncAsByte(_room->_roomVar.feather.showedSnakeToTlaoxac);
+ ser.syncAsByte(_room->_roomVar.feather.tlaoxacUnconscious);
+
+ // feather6
+ ser.syncAsByte(_room->_roomVar.feather.usedRockOnCrystalsOnce);
+
+ // feather7
+ ser.syncAsByte(_room->_roomVar.feather.insultedQuetzecoatl);
+ } else if (_missionName == "TRIAL") {
+ ser.syncAsSint16LE(_awayMission.trial.missionScore);
+ ser.syncAsSint16LE(_awayMission.trial.field2b);
+ ser.syncAsByte(_awayMission.trial.entityDefeated);
+ ser.syncAsByte(_awayMission.trial.doorOpen);
+ ser.syncAsByte(_awayMission.trial.scannedLock);
+ ser.syncAsByte(_awayMission.trial.doorCodeBehaviour);
+ ser.syncAsByte(_awayMission.trial.globSplitInTwo);
+ ser.syncAsByte(_awayMission.trial.globDefeated);
+ ser.syncBytes(_awayMission.trial.globEnergyLevels, 3);
+ ser.syncAsByte(_awayMission.trial.enteredTrial3FirstTime);
+ ser.syncAsByte(_awayMission.trial.klingonShootIndex);
+ ser.syncAsByte(_awayMission.trial.shotKlingons);
+ ser.syncAsSint16LE(_awayMission.trial.shotKlingonState);
+ ser.syncAsByte(_awayMission.trial.neuralInterfaceActive);
+ for (int i = 0; i < 3; i++)
+ ser.syncAsSint16LE(_awayMission.trial.holeContents[i]);
+ ser.syncAsByte(_awayMission.trial.enteredGlobRoom);
+ ser.syncAsByte(_awayMission.trial.forceFieldDown);
+ ser.syncAsByte(_awayMission.trial.uhuraAnalyzedCode);
+ ser.syncAsSint16LE(_awayMission.trial.missionEndMethod);
+ ser.syncAsByte(_awayMission.trial.gotPointsForGettingRod);
+ ser.syncAsByte(_awayMission.trial.gotPointsForCoatingRodWithIron);
+ ser.syncAsByte(_awayMission.trial.gotPointsForActivatingInterface);
+ ser.syncAsByte(_awayMission.trial.gotPointsForScanningGlob);
+ ser.syncAsByte(_awayMission.trial.gotPointsForBeamingOut);
+
+ // trial2
+ ser.syncAsByte(_room->_roomVar.trial.globBeingShot);
+ ser.syncAsByte(_room->_roomVar.trial.phaserOnKill);
+
+ // trial5
+ ser.syncAsSint16LE(_room->_roomVar.trial.itemToUse);
+ ser.syncAsSint16LE(_room->_roomVar.trial.objectToUse);
+ ser.syncAsSint16LE(_room->_roomVar.trial.hole);
+ }
// The action queue
if (ser.isLoading()) {
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index b4a7598a9b..e0a0401b99 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -29,6 +29,9 @@
namespace StarTrek {
+// The type to use for text references (values of "GameStringIDs" enum).
+// NOTE: if this typedef is changed, certain lines in "saveload.cpp" would also need to be
+// changed. Better to leave this as-is.
typedef int32 TextRef;
// Text that's loaded from "GROUND.TXT". First 0x40 pieces of text are for items.