Debian Codegraph @

Descent3/TelComCargo.cpp

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/TelComCargo.cpp $
21 * $Revision: 16 $
22 * $Date: 4/23/99 9:25p $
23 * $Author: Matt $
24 *
25 * TelCom Cargo implentation
26 *
27 * $Log: /DescentIII/main/TelComCargo.cpp $
28 *
29 * 16 4/23/99 9:25p Matt
30 * Fixed a dereferencing bug that was causing this screen to use totally
31 * different fonts than the code intended. It now uses the two briefing
32 * fonts.
33 *
34 * 15 4/19/99 3:47a Jeff
35 * fixed min/max for linux
36 *
37 * 14 4/14/99 4:19a Jeff
38 * more case mismatch fixes in #includes
39 *
40 * 13 4/14/99 3:57a Jeff
41 * fixed case mismatch in #includes
42 *
43 * 12 2/20/99 9:22p Jeff
44 * finished telcom level goals screen. Made it so if you go into the
45 * telcom from the game it goes to main menu instead of briefings.
46 *
47 * 11 2/01/99 9:17a Matt
48 * Fixed compile warning
49 *
50 * 10 1/30/99 4:42p Jeff
51 * primative ship status
52 *
53 * 9 1/29/99 7:13p Jeff
54 * localization
55 *
56 * 8 10/12/98 8:32p Jeff
57 * changed the way focus is handled
58 *
59 * 7 10/08/98 4:23p Kevin
60 * Changed code to comply with memory library usage. Always use mem_malloc
61 * , mem_free and mem_strdup
62 *
63 * 6 8/28/98 12:57p Jeff
64 * added sounds and some key functionality
65 *
66 * 5 8/27/98 2:51p Jeff
67 * New TelCom finally checked in
68 *
69 * 4 7/11/98 9:17p Jeff
70 * looking much better. Most of the functionality is now done.
71 *
72 * 3 7/10/98 7:49p Jeff
73 *
74 * 2 7/08/98 8:06p Jeff
75 * Initial creation of TelComCargo
76 *
77 * $NoKeywords: $
78 */
79
80 #include "TelComCargo.h"cxx . . $ `<file>/Descent3/TelComCargo.h`/
81 #include <stdlib.h>
82 #include <string.h>
83 #include <ctype.h>
84
85 #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/
86 #include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/
87 #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/
88 #include "bitmap.h"cxx . . $ `<file>/lib/bitmap.h`/
89
90 #include "TelCom.h"cxx . . $ `<file>/Descent3/TelCom.h`/
91 #include "renderer.h"cxx . . $ `<file>/lib/renderer.h`/
92 #include "game.h"cxx . . $ `<file>/Descent3/game.h`/
93 #include "mem.h"cxx . . $ `<file>/mem/mem.h`/
94 #include "stringtable.h"cxx . . $ `<file>/Descent3/stringtable.h`/
95 #include "Inventory.h"cxx . . $ `<file>/Descent3/Inventory.h`/
96 #include "player.h"cxx . . $ `<file>/Descent3/player.h`/
97 #include "gametexture.h"cxx . . $ `<file>/Descent3/gametexture.h`/
98 #include "textaux.h"cxx . . $ `<file>/lib/textaux.h`/
99 #include "TelComEfxStructs.h"cxx . . $ `<file>/Descent3/TelComEfxStructs.h`/
100 #include "TelComEffects.h"cxx . . $ `<file>/Descent3/TelComEffects.h`/
101 #include "weapon.h"cxx . . $ `<file>/Descent3/weapon.h`/
102 #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/
103
104 #include <algorithm>
105
106 #define TCBACK_BUTTON_Xcxx . . $ `Descent3/TelComCargo.cpp:106:9`! 500
107 #define TCBACK_BUTTON_Ycxx . . $ `Descent3/TelComCargo.cpp:107:9`! 350
108 #define TCFORW_BUTTON_Xcxx . . $ `Descent3/TelComCargo.cpp:108:9`! 532
109 #define TCFORW_BUTTON_Ycxx . . $ `Descent3/TelComCargo.cpp:109:9`! 350
110
111 #define LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`! 0
112 #define LIT_VALUEcxx . . $ `Descent3/TelComCargo.cpp:112:9`! 1
113
114 #define LID_NONEcxx . . $ `Descent3/TelComCargo.cpp:114:9`! -1
115 #define LID_SHIELDScxx . . $ `Descent3/TelComCargo.cpp:115:9`! 0
116 #define LID_ENERGYcxx . . $ `Descent3/TelComCargo.cpp:116:9`! 1
117 #define LID_PRIMARIEScxx . . $ `Descent3/TelComCargo.cpp:117:9`! 2
118 #define LID_SECONDARIEScxx . . $ `Descent3/TelComCargo.cpp:118:9`! 3
119 #define LID_COUNTERMEASUREScxx . . $ `Descent3/TelComCargo.cpp:119:9`! 4
120 #define LID_INVENTORYcxx . . $ `Descent3/TelComCargo.cpp:120:9`! 5
121
122 struct tLineInfocxx . . $ tLineInfo# {
123 uint8_tcxx . . $ uint8_t# typecxx . . $ tLineInfo#type.;
124 const char *namecxx . . $ tLineInfo#name.;
125 int idcxx . . $ tLineInfo#id.;
126 };
127
128 tLineInfocxx . . $ tLineInfo# StatusLinescxx . . $ StatusLines.[] = {
129 {LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`!, "Ship Status", LID_NONEcxx . . $ `Descent3/TelComCargo.cpp:114:9`!}, {LIT_VALUEcxx . . $ `Descent3/TelComCargo.cpp:112:9`!, "Shields", LID_SHIELDScxx . . $ `Descent3/TelComCargo.cpp:115:9`!},
130 {LIT_VALUEcxx . . $ `Descent3/TelComCargo.cpp:112:9`!, "Energy", LID_ENERGYcxx . . $ `Descent3/TelComCargo.cpp:116:9`!}, {LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`!, "Primaries", LID_PRIMARIEScxx . . $ `Descent3/TelComCargo.cpp:117:9`!},
131 {LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`!, "Secondaries", LID_SECONDARIEScxx . . $ `Descent3/TelComCargo.cpp:118:9`!}, {LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`!, "Counter Measures", LID_COUNTERMEASUREScxx . . $ `Descent3/TelComCargo.cpp:119:9`!},
132 {LIT_TITLEcxx . . $ `Descent3/TelComCargo.cpp:111:9`!, "Inventory", LID_INVENTORYcxx . . $ `Descent3/TelComCargo.cpp:120:9`!}};
133
134 #define NUM_LINEScxx . . $ `Descent3/TelComCargo.cpp:134:9`! (sizeof(StatusLines) / sizeof(tLineInfo))
135 #define TITLE_Xcxx . . $ `Descent3/TelComCargo.cpp:135:9`! 30 + TCminx
136 #define VALUE_Xcxx . . $ `Descent3/TelComCargo.cpp:136:9`! 400 + TCminx
137 static int TCminxcxx . . $ TCminx., TCmaxxcxx . . $ TCmaxx., TCminycxx . . $ TCminy., TCmaxycxx . . $ TCmaxy.;
138 #define SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`! BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:111:9`!
139 #define BG_FONTcxx . . $ `Descent3/TelComCargo.cpp:139:9`! BIG_BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:112:9`!
140
141 // Returns true if the player has this weapon (this fuction should be moved)
142 bool TCCPlayerHasWeaponcxx . . $ TCCPlayerHasWeapon(83c267b20bac841a).(int weapon_index) {
143 if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].weapon_flagscxx . . $ player#weapon_flags. & HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(weapon_index))
144 return true;
145 return false;
146 }
147
148 int TCCargoCreateLinecxx . . $ TCCargoCreateLine(b9ead6aff293bd59).(int id, int y, const char *title, int type) {
149 // char buffer[100];
150 int small_height = grfont_GetHeightcxx . . $ grfont_GetHeight(7864480464b09eea).(SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`!);
151 int big_height = grfont_GetHeightcxx . . $ grfont_GetHeight(7864480464b09eea).(BG_FONTcxx . . $ `Descent3/TelComCargo.cpp:139:9`!);
152
153 switch (id) {
154 case LID_NONEcxx . . $ `Descent3/TelComCargo.cpp:114:9`!:
155 return y;
156
157 case LID_SHIELDScxx . . $ `Descent3/TelComCargo.cpp:115:9`!: {
158 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`!);
159
160 float shields = Player_objectcxx . . $ Player_object.->shieldscxx . . $ object#shields.;
161 shields = stdcxx . . $ std/::maxcxx . . $ std/max(2a338fce5842aa6a).<float>(shields, 0);
162 int perc = (int)((shields / INITIAL_SHIELDScxx . . $ `Descent3/player_external.h:69:9`!) * 100.0f);
163 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(TITLE_Xcxx . . $ `Descent3/TelComCargo.cpp:135:9`!, y, title);
164 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(VALUE_Xcxx . . $ `Descent3/TelComCargo.cpp:136:9`!, y, "%d%c", perc, '%');
165 y += small_height;
166
167 } break;
168
169 case LID_ENERGYcxx . . $ `Descent3/TelComCargo.cpp:116:9`!: {
170 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`!);
171
172 float energy = Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].energycxx . . $ player#energy.;
173 energy = stdcxx . . $ std/::maxcxx . . $ std/max(2a338fce5842aa6a).<float>(energy, 0);
174 int perc = (int)((energy / INITIAL_ENERGYcxx . . $ `Descent3/player_external.h:68:9`!) * 100.0f);
175 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(TITLE_Xcxx . . $ `Descent3/TelComCargo.cpp:135:9`!, y, title);
176 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(VALUE_Xcxx . . $ `Descent3/TelComCargo.cpp:136:9`!, y, "%d%c", perc, '%');
177 y += small_height;
178
179 } break;
180
181 case LID_PRIMARIEScxx . . $ `Descent3/TelComCargo.cpp:117:9`!: {
182 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`!);
183 int prim_start = PRIMARY_INDEXcxx . . $ `Descent3/weapon.h:254:9`!;
184 int prim_end = (PRIMARY_INDEXcxx . . $ `Descent3/weapon.h:254:9`! < SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) ? SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`! : MAX_STATIC_WEAPONScxx . . $ `Descent3/weapon.h:211:9`!;
185 int weap_index;
186 weaponcxx . . $ weapon# *weap;
187
188 ASSERTcxx . . $ `misc/pserror.h:246:9`!(prim_start >= 0);
189 ASSERTcxx . . $ `misc/pserror.h:246:9`!(prim_end <= MAX_STATIC_WEAPONScxx . . $ `Descent3/weapon.h:211:9`!);
190 ASSERTcxx . . $ `misc/pserror.h:246:9`!(prim_start < prim_end);
191
192 for (weap_index = prim_start; weap_index < prim_end; weap_index++) {
193 if (TCCPlayerHasWeaponcxx . . $ TCCPlayerHasWeapon(83c267b20bac841a).(weap_index)) {
194 weap = &Weaponscxx . . $ Weapons.[weap_index];
195 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(TITLE_Xcxx . . $ `Descent3/TelComCargo.cpp:135:9`!, y, Static_weapon_namescxx . . $ Static_weapon_names.[weap_index]);
196 y += small_height;
197 }
198 }
199
200 } break;
201
202 case LID_SECONDARIEScxx . . $ `Descent3/TelComCargo.cpp:118:9`!: {
203 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(SM_FONTcxx . . $ `Descent3/TelComCargo.cpp:138:9`!);
204 int sec_start = SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!;
205 int sec_end = (SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`! < PRIMARY_INDEXcxx . . $ `Descent3/weapon.h:254:9`!) ? PRIMARY_INDEXcxx . . $ `Descent3/weapon.h:254:9`! : MAX_STATIC_WEAPONScxx . . $ `Descent3/weapon.h:211:9`!;
206 int weap_index;
207 weaponcxx . . $ weapon# *weap;
208
209 ASSERTcxx . . $ `misc/pserror.h:246:9`!(sec_start >= 0);
210 ASSERTcxx . . $ `misc/pserror.h:246:9`!(sec_end <= MAX_STATIC_WEAPONScxx . . $ `Descent3/weapon.h:211:9`!);
211 ASSERTcxx . . $ `misc/pserror.h:246:9`!(sec_start < sec_end);
212
213 for (weap_index = sec_start; weap_index < sec_end; weap_index++) {
214 if (TCCPlayerHasWeaponcxx . . $ TCCPlayerHasWeapon(83c267b20bac841a).(weap_index)) {
215 weap = &Weaponscxx . . $ Weapons.[weap_index];
216 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(TITLE_Xcxx . . $ `Descent3/TelComCargo.cpp:135:9`!, y, Static_weapon_namescxx . . $ Static_weapon_names.[weap_index]);
217 y += small_height;
218 }
219 }
220
221 } break;
222
223 case LID_COUNTERMEASUREScxx . . $ `Descent3/TelComCargo.cpp:119:9`!:
224 break;
225
226 case LID_INVENTORYcxx . . $ `Descent3/TelComCargo.cpp:120:9`!:
227 break;
228 }
229
230 return y;
231 }
232
233 void TCCargoButtonCallbackcxx . . $ TCCargoButtonCallback(d4f767463ce0a6b3).(int efxnum) {
234 // tccargo_button_pressed = efxnum;
235 }
236
237 void TCCargoRenderCallbackcxx . . $ TCCargoRenderCallback(49f6e7a06ebc5aa8).(void) {
238 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:111:9`!);
239 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
240 rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!);
241 rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.);
242 rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.);
243 rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0);
244 rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_CONSTANTcxx . . $ `lib/renderer.h:400:9`! + AT_TEXTUREcxx . . $ `lib/renderer.h:401:9`!);
245 rend_SetAlphaValuecxx . . $ rend_SetAlphaValue(ac50b47256ae7414).(255);
246 rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0);
247 // update inventory rendering
248
249 int y = TCminycxx . . $ TCminy.;
250 int id;
251 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
252 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(GR_WHITEcxx . . $ GR_WHITE.);
253
254 for (int i = 0; i < NUM_LINEScxx . . $ `Descent3/TelComCargo.cpp:134:9`!; i++) {
255 id = StatusLinescxx . . $ StatusLines.[i].idcxx . . $ tLineInfo#id.;
256
257 y = TCCargoCreateLinecxx . . $ TCCargoCreateLine(b9ead6aff293bd59).(id, y, StatusLinescxx . . $ StatusLines.[i].namecxx . . $ tLineInfo#name., StatusLinescxx . . $ StatusLines.[i].typecxx . . $ tLineInfo#type.);
258 }
259
260 grtext_Flushcxx . . $ grtext_Flush(49f6e7a06ebc5aa8).();
261
262 rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1);
263 }
264
265 // This is the function called by TelCom
266 // return true if TelCom should exit to TelCom Main Menu
267 // return false if you should exit out of TelCom completly
268 bool TelComCargocxx . . $ TelComCargo(4a6cbf79c6ed567c).(tTelComInfocxx . . $ tTelComInfo# *tcs) {
269 // int efxmap[2];
270 bool done = false;
271
272 TelcomStartScreencxx . . $ TelcomStartScreen(d4f767463ce0a6b3).(0);
273
274 TCBKGDESCcxx . . $ TCBKGDESC# backg;
275 backg.colorcxx . . $ TCBKGDESC#color. = BACKGROUND_COLORcxx . . $ `Descent3/TelCom.h:58:9`!;
276 backg.capscxx . . $ TCBKGDESC#caps. = TCBGD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:127:9`!;
277 backg.typecxx . . $ TCBKGDESC#type. = TC_BACK_STATICcxx . . $ `Descent3/TelComEfxStructs.h:144:9`!;
278 CreateBackgroundEffectcxx . . $ CreateBackgroundEffect(36995d1e7af252ca).(&backg, MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!, 0);
279 CreateBackgroundEffectcxx . . $ CreateBackgroundEffect(36995d1e7af252ca).(&backg, MONITOR_TOPcxx . . $ `Descent3/TelCom.h:99:9`!, 0);
280
281 // Setup On-Screen buttons
282 /*
283 TCBUTTONDESC buttdesc;
284 strcpy(buttdesc.filename,BACK_BUTTON);
285 strcpy(buttdesc.flash_filename,BACK_BUTTON_GLOW);
286 buttdesc.sibling_id = buttdesc.parent_id = -1;
287 buttdesc.internal = TCCargoButtonCallback;
288 buttdesc.flash_time = 0;
289 buttdesc.button_type = BUTT_INTERNAL;
290 buttdesc.flasher = true;
291 buttdesc.click_type = CLICKTYPE_CLICKUP;
292 buttdesc.osflags = OBF_GLOW;
293 buttdesc.x = TCBACK_BUTTON_X;
294 buttdesc.y = TCBACK_BUTTON_Y;
295 buttdesc.tab_stop = true; //these buttons can have focus
296 efxmap[0] = CreateButtonEffect(&buttdesc,MONITOR_MAIN,0);
297 strcpy(buttdesc.filename,FORW_BUTTON);
298 strcpy(buttdesc.flash_filename,FORW_BUTTON_GLOW);
299 buttdesc.x = TCFORW_BUTTON_X;
300 buttdesc.y = TCFORW_BUTTON_Y;
301 efxmap[1] = CreateButtonEffect(&buttdesc,MONITOR_MAIN,0);
302 */
303
304 TCminxcxx . . $ TCminx. = tcs->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!].leftcxx . . $ box#left. + 20;
305 TCminycxx . . $ TCminy. = tcs->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!].topcxx . . $ box#top. + 10;
306 TCmaxycxx . . $ TCmaxy. = tcs->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!].bottomcxx . . $ box#bottom. - 10;
307 TCmaxxcxx . . $ TCmaxx. = tcs->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!].rightcxx . . $ box#right. - 20;
308
309 TCTEXTDESCcxx . . $ TCTEXTDESC# textdesc;
310 textdesc.typecxx . . $ TCTEXTDESC#type. = TC_TEXT_STATICcxx . . $ `Descent3/TelComEfxStructs.h:135:9`!;
311 textdesc.fontcxx . . $ TCTEXTDESC#font. = BBRIEF_FONT_INDEXcxx . . $ `Descent3/gamefont.h:114:9`!;
312 textdesc.capscxx . . $ TCTEXTDESC#caps. = TCTD_TEXTBOXcxx . . $ `Descent3/TelComEfxStructs.h:111:9`! | TCTD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:107:9`! | TCTD_FONTcxx . . $ `Descent3/TelComEfxStructs.h:106:9`!;
313 textdesc.textboxcxx . . $ TCTEXTDESC#textbox..leftcxx . . $ tc_text#left. = 75;
314 textdesc.textboxcxx . . $ TCTEXTDESC#textbox..rightcxx . . $ tc_text#right. = 380;
315 textdesc.textboxcxx . . $ TCTEXTDESC#textbox..topcxx . . $ tc_text#top. = 2;
316 textdesc.textboxcxx . . $ TCTEXTDESC#textbox..bottomcxx . . $ tc_text#bottom. = 50;
317 textdesc.colorcxx . . $ TCTEXTDESC#color. = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 255);
318
319 CreateTextEffectcxx . . $ CreateTextEffect(b73a9a5c42deb467).(&textdesc, TXT_TCCARGOcxx . . $ `Descent3/stringtable.h:346:9`!, MONITOR_TOPcxx . . $ `Descent3/TelCom.h:99:9`!, 0);
320 TelcomEndScreencxx . . $ TelcomEndScreen(49f6e7a06ebc5aa8).();
321 TelcomRenderSetScreencxx . . $ TelcomRenderSetScreen(d4f767463ce0a6b3).(0);
322
323 TelcomRenderSetCallbackcxx . . $ TelcomRenderSetCallback(964b12a25712bdc3).(TCCargoRenderCallbackcxx . . $ TCCargoRenderCallback(49f6e7a06ebc5aa8).);
324
325 while (!done) {
326 Sound_systemcxx . . $ Sound_system..BeginSoundFramecxx . . $ hlsSystem#BeginSoundFrame(b45ddcbc8423892c).(Telcom_called_from_gamecxx . . $ Telcom_called_from_game.);
327
328 if (tcs->statecxx . . $ tTelComInfo#state. != TCS_POWERONcxx . . $ `Descent3/TelCom.h:133:9`! || tcs->current_statuscxx . . $ tTelComInfo#current_status. != TS_CARGOcxx . . $ `Descent3/TelCom.h:87:9`!) {
329 // we're done with the loop
330 done = true;
331 }
332
333 /*
334 if(tccargo_button_pressed!=-1){
335 if(tccargo_button_pressed==efxmap[0])
336 curr_cargo_page = &Regular;
337 else
338 if(tccargo_button_pressed==efxmap[1])
339 curr_cargo_page = &CounterMeasures;
340 tccargo_button_pressed = -1;
341 }
342 */
343
344 // Process all waiting events for the TelCom (we may only want to handle this once a frame!)
345 TelComHandleAllEventscxx . . $ TelComHandleAllEvents(9b1dcfbcd79f78bb).(&Telcom_systemcxx . . $ Telcom_system.);
346
347 TelcomRenderScreencxx . . $ TelcomRenderScreen(22445115de651e24).();
348 Descentcxx . . $ Descent.->defercxx . . $ oeApplication#defer(db52760e79bf9054).();
349 if (KEY_STATEcxx . . $ `ddio/ddio_common.h:204:9`!(KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!))
350 Telcom_systemcxx . . $ Telcom_system..statecxx . . $ tTelComInfo#state. = TCS_POWEROFFcxx . . $ `Descent3/TelCom.h:132:9`!;
351
352 Sound_systemcxx . . $ Sound_system..EndSoundFramecxx . . $ hlsSystem#EndSoundFrame(49f6e7a06ebc5aa8).();
353 }
354
355 DestroyAllScreenscxx . . $ DestroyAllScreens(b45ddcbc8423892c).();
356 TelcomRenderSetScreencxx . . $ TelcomRenderSetScreen(d4f767463ce0a6b3).(DUMMY_SCREENcxx . . $ `Descent3/TelCom.h:95:9`!);
357 TelcomRenderSetCallbackcxx . . $ TelcomRenderSetCallback(964b12a25712bdc3).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
358
359 return true;
360 }