Debian Codegraph @

Descent3/TelComEfxStructs.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/TelComEfxStructs.h $
21 * $Revision: 19 $
22 * $Date: 4/20/99 12:46p $
23 * $Author: Jeff $
24 *
25 * Structures used for TelCom effects
26 *
27 * $Log: /DescentIII/main/TelComEfxStructs.h $
28 *
29 * 19 4/20/99 12:46p Jeff
30 * telcom main menu, mouse over button sets focus. if you go into telcom
31 * main menu, when you leave a system it will return you to main menu.
32 *
33 * 18 4/17/99 6:15p Samir
34 * replaced gr.h with grdefs.h and fixed resulting compile bugs.
35 *
36 * 17 2/17/99 6:56p Jeff
37 * added jump button type. Added no early render flag for bitmaps. Fixed
38 * color bug for type text
39 *
40 * 16 2/03/99 12:14a Jeff
41 * updated single player ship selection to full functional...needs effects
42 * added in. Had to add flag to buttons for gain focus to register as a
43 * click
44 *
45 * 15 1/04/99 12:33p Jeff
46 * added support for mission flag parsing
47 *
48 * 14 10/12/98 8:32p Jeff
49 * changed the way focus is handled
50 *
51 * 13 9/17/98 2:29p Jeff
52 * added focus filenames to button effect
53 *
54 * 12 9/03/98 2:20p Jeff
55 * creation of dialogs in Brief editor
56 *
57 * 11 8/27/98 2:51p Jeff
58 * New TelCom finally checked in
59 *
60 * 10 5/19/98 3:40p Jeff
61 * poly models functional
62 *
63 * 9 5/18/98 2:29p Jeff
64 * added new type of on screen button, a glow type (if mouse is over it,
65 * it will do the glow)
66 *
67 * 8 5/05/98 6:50p Jeff
68 * Telcom doesn't use rend_DrawLFBitmap anymore...more speed!
69 *
70 * 7 5/04/98 1:35p Jeff
71 * Changes made for mouse handling
72 *
73 * 6 5/04/98 11:01a Jeff
74 * added scroll parameter to text
75 *
76 * 5 5/01/98 2:17p Jeff
77 * Added sound effect support
78 *
79 * 4 4/28/98 6:58p Jeff
80 * Added new poly model effect driver
81 *
82 * 3 4/26/98 7:21p Jeff
83 * added stretch bitmap effect define
84 *
85 * 2 4/26/98 2:54a Jeff
86 * Initial Creation
87 *
88 * $NoKeywords: $
89 */
90
91 #ifndef __TELCOMEFXSTRUCTS_H_
92 #define __TELCOMEFXSTRUCTS_H_cxx . . $ `Descent3/TelComEfxStructs.h:92:9`!
93
94 #include "grdefs.h"cxx . . $ `<file>/lib/grdefs.h`/
95
96 #define MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`! 32
97 //===================
98 // tc_text
99 // - Contains information on the text coordinates of an effect
100 //===================
101 struct tc_textcxx . . $ tc_text# {
102 int leftcxx . . $ tc_text#left., rightcxx . . $ tc_text#right., topcxx . . $ tc_text#top., bottomcxx . . $ tc_text#bottom.;
103 };
104
105 // TCTEXTDESC caps flags
106 #define TCTD_FONTcxx . . $ `Descent3/TelComEfxStructs.h:106:9`! 0x0001
107 #define TCTD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:107:9`! 0x0002
108 #define TCTD_SPEEDcxx . . $ `Descent3/TelComEfxStructs.h:108:9`! 0x0004
109 #define TCTD_LOOPINGcxx . . $ `Descent3/TelComEfxStructs.h:109:9`! 0x0008
110 #define TCTD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:110:9`! 0x0010
111 #define TCTD_TEXTBOXcxx . . $ `Descent3/TelComEfxStructs.h:111:9`! 0x0020
112 #define TCTD_SCROLLcxx . . $ `Descent3/TelComEfxStructs.h:112:9`! 0x0040
113 #define TCTD_TABSTOPcxx . . $ `Descent3/TelComEfxStructs.h:113:9`! 0x0080
114 // TCBMPDESC caps flags
115 #define TCBD_XYcxx . . $ `Descent3/TelComEfxStructs.h:115:9`! 0x0001
116 #define TCBD_LOOPINGcxx . . $ `Descent3/TelComEfxStructs.h:116:9`! 0x0002
117 #define TCBD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:117:9`! 0x0004
118 #define TCBD_SPEEDcxx . . $ `Descent3/TelComEfxStructs.h:118:9`! 0x0008
119 // TCMOVIEDESC caps flags
120 #define TCMD_XYcxx . . $ `Descent3/TelComEfxStructs.h:120:9`! 0x0001
121 #define TCMD_LOOPINGcxx . . $ `Descent3/TelComEfxStructs.h:121:9`! 0x0002
122 #define TCMD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:122:9`! 0x0004
123 #define TCMD_FPScxx . . $ `Descent3/TelComEfxStructs.h:123:9`! 0x0008
124 // TCBKGDESC caps flags
125 #define TCBGD_IDcxx . . $ `Descent3/TelComEfxStructs.h:125:9`! 0x0001
126 #define TCBGD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:126:9`! 0x0002
127 #define TCBGD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:127:9`! 0x0004
128 // TCPOLYDESC caps flags
129 #define TCPM_SPEEDcxx . . $ `Descent3/TelComEfxStructs.h:129:9`! 0x0001
130 // TCSNDDESC caps flags
131 #define TCSD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:131:9`! 0x0001
132 #define TCSD_ONCEcxx . . $ `Descent3/TelComEfxStructs.h:132:9`! 0x0002
133
134 // Type values
135 #define TC_TEXT_STATICcxx . . $ `Descent3/TelComEfxStructs.h:135:9`! 0
136 #define TC_TEXT_SCROLLcxx . . $ `Descent3/TelComEfxStructs.h:136:9`! 1
137 #define TC_TEXT_FADEcxx . . $ `Descent3/TelComEfxStructs.h:137:9`! 2
138 #define TC_TEXT_FLASHcxx . . $ `Descent3/TelComEfxStructs.h:138:9`! 3
139 #define TC_BMP_STATICcxx . . $ `Descent3/TelComEfxStructs.h:139:9`! 0
140 #define TC_BMP_BLURcxx . . $ `Descent3/TelComEfxStructs.h:140:9`! 1
141 #define TC_BMP_SCANLINEcxx . . $ `Descent3/TelComEfxStructs.h:141:9`! 2
142 #define TC_BMP_INVERTcxx . . $ `Descent3/TelComEfxStructs.h:142:9`! 3
143 #define TC_BMP_STRETCHcxx . . $ `Descent3/TelComEfxStructs.h:143:9`! 4
144 #define TC_BACK_STATICcxx . . $ `Descent3/TelComEfxStructs.h:144:9`! 0
145 #define TC_MOVIE_STATICcxx . . $ `Descent3/TelComEfxStructs.h:145:9`! 0
146 #define TC_POLY_STATICcxx . . $ `Descent3/TelComEfxStructs.h:146:9`! 0
147 #define TC_SND_STATICcxx . . $ `Descent3/TelComEfxStructs.h:147:9`! 0
148
149 // text flags
150 #define TC_TEXTF_L2Rcxx . . $ `Descent3/TelComEfxStructs.h:150:9`! 0 // scroll left 2 right
151 #define TC_TEXTF_R2Lcxx . . $ `Descent3/TelComEfxStructs.h:151:9`! 1 // scroll right 2 left
152 #define TC_TEXTF_T2Bcxx . . $ `Descent3/TelComEfxStructs.h:152:9`! 2 // scroll top 2 bottom
153 #define TC_TEXTF_B2Tcxx . . $ `Descent3/TelComEfxStructs.h:153:9`! 3 // scroll bottom 2 top
154 #define TC_TEXTF_INcxx . . $ `Descent3/TelComEfxStructs.h:154:9`! 4 // fade in
155 #define TC_TEXTF_OUTcxx . . $ `Descent3/TelComEfxStructs.h:155:9`! 5 // fade out
156 #define TC_TEXTF_PINGPONGcxx . . $ `Descent3/TelComEfxStructs.h:156:9`! 6 // fade in then out
157 // bmp flags
158 #define TC_BMPF_INcxx . . $ `Descent3/TelComEfxStructs.h:158:9`! 0 // blur/scanline/invert in
159 #define TC_BMPF_OUTcxx . . $ `Descent3/TelComEfxStructs.h:159:9`! 1 // blur/scanline/invert out
160 #define TC_NOEARLYRENDERcxx . . $ `Descent3/TelComEfxStructs.h:160:9`! 2 // don't start rendering until time is up
161
162 //===================
163 // TCTEXTDESC
164 // - Contains all the info for a text effect passed to the monitor call
165 //===================
166 // The following structure should be filled in, and passed to the Monitor::Text() function
167 // caps must be set with the above flags. If a member isn't set to be defined by the caps, then
168 // if it's needed default values will be used (defaults listed after each member in structure)
169 struct TCTEXTDESCcxx . . $ TCTEXTDESC# {
170 // what values are set/defined
171 int capscxx . . $ TCTEXTDESC#caps.; //(MUST BE DEFINED!)
172 // the text box of the effect
173 tc_textcxx . . $ tc_text# textboxcxx . . $ TCTEXTDESC#textbox.; //(Default:entire monitor screen)
174 // what kind of font to use
175 int fontcxx . . $ TCTEXTDESC#font.; //(Default: BRIEF_FONT_INDEX)
176 // default color of the text
177 ddgr_colorcxx . . $ ddgr_color# colorcxx . . $ TCTEXTDESC#color.; //(Default: GR_GREEN)
178 // flags
179 int flagscxx . . $ TCTEXTDESC#flags.;
180 // speed
181 float speedcxx . . $ TCTEXTDESC#speed.;
182 // does the text effect loop
183 bool loopingcxx . . $ TCTEXTDESC#looping.; //(Default: false)
184 // how much time to wait before effect starts
185 float waittimecxx . . $ TCTEXTDESC#waittime.; //(Default: 0.0f)
186 // type
187 int typecxx . . $ TCTEXTDESC#type.;
188 // mission flag mask
189 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCTEXTDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCTEXTDESC#mission_mask_unset.;
190 };
191
192 struct TCBMPDESCcxx . . $ TCBMPDESC# {
193 // type
194 int typecxx . . $ TCBMPDESC#type.;
195 // flags
196 int flagscxx . . $ TCBMPDESC#flags.;
197 // what members are defined
198 int capscxx . . $ TCBMPDESC#caps.; // MUST BE FILLED IN
199 // upped left corner to display bitmap
200 int xcxx . . $ TCBMPDESC#x., ycxx . . $ TCBMPDESC#y.; //(Default: (0,0) )
201 // does the effect loop
202 bool loopingcxx . . $ TCBMPDESC#looping.; //(Default: false)
203 // how long to wait until displaying the bitmap
204 float waittimecxx . . $ TCBMPDESC#waittime.; //(Default: 0.0f)
205 // how fast the bitmap effect should be (only useful for non-static)
206 float speedcxx . . $ TCBMPDESC#speed.; //(Default: 2.0f)
207 // filename
208 char filenamecxx . . $ TCBMPDESC#filename.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!]; // MUST BE FILLED IN
209 // mission flag mask
210 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCBMPDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCBMPDESC#mission_mask_unset.;
211 };
212
213 struct TCMOVIEDESCcxx . . $ TCMOVIEDESC# {
214 // fill in with whats valid
215 int capscxx . . $ TCMOVIEDESC#caps.; // MUST BE FILLED IN
216 // type
217 int typecxx . . $ TCMOVIEDESC#type.;
218 // upper left coordinate of the movie
219 int xcxx . . $ TCMOVIEDESC#x., ycxx . . $ TCMOVIEDESC#y.; //(Default: (0,0) )
220 // filename of the movie to play
221 char filenamecxx . . $ TCMOVIEDESC#filename.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!]; // MUST BE FILLED IN
222 // whether the movie is to loop
223 bool loopingcxx . . $ TCMOVIEDESC#looping.; //(Default: false)
224 // Frames per second
225 float fpscxx . . $ TCMOVIEDESC#fps.; //(Default: 20.0f)
226 // time to wait until starting the movie
227 float waittimecxx . . $ TCMOVIEDESC#waittime.; //(Default: 0.0f)
228 // mission flag mask
229 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCMOVIEDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCMOVIEDESC#mission_mask_unset.;
230 };
231
232 struct TCBKGDESCcxx . . $ TCBKGDESC# {
233 // whats defined for the struct
234 int capscxx . . $ TCBKGDESC#caps.; // MUST BE SET!
235 // what type of background effect
236 int typecxx . . $ TCBKGDESC#type.; //(Default: MBS_DESKTOP)
237 // id used by the type
238 int idcxx . . $ TCBKGDESC#id.; //(if type is set to Desktop then it MUST BE SET to the bitmap handle, else MBI_QUICKCLEAR)
239 // color if needed
240 ddgr_colorcxx . . $ ddgr_color# colorcxx . . $ TCBKGDESC#color.; //(Default: GR_BLUE)
241 // how long to wait until effect start
242 float waittimecxx . . $ TCBKGDESC#waittime.; //(Default: 0.0f)
243 // mission flag mask
244 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCBKGDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCBKGDESC#mission_mask_unset.;
245 };
246 struct TCPOLYDESCcxx . . $ TCPOLYDESC# {
247 // whats defined for the struct
248 int capscxx . . $ TCPOLYDESC#caps.; // MUST BE SET!
249 // what type of poly effect
250 int typecxx . . $ TCPOLYDESC#type.;
251 // position
252 float pos_xcxx . . $ TCPOLYDESC#pos_x., pos_ycxx . . $ TCPOLYDESC#pos_y., pos_zcxx . . $ TCPOLYDESC#pos_z.; // coordinates (MUST BE SET!)
253 // rotation (degrees per sec)
254 float rot_xcxx . . $ TCPOLYDESC#rot_x., rot_ycxx . . $ TCPOLYDESC#rot_y., rot_zcxx . . $ TCPOLYDESC#rot_z.;
255 // orientation
256 float ori_xcxx . . $ TCPOLYDESC#ori_x., ori_ycxx . . $ TCPOLYDESC#ori_y., ori_zcxx . . $ TCPOLYDESC#ori_z.;
257 // flags to use
258 int flagscxx . . $ TCPOLYDESC#flags.;
259 // how long to wait until effect starts
260 float waittimecxx . . $ TCPOLYDESC#waittime.;
261 // polymodel name
262 char polynamecxx . . $ TCPOLYDESC#polyname.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
263 // mission flag mask
264 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCPOLYDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCPOLYDESC#mission_mask_unset.;
265 };
266
267 struct TCSNDDESCcxx . . $ TCSNDDESC# {
268 // whats defined for the struct
269 int capscxx . . $ TCSNDDESC#caps.; // MUST BE SET
270 // type of sound effect
271 int typecxx . . $ TCSNDDESC#type.;
272 // true if this sound should only play once
273 bool oncecxx . . $ TCSNDDESC#once.;
274 // how long to wait until effect starts
275 float waittimecxx . . $ TCSNDDESC#waittime.;
276 // sound name
277 char filenamecxx . . $ TCSNDDESC#filename.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
278 // mission flag mask
279 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCSNDDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCSNDDESC#mission_mask_unset.;
280 };
281
282 struct TCBUTTONDESCcxx . . $ TCBUTTONDESC# {
283 char filenamecxx . . $ TCBUTTONDESC#filename.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
284 char filename_focuscxx . . $ TCBUTTONDESC#filename_focus.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
285 char flash_filenamecxx . . $ TCBUTTONDESC#flash_filename.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
286 char flash_filename_focuscxx . . $ TCBUTTONDESC#flash_filename_focus.[MAX_FILELENcxx . . $ `Descent3/TelComEfxStructs.h:96:9`!];
287 int sibling_idcxx . . $ TCBUTTONDESC#sibling_id.; // Sibling effect ID(for down/up arrows), -1 if none
288 int parent_idcxx . . $ TCBUTTONDESC#parent_id.; // Parent effect ID (text for down/up arrows), -1 if it works with TelCom System
289 int xcxx . . $ TCBUTTONDESC#x., ycxx . . $ TCBUTTONDESC#y., wcxx . . $ TCBUTTONDESC#w., hcxx . . $ TCBUTTONDESC#h.;
290 int osflagscxx . . $ TCBUTTONDESC#osflags.;
291 int jump_pagecxx . . $ TCBUTTONDESC#jump_page.;
292 void (*internalcxx . . $ TCBUTTONDESC#internal.)(int);
293 float flash_timecxx . . $ TCBUTTONDESC#flash_time.;
294 uint8_tcxx . . $ uint8_t# button_typecxx . . $ TCBUTTONDESC#button_type.; // Up arrow, Down Arrow, TelCom System
295 uint8_tcxx . . $ uint8_t# click_typecxx . . $ TCBUTTONDESC#click_type.; // CLICKTYPE_DOWN or CLICKTYPE_CLICK (what the button responds to)
296 bool flashercxx . . $ TCBUTTONDESC#flasher.;
297 bool tab_stopcxx . . $ TCBUTTONDESC#tab_stop.;
298 uint32_tcxx . . $ uint32_t# mission_mask_setcxx . . $ TCBUTTONDESC#mission_mask_set., mission_mask_unsetcxx . . $ TCBUTTONDESC#mission_mask_unset.; // mission flag mask
299 };
300
301 //==================
302 // tc_button
303 // - contains info on an on screen button
304 //==================
305 #define OBF_FLASHcxx . . $ `Descent3/TelComEfxStructs.h:305:9`! 0x01
306 #define OBF_GLOWcxx . . $ `Descent3/TelComEfxStructs.h:306:9`! 0x02
307 #define OBF_CHANGEFOCUSISCLICKcxx . . $ `Descent3/TelComEfxStructs.h:307:9`! 0x04
308 #define OBF_MOUSEOVERFOCUScxx . . $ `Descent3/TelComEfxStructs.h:308:9`! 0x08
309
310 #endif