Permalink
Browse files

STARTREK: TUG1

  • Loading branch information...
Drenn1 authored and sev- committed Jun 10, 2018
1 parent ad76c74 commit 0c28fd964e5aab156539d6ff64b82aa06cb22aef
@@ -101,10 +101,12 @@ struct AwayMission {
int16 field2b; // 0x2b
int16 field2d; // 0x2d;
bool engineerConscious; // 0x30
bool gotJunkPile; // 0x3f
bool gotTransmogrifier; // 0x43
bool transporterRepaired; // 0x44
bool spockExaminedTransporter; // 0x45
bool usedTransmogrifierOnTransporter; // 0x46
bool forceFieldDown; // 0x47
bool haveBomb; // 0x49
} tug;
};
@@ -27,6 +27,7 @@ MODULE_OBJS = \
rooms/demon5.o \
rooms/demon6.o \
rooms/tug0.o \
rooms/tug1.o \



@@ -69,6 +69,10 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) {
_roomActionList = tug0ActionList;
_numRoomActions = sizeof(tug0ActionList) / sizeof(RoomAction);
}
else if (name == "TUG1") {
_roomActionList = tug1ActionList;
_numRoomActions = sizeof(tug1ActionList) / sizeof(RoomAction);
}
else {
warning("Room \"%s\" unimplemented", name.c_str());
_numRoomActions = 0;
@@ -535,6 +535,54 @@ class Room {
void tug0UseSTricorderAnywhere();
void tug0UseMTricorderAnywhere();

// TUG1
void tug1Tick1();
void tug1UseSTricorderOnAnything();
void tug1LookAtBridgeDoor();
void tug1UseSTricorderOnBridgeDoor();
void tug1UsePhaserOnBridgeDoor();
void tug1KirkReachedFiringPosition();
void tug1KirkPulledOutPhaser();
void tug1KirkFinishedFiringPhaser();
void tug1TalkToSpock();
void tug1UseSTricorderOnJunkPile();
void tug1LookAtJunkPile();
void tug1GetJunkPile();
void tug1KirkReachedJunkPile();
void tug1KirkFinishedTakingJunkPile();
void tug1UsePhaserOnWelder();
void tug1UseWelderOnWireScraps();
void tug1UseWelderOnMetalScraps();
void tug1UseCombBitOnTransmogrifier();
void tug1UsePhaserWelderOnBridgeDoor();
void tug1UsePhaserWelderOnBridgeDoorInLeftSpot();
void tug1KirkReachedBridgeDoorWithWelder();
void tug1KirkFinishedUsingWelder();
void tug1KirkReachedBridgeDoorWithWelderInLeftSpot();
void tug1KirkFinishedUsingWelderInLeftSpot();
void tug1LookAnywhere();
void tug1LookAtMccoy();
void tug1LookAtSpock();
void tug1LookAtRedshirt();
void tug1TalkToMccoy();
void tug1TalkToRedshirt();
void tug1LookAtTerminal();
void tug1LookAtDebris();
void tug1LookAtBrigDoor();
void tug1UseSTricorderOnBrigDoor();
void tug1TalkToKirk();
void tug1UseCommunicator();
void tug1WalkToBridgeDoor();
void tug1KirkReachedBridgeDoor();
void tug1BridgeDoorOpened();
void tug1WalkToBrigDoor();
void tug1UseMTricorderAnywhere();
void tug1UseMTricorderOnBridgeDoor();
void tug1UseMTricorderOnBrigDoor();
void tug1UseSpockOnBridgeDoor();
void tug1UseRedshirtOnBridgeDoor();
void tug1UseMedkitOnBridgeDoor();

private:
// Room-specific variables. This is memset'ed to 0 when the room is initialized.
union {
@@ -544,8 +544,8 @@ RoomAction tug0ActionList[] = {

{ Action(ACTION_USE, OBJECT_IPHASERS, OBJECT_IPWE, 0), &Room::tug0UsePhaserOnWelder },
{ Action(ACTION_USE, OBJECT_IPHASERK, OBJECT_IPWE, 0), &Room::tug0UsePhaserOnWelder },
{ Action(ACTION_USE, OBJECT_IPWE, OBJECT_IWIRSCRP, 0), &Room::tug0UseWelderOnWireScraps },
{ Action(ACTION_USE, OBJECT_IPWE, OBJECT_IJNKMETL, 0), &Room::tug0UseWelderOnMetalScraps },
{ Action(ACTION_USE, OBJECT_IPWF, OBJECT_IWIRSCRP, 0), &Room::tug0UseWelderOnWireScraps },
{ Action(ACTION_USE, OBJECT_IPWF, OBJECT_IJNKMETL, 0), &Room::tug0UseWelderOnMetalScraps },
{ Action(ACTION_USE, OBJECT_ICOMBBIT, OBJECT_IRT, 0), &Room::tug0UseCombBitOnTransmogrifier },

{ Action(ACTION_USE, OBJECT_SPOCK, 11, 0), &Room::tug0UseTransporter },
@@ -589,6 +589,69 @@ RoomAction tug0ActionList[] = {
{ Action(ACTION_USE, OBJECT_IMTRICOR, -1, 0), &Room::tug0UseMTricorderAnywhere },
};


// TUG1
RoomAction tug1ActionList[] = {
{ Action(ACTION_TICK, 1, 0, 0), &Room::tug1Tick1 },
{ Action(ACTION_USE, OBJECT_ISTRICOR, -1, 0), &Room::tug1UseSTricorderOnAnything },
{ Action(ACTION_LOOK, 0x21, 0, 0), &Room::tug1LookAtBridgeDoor },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 0x21, 0), &Room::tug1UseSTricorderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IPHASERS, 0x21, 0), &Room::tug1UsePhaserOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IPHASERK, 0x21, 0), &Room::tug1UsePhaserOnBridgeDoor },
{ Action(ACTION_FINISHED_WALKING, 3, 0, 0), &Room::tug1KirkReachedFiringPosition },
{ Action(ACTION_FINISHED_ANIMATION, 4, 0, 0), &Room::tug1KirkPulledOutPhaser },
{ Action(ACTION_FINISHED_ANIMATION, 5, 0, 0), &Room::tug1KirkFinishedFiringPhaser },
{ Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::tug1TalkToSpock },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 8, 0), &Room::tug1UseSTricorderOnJunkPile },
{ Action(ACTION_LOOK, 8, 0, 0), &Room::tug1LookAtJunkPile },
{ Action(ACTION_GET, 8, 0, 0), &Room::tug1GetJunkPile },
{ Action(ACTION_FINISHED_WALKING, 1, 0, 0), &Room::tug1KirkReachedJunkPile },
{ Action(ACTION_FINISHED_ANIMATION, 2, 0, 0), &Room::tug1KirkFinishedTakingJunkPile },
{ Action(ACTION_USE, OBJECT_IPHASERS, OBJECT_IPWE, 0), &Room::tug1UsePhaserOnWelder },
{ Action(ACTION_USE, OBJECT_IPHASERK, OBJECT_IPWE, 0), &Room::tug1UsePhaserOnWelder },
{ Action(ACTION_USE, OBJECT_IPWF, OBJECT_IWIRSCRP, 0), &Room::tug1UseWelderOnWireScraps },
{ Action(ACTION_USE, OBJECT_IPWF, OBJECT_IJNKMETL, 0), &Room::tug1UseWelderOnMetalScraps },
{ Action(ACTION_USE, OBJECT_ICOMBBIT, OBJECT_IRT, 0), &Room::tug1UseCombBitOnTransmogrifier },
{ Action(ACTION_USE, OBJECT_IPWF, 0x22, 0), &Room::tug1UsePhaserWelderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IPWF, 0x21, 0), &Room::tug1UsePhaserWelderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IPWF, 0x20, 0), &Room::tug1UsePhaserWelderOnBridgeDoorInLeftSpot },
{ Action(ACTION_FINISHED_WALKING, 6, 0, 0), &Room::tug1KirkReachedBridgeDoorWithWelder },
{ Action(ACTION_FINISHED_ANIMATION, 7, 0, 0), &Room::tug1KirkFinishedUsingWelder },
{ Action(ACTION_FINISHED_WALKING, 8, 0, 0), &Room::tug1KirkReachedBridgeDoorWithWelderInLeftSpot },
{ Action(ACTION_FINISHED_ANIMATION, 9, 0, 0), &Room::tug1KirkFinishedUsingWelderInLeftSpot },
{ Action(ACTION_LOOK, -1, 0, 0), &Room::tug1LookAnywhere },
{ Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::tug1LookAtMccoy },
{ Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::tug1LookAtSpock },
{ Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::tug1LookAtRedshirt },
{ Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::tug1TalkToMccoy },
{ Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::tug1TalkToRedshirt },
{ Action(ACTION_LOOK, 0x23, 0, 0), &Room::tug1LookAtTerminal },
{ Action(ACTION_LOOK, 0x24, 0, 0), &Room::tug1LookAtDebris },
{ Action(ACTION_LOOK, 0x25, 0, 0), &Room::tug1LookAtBrigDoor },
{ Action(ACTION_USE, OBJECT_ISTRICOR, 0x25, 0), &Room::tug1UseSTricorderOnBrigDoor },
{ Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::tug1TalkToKirk },
{ Action(ACTION_USE, OBJECT_ICOMM, -1, 0), &Room::tug1UseCommunicator },
{ Action(ACTION_WALK, 0x21, 0, 0), &Room::tug1WalkToBridgeDoor },
{ Action(ACTION_FINISHED_WALKING, 10, 0, 0), &Room::tug1KirkReachedBridgeDoor },
{ Action(ACTION_FINISHED_ANIMATION, 11, 0, 0), &Room::tug1BridgeDoorOpened },
{ Action(ACTION_WALK, 0x25, 0, 0), &Room::tug1WalkToBrigDoor },
{ Action(ACTION_USE, OBJECT_IMTRICOR, -1, 0), &Room::tug1UseMTricorderAnywhere },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 0x21, 0), &Room::tug1UseMTricorderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 0x20, 0), &Room::tug1UseMTricorderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 0x22, 0), &Room::tug1UseMTricorderOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMTRICOR, 0x25, 0), &Room::tug1UseMTricorderOnBrigDoor },
{ Action(ACTION_USE, OBJECT_SPOCK, 0x20, 0), &Room::tug1UseSpockOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_SPOCK, 0x21, 0), &Room::tug1UseSpockOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_SPOCK, 0x22, 0), &Room::tug1UseSpockOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_REDSHIRT, 0x20, 0), &Room::tug1UseRedshirtOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_REDSHIRT, 0x21, 0), &Room::tug1UseRedshirtOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_REDSHIRT, 0x22, 0), &Room::tug1UseRedshirtOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMEDKIT, 0x20, 0), &Room::tug1UseMedkitOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMEDKIT, 0x21, 0), &Room::tug1UseMedkitOnBridgeDoor },
{ Action(ACTION_USE, OBJECT_IMEDKIT, 0x22, 0), &Room::tug1UseMedkitOnBridgeDoor },

};

}

#endif
@@ -212,6 +212,10 @@ void Room::tug0UsePhaserOnWelder() {
loseItem(OBJECT_IPWE);
giveItem(OBJECT_IPWF);
showText(TX_TUG0N006);

// BUGFIX: this following line didn't exist, despite it existing in TUG1; meaning this
// was supposed to give points, but it only did in a specific room.
_vm->_awayMission.tug.missionScore += 3;
}

void Room::tug0UseWelderOnWireScraps() {
Oops, something went wrong.

0 comments on commit 0c28fd9

Please sign in to comment.