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_
93
94 #include "grdefs.h"
95
96 #define MAX_FILELEN 32
97 //===================
98 // tc_text
99 // - Contains information on the text coordinates of an effect
100 //===================
101 struct tc_text {
102 int left, right, top, bottom;
103 };
104
105 // TCTEXTDESC caps flags
106 #define TCTD_FONT 0x0001
107 #define TCTD_COLOR 0x0002
108 #define TCTD_SPEED 0x0004
109 #define TCTD_LOOPING 0x0008
110 #define TCTD_WAITTIME 0x0010
111 #define TCTD_TEXTBOX 0x0020
112 #define TCTD_SCROLL 0x0040
113 #define TCTD_TABSTOP 0x0080
114 // TCBMPDESC caps flags
115 #define TCBD_XY 0x0001
116 #define TCBD_LOOPING 0x0002
117 #define TCBD_WAITTIME 0x0004
118 #define TCBD_SPEED 0x0008
119 // TCMOVIEDESC caps flags
120 #define TCMD_XY 0x0001
121 #define TCMD_LOOPING 0x0002
122 #define TCMD_WAITTIME 0x0004
123 #define TCMD_FPS 0x0008
124 // TCBKGDESC caps flags
125 #define TCBGD_ID 0x0001
126 #define TCBGD_WAITTIME 0x0002
127 #define TCBGD_COLOR 0x0004
128 // TCPOLYDESC caps flags
129 #define TCPM_SPEED 0x0001
130 // TCSNDDESC caps flags
131 #define TCSD_WAITTIME 0x0001
132 #define TCSD_ONCE 0x0002
133
134 // Type values
135 #define TC_TEXT_STATIC 0
136 #define TC_TEXT_SCROLL 1
137 #define TC_TEXT_FADE 2
138 #define TC_TEXT_FLASH 3
139 #define TC_BMP_STATIC 0
140 #define TC_BMP_BLUR 1
141 #define TC_BMP_SCANLINE 2
142 #define TC_BMP_INVERT 3
143 #define TC_BMP_STRETCH 4
144 #define TC_BACK_STATIC 0
145 #define TC_MOVIE_STATIC 0
146 #define TC_POLY_STATIC 0
147 #define TC_SND_STATIC 0
148
149 // text flags
150 #define TC_TEXTF_L2R 0 // scroll left 2 right
151 #define TC_TEXTF_R2L 1 // scroll right 2 left
152 #define TC_TEXTF_T2B 2 // scroll top 2 bottom
153 #define TC_TEXTF_B2T 3 // scroll bottom 2 top
154 #define TC_TEXTF_IN 4 // fade in
155 #define TC_TEXTF_OUT 5 // fade out
156 #define TC_TEXTF_PINGPONG 6 // fade in then out
157 // bmp flags
158 #define TC_BMPF_IN 0 // blur/scanline/invert in
159 #define TC_BMPF_OUT 1 // blur/scanline/invert out
160 #define TC_NOEARLYRENDER 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 TCTEXTDESC {
170 // what values are set/defined
171 int caps; //(MUST BE DEFINED!)
172 // the text box of the effect
173 tc_text textbox; //(Default:entire monitor screen)
174 // what kind of font to use
175 int font; //(Default: BRIEF_FONT_INDEX)
176 // default color of the text
177 ddgr_color color; //(Default: GR_GREEN)
178 // flags
179 int flags;
180 // speed
181 float speed;
182 // does the text effect loop
183 bool looping; //(Default: false)
184 // how much time to wait before effect starts
185 float waittime; //(Default: 0.0f)
186 // type
187 int type;
188 // mission flag mask
189 uint32_t mission_mask_set, mission_mask_unset;
190 };
191
192 struct TCBMPDESC {
193 // type
194 int type;
195 // flags
196 int flags;
197 // what members are defined
198 int caps; // MUST BE FILLED IN
199 // upped left corner to display bitmap
200 int x, y; //(Default: (0,0) )
201 // does the effect loop
202 bool looping; //(Default: false)
203 // how long to wait until displaying the bitmap
204 float waittime; //(Default: 0.0f)
205 // how fast the bitmap effect should be (only useful for non-static)
206 float speed; //(Default: 2.0f)
207 // filename
208 char filename[MAX_FILELEN]; // MUST BE FILLED IN
209 // mission flag mask
210 uint32_t mission_mask_set, mission_mask_unset;
211 };
212
213 struct TCMOVIEDESC {
214 // fill in with whats valid
215 int caps; // MUST BE FILLED IN
216 // type
217 int type;
218 // upper left coordinate of the movie
219 int x, y; //(Default: (0,0) )
220 // filename of the movie to play
221 char filename[MAX_FILELEN]; // MUST BE FILLED IN
222 // whether the movie is to loop
223 bool looping; //(Default: false)
224 // Frames per second
225 float fps; //(Default: 20.0f)
226 // time to wait until starting the movie
227 float waittime; //(Default: 0.0f)
228 // mission flag mask
229 uint32_t mission_mask_set, mission_mask_unset;
230 };
231
232 struct TCBKGDESC {
233 // whats defined for the struct
234 int caps; // MUST BE SET!
235 // what type of background effect
236 int type; //(Default: MBS_DESKTOP)
237 // id used by the type
238 int 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_color color; //(Default: GR_BLUE)
241 // how long to wait until effect start
242 float waittime; //(Default: 0.0f)
243 // mission flag mask
244 uint32_t mission_mask_set, mission_mask_unset;
245 };
246 struct TCPOLYDESC {
247 // whats defined for the struct
248 int caps; // MUST BE SET!
249 // what type of poly effect
250 int type;
251 // position
252 float pos_x, pos_y, pos_z; // coordinates (MUST BE SET!)
253 // rotation (degrees per sec)
254 float rot_x, rot_y, rot_z;
255 // orientation
256 float ori_x, ori_y, ori_z;
257 // flags to use
258 int flags;
259 // how long to wait until effect starts
260 float waittime;
261 // polymodel name
262 char polyname[MAX_FILELEN];
263 // mission flag mask
264 uint32_t mission_mask_set, mission_mask_unset;
265 };
266
267 struct TCSNDDESC {
268 // whats defined for the struct
269 int caps; // MUST BE SET
270 // type of sound effect
271 int type;
272 // true if this sound should only play once
273 bool once;
274 // how long to wait until effect starts
275 float waittime;
276 // sound name
277 char filename[MAX_FILELEN];
278 // mission flag mask
279 uint32_t mission_mask_set, mission_mask_unset;
280 };
281
282 struct TCBUTTONDESC {
283 char filename[MAX_FILELEN];
284 char filename_focus[MAX_FILELEN];
285 char flash_filename[MAX_FILELEN];
286 char flash_filename_focus[MAX_FILELEN];
287 int sibling_id; // Sibling effect ID(for down/up arrows), -1 if none
288 int parent_id; // Parent effect ID (text for down/up arrows), -1 if it works with TelCom System
289 int x, y, w, h;
290 int osflags;
291 int jump_page;
292 void (*internal)(int);
293 float flash_time;
294 uint8_t button_type; // Up arrow, Down Arrow, TelCom System
295 uint8_t click_type; // CLICKTYPE_DOWN or CLICKTYPE_CLICK (what the button responds to)
296 bool flasher;
297 bool tab_stop;
298 uint32_t mission_mask_set, mission_mask_unset; // mission flag mask
299 };
300
301 //==================
302 // tc_button
303 // - contains info on an on screen button
304 //==================
305 #define OBF_FLASH 0x01
306 #define OBF_GLOW 0x02
307 #define OBF_CHANGEFOCUSISCLICK 0x04
308 #define OBF_MOUSEOVERFOCUS 0x08
309
310 #endif