Skip to content

Commit

Permalink
STARTREK: FEATHER5
Browse files Browse the repository at this point in the history
  • Loading branch information
Stewmath authored and sev- committed Aug 9, 2018
1 parent 8aef8c4 commit 5863f51
Show file tree
Hide file tree
Showing 9 changed files with 582 additions and 22 deletions.
5 changes: 5 additions & 0 deletions engines/startrek/action.h
Expand Up @@ -42,6 +42,11 @@ enum ActionTypes {
ACTION_TOUCHED_HOTSPOT = 7, // Second kind of "hotspot" only relevant when an object touches them
ACTION_TIMER_EXPIRED = 8,

ACTION_DONE_ANIM = 10,
ACTION_DONE_WALK = 12,

// TODO: remove these as redundant. They only still exist so I don't need to redo the
// manual spacing in the room action lists.
ACTION_FINISHED_ANIMATION = 10,
ACTION_FINISHED_WALKING = 12,

Expand Down
14 changes: 6 additions & 8 deletions engines/startrek/awaymission.cpp
Expand Up @@ -613,16 +613,14 @@ void StarTrekEngine::handleAwayMissionAction() {
showTextbox("", getLoadedText(GROUNDTX_LOOK_SPOCK), 20, 20, TEXTCOLOR_YELLOW, 0);
else if (action.activeObject() == OBJECT_MCCOY)
showTextbox("", getLoadedText(GROUNDTX_LOOK_MCCOY), 20, 20, TEXTCOLOR_YELLOW, 0);
else {
if (action.activeObject() == OBJECT_REDSHIRT)
showTextbox("", getLoadedText(GROUNDTX_LOOK_REDSHIRT), 20, 20, TEXTCOLOR_YELLOW, 0);

else if (action.activeObject() == OBJECT_REDSHIRT)
showTextbox("", getLoadedText(GROUNDTX_LOOK_REDSHIRT), 20, 20, TEXTCOLOR_YELLOW, 0);
else
// Show generic "nothing of note" text.
// BUG? This text is also shown after looking at the redshirt. However, his
// text is normally overridden on a per-mission basis, so perhaps this bug
// never manifests itself?
// BUGFIX: originally this was shown after the redshirt's text as well.
// Though, the original game may not have used this default implementation
// anywhere...
showTextbox("", getLoadedText(GROUNDTX_LOOK_ANYWHERE), 20, 20, TEXTCOLOR_YELLOW, 0);
}
break;

case ACTION_TALK:
Expand Down
2 changes: 2 additions & 0 deletions engines/startrek/awaymission.h
Expand Up @@ -253,9 +253,11 @@ struct AwayMission {
bool tookKnife; // 0x2d
bool field2e; // 0x2e
byte numRocksThrownAtTlaoxac; // 0x2f
bool gotFern; // 0x30
bool holeBlocked; // 0x31
bool tlaoxacTestPassed; // 0x32
bool knockedOutTlaoxac; // 0x33
bool waterMonsterRetreated; // 0x34
bool showedSnakeToTlaoxac; // 0x35
int16 missionScore; // 0x36
} feather;
Expand Down
2 changes: 1 addition & 1 deletion engines/startrek/room.cpp
Expand Up @@ -153,7 +153,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) {
}
else if (name == "FEATHER5") {
_roomActionList = feather5ActionList;
_numRoomActions = sizeof(feather5ActionList) / sizeof(RoomAction);
_numRoomActions = feather5NumActions;
}
else if (name == "FEATHER6") {
_roomActionList = feather6ActionList;
Expand Down
62 changes: 60 additions & 2 deletions engines/startrek/room.h
Expand Up @@ -1573,7 +1573,7 @@ class Room {
void feather4UsePhaser();
void feather4UseSTricorderOnLight();
void feather4UseSTricorderOnMushroom();
void feather4UseSTricorderOnBush();
void feather4UseSTricorderOnFern();
void feather4UseSTricorderAnywhere();
void feather4UseMTricorderOnLight();
void feather4UseMTricorderOnMushroom();
Expand All @@ -1585,7 +1585,7 @@ class Room {
void feather4LookAtEyes();
void feather4LookAnywhere();
void feather4LookAtMushroom();
void feather4LookAtBush();
void feather4LookAtFern();
void feather4LookAtLight();
void feather4LookAtKirk();
void feather4LookAtSpock();
Expand All @@ -1594,6 +1594,64 @@ class Room {

// FEATHER5
void feather5Tick1();
void feather5TouchedHotspot0();
void feather5UseSpockOnFern();
void feather5UseMccoyOnFern();
void feather5UseRedshirtOnFern();
void feather5UseRedshirtOnLeftExit();
void feather5RedshirtReachedLog();
void feather5RedshirtDeathFinished();
void feather5UseSpockOnLeftExit();
void feather5UseMccoyOnLeftExit();
void feather5UseSnakeOnKirk();
void feather5UseSnakeOnSpock();
void feather5UseSnakeOnMccoy();
void feather5UseSnakeOnRedshirt();
void feather5UseSnakeOnWater();
void feather5UseKnifeOnKirk();
void feather5UseKnifeOnSpock();
void feather5UseKnifeOnMccoy();
void feather5UseKnifeOnRedshirt();
void feather5UseKnifeOnWater();
void feather5UseKnifeOnMonster();
void feather5GetFern();
void feather5UseKnifeOnFern();
void feather5ReachedFern();
void feather5PickedUpFern();
void feather5UseFernOnMonster();
void feather5ReachedPositionToUseFern();
void feather5DoneThrowingFern();
void feather5FernFellIntoWater();
void feather5Timer1Expired();
void feather5UseRockOnSpock();
void feather5UseRockOnMccoy();
void feather5UseRockOnRedshirt();
void feather5UseCrewmanOnThrownFern();
void feather5UseSpockOnMonster();
void feather5UseMccoyOnMonster();
void feather5UseRedshirtOnMonster();
void feather5UsePhaser();
void feather5LookAnywhere();
void feather5LookAtLog();
void feather5LookAtWater();
void feather5LookAtFern();
void feather5LookAtInsects();
void feather5LookAtCave();
void feather5LookAtMonster();
void feather5LookAtSpock();
void feather5LookAtKirk();
void feather5LookAtMccoy();
void feather5LookAtRedshirt();
void feather5TalkToMccoy();
void feather5TalkToSpock();
void feather5TalkToRedshirt();
void feather5UseMTricorderOnWater();
void feather5UseMTricorderOnMonster();
void feather5UseSTricorderOnMonster();
void feather5UseSTricorderAnywhere();
void feather5UseSTricorderOnWater();
void feather5UseSTricorderOnFern();
void feather5UseMedkitAnywhere();

// FEATHER6
void feather6Tick1();
Expand Down
10 changes: 5 additions & 5 deletions engines/startrek/rooms/feather4.cpp
Expand Up @@ -24,7 +24,7 @@

#define HOTSPOT_EYES 0x20
#define HOTSPOT_MUSHROOM 0x21
#define HOTSPOT_BUSH 0x22
#define HOTSPOT_FERN 0x22
#define HOTSPOT_LIGHT_1 0x23
#define HOTSPOT_LIGHT_2 0x24
#define HOTSPOT_LIGHT_3 0x25
Expand All @@ -40,7 +40,7 @@ extern const RoomAction feather4ActionList[] = {
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_LIGHT_2, 0}, &Room::feather4UseSTricorderOnLight },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_LIGHT_3, 0}, &Room::feather4UseSTricorderOnLight },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_MUSHROOM, 0},&Room::feather4UseSTricorderOnMushroom },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_BUSH, 0}, &Room::feather4UseSTricorderOnBush },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_FERN, 0}, &Room::feather4UseSTricorderOnFern },
{ {ACTION_USE, OBJECT_ISTRICOR, 0xff, 0}, &Room::feather4UseSTricorderAnywhere },
{ {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_LIGHT_1, 0}, &Room::feather4UseMTricorderOnLight },
{ {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_LIGHT_2, 0}, &Room::feather4UseMTricorderOnLight },
Expand All @@ -54,7 +54,7 @@ extern const RoomAction feather4ActionList[] = {
{ {ACTION_LOOK, HOTSPOT_EYES, 0, 0}, &Room::feather4LookAtEyes },
{ {ACTION_LOOK, 0xff, 0, 0}, &Room::feather4LookAnywhere },
{ {ACTION_LOOK, HOTSPOT_MUSHROOM, 0, 0}, &Room::feather4LookAtMushroom },
{ {ACTION_LOOK, HOTSPOT_BUSH, 0, 0}, &Room::feather4LookAtBush },
{ {ACTION_LOOK, HOTSPOT_FERN, 0, 0}, &Room::feather4LookAtFern },
{ {ACTION_LOOK, HOTSPOT_LIGHT_1, 0, 0}, &Room::feather4LookAtLight },
{ {ACTION_LOOK, HOTSPOT_LIGHT_2, 0, 0}, &Room::feather4LookAtLight },
{ {ACTION_LOOK, HOTSPOT_LIGHT_3, 0, 0}, &Room::feather4LookAtLight },
Expand Down Expand Up @@ -88,7 +88,7 @@ void Room::feather4UseSTricorderOnMushroom() {
spockScan(DIR_W, TX_FEA4_012);
}

void Room::feather4UseSTricorderOnBush() {
void Room::feather4UseSTricorderOnFern() {
spockScan(DIR_W, TX_FEA4_009);
}

Expand Down Expand Up @@ -136,7 +136,7 @@ void Room::feather4LookAtMushroom() {
showText(TX_FEA4N001);
}

void Room::feather4LookAtBush() {
void Room::feather4LookAtFern() {
showText(TX_FEA4N000);
}

Expand Down

0 comments on commit 5863f51

Please sign in to comment.