static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) { s.syncAsUint32LE(hdr.id); s.syncAsUint32LE(hdr.size); s.syncAsUint32LE(hdr.ver); s.syncBytes((byte *)hdr.desc, SG_DESC_LEN); hdr.desc[SG_DESC_LEN - 1] = 0; syncTime(s, hdr.dateTime); int tmp = hdr.size - s.bytesSynced(); // NOTE: We can't use SAVEGAME_ID here when attempting to remove a saved game from the launcher, // as there is no TinselEngine initialized then. This means that we can't check if this is a DW1 // or DW2 savegame in this case, but it doesn't really matter, as the saved game is about to be // deleted anyway. Refer to bug #3387551. bool correctID = _vm ? (hdr.id == SAVEGAME_ID) : (hdr.id == DW1_SAVEGAME_ID || hdr.id == DW2_SAVEGAME_ID); // Perform sanity check if (tmp < 0 || !correctID || hdr.ver > CURRENT_VER || hdr.size > 1024) return false; // Skip over any extra bytes s.skip(tmp); return true; }
bool BuriedEngine::syncLocation(Common::Serializer &s, Location &location) { s.syncAsSint16LE(location.timeZone); s.syncAsSint16LE(location.environment); s.syncAsSint16LE(location.node); s.syncAsSint16LE(location.facing); s.syncAsSint16LE(location.orientation); s.syncAsSint16LE(location.depth); return s.bytesSynced() == 12; }
static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) { s.syncAsUint32LE(hdr.id); s.syncAsUint32LE(hdr.size); s.syncAsUint32LE(hdr.ver); s.syncBytes((byte *)hdr.desc, SG_DESC_LEN); hdr.desc[SG_DESC_LEN - 1] = 0; syncTime(s, hdr.dateTime); int tmp = hdr.size - s.bytesSynced(); // NOTE: We can't use SAVEGAME_ID here when attempting to remove a saved game from the launcher, // as there is no TinselEngine initialized then. This means that we can't check if this is a DW1 // or DW2 savegame in this case, but it doesn't really matter, as the saved game is about to be // deleted anyway. Refer to bug #3387551. bool correctID = _vm ? (hdr.id == SAVEGAME_ID) : (hdr.id == DW1_SAVEGAME_ID || hdr.id == DW2_SAVEGAME_ID); // Perform sanity check if (tmp < 0 || !correctID || hdr.ver > CURRENT_VER || hdr.size > 1024) return false; if (tmp > 0) { // If there's header space left, handling syncing the Scn flag and game language s.syncAsByte(hdr.scnFlag); s.syncAsByte(hdr.language); tmp -= 2; if (_vm && s.isLoading()) { // If the engine is loaded, ensure the Scn/Gra usage is correct, and it's the correct language if ((hdr.scnFlag != ((_vm->getFeatures() & GF_SCNFILES) != 0)) || (hdr.language != _vm->_config->_language)) return false; } } // Handle the number of interpreter contexts that will be saved in the savegame if (tmp >= 2) { tmp -= 2; hdr.numInterpreters = NUM_INTERPRET; s.syncAsUint16LE(hdr.numInterpreters); } else { hdr.numInterpreters = (TinselV2 ? 70 : 64) - 20; } // Skip over any extra bytes s.skip(tmp); return true; }
static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) { s.syncAsUint32LE(hdr.id); s.syncAsUint32LE(hdr.size); s.syncAsUint32LE(hdr.ver); s.syncBytes((byte *)hdr.desc, SG_DESC_LEN); hdr.desc[SG_DESC_LEN - 1] = 0; syncTime(s, hdr.dateTime); int tmp = hdr.size - s.bytesSynced(); // Perform sanity check if (tmp < 0 || hdr.id != SAVEGAME_ID || hdr.ver > CURRENT_VER || hdr.size > 1024) return false; // Skip over any extra bytes s.skip(tmp); return true; }
void MystGameState::syncGameState(Common::Serializer &s, bool isME) { // Globals first s.syncAsUint16LE(_globals.u0); s.syncAsUint16LE(_globals.currentAge); s.syncAsUint16LE(_globals.heldPage); s.syncAsUint16LE(_globals.u1); s.syncAsUint16LE(_globals.transitions); s.syncAsUint16LE(_globals.zipMode); s.syncAsUint16LE(_globals.redPagesInBook); s.syncAsUint16LE(_globals.bluePagesInBook); // Onto Myst if (isME) { s.syncAsUint32LE(_myst.cabinMarkerSwitch); s.syncAsUint32LE(_myst.clockTowerMarkerSwitch); s.syncAsUint32LE(_myst.dockMarkerSwitch); s.syncAsUint32LE(_myst.poolMarkerSwitch); s.syncAsUint32LE(_myst.gearsMarkerSwitch); s.syncAsUint32LE(_myst.generatorMarkerSwitch); s.syncAsUint32LE(_myst.observatoryMarkerSwitch); s.syncAsUint32LE(_myst.rocketshipMarkerSwitch); } else { s.syncAsByte(_myst.cabinMarkerSwitch); s.syncAsByte(_myst.clockTowerMarkerSwitch); s.syncAsByte(_myst.dockMarkerSwitch); s.syncAsByte(_myst.poolMarkerSwitch); s.syncAsByte(_myst.gearsMarkerSwitch); s.syncAsByte(_myst.generatorMarkerSwitch); s.syncAsByte(_myst.observatoryMarkerSwitch); s.syncAsByte(_myst.rocketshipMarkerSwitch); } s.syncAsUint16LE(_myst.greenBookOpenedBefore); s.syncAsUint16LE(_myst.shipFloating); s.syncAsUint16LE(_myst.cabinValvePosition); s.syncAsUint16LE(_myst.clockTowerHourPosition); s.syncAsUint16LE(_myst.clockTowerMinutePosition); s.syncAsUint16LE(_myst.gearsOpen); s.syncAsUint16LE(_myst.clockTowerBridgeOpen); s.syncAsUint16LE(_myst.generatorBreakers); s.syncAsUint16LE(_myst.generatorButtons); s.syncAsUint16LE(_myst.generatorVoltage); s.syncAsUint16LE(_myst.libraryBookcaseDoor); s.syncAsUint16LE(_myst.imagerSelection); s.syncAsUint16LE(_myst.imagerActive); s.syncAsUint16LE(_myst.imagerWaterErased); s.syncAsUint16LE(_myst.imagerMountainErased); s.syncAsUint16LE(_myst.imagerAtrusErased); s.syncAsUint16LE(_myst.imagerMarkerErased); s.syncAsUint16LE(_myst.towerRotationAngle); s.syncAsUint16LE(_myst.courtyardImageBoxes); s.syncAsUint16LE(_myst.cabinPilotLightLit); s.syncAsUint16LE(_myst.observatoryDaySetting); s.syncAsUint16LE(_myst.observatoryLights); s.syncAsUint16LE(_myst.observatoryMonthSetting); s.syncAsUint16LE(_myst.observatoryTimeSetting); s.syncAsUint16LE(_myst.observatoryYearSetting); s.syncAsUint16LE(_myst.observatoryDayTarget); s.syncAsUint16LE(_myst.observatoryMonthTarget); s.syncAsUint16LE(_myst.observatoryTimeTarget); s.syncAsUint16LE(_myst.observatoryYearTarget); s.syncAsUint16LE(_myst.cabinSafeCombination); s.syncAsUint16LE(_myst.treePosition); s.syncAsUint32LE(_myst.treeLastMoveTime); for (int i = 0; i < 5; i++) s.syncAsUint16LE(_myst.rocketSliderPosition[i]); s.syncAsUint16LE(_myst.observatoryDaySlider); s.syncAsUint16LE(_myst.observatoryMonthSlider); s.syncAsUint16LE(_myst.observatoryYearSlider); s.syncAsUint16LE(_myst.observatoryTimeSlider); // Channelwood if (isME) { s.syncAsUint32LE(_channelwood.waterPumpBridgeState); s.syncAsUint32LE(_channelwood.elevatorState); s.syncAsUint32LE(_channelwood.stairsLowerDoorState); s.syncAsUint32LE(_channelwood.pipeState); } else { s.syncAsByte(_channelwood.waterPumpBridgeState); s.syncAsByte(_channelwood.elevatorState); s.syncAsByte(_channelwood.stairsLowerDoorState); s.syncAsByte(_channelwood.pipeState); } s.syncAsUint16LE(_channelwood.waterValveStates); s.syncAsUint16LE(_channelwood.holoprojectorSelection); s.syncAsUint16LE(_channelwood.stairsUpperDoorState); if (isME) s.skip(4); else s.skip(1); // Mechanical s.syncAsUint16LE(_mechanical.achenarPanelState); s.syncAsUint16LE(_mechanical.sirrusPanelState); s.syncAsUint16LE(_mechanical.staircaseState); s.syncAsUint16LE(_mechanical.elevatorRotation); for (int i = 0; i < 4; i++) s.syncAsUint16LE(_mechanical.codeShape[i]); // Selenitic if (isME) { s.syncAsUint32LE(_selenitic.emitterEnabledWater); s.syncAsUint32LE(_selenitic.emitterEnabledVolcano); s.syncAsUint32LE(_selenitic.emitterEnabledClock); s.syncAsUint32LE(_selenitic.emitterEnabledCrystal); s.syncAsUint32LE(_selenitic.emitterEnabledWind); s.syncAsUint32LE(_selenitic.soundReceiverOpened); s.syncAsUint32LE(_selenitic.tunnelLightsSwitchedOn); } else { s.syncAsByte(_selenitic.emitterEnabledWater); s.syncAsByte(_selenitic.emitterEnabledVolcano); s.syncAsByte(_selenitic.emitterEnabledClock); s.syncAsByte(_selenitic.emitterEnabledCrystal); s.syncAsByte(_selenitic.emitterEnabledWind); s.syncAsByte(_selenitic.soundReceiverOpened); s.syncAsByte(_selenitic.tunnelLightsSwitchedOn); } s.syncAsUint16LE(_selenitic.soundReceiverCurrentSource); for (byte i = 0; i < 5; i++) s.syncAsUint16LE(_selenitic.soundReceiverPositions[i]); for (byte i = 0; i < 5; i++) s.syncAsUint16LE(_selenitic.soundLockSliderPositions[i]); // Stoneship if (isME) { s.syncAsUint32LE(_stoneship.lightState); } else { s.syncAsByte(_stoneship.lightState); } s.syncAsUint16LE(_stoneship.sideDoorOpened); s.syncAsUint16LE(_stoneship.pumpState); s.syncAsUint16LE(_stoneship.trapdoorState); s.syncAsUint16LE(_stoneship.chestWaterState); s.syncAsUint16LE(_stoneship.chestValveState); s.syncAsUint16LE(_stoneship.chestOpenState); s.syncAsUint16LE(_stoneship.trapdoorKeyState); s.syncAsUint32LE(_stoneship.generatorDuration); s.syncAsUint16LE(_stoneship.generatorPowerAvailable); s.syncAsUint32LE(_stoneship.generatorDepletionTime); // D'ni s.syncAsUint16LE(_globals.ending); // Already visited zip destinations for (byte i = 0; i < 41; i++) s.syncAsUint16LE(_mystReachableZipDests[i]); for (byte i = 0; i < 41; i++) s.syncAsUint16LE(_channelwoodReachableZipDests[i]); for (byte i = 0; i < 41; i++) s.syncAsUint16LE(_mechReachableZipDests[i]); for (byte i = 0; i < 41; i++) s.syncAsUint16LE(_seleniticReachableZipDests[i]); for (byte i = 0; i < 41; i++) s.syncAsUint16LE(_stoneshipReachableZipDests[i]); if ((isME && s.bytesSynced() != 664) || (!isME && s.bytesSynced() != 601)) warning("Unexpected File Position 0x%03X At End of Save/Load", s.bytesSynced()); }
bool BuriedEngine::syncGlobalFlags(Common::Serializer &s, GlobalFlags &flags) { uint32 startBytes = s.bytesSynced(); s.syncAsByte(flags.cgWallExploded); s.syncAsByte(flags.cgHookPresent); s.syncAsByte(flags.cgArrowPresent); s.syncAsByte(flags.cgHammerPresent); s.syncAsByte(flags.cgSmithyStatus); s.syncAsByte(flags.cgSmithyGuard); s.syncAsByte(flags.cgBaileyOneWayGuard); s.syncAsByte(flags.cgBaileyTwoWayGuards); s.syncAsByte(flags.cgTapestryFlag); s.syncAsByte(flags.cgBurnedLetterPresent); s.syncAsByte(flags.cgGoldCoinsPresent); s.syncAsByte(flags.cgStorageRoomVisit); s.syncAsByte(flags.bcTranslateEnabled); s.syncAsByte(flags.bcCloakingEnabled); s.syncAsByte(flags.bcLocateEnabled); s.syncAsByte(flags.myPickedUpCeramicBowl); s.syncAsByte(flags.myTPCodeWheelStatus); s.syncAsByte(flags.myTPCodeWheelLeftIndex); s.syncAsByte(flags.myTPCodeWheelRightIndex); s.syncAsByte(flags.myMCPickedUpSkull); s.syncAsByte(flags.myMCDeathGodOfferings); s.syncAsByte(flags.myWGPlacedRope); s.syncAsByte(flags.myWGRetrievedJadeBlock); s.syncAsByte(flags.myWTRetrievedLimestoneBlock); s.syncAsByte(flags.myWTCurrentBridgeStatus); s.syncAsByte(flags.myAGRetrievedEntrySkull); s.syncAsByte(flags.myAGRetrievedSpearSkull); s.syncAsByte(flags.myAGRetrievedCopperMedal); s.syncAsByte(flags.myAGRetrievedObsidianBlock); s.syncAsByte(flags.myAGHeadAStatus); s.syncAsByte(flags.myAGHeadBStatus); s.syncAsByte(flags.myAGHeadCStatus); s.syncAsByte(flags.myAGHeadDStatus); s.syncAsByte(flags.myAGHeadAStatusSkullID); s.syncAsByte(flags.myAGHeadBStatusSkullID); s.syncAsByte(flags.myAGHeadCStatusSkullID); s.syncAsByte(flags.myAGHeadDStatusSkullID); s.syncAsByte(flags.myAGTimerHeadID); SYNC_FLAG_UINT32(myAGTimerStartTime); s.syncAsByte(flags.myDGOfferedHeart); s.syncAsByte(flags.takenEnvironCart); s.syncAsByte(flags.alRDTakenLiveCore); s.syncAsByte(flags.alRDTakenDeadCore); s.syncAsByte(flags.alNMWrongAlienPrefixCode); s.syncAsByte(flags.faKIOvenStatus); s.syncAsByte(flags.faKIPostBoxSlotA); s.syncAsByte(flags.faKIPostBoxSlotB); s.syncAsByte(flags.faKIPostBoxSlotC); s.syncAsByte(flags.faERCurrentCartridge); s.syncAsByte(flags.faERTakenRemoteControl); s.syncAsByte(flags.myMCStingerID); s.syncAsByte(flags.myMCStingerChannelID); s.syncAsByte(flags.faStingerID); s.syncAsByte(flags.faStingerChannelID); s.syncBytes(flags.unused0, sizeof(flags.unused0)); SYNC_FLAG_UINT32(cgMWCatapultData); SYNC_FLAG_UINT32(cgMWCatapultOffset); s.syncAsByte(flags.cgTSTriedDoor); s.syncAsByte(flags.cgMBCrossedMoat); s.syncAsByte(flags.cgKSSmithyEntryRead); s.syncAsByte(flags.cgKSSmithyEntryTranslated); s.syncAsByte(flags.cgBSFoundMold); s.syncAsByte(flags.readBurnedLetter); s.syncAsByte(flags.evcapNumCaptured); s.syncBytes(flags.evcapBaseID, sizeof(flags.evcapBaseID)); s.syncBytes(flags.unused1, sizeof(flags.unused1)); s.syncAsByte(flags.faMNEnvironDoor); s.syncAsByte(flags.faMNClockClicked); s.syncAsByte(flags.faMNBooksClicked); s.syncAsByte(flags.faMNTazClicked); s.syncAsByte(flags.faMNPongClicked); s.syncAsByte(flags.faKIBirdsBobbed); s.syncAsByte(flags.faKICoffeeSpilled); s.syncAsByte(flags.cgViewedKeepPlans); s.syncAsByte(flags.cgFoundChestPanel); s.syncAsByte(flags.cgTRFoundSword); s.syncAsByte(flags.faHeardAgentFigure); s.syncAsByte(flags.jumpBCNoInfoMessageCycle); s.syncAsByte(flags.myTPCalendarTopTranslated); s.syncAsByte(flags.myTPCalendarListTranslated); s.syncAsByte(flags.myTPTextTranslated); s.syncAsByte(flags.myMCTransDoor); s.syncAsByte(flags.myMCTransAGOffering); s.syncAsByte(flags.myMCTransWGOffering); s.syncAsByte(flags.myMCTransWTOffering); s.syncAsByte(flags.myMCTransDGOffering); s.syncAsByte(flags.myMCTransMadeAnOffering); s.syncAsByte(flags.myWGTransDoorTop); s.syncAsByte(flags.myWGSeenLowerPassage); s.syncAsByte(flags.myWGCrossedRopeBridge); s.syncAsByte(flags.myMCViewedDeathGodDoor); s.syncAsByte(flags.myTPTransBreathOfItzamna); SYNC_FLAG_UINT32(myAGHeadAOpenedTime); SYNC_FLAG_UINT32(myAGHeadBOpenedTime); SYNC_FLAG_UINT32(myAGHeadCOpenedTime); SYNC_FLAG_UINT32(myAGHeadDOpenedTime); s.syncAsByte(flags.myAGHeadATouched); s.syncAsByte(flags.myAGHeadBTouched); s.syncAsByte(flags.myAGHeadCTouched); s.syncAsByte(flags.myAGHeadDTouched); s.syncAsByte(flags.lensFilterActivated); s.syncAsByte(flags.dsPTElevatorPresent); s.syncAsByte(flags.dsPTElevatorLeverA); s.syncAsByte(flags.dsPTElevatorLeverB); s.syncAsByte(flags.dsPTDoorLocked); s.syncAsByte(flags.dsWSPickedUpWheelAssembly); s.syncAsByte(flags.dsWSPickedUpGearAssembly); s.syncAsByte(flags.dsWSPickedUpPegs); s.syncAsByte(flags.dsWSSiegeCycleStatus); s.syncAsByte(flags.dsWSGrabbedSiegeCycle); s.syncAsByte(flags.dsPTUseElevatorControls); s.syncAsByte(flags.dsPTTransElevatorControls); s.syncAsByte(flags.dsGDTakenCoilOfRope); s.syncAsByte(flags.dsCTUnlockedDoor); s.syncAsByte(flags.dsCTViewedAgent3); s.syncAsByte(flags.dsPTViewedAgent3); s.syncAsByte(flags.dsCTRetrievedLens); s.syncAsByte(flags.dsCTTakenHeart); s.syncAsByte(flags.dsCYFiredCannon); s.syncAsByte(flags.dsCYBallistaStatus); s.syncAsByte(flags.dsCYPlacedSiegeCycle); s.syncAsByte(flags.dsCYBallistaXPos); s.syncAsByte(flags.dsCYBallistaYPos); s.syncAsByte(flags.aiHWStingerID); s.syncAsByte(flags.aiHWStingerChannelID); s.syncAsByte(flags.aiCRStingerID); s.syncAsByte(flags.aiCRStingerChannelID); s.syncAsByte(flags.aiDBStingerID); s.syncAsByte(flags.aiDBStingerChannelID); s.syncAsByte(flags.aiCRGrabbedMetalBar); s.syncAsByte(flags.aiICGrabbedWaterCanister); s.syncAsByte(flags.aiOxygenTimer); s.syncAsByte(flags.aiCRPressurized); s.syncAsByte(flags.aiCRPressurizedAttempted); s.syncAsByte(flags.aiMRPressurized); s.syncAsByte(flags.aiIceMined); s.syncAsByte(flags.aiOxygenReserves); s.syncAsByte(flags.aiSCHeardInitialSpeech); s.syncAsByte(flags.aiSCInitialAudioChannel); s.syncAsByte(flags.aiSCDBDoorWarning); s.syncAsByte(flags.aiSCMoveCenterWarning); s.syncAsByte(flags.aiSCConversationStatus); s.syncAsByte(flags.aiHWIceDoorUnlocked); s.syncAsByte(flags.aiICWaterInFillHandle); s.syncAsByte(flags.aiICTakenWaterCanister); s.syncAsByte(flags.aiSWStingerID); s.syncAsByte(flags.aiSWStingerChannelID); s.syncAsByte(flags.aiMRCorrectFreqSet); s.syncAsByte(flags.aiSCHeardNexusDoorComment); s.syncAsByte(flags.aiSCHeardNexusDoorCode); s.syncAsByte(flags.asInitialGuardsPass); s.syncAsByte(flags.asRBPodAStatus); s.syncAsByte(flags.asRBPodBStatus); s.syncAsByte(flags.asRBPodCStatus); s.syncAsByte(flags.asRBPodDStatus); s.syncAsByte(flags.asRBPodEStatus); s.syncAsByte(flags.asRBPodFStatus); s.syncAsByte(flags.asRBPodATakenEnvironCart); s.syncAsByte(flags.asRBPodBTakenPuzzleBox); s.syncAsByte(flags.asRBPodCTakenCodex); s.syncAsByte(flags.asRBPodDTakenSculpture); s.syncAsByte(flags.asRBPodETakenSword); s.syncAsByte(flags.asTakenEvidenceThisTrip); s.syncAsByte(flags.asDangerDoorASealed); s.syncAsByte(flags.asDoorBGuardsSeen); s.syncAsByte(flags.asAmbassadorEncounter); s.syncAsByte(flags.dsCTTriedLockedDoor); s.syncAsByte(flags.dsCTCodexTranslateAttempted); s.syncAsByte(flags.dsCTCodexFormulaeFound); s.syncAsByte(flags.dsCTCodexAtlanticusPage2); s.syncAsByte(flags.dsCTTriedElevatorControls); s.syncAsByte(flags.aiDBPlayedMomComment); s.syncAsByte(flags.aiDBPlayedFirstArthur); s.syncAsByte(flags.aiDBPlayedSecondArthur); s.syncAsByte(flags.aiDBPlayedThirdArthur); s.syncAsByte(flags.aiDBPlayedFourthArthur); s.syncAsByte(flags.aiSCPlayedNoStinger); s.syncAsByte(flags.faKITakenPostboxItem); s.syncAsByte(flags.cgMBVisited); s.syncAsByte(flags.cgKCVisited); s.syncAsByte(flags.cgTRVisited); s.syncAsByte(flags.cgKSReadJournal); s.syncAsByte(flags.cgSRClickedOnLockedChest); s.syncAsByte(flags.cgSROpenedChest); s.syncAsByte(flags.dsVisitedCodexTower); s.syncAsByte(flags.dsPTRaisedPlatform); s.syncAsByte(flags.dsPTWalkedDownElevator); s.syncAsByte(flags.dsPTBeenOnBalcony); s.syncAsByte(flags.dsGDClickedOnCodexDoor); s.syncAsByte(flags.dsWSSeenCycleSketch); s.syncAsByte(flags.dsWSSeenBallistaSketch); s.syncAsByte(flags.genHadSiegeCycle); s.syncAsByte(flags.genHadDriveAssembly); s.syncAsByte(flags.genHadWheelAssembly); s.syncAsByte(flags.dsCYNeverConnectedHook); s.syncAsByte(flags.dsCYNeverShotBallista); s.syncAsByte(flags.dsCYNeverUsedCrank); s.syncAsByte(flags.dsCYNeverOpenedBalconyDoor); s.syncAsByte(flags.dsCYTranslatedCodex); s.syncAsByte(flags.dsCYTriedOpeningDoor); s.syncAsByte(flags.dsCYTriedElevator); s.syncAsByte(flags.dsCYFoundCodexes); s.syncAsByte(flags.myVisitedMainCavern); s.syncAsByte(flags.myVisitedArrowGod); s.syncAsByte(flags.myVisitedWaterGod); s.syncAsByte(flags.myVisitedWealthGod); s.syncAsByte(flags.myVisitedDeathGod); s.syncAsByte(flags.myVisitedSpecRooms); s.syncAsByte(flags.myWTSteppedOnSwings); s.syncAsByte(flags.myWTSteppedOnFarLedge); s.syncAsByte(flags.myDGOpenedPuzzleBox); s.syncAsByte(flags.myAGVisitedAltar); s.syncAsByte(flags.dsCTPlayedBallistaFalling); s.syncAsByte(flags.cgTSTriedDoorA); s.syncAsByte(flags.cgTSTriedDoorB); s.syncAsByte(flags.aiHWLastCommentPlayed); s.syncAsByte(flags.aiNXPlayedBrainComment); s.syncAsByte(flags.asRBLastStingerID); s.syncAsByte(flags.asRBStingerID); s.syncAsByte(flags.aiICProcessedOxygen); s.syncAsByte(flags.dsCYWeebleClicked); s.syncAsByte(flags.aiICUsedMiningControls); s.syncAsByte(flags.aiSWAttemptedPresMR); s.syncAsByte(flags.aiICRefilledOxygen); s.syncAsByte(flags.aiMRUsedHarmonicsInterface); s.syncAsByte(flags.alRestoreSkipAgent3Initial); s.syncBytes(flags.unused2, sizeof(flags.unused2)); s.syncAsByte(flags.scoreGotTranslateBioChip); s.syncAsByte(flags.scoreEnteredSpaceStation); s.syncAsByte(flags.scoreDownloadedArthur); s.syncAsByte(flags.scoreFoundSculptureDiagram); s.syncAsByte(flags.scoreEnteredKeep); s.syncAsByte(flags.scoreGotKeyFromSmithy); s.syncAsByte(flags.scoreEnteredTreasureRoom); s.syncAsByte(flags.scoreFoundSwordDiamond); s.syncAsByte(flags.scoreMadeSiegeCycle); s.syncAsByte(flags.scoreEnteredCodexTower); s.syncAsByte(flags.scoreLoggedCodexEvidence); s.syncAsByte(flags.scoreEnteredMainCavern); s.syncAsByte(flags.scoreGotWealthGodPiece); s.syncAsByte(flags.scoreGotRainGodPiece); s.syncAsByte(flags.scoreGotWarGodPiece); s.syncAsByte(flags.scoreCompletedDeathGod); s.syncAsByte(flags.scoreEliminatedAgent3); s.syncAsByte(flags.scoreTransportToKrynn); s.syncAsByte(flags.scoreGotKrynnArtifacts); s.syncAsByte(flags.scoreDefeatedIcarus); s.syncAsByte(flags.scoreResearchINNLouvreReport); s.syncAsByte(flags.scoreResearchINNHighBidder); s.syncAsByte(flags.scoreResearchINNAppeal); s.syncAsByte(flags.scoreResearchINNUpdate); s.syncAsByte(flags.scoreResearchINNJumpsuit); s.syncAsByte(flags.scoreResearchBCJumpsuit); s.syncAsByte(flags.scoreResearchMichelle); s.syncAsByte(flags.scoreResearchMichelleBkg); s.syncAsByte(flags.scoreResearchLensFilter); s.syncAsByte(flags.scoreResearchCastleFootprint); s.syncAsByte(flags.scoreResearchDaVinciFootprint); s.syncAsByte(flags.scoreResearchMorphSculpture); s.syncAsByte(flags.scoreResearchEnvironCart); s.syncAsByte(flags.scoreResearchAgent3Note); s.syncAsByte(flags.scoreResearchAgent3DaVinci); SYNC_FLAG_UINT16(scoreHintsTotal); s.syncBytes(flags.unused3, sizeof(flags.unused3)); s.syncAsByte(flags.genJumpCastleBriefing); s.syncAsByte(flags.genJumpMayanBriefing); s.syncAsByte(flags.genJumpDaVinciBriefing); s.syncAsByte(flags.genJumpStationBriefing); s.syncBytes(flags.unused4, sizeof(flags.unused4)); s.syncAsByte(flags.generalWalkthroughMode); s.syncBytes(flags.unused5, sizeof(flags.unused5)); s.syncBytes(flags.aiData, sizeof(flags.aiData)); return s.bytesSynced() - startBytes == 1024; }