Permalink
Browse files

STARTREK: Start on LOVE3

  • Loading branch information...
Drenn1 authored and sev- committed Jun 21, 2018
1 parent 7d110de commit 16042faa655f53553ec26ef908e5528871e046ce
@@ -41,7 +41,7 @@ void StarTrekEngine::initAwayMission() {
_roomIndexToLoad = -1;

// Load crew positions for beaming in
initAwayCrewPositions(0);
initAwayCrewPositions(1);
}

void StarTrekEngine::runAwayMission() {
@@ -142,7 +142,7 @@ struct AwayMission {
struct {
bool alreadyStartedMission; // 0x29
bool knowAboutVirus; // 0x2a
bool field2b; // 0x2b
bool putLaughingGasInVent; // 0x2b
bool field2c; // 0x2c
bool field2d; // 0x2d
bool chamberHasCure; // 0x2e
@@ -155,6 +155,13 @@ struct AwayMission {
byte field35; // 0x35
byte canister1; // 0x36
byte canister2; // 0x37
bool servicePanelOpen; // 0x38
bool gasTankUnscrewed; // 0x39
bool wrenchTaken; // 0x3a
bool tookN2TankFromServicePanel; // 0x3b
bool grateRemoved; // 0x3d
bool field3e; // 0x3e
bool field3f; // 0x3f
bool field41; // 0x41
bool spockAccessedConsole; // 0x49
bool mccoyAccessedConsole; // 0x4a
@@ -938,6 +938,42 @@ class Room {

// LOVE3
void love3Tick1();
void love3Tick80();
void love3TouchedWarp1();
void love3Timer3Expired();
void love3LookAtServicePanel();
void love3LookAtMonitor();
void love3LookAtWrench();
void love3LookAtKirk();
void love3LookAtMccoy();
void love3LookAtSpock();
void love3LookAtRedshirt();
void love3LookAnywhere();
void love3LookAtShaft();
void love3LookAtPanel();
void love3LookAtGasTank();
void love3LookAtTurbines();
void love3TalkToKirk();
void love3TalkToSpock();
void love3TalkToMccoy();
void love3TalkToRedshirt();
void love3UseMTricorderAnywhere();
void love3UseSTricorderOnTurbines();
void love3UseSTricorderOnInsulation();
void love3UseSTricorderAnywhere();
void love3UseKirkOnServicePanel();
void love3UseSpockOnServicePanel();
void love3UseMccoyOnServicePanel();
void love3UseRedshirtOnServicePanel();
void love3CrewmanReachedServicePanel();
void love3OpenedOrClosedServicePanel();
void love3UseWrenchOnGasTank();
void love3ReachedGasTankToUnscrew();
void love3ScrewedOrUnscrewedGasTank();
void love3UseWrenchOnO2OrH2Gas();
void love3UseWrenchOnN2Gas();
void love3ReachedGasTankToPutDown();
void love3PutN2TankBack();

// LOVE4
void love4Tick1();
@@ -1053,6 +1089,12 @@ class Room {
byte _2967; // 0x2967
} love2;

struct {
byte activeCrewman;
byte _188e; // 0x188e
byte _188f; // 0x188f
} love3;


} _roomVar;
};
@@ -1063,6 +1063,44 @@ RoomAction love2ActionList[] = {

RoomAction love3ActionList[] = {
{ Action(ACTION_TICK, 1, 0, 0), &Room::love3Tick1 },
{ Action(ACTION_TICK, 80, 0, 0), &Room::love3Tick80 },
{ Action(ACTION_TOUCHED_WARP, 1, 0, 0), &Room::love3TouchedWarp1 },
{ Action(ACTION_TIMER_EXPIRED, 3, 0, 0), &Room::love3Timer3Expired },
{ Action(ACTION_LOOK, 8, 0, 0), &Room::love3LookAtServicePanel },
{ Action(ACTION_LOOK, 0x21, 0, 0), &Room::love3LookAtMonitor },
{ Action(ACTION_LOOK, 10, 0, 0), &Room::love3LookAtWrench },
{ Action(ACTION_LOOK, OBJECT_KIRK, 0, 0), &Room::love3LookAtKirk },
{ Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::love3LookAtMccoy },
{ Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::love3LookAtSpock },
{ Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::love3LookAtRedshirt },
{ Action(ACTION_LOOK, -1, 0, 0), &Room::love3LookAnywhere },
{ Action(ACTION_LOOK, 0x22, 0, 0), &Room::love3LookAtShaft },
{ Action(ACTION_LOOK, 9, 0, 0), &Room::love3LookAtPanel },
{ Action(ACTION_LOOK, 0x20, 0, 0), &Room::love3LookAtPanel },
{ Action(ACTION_LOOK, 12, 0, 0), &Room::love3LookAtGasTank },
{ Action(ACTION_LOOK, 0x23, 0, 0), &Room::love3LookAtTurbines },
{ Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::love3TalkToKirk },
{ Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::love3TalkToSpock },
{ Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::love3TalkToMccoy },
{ Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::love3TalkToRedshirt },
{ Action(ACTION_USE, OBJECT_IMTRICOR, -1, 0), &Room::love3UseMTricorderAnywhere },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 0x23, 0), &Room::love3UseSTricorderOnTurbines },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 9, 0), &Room::love3UseSTricorderOnInsulation },
{ Action(ACTION_USE, OBJECT_ISTRICOR, -1, 0), &Room::love3UseSTricorderAnywhere },
{ Action(ACTION_USE, OBJECT_KIRK, 8, 0), &Room::love3UseKirkOnServicePanel },
{ Action(ACTION_USE, OBJECT_SPOCK, 8, 0), &Room::love3UseSpockOnServicePanel },
{ Action(ACTION_USE, OBJECT_MCCOY, 8, 0), &Room::love3UseMccoyOnServicePanel },
{ Action(ACTION_USE, OBJECT_REDSHIRT, 8, 0), &Room::love3UseRedshirtOnServicePanel },
{ Action(ACTION_FINISHED_WALKING, 1, 0, 0), &Room::love3CrewmanReachedServicePanel },
{ Action(ACTION_FINISHED_ANIMATION, 1, 0, 0), &Room::love3OpenedOrClosedServicePanel },
{ Action(ACTION_USE, OBJECT_IWRENCH, 12, 0), &Room::love3UseWrenchOnGasTank },
{ Action(ACTION_FINISHED_WALKING, 2, 0, 0), &Room::love3ReachedGasTankToUnscrew },
{ Action(ACTION_FINISHED_ANIMATION, 2, 0, 0), &Room::love3ScrewedOrUnscrewedGasTank },
{ Action(ACTION_USE, OBJECT_IWRENCH, OBJECT_IO2GAS, 0), &Room::love3UseWrenchOnO2OrH2Gas },
{ Action(ACTION_USE, OBJECT_IWRENCH, OBJECT_IH2GAS, 0), &Room::love3UseWrenchOnO2OrH2Gas },
{ Action(ACTION_USE, OBJECT_IWRENCH, OBJECT_IN2GAS, 0), &Room::love3UseWrenchOnN2Gas },
{ Action(ACTION_FINISHED_WALKING, 15, 0, 0), &Room::love3ReachedGasTankToPutDown },
{ Action(ACTION_FINISHED_ANIMATION, 3, 0, 0), &Room::love3PutN2TankBack },
};

RoomAction love4ActionList[] = {
@@ -624,7 +624,7 @@ void Room::love1CrewmanReachedLadder() {
TX_SPEAKER_FERRIS
};

if (_vm->_awayMission.love.field2b || _vm->_awayMission.love.field41) // Romulans unconscious
if (_vm->_awayMission.love.putLaughingGasInVent || _vm->_awayMission.love.field41) // Romulans unconscious
loadRoomIndex(4, 3);
else { // Romulans still conscious, they shoot you
loadActorAnim(OBJECT_PHASERSHOT, "s3r2s2", 0xf3, 0x89, 0);
@@ -650,7 +650,7 @@ void Room::love1CrewmanDiedFromPhaser() {

// Romulans fire a "warning shot" when you go to the right part of the room.
void Room::love1TouchedHotspot0() {
if (_vm->_awayMission.love.field2b || _vm->_awayMission.love.field41)
if (_vm->_awayMission.love.putLaughingGasInVent || _vm->_awayMission.love.field41)
return;
loadActorAnim(OBJECT_PHASERSHOT, "s3r2s1", 0xf3, 0x89, 0);
playSoundEffectIndex(SND_PHASSHOT);
Oops, something went wrong.

0 comments on commit 16042fa

Please sign in to comment.