1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef STARTREK_AWAYMISSION_H 24 #define STARTREK_AWAYMISSION_H 25 26 // All variables here get cleared to 0 upon starting an away mission. 27 // NOTE: Any changes here must be reflected in the corresponding serializer functions. 28 struct AwayMission { 29 // These timers count down automatically when nonzero. When they reach 0, 30 // ACTION_TIMER_EXPIRED is invoked with the corresponding index (0-7). 31 int16 timers[8]; // 0x00-0x0f 32 33 int16 mouseX; // 0x10 34 int16 mouseY; // 0x12 35 int16 crewGetupTimers[4]; // 0x14 36 bool disableWalking; // 0x1c 37 38 // 0 / false: input enabled 39 // 1 / true: input disabled, turns back on after walking or beaming into a room 40 // 2: input disabled, doesn't turn back on after walking or beaming into room 41 byte disableInput; // 0x1d 42 43 bool redshirtDead; // 0x1e 44 byte activeAction; // 0x1f 45 byte activeObject; // 0x20; The item that is going to be used on something 46 byte passiveObject; // 0x21; The item that the active item is used on (or the item looked at, etc). 47 48 // If this is true after calling room-specific RDF code, the game will continue to run 49 // any "default" code for the event, if any. 50 bool rdfStillDoDefaultAction; // 0x23 51 52 // If a bit in "crewDownBitset" is set, the corresponding timer in "crewGetupTimers" 53 // begins counting down. When it reaches 0, they get up. 54 byte crewDownBitset; // 0x24 55 56 int8 crewDirectionsAfterWalk[4]; // 0x25: Sets an object's direction after they finish walking somewhere? 57 58 // Mission-specific variables 59 union { 60 // Demon World (TODO: label remaining generic variables) 61 struct { 62 bool wasRudeToPrelate; // 0x29 63 bool insultedStephen; // 0x2b 64 bool field2d; // 0x2d 65 bool beatKlingons; // 0x2f 66 bool tookKlingonHand; // 0x31 67 68 bool talkedToPrelate; // 0x33 69 bool stephenWelcomedToStudy; // 0x34 70 bool prelateWelcomedCrew; // 0x35 71 bool askedPrelateAboutSightings; // 0x36 72 byte field37; // 0x37 73 bool mccoyMentionedFlora; // 0x38 74 byte numBouldersGone; // 0x39 75 byte enteredFrom; // 0x3a 76 bool repairedHand; // 0x3b 77 bool healedMiner; // 0x3c 78 bool curedChub; // 0x3d 79 bool field3e; // 0x3e 80 bool knowAboutHypoDytoxin; // 0x3f 81 bool minerDead; // 0x40 82 byte field41; // 0x41 83 bool foundMiner; // 0x43 84 bool field45; // 0x45 85 bool gaveSkullToNauian; // 0x47 86 bool warpsDisabled; // 0x48 87 bool boulder1Gone; // 0x49 88 bool boulder2Gone; // 0x4a 89 bool boulder3Gone; // 0x4b 90 bool boulder4Gone; // 0x4c 91 bool doorOpened; // 0x4d 92 bool solvedSunPuzzle; // 0x4e 93 byte itemsTakenFromCase; // 0x4f 94 bool gotBerries; // 0x50 95 bool madeHypoDytoxin; // 0x51 96 bool metNauian; // 0x53 97 bool gavePointsForDytoxin; // 0x54 98 bool lookedAtComputer; // 0x55 99 byte field56; // 0x56 100 bool foundAlienRoom; // 0x57 101 int16 missionScore; // 0x58 102 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250208103 void saveLoadWithSerializer(Common::Serializer &ser) { 104 ser.syncAsByte(wasRudeToPrelate); 105 ser.syncAsByte(insultedStephen); 106 ser.syncAsByte(field2d); 107 ser.syncAsByte(beatKlingons); 108 ser.syncAsByte(tookKlingonHand); 109 ser.syncAsByte(talkedToPrelate); 110 ser.syncAsByte(stephenWelcomedToStudy); 111 ser.syncAsByte(prelateWelcomedCrew); 112 ser.syncAsByte(askedPrelateAboutSightings); 113 ser.syncAsByte(field37); 114 ser.syncAsByte(mccoyMentionedFlora); 115 ser.syncAsByte(numBouldersGone); 116 ser.syncAsByte(enteredFrom); 117 ser.syncAsByte(repairedHand); 118 ser.syncAsByte(healedMiner); 119 ser.syncAsByte(curedChub); 120 ser.syncAsByte(field3e); 121 ser.syncAsByte(knowAboutHypoDytoxin); 122 ser.syncAsByte(minerDead); 123 ser.syncAsByte(field41); 124 ser.syncAsByte(foundMiner); 125 ser.syncAsByte(field45); 126 ser.syncAsByte(gaveSkullToNauian); 127 ser.syncAsByte(warpsDisabled); 128 ser.syncAsByte(boulder1Gone); 129 ser.syncAsByte(boulder2Gone); 130 ser.syncAsByte(boulder3Gone); 131 ser.syncAsByte(boulder4Gone); 132 ser.syncAsByte(doorOpened); 133 ser.syncAsByte(solvedSunPuzzle); 134 ser.syncAsByte(itemsTakenFromCase); 135 ser.syncAsByte(gotBerries); 136 ser.syncAsByte(madeHypoDytoxin); 137 ser.syncAsByte(metNauian); 138 ser.syncAsByte(gavePointsForDytoxin); 139 ser.syncAsByte(lookedAtComputer); 140 ser.syncAsByte(field56); 141 ser.syncAsByte(foundAlienRoom); 142 ser.syncAsSint16LE(missionScore); 143 } 144 } demon; 145 146 // Hijacked 147 struct { 148 int16 missionScore; // 0x29 149 int16 field2b; // 0x2b 150 int16 field2d; // 0x2d 151 bool engineerConscious; // 0x30 152 byte field35; // 0x35 153 bool gotWires; // 0x37 154 byte orbitalDecayCounter; // 0x3b 155 bool bridgeElasiDrewPhasers; // 0x3d 156 bool talkedToCereth; // 0x3e 157 bool gotJunkPile; // 0x3f 158 bool gotTransmogrifier; // 0x43 159 bool transporterRepaired; // 0x44 160 bool spockExaminedTransporter; // 0x45 161 bool usedTransmogrifierOnTransporter; // 0x46 162 bool bridgeForceFieldDown; // 0x47 163 bool savedPrisoners; // 0x48 164 bool haveBomb; // 0x49 165 bool brigElasiPhasersOnKill; // 0x4a 166 byte elasiTargetIndex; // 0x4b 167 byte guard1Status; // 0x4c 168 byte guard2Status; // 0x4d 169 byte field4e; // 0x4e 170 byte crewmanKilled[4]; // 0x4f 171 byte bridgeElasi1Status; // 0x53 172 byte bridgeElasi2Status; // 0x54 173 byte bridgeElasi3Status; // 0x55 174 byte bridgeElasi4Status; // 0x56 175 bool brigForceFieldDown; // 0x58 176 byte field59; // 0x59 177 byte field5b; // 0x5b 178 bool elasiSurrendered; // 0x5c 179 byte kirkPhaserDrawn; // 0x5d 180 181 // 1: Decided to shoot them 182 // 2: Talked, and they surrendered immediately 183 // 3: They deorbited the ship (and perhaps surrendered after) 184 byte bridgeWinMethod; // 0x5e 185 186 bool talkedToBrigCrewman; // 0x5f 187 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250308188 void saveLoadWithSerializer(Common::Serializer &ser) { 189 ser.syncAsSint16LE(missionScore); 190 ser.syncAsSint16LE(field2b); 191 ser.syncAsSint16LE(field2d); 192 ser.syncAsByte(engineerConscious); 193 ser.syncAsByte(field35); 194 ser.syncAsByte(gotWires); 195 ser.syncAsByte(orbitalDecayCounter); 196 ser.syncAsByte(bridgeElasiDrewPhasers); 197 ser.syncAsByte(talkedToCereth); 198 ser.syncAsByte(gotJunkPile); 199 ser.syncAsByte(gotTransmogrifier); 200 ser.syncAsByte(transporterRepaired); 201 ser.syncAsByte(spockExaminedTransporter); 202 ser.syncAsByte(usedTransmogrifierOnTransporter); 203 ser.syncAsByte(bridgeForceFieldDown); 204 ser.syncAsByte(savedPrisoners); 205 ser.syncAsByte(haveBomb); 206 ser.syncAsByte(brigElasiPhasersOnKill); 207 ser.syncAsByte(elasiTargetIndex); 208 ser.syncAsByte(guard1Status); 209 ser.syncAsByte(guard2Status); 210 ser.syncAsByte(field4e); 211 ser.syncBytes(crewmanKilled, 4); 212 ser.syncAsByte(bridgeElasi1Status); 213 ser.syncAsByte(bridgeElasi2Status); 214 ser.syncAsByte(bridgeElasi3Status); 215 ser.syncAsByte(bridgeElasi4Status); 216 ser.syncAsByte(brigForceFieldDown); 217 ser.syncAsByte(field59); 218 ser.syncAsByte(field5b); 219 ser.syncAsByte(elasiSurrendered); 220 ser.syncAsByte(kirkPhaserDrawn); 221 ser.syncAsByte(bridgeWinMethod); 222 ser.syncAsByte(talkedToBrigCrewman); 223 } 224 } tug; 225 226 // Love's Labor Jeopardized 227 struct { 228 bool alreadyStartedMission; // 0x29 229 bool knowAboutVirus; // 0x2a 230 bool romulansUnconsciousFromLaughingGas; // 0x2b 231 bool releasedHumanLaughingGas; // 0x2c 232 bool releasedRomulanLaughingGas; // 0x2d 233 bool chamberHasCure; // 0x2e 234 bool freezerOpen; // 0x2f 235 bool chamberHasDish; // 0x30 236 byte bottleInNozzle; // 0x31 237 bool cabinetOpen; // 0x32 238 bool gasFeedOn; // 0x33 239 byte synthesizerBottleIndex; // 0x34 240 byte synthesizerContents; // 0x35 241 byte canister1; // 0x36 242 byte canister2; // 0x37 243 bool servicePanelOpen; // 0x38 244 bool gasTankUnscrewed; // 0x39 245 bool wrenchTaken; // 0x3a 246 bool tookN2TankFromServicePanel; // 0x3b 247 bool field3c; // 0x3c 248 bool grateRemoved; // 0x3d 249 bool insulationOnGround; // 0x3e 250 bool visitedRoomWithRomulans; // 0x3f 251 bool romulansCured; // 0x40 252 bool romulansUnconsciousFromVirus; // 0x41 253 bool freedMarcusAndCheever; // 0x42 254 bool preaxCured; // 0x43 255 byte spockInfectionCounter; // 0x45: When this reached 100, Spock dies. 256 bool spockCured; // 0x46 257 bool contactedEnterpriseBeforeCure; // 0x47 258 bool contactedEnterpriseAfterCure; // 0x48 259 bool spockAccessedConsole; // 0x49 260 bool mccoyAccessedConsole; // 0x4a 261 bool gotPolyberylcarbonate; // 0x4b 262 bool gotTLDH; // 0x4c (Got romulan laughing gas) 263 bool gotPointsForOpeningGrate; // 0x4d 264 bool gotPointsForGassingRomulans; // 0x4e 265 bool gotCure; // 0x4f 266 bool gotPointsForHydratingPreax; // 0x50 267 bool gotPointsForHydratingRomulans; // 0x51 268 int16 missionScore; // 0x52 269 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250408270 void saveLoadWithSerializer(Common::Serializer &ser) { 271 ser.syncAsByte(alreadyStartedMission); 272 ser.syncAsByte(knowAboutVirus); 273 ser.syncAsByte(romulansUnconsciousFromLaughingGas); 274 ser.syncAsByte(releasedHumanLaughingGas); 275 ser.syncAsByte(releasedRomulanLaughingGas); 276 ser.syncAsByte(chamberHasCure); 277 ser.syncAsByte(freezerOpen); 278 ser.syncAsByte(chamberHasDish); 279 ser.syncAsByte(bottleInNozzle); 280 ser.syncAsByte(cabinetOpen); 281 ser.syncAsByte(gasFeedOn); 282 ser.syncAsByte(synthesizerBottleIndex); 283 ser.syncAsByte(synthesizerContents); 284 ser.syncAsByte(canister1); 285 ser.syncAsByte(canister2); 286 ser.syncAsByte(servicePanelOpen); 287 ser.syncAsByte(gasTankUnscrewed); 288 ser.syncAsByte(wrenchTaken); 289 ser.syncAsByte(tookN2TankFromServicePanel); 290 ser.syncAsByte(field3c); 291 ser.syncAsByte(grateRemoved); 292 ser.syncAsByte(insulationOnGround); 293 ser.syncAsByte(visitedRoomWithRomulans); 294 ser.syncAsByte(romulansCured); 295 ser.syncAsByte(romulansUnconsciousFromVirus); 296 ser.syncAsByte(freedMarcusAndCheever); 297 ser.syncAsByte(preaxCured); 298 ser.syncAsByte(spockInfectionCounter); 299 ser.syncAsByte(spockCured); 300 ser.syncAsByte(contactedEnterpriseBeforeCure); 301 ser.syncAsByte(contactedEnterpriseAfterCure); 302 ser.syncAsByte(spockAccessedConsole); 303 ser.syncAsByte(mccoyAccessedConsole); 304 ser.syncAsByte(gotPolyberylcarbonate); 305 ser.syncAsByte(gotTLDH); 306 ser.syncAsByte(gotPointsForOpeningGrate); 307 ser.syncAsByte(gotPointsForGassingRomulans); 308 ser.syncAsByte(gotCure); 309 ser.syncAsByte(gotPointsForHydratingPreax); 310 ser.syncAsByte(gotPointsForHydratingRomulans); 311 ser.syncAsSint16LE(missionScore); 312 } 313 } love; 314 315 struct { 316 // 0: Haven't entered first room yet 317 // 1: Have entered first room once 318 // 2: Mudd is gone from first room 319 byte muddFirstRoomState; // 0x29 320 321 bool torpedoLoaded; // 0x33 322 bool knowAboutTorpedo; // 0x34 323 bool discoveredBase3System; // 0x35 324 bool translatedAlienLanguage; // 0x36 325 bool databaseDestroyed; // 0x37 326 bool muddInDatabaseRoom; // 0x38 327 bool muddCurrentlyInsane; // 0x39 328 bool computerDataErasedOrDestroyed; // 0x3a 329 bool muddErasedDatabase; // 0x3b 330 331 // True if you've combined the lense + degrimer and fired it off, discovering 332 // it's a weapon 333 bool discoveredLenseAndDegrimerFunction; // 0x3c 334 335 int16 torpedoStatus; // 0x3d 336 bool muddUnavailable; // 0x3f 337 bool muddVisitedDatabaseRoom; // 0x40 338 bool accessedAlienDatabase; // 0x41 339 bool tookRepairTool; // 0x42 340 bool gotPointsForDownloadingData; // 0x43 341 bool contactedEnterpriseFirstTime; // 0x44 342 bool viewScreenEnabled; // 0x45 343 bool lifeSupportMalfunctioning; // 0x46 344 byte numTimesEnteredRoom5; // 0x47 345 bool gotMemoryDisk; // 0x48 346 bool gotLense; // 0x49 347 bool gotDegrimer; // 0x4a 348 bool putCapsuleInMedicalMachine; // 0x4c 349 bool muddUnconscious; // 0x4d 350 351 // 0: haven't entered room yet 352 // 1: will go insane next time room is entered (if he's available) 353 // 2: currently insane (or unconscious) 354 // 3: cured 355 byte muddInsanityState; // 0x4e 356 357 bool muddInhaledGas; // 0x4f (mostly the same as "muddCurrentlyInsane"?) 358 int16 lifeSupportTimer; // 0x50 359 bool startedLifeSupportTimer; // 0x52 360 bool enteredRoom0ForFirstTime; // 0x54 361 bool gotPointsForLoadingTorpedo; // 0x55 362 bool gotPointsForPressingRedButton; // 0x56 363 bool gotPointsForEnablingViewscreen; // 0x57 364 bool enteredRoom1ForFirstTime; // 0x58 365 bool repairedLifeSupportGenerator; // 0x59 366 int16 missionScore; // 0x5a 367 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250508368 void saveLoadWithSerializer(Common::Serializer &ser) { 369 ser.syncAsByte(muddFirstRoomState); 370 ser.syncAsByte(torpedoLoaded); 371 ser.syncAsByte(knowAboutTorpedo); 372 ser.syncAsByte(discoveredBase3System); 373 ser.syncAsByte(translatedAlienLanguage); 374 ser.syncAsByte(databaseDestroyed); 375 ser.syncAsByte(muddInDatabaseRoom); 376 ser.syncAsByte(muddCurrentlyInsane); 377 ser.syncAsByte(computerDataErasedOrDestroyed); 378 ser.syncAsByte(muddErasedDatabase); 379 ser.syncAsByte(discoveredLenseAndDegrimerFunction); 380 ser.syncAsSint16LE(torpedoStatus); 381 ser.syncAsByte(muddUnavailable); 382 ser.syncAsByte(muddVisitedDatabaseRoom); 383 ser.syncAsByte(accessedAlienDatabase); 384 ser.syncAsByte(tookRepairTool); 385 ser.syncAsByte(gotPointsForDownloadingData); 386 ser.syncAsByte(contactedEnterpriseFirstTime); 387 ser.syncAsByte(viewScreenEnabled); 388 ser.syncAsByte(lifeSupportMalfunctioning); 389 ser.syncAsByte(numTimesEnteredRoom5); 390 ser.syncAsByte(gotMemoryDisk); 391 ser.syncAsByte(gotLense); 392 ser.syncAsByte(gotDegrimer); 393 ser.syncAsByte(putCapsuleInMedicalMachine); 394 ser.syncAsByte(muddUnconscious); 395 ser.syncAsByte(muddInsanityState); 396 ser.syncAsByte(muddInhaledGas); 397 ser.syncAsSint16LE(lifeSupportTimer); 398 ser.syncAsByte(startedLifeSupportTimer); 399 ser.syncAsByte(enteredRoom0ForFirstTime); 400 ser.syncAsByte(gotPointsForLoadingTorpedo); 401 ser.syncAsByte(gotPointsForPressingRedButton); 402 ser.syncAsByte(gotPointsForEnablingViewscreen); 403 ser.syncAsByte(enteredRoom1ForFirstTime); 404 ser.syncAsByte(repairedLifeSupportGenerator); 405 ser.syncAsSint16LE(missionScore); 406 } 407 } mudd; 408 409 struct { 410 bool diedFromStalactites; // 0x29 411 // 0: initial state 412 // 1: one rock thrown at it 413 // 2: two rocks thrown at it (low enough to climb up) 414 byte vineState; // 0x2a 415 416 bool gotRock; // 0x2b 417 bool gotSnake; // 0x2c 418 bool tookKnife; // 0x2d 419 bool field2e; // 0x2e 420 byte numRocksThrownAtTlaoxac; // 0x2f 421 bool gotFern; // 0x30 422 bool holeBlocked; // 0x31 423 bool tlaoxacTestPassed; // 0x32 424 bool knockedOutTlaoxac; // 0x33 425 bool waterMonsterRetreated; // 0x34 426 bool showedSnakeToTlaoxac; // 0x35 427 int16 missionScore; // 0x36 428 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250608429 void saveLoadWithSerializer(Common::Serializer &ser) { 430 ser.syncAsByte(diedFromStalactites); 431 ser.syncAsByte(vineState); 432 ser.syncAsByte(gotRock); 433 ser.syncAsByte(gotSnake); 434 ser.syncAsByte(tookKnife); 435 ser.syncAsByte(field2e); 436 ser.syncAsByte(numRocksThrownAtTlaoxac); 437 ser.syncAsByte(gotFern); 438 ser.syncAsByte(holeBlocked); 439 ser.syncAsByte(tlaoxacTestPassed); 440 ser.syncAsByte(knockedOutTlaoxac); 441 ser.syncAsByte(waterMonsterRetreated); 442 ser.syncAsByte(showedSnakeToTlaoxac); 443 ser.syncAsSint16LE(missionScore); 444 } 445 } feather; 446 447 struct { 448 int16 missionScore; // 0x29 449 int16 field2b; // 0x2b 450 bool entityDefeated; // 0x31: Used iron rod on the energy being 451 bool doorOpen; // 0x32 452 bool scannedLock; // 0x33 453 454 // 0: Don't know the door code yet 455 // 2: Will just open the door when the keypad is used 456 // 5: Will activate the unknown program when the keypad is used 457 byte doorCodeBehaviour; // 0x34 458 459 bool globSplitInTwo; // 0x35 460 bool globDefeated; // 0x36 461 byte globEnergyLevels[3]; // 0x37 462 bool enteredTrial3FirstTime; // 0x3a 463 byte klingonShootIndex; // 0x3b 464 byte shotKlingons; // 0x3c 465 466 // 0: Hasn't appeared yet 467 // 21: Is conscious 468 // 22: Is stunned 469 // 23: Is dead 470 int16 shotKlingonState; // 0x3d 471 472 bool neuralInterfaceActive; // 0x43 473 int16 holeContents[3]; // 0x44 (Holes to put gems in for TRIAL5) 474 475 bool enteredGlobRoom; // 0x5c 476 bool forceFieldDown; // 0x5d 477 bool uhuraAnalyzedCode; // 0x5e 478 479 // 0: Gave up in court, letting Quetzecoatl die 480 // 1: Beamed to enterprise after calling Uhura 481 // 2: Lost the court battle after beaming back to the courtroom 482 // 3: Quetzecoatl goes free and Vlict doesn't die 483 // 4: Quetzecoatl goes free and Vlict dies 484 int16 missionEndMethod; // 0x5f 485 486 bool gotPointsForGettingRod; // 0x61 487 bool gotPointsForCoatingRodWithIron; // 0x62 488 bool gotPointsForActivatingInterface; // 0x63 489 bool gotPointsForScanningGlob; // 0x64 490 491 bool gotPointsForBeamingOut; 492 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250708493 void saveLoadWithSerializer(Common::Serializer &ser) { 494 ser.syncAsSint16LE(missionScore); 495 ser.syncAsSint16LE(field2b); 496 ser.syncAsByte(entityDefeated); 497 ser.syncAsByte(doorOpen); 498 ser.syncAsByte(scannedLock); 499 ser.syncAsByte(doorCodeBehaviour); 500 ser.syncAsByte(globSplitInTwo); 501 ser.syncAsByte(globDefeated); 502 ser.syncBytes(globEnergyLevels, 3); 503 ser.syncAsByte(enteredTrial3FirstTime); 504 ser.syncAsByte(klingonShootIndex); 505 ser.syncAsByte(shotKlingons); 506 ser.syncAsSint16LE(shotKlingonState); 507 ser.syncAsByte(neuralInterfaceActive); 508 for (int i = 0; i < 3; i++) 509 ser.syncAsSint16LE(holeContents[i]); 510 ser.syncAsByte(enteredGlobRoom); 511 ser.syncAsByte(forceFieldDown); 512 ser.syncAsByte(uhuraAnalyzedCode); 513 ser.syncAsSint16LE(missionEndMethod); 514 ser.syncAsByte(gotPointsForGettingRod); 515 ser.syncAsByte(gotPointsForCoatingRodWithIron); 516 ser.syncAsByte(gotPointsForActivatingInterface); 517 ser.syncAsByte(gotPointsForScanningGlob); 518 ser.syncAsByte(gotPointsForBeamingOut); 519 } 520 } trial; 521 522 struct { 523 byte field31; // 0x31 524 byte field32; // 0x32 525 bool field33; // 0x33 526 bool doorLaserFiredOnce; // 0x34 527 bool gotPointsForAccessingTerminal; // 0x35 528 bool scannedKeycardLock; // 0x36 529 byte laserSetting; // 0x37 530 531 // 0 if the laser hasn't been programmed with the keycard template; 532 // 1 if it has been programmed with the template; 533 // 2 if the rock has been placed on the wall. 534 byte laserPattern; // 0x38 535 536 // bit 0: got a rock, or at least scanned the ground outside 537 // bit 1: entered mineshaft room 538 // bit 2: scanned the ID card panel 539 // bit 3: set after all 3 clues are obtained and Spock explains how to make 540 // the keycard 541 byte gatheredClues; // 0x39 542 543 // bit 0: scanned left computer 544 // bit 1: scanned right computer 545 // bit 2: accessed left computer 546 // bit 3: accessed right computer 547 byte scannedAndUsedComputers; // 0x3a 548 549 bool wireConnected1; // 0x3b 550 bool wireConnected2; // 0x3c 551 bool openedOuterDoor; // 0x3d 552 bool openedInnerDoor; // 0x3e 553 bool unlockedIDCardDoor; // 0x3f 554 555 // 0: mold hasn't been created 556 // 2: mold for the keycard has been etched into the rock 557 // 3: rock placed top of the mold 558 // 4: a keycard is there 559 int8 moldState; // 0x40 560 561 // 0: box closed 562 // 1: box open 563 // 2: box empty 564 byte boxState; // 0x41 565 566 bool enteredRoom0FirstTime; // 0x42 567 bool scottyInformedKirkAboutVirus; // 0x43 568 bool enteredRoom2FirstTime; // 0x44 569 bool enteredRoom3FirstTime; // 0x45 570 bool enteredRoom4FirstTime; // 0x46 571 bool enteredRoom5FirstTime; // 0x47 572 bool gotPointsForScanningStatue; // 0x48 573 bool gotPointsForScanningRoom4; // 0x49 574 bool gotPointsForScanningRoom5; // 0x4a 575 bool gotPointsForScanningRightComputer; // 0x4b 576 bool gotPointsForScanningLeftComputer; // 0x4c 577 bool gotPointsForUsingRightComputer; // 0x4d 578 bool gotPointsForUsingLeftComputer; // 0x4e 579 bool discoveredComputersOutOfSync; // 0x4f 580 bool enteredRoom1FirstTime; // 0x50 581 bool playedMusicUponEnteringRoom5FirstTime; // 0x51 582 int16 missionScore; // 0x52 583 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250808584 void saveLoadWithSerializer(Common::Serializer &ser) { 585 ser.syncAsByte(field31); 586 ser.syncAsByte(field32); 587 ser.syncAsByte(field33); 588 ser.syncAsByte(doorLaserFiredOnce); 589 ser.syncAsByte(gotPointsForAccessingTerminal); 590 ser.syncAsByte(scannedKeycardLock); 591 ser.syncAsByte(laserSetting); 592 ser.syncAsByte(laserPattern); 593 ser.syncAsByte(gatheredClues); 594 ser.syncAsByte(scannedAndUsedComputers); 595 ser.syncAsByte(wireConnected1); 596 ser.syncAsByte(wireConnected2); 597 ser.syncAsByte(openedOuterDoor); 598 ser.syncAsByte(openedInnerDoor); 599 ser.syncAsByte(unlockedIDCardDoor); 600 ser.syncAsByte(moldState); 601 ser.syncAsByte(boxState); 602 ser.syncAsByte(enteredRoom0FirstTime); 603 ser.syncAsByte(scottyInformedKirkAboutVirus); 604 ser.syncAsByte(enteredRoom2FirstTime); 605 ser.syncAsByte(enteredRoom3FirstTime); 606 ser.syncAsByte(enteredRoom4FirstTime); 607 ser.syncAsByte(enteredRoom5FirstTime); 608 ser.syncAsByte(gotPointsForScanningStatue); 609 ser.syncAsByte(gotPointsForScanningRoom4); 610 ser.syncAsByte(gotPointsForScanningRoom5); 611 ser.syncAsByte(gotPointsForScanningRightComputer); 612 ser.syncAsByte(gotPointsForScanningLeftComputer); 613 ser.syncAsByte(gotPointsForUsingRightComputer); 614 ser.syncAsByte(gotPointsForUsingLeftComputer); 615 ser.syncAsByte(discoveredComputersOutOfSync); 616 ser.syncAsByte(enteredRoom1FirstTime); 617 ser.syncAsByte(playedMusicUponEnteringRoom5FirstTime); 618 ser.syncAsSint16LE(missionScore); 619 } 620 } sins; 621 622 struct { 623 bool usedMedkitOnBrittany; // 0x29 624 bool talkedToBrittany; // 0x2a 625 bool brittanyDead; // 0x2b 626 bool lookedAtBrittany; // 0x2c 627 bool enteredRoom0FirstTime; // 0x2d 628 int16 missionScore; // 0x2e 629 bool bridgeCrewmanDead; // 0x30 630 bool scannedCaptainsChair; // 0x31 631 bool scannedComputerBank; // 0x32 632 bool showedRepublicMapFirstTime; // 0x33 633 bool impulseEnginesOn; // 0x34 634 635 // 0: beam still in place 636 // 1: used saw on beam 637 // 2: beam taken 638 byte beamState; // 0x35 639 640 bool enterpriseLeftForDistressCall; // 0x36 641 bool openedPanel; // 0x37 642 bool clearedPanelDebris; // 0x38 643 bool removedPanelDebris; // 0x39 644 bool oilInHypo; // 0x3a 645 bool loosenedDebrisWithOil; // 0x3b 646 647 // 0: no power allocated 648 // 1: power to weapons 649 // 2: power to shields 650 // 3: power to transporter 651 byte poweredSystem; // 0x3c 652 653 // 0: no tricorders plugged in 654 // 1: med tricorder plugged in 655 // 2: sci tricorder plugged in 656 // 3: both plugged in 657 byte tricordersPluggedIntoComputer; // 0x3d 658 659 byte captainsLogIndex; // 0x3e 660 bool elasiShieldsDown; // 0x40 661 bool torpedoLoaded; // 0x41 662 bool firedTorpedo; // 0x42 663 bool elasiShipDecloaked; // 0x43 664 bool countdownStarted; // 0x44 665 bool toldElasiToBeamOver; // 0x45 666 bool scannedMainComputer; // 0x46 667 bool elasiHailedRepublic; // 0x47 668 bool tookRecordDeckFromAuxilaryControl; // 0x48 669 670 // Counter used when shields are down and Elasi are present 671 int16 counterUntilElasiBoardWithShieldsDown; // 0x49 672 673 // Counter used after talking with Elasi and they give you time to recover the 674 // data 675 int16 counterUntilElasiAttack; // 0x4b 676 677 // Counter used after telling Elasi you'll turn off shields (initial warning) 678 int16 counterUntilElasiNagToDisableShields; // 0x4d 679 680 // Counter used after telling Elasi you'll turn off shields (they destroy the 681 // ship this time) 682 int16 counterUntilElasiDestroyShip; // 0x4f 683 684 // Counter used after telling Elasi to beam over 685 int16 counterUntilElasiBoardWithInvitation; // 0x51 686 687 bool putSupportBeamInSickbayHallway; // 0x53 688 bool clearedDebris; // 0x54 689 bool lookedAtTurbolift2Door; // 0x55 690 bool kirkShouldSuggestReestablishingPower; // 0x56 691 bool tookHypoFromSickbay; // 0x57 692 bool tookDrillFromSickbay; // 0x58 693 bool clearedDebrisInRoom5; // 0x59 694 bool havePowerPack; // 0x5a 695 bool enteredRoom5FirstTime; // 0x5b 696 bool askedSpockAboutFire; // 0x5c 697 698 // bits 0-1 are set for each of the 2 cables that can be connected to the 699 // junction box in engineering. 700 byte junctionCablesConnected; // 0x5d 701 702 bool tookCableFromTransporterRoomHallway; // 0x5e 703 bool tookCableFromSickbayHallway; // 0x5f 704 bool tookMolecularSaw; // 0x60 705 bool readEngineeringJournal; // 0x61 706 bool tookEngineeringJournal; // 0x62 707 bool engineeringCabinetOpen; // 0x63 708 bool setTransporterCoordinates; // 0x65 709 bool examinedTorpedoControl; // 0x66 710 bool powerPackPluggedIntoTransporter; // 0x67 711 bool field68; // 0x68 712 bool getPointsForHealingBrittany; // 0x69 713 bool readAllLogs; // 0x6a 714 bool field6b; // 0x6b 715 bool field6c; // 0x6c 716 saveLoadWithSerializerAwayMission::__anona36e3825010a::__anona36e38250908717 void saveLoadWithSerializer(Common::Serializer &ser) { 718 ser.syncAsByte(usedMedkitOnBrittany); 719 ser.syncAsByte(talkedToBrittany); 720 ser.syncAsByte(brittanyDead); 721 ser.syncAsByte(lookedAtBrittany); 722 ser.syncAsByte(enteredRoom0FirstTime); 723 ser.syncAsSint16LE(missionScore); 724 ser.syncAsByte(bridgeCrewmanDead); 725 ser.syncAsByte(scannedCaptainsChair); 726 ser.syncAsByte(scannedComputerBank); 727 ser.syncAsByte(impulseEnginesOn); 728 ser.syncAsByte(beamState); 729 ser.syncAsByte(enterpriseLeftForDistressCall); 730 ser.syncAsByte(openedPanel); 731 ser.syncAsByte(clearedPanelDebris); 732 ser.syncAsByte(removedPanelDebris); 733 ser.syncAsByte(oilInHypo); 734 ser.syncAsByte(loosenedDebrisWithOil); 735 ser.syncAsByte(poweredSystem); 736 ser.syncAsByte(tricordersPluggedIntoComputer); 737 ser.syncAsByte(captainsLogIndex); 738 ser.syncAsByte(elasiShieldsDown); 739 ser.syncAsByte(torpedoLoaded); 740 ser.syncAsByte(firedTorpedo); 741 ser.syncAsByte(elasiShipDecloaked); 742 ser.syncAsByte(countdownStarted); 743 ser.syncAsByte(toldElasiToBeamOver); 744 ser.syncAsByte(scannedMainComputer); 745 ser.syncAsByte(elasiHailedRepublic); 746 ser.syncAsByte(tookRecordDeckFromAuxilaryControl); 747 ser.syncAsSint16LE(counterUntilElasiBoardWithShieldsDown); 748 ser.syncAsSint16LE(counterUntilElasiAttack); 749 ser.syncAsSint16LE(counterUntilElasiNagToDisableShields); 750 ser.syncAsSint16LE(counterUntilElasiDestroyShip); 751 ser.syncAsSint16LE(counterUntilElasiBoardWithInvitation); 752 ser.syncAsByte(clearedDebris); 753 ser.syncAsByte(lookedAtTurbolift2Door); 754 ser.syncAsByte(kirkShouldSuggestReestablishingPower); 755 ser.syncAsByte(tookHypoFromSickbay); 756 ser.syncAsByte(tookDrillFromSickbay); 757 ser.syncAsByte(clearedDebrisInRoom5); 758 ser.syncAsByte(havePowerPack); 759 ser.syncAsByte(enteredRoom5FirstTime); 760 ser.syncAsByte(askedSpockAboutFire); 761 ser.syncAsByte(junctionCablesConnected); 762 ser.syncAsByte(tookCableFromTransporterRoomHallway); 763 ser.syncAsByte(tookCableFromSickbayHallway); 764 ser.syncAsByte(tookMolecularSaw); 765 ser.syncAsByte(readEngineeringJournal); 766 ser.syncAsByte(tookEngineeringJournal); 767 ser.syncAsByte(engineeringCabinetOpen); 768 ser.syncAsByte(setTransporterCoordinates); 769 ser.syncAsByte(examinedTorpedoControl); 770 ser.syncAsByte(powerPackPluggedIntoTransporter); 771 ser.syncAsByte(field68); 772 ser.syncAsByte(getPointsForHealingBrittany); 773 ser.syncAsByte(readAllLogs); 774 ser.syncAsByte(field6b); 775 ser.syncAsByte(field6c); 776 } 777 } veng; 778 }; 779 }; 780 // Size: 0x129 bytes 781 782 // Bottle types for Love's Labor Jeopardized 783 enum BottleTypes { 784 BOTTLETYPE_NONE = 0, 785 BOTTLETYPE_N2O = 1, 786 BOTTLETYPE_NH3 = 2, 787 BOTTLETYPE_H2O = 3, 788 BOTTLETYPE_RLG = 4 // Romulan Laughing Gas 789 }; 790 791 // Canister types for Love's Labor Jeopardized 792 enum CanisterTypes { 793 CANTYPE_NONE = 0, 794 CANTYPE_O2 = 1, 795 CANTYPE_H2 = 2, 796 CANTYPE_N2 = 3 797 }; 798 799 // Synthesizer contents for Love's Labor Jeopardized (values for synthesizerContents) 800 enum SynthesizerContent { 801 SYNTHITEM_NONE = 0, 802 SYNTHITEM_PBC = 1, 803 SYNTHITEM_VIRUS_SAMPLE = 2, 804 SYNTHITEM_CURE_SAMPLE = 3, 805 SYNTHITEM_BOTTLE = 9 // Contents of bottle determined by "synthesizerBottleIndex" variable 806 }; 807 808 #endif 809