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
|
/* 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.
*
*/
#ifndef STARTREK_AWAYMISSION_H
#define STARTREK_AWAYMISSION_H
// All variables here get cleared to 0 upon starting an away mission.
struct AwayMission {
// These timers count down automatically when nonzero. When they reach 0,
// ACTION_TIMER_EXPIRED is invoked with the corresponding index (0-7).
int16 timers[8]; // 0x00-0x0f
int16 mouseX; // 0x10
int16 mouseY; // 0x12
int16 crewGetupTimers[4]; // 0x14
bool disableWalking; // 0x1c
byte disableInput; // 0x1d; Set while beaming in or walking into a room. Disables control?
bool redshirtDead; // 0x1e
byte activeAction; // 0x1f
byte activeObject; // 0x20; The item that is going to be used on something
byte passiveObject; // 0x21; The item that the active item is used on (or the item looked at, etc).
// If this is true after calling room-specific RDF code, the game will continue to run
// any "default" code for the event, if any.
bool rdfStillDoDefaultAction; // 0x23
// If a bit in "crewDownBitset" is set, the corresponding timer in "crewGetupTimers"
// begins counting down. When it reaches 0, they get up.
byte crewDownBitset; // 0x24
int8 crewDirectionsAfterWalk[4]; // 0x25: Sets an object's direction after they finish walking somewhere?
// Mission-specific variables
union {
// Demon World (TODO: label remaining generic variables)
struct {
bool wasRudeToPrelate; // 0x29
bool insultedStephen; // 0x2b
bool field2d; // 0x2d
bool beatKlingons; // 0x2f
bool tookKlingonHand; // 0x31
bool talkedToPrelate; // 0x33
bool stephenWelcomedToStudy; // 0x34
bool prelateWelcomedCrew; // 0x35
bool askedPrelateAboutSightings; // 0x36
byte field37; // 0x37
bool mccoyMentionedFlora; // 0x38
byte numBouldersGone; // 0x39
byte enteredFrom; // 0x3a
bool repairedHand; // 0x3b
bool healedMiner; // 0x3c
bool curedChub; // 0x3d
bool field3e; // 0x3e
bool knowAboutHypoDytoxin; // 0x3f
bool minerDead; // 0x40
byte field41; // 0x41
bool foundMiner; // 0x43
bool field45; // 0x45
bool gaveSkullToNauian; // 0x47
bool warpsDisabled; // 0x48
bool boulder1Gone; // 0x49
bool boulder2Gone; // 0x4a
bool boulder3Gone; // 0x4b
bool boulder4Gone; // 0x4c
bool doorOpened; // 0x4d
bool solvedSunPuzzle; // 0x4e
byte itemsTakenFromCase; // 0x4f
bool gotBerries; // 0x50
bool madeHypoDytoxin; // 0x51
bool metNauian; // 0x53
bool gavePointsForDytoxin; // 0x54
bool lookedAtComputer; // 0x55
byte field56; // 0x56
bool foundAlienRoom; // 0x57
int16 missionScore; // 0x58
} demon;
// Hijacked
struct {
int16 missionScore; // 0x29
int16 field2b; // 0x2b
int16 field2d; // 0x2d
bool engineerConscious; // 0x30
byte field35; // 0x35
bool gotWires; // 0x37
byte orbitalDecayCounter; // 0x3b
bool bridgeElasiDrewPhasers; // 0x3d
bool talkedToCereth; // 0x3e
bool gotJunkPile; // 0x3f
bool gotTransmogrifier; // 0x43
bool transporterRepaired; // 0x44
bool spockExaminedTransporter; // 0x45
bool usedTransmogrifierOnTransporter; // 0x46
bool bridgeForceFieldDown; // 0x47
bool savedPrisoners; // 0x48
bool haveBomb; // 0x49
bool brigElasiPhasersOnKill; // 0x4a
byte field4b; // 0x4b
byte guard1Status; // 0x4c
byte guard2Status; // 0x4d
byte field4e; // 0x4e
byte crewmanKilled[4]; // 0x4f
byte bridgeElasi1Status; // 0x53
byte bridgeElasi2Status; // 0x54
byte bridgeElasi3Status; // 0x55
byte bridgeElasi4Status; // 0x56
bool brigForceFieldDown; // 0x58
byte field59; // 0x59
byte field5b; // 0x5b
bool elasiSurrendered; // 0x5c
byte kirkPhaserDrawn; // 0x5d
// 1: Decided to shoot them
// 2: Talked, and they surrendered immediately
// 3: They deorbited the ship (and perhps surrendered after)
byte bridgeWinMethod; // 0x5e
bool talkedToBrigCrewman; // 0x5f
} tug;
// Love's Labor Jeopardized
struct {
bool alreadyStartedMission; // 0x29
bool knowAboutVirus; // 0x2a
bool field2c; // 0x2c
bool field2d; // 0x2d
byte field36; // 0x36
byte field37; // 0x37
bool spockAccessedConsole; // 0x49
bool mccoyAccessedConsole; // 0x4a
int16 missionScore; // 0x52
} love;
};
};
// Size: 0x129 bytes
#endif
|