Permalink
Browse files

STARTREK: SINS2

  • Loading branch information...
Drenn1 authored and sev- committed Jul 28, 2018
1 parent bf1e125 commit 93ca6a7b489fc1f382f963f09e291497b4aa8ece
@@ -524,12 +524,14 @@ struct AwayMission {
byte field32; // 0x32
bool field33; // 0x33
bool doorLaserFiredOnce; // 0x34
bool gotPointsForAccessingTerminal; // 0x35
byte field39; // 0x39
bool openedDoor; // 0x3d
bool field3e; // 0x3e
bool openedOuterDoor; // 0x3d
bool openedInnerDoor; // 0x3e
bool enteredRoom0FirstTime; // 0x42
bool scottyInformedKirkAboutVirus; // 0x43
bool field44; // 0x44
bool enteredRoom2FirstTime; // 0x44
bool field46; // 0x46
bool gotPointsForScanningStatue; // 0x48
bool enteredRoom1FirstTime; // 0x50
int16 missionScore; // 0x52
@@ -2228,6 +2228,44 @@ class Room {

// SINS2
void sins2Tick1();
void sins2UsePhaserOnDoor();
void sins2UseSTricorderAnywhere();
void sins2UseKirkOnTerminal();
void sins2UseSpockOnTerminal();
void sins2SpockReachedTerminal();
void sins2SpockUsedTerminal();
void sins2UseMccoyOnTerminal();
void sins2UseRedshirtOnTerminal();
void sins2UseSTricorderOnTerminal();
void sins2UseSTricorderOnKeypad();
void sins2UseSTricorderOnDoor();
void sins2UseKirkOnKeypad();
void sins2UseSpockOnKeypad();
void sins2SpockReachedKeypad();
void sins2EnteredCorrectCode();
void sins2EnteredIncorrectCode();
void sins2DoorFinishedOpening();
void sins2Tick40();
void sins2LookAnywhere();
void sins2LookAtOpenDoor();
void sins2LookAtTerminal();
void sins2LookAtKeypad();
void sins2LookAtKirk();
void sins2LookAtSpock();
void sins2LookAtMccoy();
void sins2LookAtRedshirt();
void sins2TalkToKirk();
void sins2TalkToSpock();
void sins2TalkToMccoy();
void sins2TalkToRedshirt();
void sins2LookAtDoor();
void sins2UseSpockOnDoor();
void sins2UseCommunicator();
void sins2UseMedkitOnCrewman();
void sins2UseMTricorderOnCrewman();
void sins2UseMccoyOnKeypad();
void sins2UseRedshirtOnKeypad();
void sins2WalkToDoor();

// SINS3
void sins3Tick1();
@@ -84,9 +84,9 @@ void Room::sins0Tick1() {
if (!_awayMission->sins.enteredRoom0FirstTime)
_awayMission->disableInput = 2;

if (_awayMission->sins.field3e)
if (_awayMission->sins.openedInnerDoor)
loadActorAnim2(OBJECT_DOOR, "s0dr2", 0, 0);
if (_awayMission->sins.openedDoor)
else if (_awayMission->sins.openedOuterDoor)
loadActorAnim2(OBJECT_DOOR, "s0dr1", 0, 0);

playMidiMusicTracks(MIDITRACK_27, -3);
@@ -96,13 +96,13 @@ void Room::sins1Tick1() {
// BUGFIX: Set this to 2, not 1 (disable input even after walking animation is done)
_awayMission->disableInput = 2;

if (_awayMission->sins.openedDoor) {
if (_awayMission->sins.openedOuterDoor) {
loadActorAnim2(OBJECT_DOOR, "s1dro", 0, 0);
loadMapFile("sins12");
} else
loadMapFile("sins1");

if (_awayMission->sins.field3e)
if (_awayMission->sins.openedInnerDoor)
loadActorAnim2(OBJECT_DOOR, "s1ndro", 0, 0);

_awayMission->sins.field32 = 1;
@@ -153,7 +153,7 @@ void Room::sins1UseSTricorderOnLock() {
}

void Room::sins1UseSTricorderOnDoor() {
if (!_awayMission->sins.openedDoor)
if (!_awayMission->sins.openedOuterDoor)
spockScan(DIR_N, TX_SIN1_019);
}

@@ -173,24 +173,24 @@ void Room::sins1UseRockOnDoor() {
}

void Room::sins1UseRedshirtOnKeypad() {
if (!_awayMission->sins.openedDoor)
if (!_awayMission->sins.openedOuterDoor)
showText(TX_SPEAKER_MOSHER, TX_SIN1_028);
}

void Room::sins1UseMccoyOnKeypad() {
if (!_awayMission->sins.openedDoor)
if (!_awayMission->sins.openedOuterDoor)
showText(TX_SPEAKER_MCCOY, TX_SIN1_012);
}

void Room::sins1UseKirkOnKeypad() {
if (!_awayMission->sins.openedDoor) {
if (!_awayMission->sins.openedOuterDoor) {
showText(TX_SPEAKER_KIRK, TX_SIN1_001);
sins1UseSpockOnKeypad();
}
}

void Room::sins1UseSpockOnKeypad() {
if (!_awayMission->sins.openedDoor) {
if (!_awayMission->sins.openedOuterDoor) {
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_N;
walkCrewmanC(OBJECT_SPOCK, 0xfd, 0xad, &Room::sins1SpockReachedKeypad);
}
@@ -221,7 +221,7 @@ void Room::sins1SpockReachedKeypad() {
void Room::sins1EnteredCorrectCode() {
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
walkCrewman(OBJECT_SPOCK, 0xf3, 0xad);
_awayMission->sins.openedDoor = true;
_awayMission->sins.openedOuterDoor = true;
loadMapFile("sins12");
loadActorAnimC(OBJECT_DOOR, "s1door", 0, 0, &Room::sins1DoorDoneOpening);
playVoc("HUGEDOO2");
@@ -318,7 +318,7 @@ void Room::sins1LookAtLens() {
}

void Room::sins1UseCommunicator() {
if (!_awayMission->sins.field44) {
if (!_awayMission->sins.enteredRoom2FirstTime) {
showText(TX_SPEAKER_KIRK, TX_SIN1_008);
showText(TX_SPEAKER_SCOTT, TX_SIN1_S51);
showText(TX_SPEAKER_KIRK, TX_SIN1_002);
@@ -337,7 +337,7 @@ void Room::sins1UseMTricorderOnCrewman() {
}

void Room::sins1WalkToDoor() {
if (_awayMission->sins.openedDoor)
if (_awayMission->sins.openedOuterDoor)
walkCrewman(OBJECT_KIRK, 0x98, 0x9e, 5); // NOTE: Callback 5 not defined
}

Oops, something went wrong.

0 comments on commit 93ca6a7

Please sign in to comment.