Debian Codegraph @

Descent3/gamecinematics_external.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/gamecinematics_external.h $
21 * $Revision: 13 $
22 * $Date: 5/10/99 10:22p $
23 * $Author: Ardussi $
24 *
25 * Defines and structs external for DLLs
26 *
27 * $Log: /DescentIII/Main/gamecinematics_external.h $
28 *
29 * 13 5/10/99 10:22p Ardussi
30 * changes to compile on Mac
31 *
32 * 12 5/04/99 6:53p Jeff
33 * added new canned cinematic to fade screen to white and endlevel. Fixed
34 * crash bug with invalid player path for canned cine with player paths
35 *
36 * 11 4/04/99 8:21p Matt
37 * Fixed include problems with osiris vector stuff. Osiris headers now
38 * include vecmat_external.h, instead of defining the typedefs, structs,
39 * and inlines on the Osiris side.
40 *
41 * 10 3/27/99 7:22p Jeff
42 * fixed cinematics when going from one cut to another immediatly. Added
43 * start transition
44 *
45 * 9 2/28/99 8:32p Jeff
46 * added fade and move player dallas action. Fixed the end-level sequence
47 * changing view back to player for split second.
48 *
49 * 8 2/22/99 1:20a Jeff
50 * added support for inventory (simple) in dallas. Moved end-level
51 * sequence to use IGC. Add position clipboard stuff for dallas. Fixed
52 * some inventory bug with storing object handles
53 *
54 * 7 2/21/99 8:36p Jeff
55 * misc changes to handle new matcen and path types of dallas
56 *
57 * 6 2/16/99 9:36p Jeff
58 * added low text layout for cinematics
59 *
60 * 5 2/14/99 1:16a Jeff
61 * added canned cinematic function/structures. Added a flag to push
62 * target to end of path if on a path (quick exit). Added canned intro
63 * cine. Determine correct velocity on player ship for intro cine.
64 *
65 * 4 2/12/99 2:45a Jeff
66 * added end-cinematic transitions
67 *
68 * 3 2/02/99 3:58p Jeff
69 * started to implement level intro cinematic (need ai functions first).
70 * No longer need camera object to do cinematic (auto-created)...path
71 * cameras use speed based on distance needed to travel.
72 *
73 * 2 2/01/99 12:55p Jeff
74 * restore correct hud mode, added flag to stop cinematics if target dies
75 *
76 * 1 1/31/99 10:28p Jeff
77 *
78 * $NoKeywords: $
79 */
80
81 #ifndef __GAMECINEMATICS_EXTERNAL_H_
82 #define __GAMECINEMATICS_EXTERNAL_H_cxx . . $ `Descent3/gamecinematics_external.h:82:9`!
83
84 #include <cstdint>
85
86 #include "vecmat_external.h"cxx . . $ `<file>/lib/vecmat_external.h`/
87 #include "manage_external.h"cxx . . $ `<file>/lib/manage_external.h`/
88
89 /*
90 ==========================================================
91 Canned Cinematics
92 */
93 #define CANNED_LEVEL_INTROcxx . . $ `Descent3/gamecinematics_external.h:93:9`! 1
94 #define CANNED_LEVEL_END_PATHcxx . . $ `Descent3/gamecinematics_external.h:94:9`! 2 // end level with camera on path
95 #define CANNED_LEVEL_END_POINTcxx . . $ `Descent3/gamecinematics_external.h:95:9`! 3 // end level with camera on point
96 #define CANNED_MOVE_PLAYER_FADEcxx . . $ `Descent3/gamecinematics_external.h:96:9`! 4 // fade the screen out and move the player to a new position
97 #define CANNED_LEVEL_END_FADE_WHITEcxx . . $ `Descent3/gamecinematics_external.h:97:9`! 5 // fade the screen to white and end level
98
99 struct tCannedCinematicInfocxx . . $ tCannedCinematicInfo# {
100 int32_t typecxx . . $ tCannedCinematicInfo#type.;
101 /*
102 CANNED_LEVEL_INTRO:
103 camera_pathid
104 target_pathid
105 text_to_display
106 time
107 */
108 /*
109 CANNED_LEVEL_END_PATH
110 camera_pathid
111 target_pathid
112 text_to_display
113 time
114 */
115 /*
116 CANNED_LEVEL_END_POINT
117 object_to_use_for_point
118 target_pathid
119 text_to_display
120 time
121 */
122 /*
123 CANNED_MOVE_PLAYER_FADE
124 room //destination room
125 pos //destination pos
126 orient //destination orient
127 target_objhandle //the player
128 */
129 /*
130 CANNED_LEVEL_END_FADE_WHITE
131 time
132 text_to_display
133 */
134
135 int32_t camera_pathidcxx . . $ tCannedCinematicInfo#camera_pathid.;
136 int32_t target_pathidcxx . . $ tCannedCinematicInfo#target_pathid.;
137 const char *text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display.;
138
139 int32_t target_objhandlecxx . . $ tCannedCinematicInfo#target_objhandle.;
140
141 int32_t roomcxx . . $ tCannedCinematicInfo#room.;
142
143 float timecxx . . $ tCannedCinematicInfo#time.;
144
145 int32_t object_to_use_for_pointcxx . . $ tCannedCinematicInfo#object_to_use_for_point.;
146
147 vectorcxx . . $ vector# poscxx . . $ tCannedCinematicInfo#pos.;
148 matrixcxx . . $ matrix# orientcxx . . $ tCannedCinematicInfo#orient.;
149
150 };
151
152 //========================================================
153
154 // flags for game cinematic struct
155 #define GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`! 0x00000000
156 #define GCF_FULLSCREENcxx . . $ `Descent3/gamecinematics_external.h:156:9`! 0x00000001
157 #define GCF_SCREENFORMATcxx . . $ `Descent3/gamecinematics_external.h:157:9`! 0x00000001 // mask for screen format to use
158
159 #define GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`! 0x00000000
160 #define GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`! 0x00000002
161 #define GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`! 0x00000002 // mask for camera placement (use path or point)
162
163 #define GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`! 0x00000004
164 #define GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`! 0x00000008
165 #define GCF_TEXT_NOEFFECTcxx . . $ `Descent3/gamecinematics_external.h:165:9`! 0x00000000
166 #define GCF_TEXT_MASKcxx . . $ `Descent3/gamecinematics_external.h:166:9`! 0x0000000C // mask for text modes
167
168 #define GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`! 0x00000000
169 #define GCF_LAYOUT_TOPcxx . . $ `Descent3/gamecinematics_external.h:169:9`! 0x00000010
170 #define GCF_LAYOUT_MIDDLEcxx . . $ `Descent3/gamecinematics_external.h:170:9`! 0x00000020
171 #define GCF_LAYOUT_LOWcxx . . $ `Descent3/gamecinematics_external.h:171:9`! 0x00000040
172 #define GCF_LAYOUT_MASKcxx . . $ `Descent3/gamecinematics_external.h:172:9`! 0x00000070 // mask for text layout to use
173
174 #define GCF_STOPIFTAGETDEADcxx . . $ `Descent3/gamecinematics_external.h:174:9`! 0x00000100 // stop the cinematic if the target dies
175 #define GCF_FORCETARGETTOENDcxx . . $ `Descent3/gamecinematics_external.h:175:9`! \
176 0x00000200 // if there is a quick exit (by keypress) force target position to the end of the path
177 #define GCF_DONTRESTOREVIEWERcxx . . $ `Descent3/gamecinematics_external.h:177:9`! \
178 0x00000400 // don't restore the view back to the player (this is really an internal flag and shouldn't be used)
179 #define GCF_IGNOREPLAYERDEADcxx . . $ `Descent3/gamecinematics_external.h:179:9`! 0x00000800 // don't stop cinematic if player dies
180 #define GCF_DOTRANSBEFORETEXTcxx . . $ `Descent3/gamecinematics_external.h:180:9`! 0x00001000 // process end transitions before drawing text
181
182 // callback types
183 #define GCCT_STARTcxx . . $ `Descent3/gamecinematics_external.h:183:9`! 0x00000001 // first frame of the movie
184 #define GCCT_STOPcxx . . $ `Descent3/gamecinematics_external.h:184:9`! 0x00000002 // last frame of the movie
185 #define GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`! 0x00000003 // frame of the movie
186
187 // Transition types
188 #define GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`! 0
189 #define GCTT_WACKYcxx . . $ `Descent3/gamecinematics_external.h:189:9`! 1
190 #define GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`! 2
191 #define GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`! 3
192 #define GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`! 4
193
194 struct PercentageRangecxx . . $ PercentageRange# {
195 float mincxx . . $ PercentageRange#min., maxcxx . . $ PercentageRange#max.; // 0.0f->1.0f
196 };
197
198 struct tGameCinematiccxx . . $ tGameCinematic# {
199 uint32_tcxx . . $ uint32_t# flagscxx . . $ tGameCinematic#flags.;
200
201 int32_t target_objhandlecxx . . $ tGameCinematic#target_objhandle.;
202
203 int32_t end_transitioncxx . . $ tGameCinematic#end_transition.;
204 int32_t start_transitioncxx . . $ tGameCinematic#start_transition.;
205
206 // the name of the path or the position that the camera should be at
207 int32_t pathidcxx . . $ tGameCinematic#pathid.;
208 vectorcxx . . $ vector# positioncxx . . $ tGameCinematic#position.;
209 matrixcxx . . $ matrix# *orientcxx . . $ tGameCinematic#orient.;
210 int32_t roomcxx . . $ tGameCinematic#room.;
211
212 // the total time that the cinematic should play
213 float max_time_playcxx . . $ tGameCinematic#max_time_play.;
214
215 // called every frame while the cinematic is processing
216 void (*callbackcxx . . $ tGameCinematic#callback.)(int type);
217
218 // ranges (based on max_time_play)
219 PercentageRangecxx . . $ PercentageRange# text_displaycxx . . $ tGameCinematic#text_display.; // range that the text should be displayed
220 PercentageRangecxx . . $ PercentageRange# track_targetcxx . . $ tGameCinematic#track_target.; // range that the camera should track the target
221 PercentageRangecxx . . $ PercentageRange# player_disabledcxx . . $ tGameCinematic#player_disabled.; // range that the player can't move/fire/etc.
222 PercentageRangecxx . . $ PercentageRange# in_camera_viewcxx . . $ tGameCinematic#in_camera_view.; // range that the view is from the camera
223 PercentageRangecxx . . $ PercentageRange# quick_exitcxx . . $ tGameCinematic#quick_exit.; // range where a key-press will quick exit cinematic
224
225 };
226
227 #endif