1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "startrek/room.h"
#define OBJECT_QUETZECOATL 8
namespace StarTrek {
extern const RoomAction feather7ActionList[] = {
{ {ACTION_TICK, 1, 0, 0}, &Room::feather7Tick1 },
{ {ACTION_TICK, 40, 0, 0}, &Room::feather7Tick40 },
{ {ACTION_DONE_WALK, 1, 0, 0}, &Room::feather7KirkReachedSeat },
{ {ACTION_DONE_WALK, 2, 0, 0}, &Room::feather7SpockReachedSeat },
{ {ACTION_DONE_WALK, 3, 0, 0}, &Room::feather7MccoyReachedSeat },
{ {ACTION_DONE_ANIM, 4, 0, 0}, &Room::feather7QuetzecoatlReachedSeat },
{ {ACTION_DONE_ANIM, 1, 0, 0}, &Room::feather7KirkSatDown },
{ {ACTION_DONE_ANIM, 2, 0, 0}, &Room::feather7ReadyToBeamOut },
};
extern const int feather7NumActions = ARRAYSIZE(feather7ActionList);
void Room::feather7Tick1() {
playVoc("FEA7LOOP");
playMidiMusicTracks(33);
_awayMission->disableInput = 2;
loadActorAnim(OBJECT_QUETZECOATL, "s5r7qn", 0x106, 0x98);
}
void Room::feather7Tick40() {
if (_awayMission->feather.diedFromStalactites)
showText(TX_SPEAKER_QUETZECOATL, 17, true);
showText(TX_SPEAKER_QUETZECOATL, 22, true);
if (_awayMission->redshirtDead)
showText(TX_SPEAKER_QUETZECOATL, 21, true);
// BUGFIX: Show this even if redshirt isn't dead (he wishes you wouldn't have knocked
// out Tlaoxac)
if (_awayMission->feather.knockedOutTlaoxac)
showText(TX_SPEAKER_QUETZECOATL, 23, true);
showText(TX_SPEAKER_QUETZECOATL, 27, true);
walkCrewmanC(OBJECT_KIRK, 0x6c, 0x93, &Room::feather7KirkReachedSeat);
walkCrewmanC(OBJECT_SPOCK, 0xbb, 0x8c, &Room::feather7SpockReachedSeat);
walkCrewmanC(OBJECT_MCCOY, 0x8d, 0x8c, &Room::feather7MccoyReachedSeat);
loadActorAnimC(OBJECT_QUETZECOATL, "s5r7qw", -1, -1, &Room::feather7QuetzecoatlReachedSeat);
}
void Room::feather7KirkReachedSeat() {
loadActorAnimC(OBJECT_KIRK, "s5r7ks", -1, -1, &Room::feather7KirkSatDown);
}
void Room::feather7SpockReachedSeat() {
loadActorAnim2(OBJECT_SPOCK, "s5r7ss");
}
void Room::feather7MccoyReachedSeat() {
loadActorAnim2(OBJECT_MCCOY, "s5r7ms");
}
void Room::feather7QuetzecoatlReachedSeat() {
loadActorAnim2(OBJECT_QUETZECOATL, "s5r7qn", 0x97, 0x98);
}
void Room::feather7KirkSatDown() {
const TextRef choices1[] = {
TX_SPEAKER_KIRK,
5, 6, 10,
TX_BLANK
};
int choice = showMultipleTexts(choices1, true);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
showText(TX_SPEAKER_QUETZECOATL, 20, true);
} else if (choice == 1)
showText(TX_SPEAKER_QUETZECOATL, 19, true);
else
showText(TX_SPEAKER_QUETZECOATL, 16, true);
showText(TX_SPEAKER_QUETZECOATL, 29, true);
const TextRef choices2[] = {
TX_SPEAKER_KIRK,
7, 4, 12,
TX_BLANK
};
choice = showMultipleTexts(choices2, true);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
showText(TX_SPEAKER_QUETZECOATL, 30, true);
} else if (choice == 1)
showText(TX_SPEAKER_QUETZECOATL, 18, true);
else {
_roomVar.feather.insultedQuetzecoatl = true;
showText(TX_SPEAKER_QUETZECOATL, 26, true);
}
showText(TX_SPEAKER_SPOCK, 14, true);
showText(TX_SPEAKER_QUETZECOATL, 24, true);
const TextRef choices3[] = {
TX_SPEAKER_KIRK,
8, 9, 11,
TX_BLANK
};
choice = showMultipleTexts(choices3, true);
if (choice == 0) {
_roomVar.feather.insultedQuetzecoatl = true;
showText(TX_SPEAKER_QUETZECOATL, 25, true);
} else if (choice == 1)
showText(TX_SPEAKER_QUETZECOATL, 28, true);
showText(TX_SPEAKER_QUETZECOATL, 15, true);
showText(TX_SPEAKER_MCCOY, 13, true);
showText(TX_SPEAKER_KIRK, 3, true);
loadActorAnimC(OBJECT_KIRK, "s5r7ku", -1, -1, &Room::feather7ReadyToBeamOut);
loadActorAnim2(OBJECT_SPOCK, "s5r7su");
loadActorAnim2(OBJECT_MCCOY, "s5r7mu");
}
void Room::feather7ReadyToBeamOut() {
if (_awayMission->redshirtDead)
showText(TX_SPEAKER_KIRK, 2, true);
else {
_awayMission->feather.missionScore += 1;
showText(TX_SPEAKER_KIRK, 1, true);
}
if (!_roomVar.feather.insultedQuetzecoatl)
_awayMission->feather.missionScore += 2;
_awayMission->feather.missionScore += 4;
loadActorAnim2(OBJECT_QUETZECOATL, "s5r7qt");
endMission(_awayMission->feather.missionScore, 0x13, 0);
}
}
|