Permalink
Browse files

STARTREK: Make "missionScore" mission-specific

  • Loading branch information...
Drenn1 authored and sev- committed Jun 7, 2018
1 parent 84a30e4 commit ed7d22cd0f2ac6a42bde79d49d417c7c981e0758
@@ -92,10 +92,9 @@ struct AwayMission {
bool lookedAtComputer; // 0x55
byte field56; // 0x56
bool foundAlienRoom; // 0x57
int16 missionScore; // 0x58
} demon;
};

int16 missionScore; // 0x58
};
// Size: 0x129 bytes

@@ -157,7 +157,7 @@ void Room::demon0TalkToPrelate() {
if (_vm->_awayMission.demon.talkedToPrelate)
return;

_vm->_awayMission.missionScore += 3;
_vm->_awayMission.demon.missionScore += 3;
_vm->_awayMission.demon.talkedToPrelate = true;

const int *response = nullptr;
@@ -330,7 +330,7 @@ void Room::demon0BadResponse() {
if (_vm->_awayMission.demon.wasRudeToPrelate)
return;

_vm->_awayMission.missionScore -= 3;
_vm->_awayMission.demon.missionScore -= 3;
_vm->_awayMission.demon.wasRudeToPrelate = true;

showText(TX_SPEAKER_ANGIVEN, TX_DEM0_033);
@@ -435,7 +435,7 @@ void Room::demon1ReachedHand() {

void Room::demon1PickedUpHand() {
loadActorStandAnim(13);
_vm->_awayMission.missionScore += 3;
_vm->_awayMission.demon.missionScore += 3;
loadActorStandAnim(OBJECT_KIRK);
_vm->_awayMission.timers[4] = 2;
}
@@ -167,7 +167,7 @@ void Room::demon2PickedUpBerries() {
showText(TX_DEM2N013);
giveItem(OBJECT_IBERRY);
_vm->_awayMission.demon.gotBerries = true;
_vm->_awayMission.missionScore += 1;
_vm->_awayMission.demon.missionScore += 1;
}

}
@@ -90,7 +90,7 @@ void Room::demon3Timer3Expired() {
loadActorAnim(14, "door", 0x82, 0xc, 0);
loadMapFile("demon3");
_vm->_awayMission.demon.doorOpened = true;
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;
}
else {
showText(TX_DEM3N007);
@@ -457,7 +457,7 @@ void Room::demon3McCoyFinishedHealingMiner() {
showText(TX_SPEAKER_MCCOY, TX_DEM3_021);
_vm->_awayMission.demon.healedMiner = true;
loadActorAnim2(13, "drmine", 0xda, 0x6c, 0);
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;
walkCrewman(OBJECT_MCCOY, 0x104, 0x96, 0);
}
}
@@ -77,7 +77,7 @@ void Room::demon4FinishedAnimation3() {
showText(TX_SPEAKER_SPOCK, TX_DEM4_030);

_vm->_awayMission.disableInput = true;
_vm->_awayMission.missionScore += 5;
_vm->_awayMission.demon.missionScore += 5;
_vm->_awayMission.timers[1] = 20;
}

@@ -109,11 +109,11 @@ void Room::demon4CrewmanReachedBeamoutPosition() {
return;

if (!_vm->_awayMission.demon.insultedStephen)
_vm->_awayMission.missionScore += 3;
_vm->_awayMission.demon.missionScore += 3;
if (!_vm->_awayMission.redshirtDead)
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;

endMission(_vm->_awayMission.missionScore, 0x24, 0);
endMission(_vm->_awayMission.demon.missionScore, 0x24, 0);
}

void Room::demon4Timer2Expired() {
@@ -175,7 +175,7 @@ void Room::demon4UseMetalOnNauian() {
void Room::demon4KirkReachedNauian() {
loadActorAnim2(8, "usekey", 0x107, 0x8e, 3);
loseItem(OBJECT_IMETAL);
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;
_vm->_awayMission.demon.itemsTakenFromCase &= ~1;
}

@@ -191,7 +191,7 @@ void Room::demon4KirkReachedNauianWithSkull() {

switch (choice) {
case 0:
_vm->_awayMission.missionScore++;
_vm->_awayMission.demon.missionScore++;
loadActorAnim2(8, "takesk", 0x107, 0x8e, 0);
loseItem(OBJECT_ISKULL);
_vm->_awayMission.demon.itemsTakenFromCase &= ~16; // BUG: skull reappears in case? Can abuse for infinite ponits?
@@ -277,7 +277,7 @@ void Room::demon4TalkToNauian() {
showText(TX_SPEAKER_SPOCK, TX_DEM4_030);

_vm->_awayMission.disableInput = true;
_vm->_awayMission.missionScore += 5;
_vm->_awayMission.demon.missionScore += 5;
_vm->_awayMission.timers[1] = 20;
}
else {
@@ -365,7 +365,7 @@ void Room::demon4CrewmanReachedPanel() {
if (demon4ShowSunPuzzle()) {
_vm->_awayMission.demon.solvedSunPuzzle = true;
loadActorAnim(9, "ctrl", 0, 0, 0);
_vm->_awayMission.missionScore += 3;
_vm->_awayMission.demon.missionScore += 3;
_vm->_awayMission.timers[0] = 10;
}
else
@@ -95,7 +95,7 @@ void Room::demon5MccoyHealedChub() {
showText(TX_SPEAKER_CHUB, TX_DEM5L027);
loseItem(OBJECT_IDETOXIN);
_vm->_awayMission.demon.curedChub = true;
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;
}

void Room::demon5UseHypoDytoxinOnAnything() {
@@ -139,7 +139,7 @@ void Room::demon6LookAtComputer() {
showText(TX_DEM6N006);
if (!_vm->_awayMission.demon.lookedAtComputer) {
_vm->_awayMission.demon.lookedAtComputer = true;
_vm->_awayMission.missionScore++;
_vm->_awayMission.demon.missionScore++;
}
}

@@ -202,7 +202,7 @@ void Room::demon6FinishedMakingHypoDytoxin() {

if (!_vm->_awayMission.demon.gavePointsForDytoxin) {
_vm->_awayMission.demon.gavePointsForDytoxin = true;
_vm->_awayMission.missionScore++;
_vm->_awayMission.demon.missionScore++;
}
}

@@ -224,7 +224,7 @@ void Room::demon6SpockReachedWorkspace() {
void Room::demon6SpockFinishedRepairingHand() {
showText(TX_SPEAKER_SPOCK, TX_DEM6_024);
_vm->_awayMission.demon.repairedHand = true;
_vm->_awayMission.missionScore += 2;
_vm->_awayMission.demon.missionScore += 2;
loadActorStandAnim(OBJECT_SPOCK);
_vm->_awayMission.disableInput = false;
}

0 comments on commit ed7d22c

Please sign in to comment.