Permalink
Browse files

STARTREK: LOVE5

  • Loading branch information...
Drenn1 authored and sev- committed Jun 22, 2018
1 parent 43a0a57 commit 958a9065aa07644698215d9aef7f24f501b569a4
@@ -41,7 +41,7 @@ void StarTrekEngine::initAwayMission() {
_roomIndexToLoad = -1;

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

void StarTrekEngine::runAwayMission() {
@@ -165,13 +165,17 @@ struct AwayMission {
bool visitedRoomWithRomulans; // 0x3f
bool romulansCured; // 0x40
bool romulansUnconsciousFromVirus; // 0x41
bool freedMarcusAndCheever; // 0x42
bool preaxCured; // 0x43
bool spockCured; // 0x46
bool spockAccessedConsole; // 0x49
bool mccoyAccessedConsole; // 0x4a
bool gotPolyberylcarbonate; // 0x4b
bool gotTLDH; // 0x4c (Got romulan laughing gas)
bool gotPointsForOpeningGrate; // 0x4d
bool gotPointsForGassingRomulans; // 0x4e
bool gotCure; // 0x4f
bool gotPointsForHydratingPreax; // 0x50
bool gotPointsForHydratingRomulans; // 0x51
int16 missionScore; // 0x52
} love;
@@ -109,7 +109,7 @@ class Room {
// Command 0x05: "demon4ShowSunPuzzle"
void loadRoomIndex(int roomIndex, int spawnIndex); // Cmd 0x06
void loseItem(int item); // Cmd 0x07
void walkCrewman(int actorIndex, int16 destX, int16 destY, uint16 finishedAnimActionParam);// Cmd 0x08
void walkCrewman(int actorIndex, int16 destX, int16 destY, uint16 finishedAnimActionParam = 0);// Cmd 0x08
void walkCrewmanC(int actorIndex, int16 destX, int16 destY, void (Room::*funcPtr)()); // Cmd 0x08
void loadMapFile(const Common::String &name); // Cmd 0x09
void showBitmapFor5Ticks(const Common::String &bmpName, int priority); // Cmd 0x0a
@@ -1053,6 +1053,47 @@ class Room {

// LOVE5
void love5Tick1();
void love5TouchedWarp1();
void love5Timer4Expired();
void love5UseStunPhaserOnPreax();
void love5LookAtKirk();
void love5LookAtSpock();
void love5LookAtMccoy();
void love5LookAtRedshirt();
void love5LookAnywhere();
void love5LookAtDevice();
void love5LookAtConsole();
void love5LookAtDrMarcus();
void love5LookAtDrCheever();
void love5LookAtPreax();
void love5TalkToPreax();
void love5MccoyReachedSpockToCure();
void love5MccoyCuredSpock();
void love5EndMission();
void love5CrewmanReachedBeamoutPosition();
void love5TalkToDrMarcus();
void love5TalkToDrCheever();
void love5TalkToKirk();
void love5TalkToSpock();
void love5TalkToMccoy();
void love5TalkToRedshirt();
void love5UseSTricorderAnywhere();
void love5UseSTricorderOnDevice();
void love5UseMTricorderOnMarcusOrCheever();
void love5UseMTricorderOnPreax();
void love5UseMedkitOnPreax();
void love5UseWaterOnPreax();
void love5UseCureSampleOnPreax();
void love5UseCureOnPreax();
void love5ReachedPreaxUsingCure();
void love5CuredPreax();
void love5UseAnythingOnPreax();
void love5UseKirkOnMarcusOrCheever();
void love5KirkReachedCheever();
void love5KirkUntiedCheever();
void love5KirkReachedMarcus();
void love5KirkUntiedMarcus();
void love5MarcusStoodUp();

private:
// Room-specific variables. This is memset'ed to 0 when the room is initialized.
@@ -1174,6 +1215,10 @@ class Room {
bool walkingToDoor; // 0xcc
} love4;

struct {
byte numCrewmenReadyToBeamOut; // 0xcb
} love5;


} _roomVar;
};
@@ -1150,6 +1150,7 @@ RoomAction love4ActionList[] = {
{ Action(ACTION_USE, OBJECT_IPHASERS, 10, 0), &Room::love4UseStunPhaserOnRomulan },
{ Action(ACTION_USE, OBJECT_IPHASERS, 11, 0), &Room::love4UseStunPhaserOnRomulan },
{ Action(ACTION_USE, OBJECT_IPHASERS, 12, 0), &Room::love4UseStunPhaserOnRomulan },
// NOTE: nothing for OBJECT_IPHASERK. There's an unused audio file which might fit.
{ Action(ACTION_LOOK, -1, 0, 0), &Room::love4LookAnywhere },
{ Action(ACTION_LOOK, 0x21, 0, 0), &Room::love4LookAtLadder },
{ Action(ACTION_LOOK, 8, 0, 0), &Room::love4LookAtDoor },
@@ -1195,10 +1196,45 @@ RoomAction love4ActionList[] = {
{ Action(ACTION_USE, -1, 10, 0), &Room::love4UseAnythingOnRomulan },
{ Action(ACTION_USE, -1, 11, 0), &Room::love4UseAnythingOnRomulan },
{ Action(ACTION_USE, -1, 12, 0), &Room::love4UseAnythingOnRomulan },
// TODO: common code
};

RoomAction love5ActionList[] = {
{ Action(ACTION_TICK, 1, 0, 0), &Room::love5Tick1 },
{ Action(ACTION_TOUCHED_WARP, 1, 0, 0), &Room::love5TouchedWarp1 },
{ Action(ACTION_TIMER_EXPIRED, 4, 0, 0), &Room::love5Timer4Expired },
{ Action(ACTION_USE, OBJECT_IPHASERS, 9, 0), &Room::love5UseStunPhaserOnPreax },
// NOTE: nothing for OBJECT_IPHASERK. There's an unused audio file which might fit.
{ Action(ACTION_LOOK, OBJECT_KIRK, 0, 0), &Room::love5LookAtKirk },
{ Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::love5LookAtSpock },
{ Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::love5LookAtMccoy },
{ Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::love5LookAtRedshirt },
{ Action(ACTION_LOOK, -1, 0, 0), &Room::love5LookAnywhere },
{ Action(ACTION_LOOK, 0x20, 0, 0), &Room::love5LookAtDevice },
{ Action(ACTION_LOOK, 0x21, 0, 0), &Room::love5LookAtConsole },
{ Action(ACTION_LOOK, 10, 0, 0), &Room::love5LookAtDrMarcus },
{ Action(ACTION_LOOK, 11, 0, 0), &Room::love5LookAtDrCheever },
{ Action(ACTION_LOOK, 9, 0, 0), &Room::love5LookAtPreax },
{ Action(ACTION_TALK, 9, 0, 0), &Room::love5TalkToPreax },
{ Action(ACTION_TALK, 10, 0, 0), &Room::love5TalkToDrMarcus },
{ Action(ACTION_TALK, 11, 0, 0), &Room::love5TalkToDrCheever },
{ Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::love5TalkToKirk },
{ Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::love5TalkToSpock },
{ Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::love5TalkToMccoy },
{ Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::love5TalkToRedshirt },
{ Action(ACTION_USE, OBJECT_ISTRICOR, -1, 0), &Room::love5UseSTricorderAnywhere },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 0x20, 0), &Room::love5UseSTricorderOnDevice },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 10, 0), &Room::love5UseMTricorderOnMarcusOrCheever },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 11, 0), &Room::love5UseMTricorderOnMarcusOrCheever },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 9, 0), &Room::love5UseMTricorderOnPreax },
{ Action(ACTION_USE, OBJECT_IMEDKIT, 9, 0), &Room::love5UseMedkitOnPreax },
{ Action(ACTION_USE, OBJECT_IH2O, 9, 0), &Room::love5UseWaterOnPreax },
{ Action(ACTION_USE, OBJECT_ISAMPLE, 9, 0), &Room::love5UseCureSampleOnPreax },
{ Action(ACTION_USE, OBJECT_ICURE, 9, 0), &Room::love5UseCureOnPreax },
{ Action(ACTION_USE, -1, 9, 0), &Room::love5UseAnythingOnPreax },
{ Action(ACTION_USE, OBJECT_KIRK, 10, 0), &Room::love5UseKirkOnMarcusOrCheever },
{ Action(ACTION_USE, OBJECT_KIRK, 11, 0), &Room::love5UseKirkOnMarcusOrCheever },
// TODO: common code
};


@@ -261,9 +261,10 @@ void Room::love4UseWaterOnRomulan() {
}

// Note the following unused block of code, an alternative implementation of the
// function? If they succumbed to the virus from taking too long, McCoy doesn't let
// you hydrate them, saying it's dangerous. Otherwise, the romulans get up even
// without receiving the cure. (At least the narration says they do.)
// function, resembling the version in love5. If they succumbed to the virus from
// taking too long, McCoy doesn't let you hydrate them, saying it's dangerous.
// Otherwise, the romulans get up even without receiving the cure. (At least the
// narration says they do.)
// These events don't make too much sense, probably cut in the original release, but
// they did get voice acted anyway.
if (false) {
Oops, something went wrong.

0 comments on commit 958a906

Please sign in to comment.