| 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.cpp $ |
| 21 | * $Revision: 49 $ |
| 22 | * $Date: 4/06/00 9:25a $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * In-Game Cinematics system |
| 26 | * |
| 27 | * $Log: /DescentIII/main/gamecinematics.cpp $ |
| 28 | * |
| 29 | * 49 4/06/00 9:25a Matt |
| 30 | * Fixed a screen clear problem on at ATI Rage Fury Maxx in dual-chip mode |
| 31 | * by forcing the screen to clear four times (instead of three). |
| 32 | * |
| 33 | * 48 10/08/99 4:14p 3dsmax |
| 34 | * complex cinematic paths with only one node issue fixed. |
| 35 | * |
| 36 | * 47 5/22/99 12:07a Jeff |
| 37 | * properly set the target handle when faking a canned cinematic |
| 38 | * |
| 39 | * 46 5/19/99 12:52p Samir |
| 40 | * clear player weapon firing when entering cinematics, |
| 41 | * |
| 42 | * 45 5/07/99 7:48p Jeff |
| 43 | * fixed demo recording during cinematics |
| 44 | * |
| 45 | * 44 5/07/99 1:44p Chris |
| 46 | * Made in-game cinematics use the ORIENT_PATH_NODE for player ships |
| 47 | * |
| 48 | * 43 5/04/99 6:52p Jeff |
| 49 | * added new canned cinematic to fade screen to white and endlevel. Fixed |
| 50 | * crash bug with invalid player path for canned cine with player paths |
| 51 | * |
| 52 | * 42 4/28/99 3:32a Jeff |
| 53 | * created cinematic level reset function |
| 54 | * |
| 55 | * 41 4/27/99 5:58p Jeff |
| 56 | * fixed for coop |
| 57 | * |
| 58 | * 40 4/27/99 5:41p Jeff |
| 59 | * hopefully fixed coop/multiplayer issues |
| 60 | * |
| 61 | * 39 4/24/99 2:20a Chris |
| 62 | * Added the Neutral_till_hit flag |
| 63 | * |
| 64 | * 38 4/15/99 11:40a Jeff |
| 65 | * changes layout of igc intro |
| 66 | * |
| 67 | * 37 4/14/99 3:56a Jeff |
| 68 | * fixed case mismatch in #includes |
| 69 | * |
| 70 | * 36 4/06/99 4:34p Jeff |
| 71 | * fixed screenmode bug during endlevel |
| 72 | * |
| 73 | * 35 4/06/99 2:54p Jeff |
| 74 | * fixed 1 node end level sequence path bug |
| 75 | * |
| 76 | * 34 4/02/99 11:33p Jeff |
| 77 | * able to turn off IGC in debug mode. Better handling of cinematics |
| 78 | * quick exit if playing via alt-p |
| 79 | * |
| 80 | * 33 3/31/99 8:34p Jeff |
| 81 | * different bitmap for trans |
| 82 | * |
| 83 | * 32 3/30/99 4:47p Jeff |
| 84 | * added level events for when IGC occurs for a player |
| 85 | * |
| 86 | * 31 3/27/99 7:22p Jeff |
| 87 | * fixed cinematics when going from one cut to another immediatly. Added |
| 88 | * start transition |
| 89 | * |
| 90 | * 30 3/19/99 9:39a Nate |
| 91 | * Jeff - fixed crash bug |
| 92 | * |
| 93 | * 29 3/17/99 11:48a Jeff |
| 94 | * intro cams are letterbox |
| 95 | * |
| 96 | * 28 3/10/99 6:44p Jeff |
| 97 | * fixed exported game cinematic function for canned cinematics, so it's |
| 98 | * prototype doesn't change (oem patch friendly) |
| 99 | * |
| 100 | * 27 3/10/99 6:20p Jeff |
| 101 | * many fixes to demo system. Fixed IGC so cameras move...fixed osiris to |
| 102 | * be restored correctly, and it handles errors on restore |
| 103 | * |
| 104 | * 26 3/10/99 11:27a Jeff |
| 105 | * fixed saving cinematic data when writing cinematics that use paths |
| 106 | * |
| 107 | * 25 3/08/99 3:24p Jeff |
| 108 | * fixed end level sequencing where if the level ended while the player |
| 109 | * was dead. |
| 110 | * |
| 111 | * 24 3/08/99 12:04p Jeff |
| 112 | * fixed ship jitter in in-game cinematics (intro/end level) |
| 113 | * |
| 114 | * 23 3/04/99 3:57p Jeff |
| 115 | * make player's burners on in intro/end level seqeunces if on a path |
| 116 | * |
| 117 | * 22 3/03/99 1:18p Jeff |
| 118 | * turn off afterburner |
| 119 | * |
| 120 | * 21 3/01/99 5:35p Jeff |
| 121 | * didn't change much |
| 122 | * |
| 123 | * 20 2/28/99 8:31p Jeff |
| 124 | * added fade and move player dallas action. Fixed the end-level sequence |
| 125 | * changing view back to player for split second. |
| 126 | * |
| 127 | * 19 2/28/99 6:55p Jeff |
| 128 | * orient the player correctly when 1 node path for level intro |
| 129 | * |
| 130 | * 18 2/26/99 6:38p Mark |
| 131 | * fixed screen clearing problem |
| 132 | * |
| 133 | * 17 2/23/99 12:44a Jeff |
| 134 | * added support for in-game-cinematics in demo system |
| 135 | * |
| 136 | * 16 2/22/99 1:20a Jeff |
| 137 | * added support for inventory (simple) in dallas. Moved end-level |
| 138 | * sequence to use IGC. Add position clipboard stuff for dallas. Fixed |
| 139 | * some inventory bug with storing object handles |
| 140 | * |
| 141 | * 15 2/21/99 8:35p Jeff |
| 142 | * misc changes to handle new matcen and path types of dallas |
| 143 | * |
| 144 | * 14 2/20/99 4:15p Jeff |
| 145 | * add cinematic text to game messages |
| 146 | * |
| 147 | * 13 2/18/99 6:47p Jeff |
| 148 | * added call to start/stop special cinematics music |
| 149 | * |
| 150 | * 12 2/18/99 3:00p Jeff |
| 151 | * smoother rotation/autolevel |
| 152 | * |
| 153 | * 11 2/16/99 9:36p Jeff |
| 154 | * new add gamefile dialog |
| 155 | * |
| 156 | * 10 2/16/99 6:15p Jeff |
| 157 | * pause hud messages when in cinematics |
| 158 | * |
| 159 | * 9 2/14/99 1:16a Jeff |
| 160 | * added canned cinematic function/structures. Added a flag to push |
| 161 | * target to end of path if on a path (quick exit). Added canned intro |
| 162 | * cine. Determine correct velocity on player ship for intro cine. |
| 163 | * |
| 164 | * 8 2/12/99 2:45a Jeff |
| 165 | * added end-cinematic transitions |
| 166 | * |
| 167 | * 7 2/10/99 1:47p Matt |
| 168 | * Changed object handle symbolic constants |
| 169 | * |
| 170 | * 6 2/04/99 3:56p Jeff |
| 171 | * no cinematics in multiplayer |
| 172 | * |
| 173 | * 5 2/02/99 3:58p Jeff |
| 174 | * started to implement level intro cinematic (need ai functions first). |
| 175 | * No longer need camera object to do cinematic (auto-created)...path |
| 176 | * cameras use speed based on distance needed to travel. |
| 177 | * |
| 178 | * 4 2/02/99 12:32p Jeff |
| 179 | * added ai notify events for movie start and stop |
| 180 | * |
| 181 | * 3 2/01/99 12:55p Jeff |
| 182 | * restore correct hud mode, added flag to stop cinematics if target dies |
| 183 | * |
| 184 | * 2 1/31/99 8:48p Jeff |
| 185 | * new in game cinematics system finished |
| 186 | * |
| 187 | * $NoKeywords: $ |
| 188 | */ |
| 189 | |
| 190 | #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/ |
| 191 | #include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/ |
| 192 | #include "grtext.h"cxx . . $ `<file>/grtext/grtext.h`/ |
| 193 | #include "renderer.h"cxx . . $ `<file>/lib/renderer.h`/ |
| 194 | #include "gamecinematics.h"cxx . . $ `<file>/Descent3/gamecinematics.h`/ |
| 195 | #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/ |
| 196 | #include "mem.h"cxx . . $ `<file>/mem/mem.h`/ |
| 197 | #include "gamepath.h"cxx . . $ `<file>/Descent3/gamepath.h`/ |
| 198 | #include <stdio.h> |
| 199 | #include <stdlib.h> |
| 200 | #include <string.h> |
| 201 | #include "game.h"cxx . . $ `<file>/Descent3/game.h`/ |
| 202 | #include "AIGoal.h"cxx . . $ `<file>/Descent3/AIGoal.h`/ |
| 203 | #include "aipath.h"cxx . . $ `<file>/Descent3/aipath.h`/ |
| 204 | #include "objinfo.h"cxx . . $ `<file>/Descent3/objinfo.h`/ |
| 205 | #include "player.h"cxx . . $ `<file>/Descent3/player.h`/ |
| 206 | #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/ |
| 207 | #include "gamefont.h"cxx . . $ `<file>/Descent3/gamefont.h`/ |
| 208 | #include "AIMain.h"cxx . . $ `<file>/Descent3/AIMain.h`/ |
| 209 | #include "controls.h"cxx . . $ `<file>/Descent3/controls.h`/ |
| 210 | #include "d3music.h"cxx . . $ `<file>/Descent3/d3music.h`/ |
| 211 | #include "gamesequence.h"cxx . . $ `<file>/Descent3/gamesequence.h`/ |
| 212 | #include "demofile.h"cxx . . $ `<file>/lib/demofile.h`/ |
| 213 | #include "osiris_dll.h"cxx . . $ `<file>/Descent3/osiris_dll.h`/ |
| 214 | #include "multi.h"cxx . . $ `<file>/Descent3/multi.h`/ |
| 215 | #include "weapon.h"cxx . . $ `<file>/Descent3/weapon.h`/ |
| 216 | |
| 217 | #include <algorithm> |
| 218 | |
| 219 | #if (defined(_DEBUGcxx . . $ `<built-in>:482:9`!) || defined(EDITOR)) |
| 220 | bool Cinematics_enabledcxx . . $ Cinematics_enabled. = true; |
| 221 | extern int DoAIcxx . . $ DoAI.; |
| 222 | #ifdef EDITOR |
| 223 | extern bool Game_being_played_from_quick_play; |
| 224 | #endif |
| 225 | #endif |
| 226 | extern uint16_tcxx . . $ uint16_t# Demo_obj_mapcxx . . $ Demo_obj_map.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 227 | |
| 228 | structcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0# { |
| 229 | // some important, pre-computed times |
| 230 | float text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start., text_display_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_stop.; |
| 231 | float track_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_start., track_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_stop.; |
| 232 | float player_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_start., player_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_stop.; |
| 233 | float camera_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_start., camera_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_stop.; |
| 234 | float exit_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_start., exit_endcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_end.; |
| 235 | float end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_time.; |
| 236 | |
| 237 | void (*callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.)(int type); |
| 238 | |
| 239 | int pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.; |
| 240 | int roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#room.; |
| 241 | vectorcxx . . $ vector# positioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#position.; |
| 242 | |
| 243 | int target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle.; |
| 244 | int camera_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_objhandle.; |
| 245 | |
| 246 | int bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle.; |
| 247 | int longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line.; |
| 248 | |
| 249 | uint32_tcxx . . $ uint32_t# flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags.; |
| 250 | |
| 251 | tHUDModecxx . . $ tHUDMode# old_hudmodecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#old_hudmode.; |
| 252 | |
| 253 | int num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.; |
| 254 | int end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type.; // what kind of ending transition should the cinematic have |
| 255 | int start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type.; // what kind of starting transition should the cinematic have |
| 256 | char *textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.; |
| 257 | bool target_triggeredcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_triggered.; // whether the notify event has been sent to the object yet |
| 258 | |
| 259 | bool doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.; // we're processing an end transition still |
| 260 | float end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time.; // Gametime that the end transition started |
| 261 | float end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time.; // Gametime that the end transition should end |
| 262 | |
| 263 | float start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time.; |
| 264 | float start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time.; |
| 265 | |
| 266 | // some transition data |
| 267 | float early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time.; |
| 268 | |
| 269 | bool controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended.; |
| 270 | } GameCinemacxx . . $ GameCinema.; |
| 271 | |
| 272 | #define CDI_NOT_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:272:9`! 0 |
| 273 | #define CDI_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:273:9`! 1 |
| 274 | |
| 275 | struct tCinematicDemoInfocxx . . $ tCinematicDemoInfo# { |
| 276 | uint8_tcxx . . $ uint8_t# cinematic_typecxx . . $ tCinematicDemoInfo#cinematic_type.; // canned/not canned |
| 277 | int camera_objhandlecxx . . $ tCinematicDemoInfo#camera_objhandle.; // object handle for camera to use |
| 278 | |
| 279 | char *text_stringcxx . . $ tCinematicDemoInfo#text_string.; // not canned text string |
| 280 | |
| 281 | unioncxx . . $ tCinematicDemoInfo#$anonymous_type_1# { |
| 282 | tCannedCinematicInfocxx . . $ tCannedCinematicInfo# *canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.; // data to start a canned cinematic |
| 283 | tGameCinematiccxx . . $ tGameCinematic# *cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.; // data to start a regular cinematic |
| 284 | }; |
| 285 | |
| 286 | }; |
| 287 | |
| 288 | static void Cinematic_WriteDemoFileDatacxx . . $ Cinematic_WriteDemoFileData(94428571cf5c5a65).(tCinematicDemoInfocxx . . $ tCinematicDemoInfo# *info); |
| 289 | static bool Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(tGameCinematiccxx . . $ tGameCinematic# *info, const char *text_string, int camera_objhandle); |
| 290 | |
| 291 | static void Cinematic_DrawTextcxx . . $ Cinematic_DrawText(49f6e7a06ebc5aa8).(void); |
| 292 | static void Cinematic_DoEndTransitioncxx . . $ Cinematic_DoEndTransition(49f6e7a06ebc5aa8).(void); |
| 293 | static void Cinematic_DoStartTransitioncxx . . $ Cinematic_DoStartTransition(49f6e7a06ebc5aa8).(void); |
| 294 | |
| 295 | bool Cinematic_inusecxx . . $ Cinematic_inuse.; |
| 296 | static tGameCinematiccxx . . $ tGameCinematic# Cinematic_fake_infocxx . . $ Cinematic_fake_info.; |
| 297 | bool Cinematic_fake_queuedcxx . . $ Cinematic_fake_queued. = false; |
| 298 | |
| 299 | static int gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 300 | static int gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 301 | static int gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 302 | static int gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 303 | |
| 304 | #define END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! 1.0f |
| 305 | |
| 306 | static float Cine_GetPathTravelSpeedcxx . . $ Cine_GetPathTravelSpeed(d7799857c894622e).(int pathnum, float time); |
| 307 | static void Cinematic_PerformFakecxx . . $ Cinematic_PerformFake(49f6e7a06ebc5aa8).(void); |
| 308 | static void Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(tGameCinematiccxx . . $ tGameCinematic# *info); |
| 309 | static inline void verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(PercentageRangecxx . . $ PercentageRange# *range); |
| 310 | static inline int Cinematics_CreateCameracxx . . $ Cinematics_CreateCamera(b126dc7c1de90089).(void); |
| 311 | static inline void Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(int objhandle); |
| 312 | static inline bool Cinematic_IsPlayerDeadcxx . . $ Cinematic_IsPlayerDead(c9857a73d68e59ba).(void); |
| 313 | static bool Cinematic_IsKeyPressedcxx . . $ Cinematic_IsKeyPressed(c9857a73d68e59ba).(void); |
| 314 | static void CannedCinematicIntroCallbackcxx . . $ CannedCinematicIntroCallback(d4f767463ce0a6b3).(int type); |
| 315 | static void CannedCinematic_Introcxx . . $ CannedCinematic_Intro(f0c76aed63ddc256).(int PathID, char *Text, int PlayerPath, float Seconds, int camera_handle); |
| 316 | static void CannedCinematicEndLevelCallbackcxx . . $ CannedCinematicEndLevelCallback(d4f767463ce0a6b3).(int type); |
| 317 | static void CannedCinematic_EndLevelPathcxx . . $ CannedCinematic_EndLevelPath(f0c76aed63ddc256).(int PathID, char *Text, int PlayerPath, float Seconds, int camera_handle); |
| 318 | static void CannedCinematic_EndLevelPointcxx . . $ CannedCinematic_EndLevelPoint(d7f347170ad85d00).(vectorcxx . . $ vector# *pos, int room, char *Text, int PlayerPath, float Seconds, |
| 319 | int camera_handle); |
| 320 | static void CannedCinematicMovePlayerFadeCallbackcxx . . $ CannedCinematicMovePlayerFadeCallback(d4f767463ce0a6b3).(int type); |
| 321 | static void CannedCinematic_MovePlayerFadecxx . . $ CannedCinematic_MovePlayerFade(a6a0a45dc3a450).(objectcxx . . $ object# *player, int room, vectorcxx . . $ vector# *pos, matrixcxx . . $ matrix# *orient, int camera_handle); |
| 322 | static void CannedCinematicLevelEndFadeWhiteCallbackcxx . . $ CannedCinematicLevelEndFadeWhiteCallback(d4f767463ce0a6b3).(int type); |
| 323 | static void CannedCinematic_LevelEndFadeWhitecxx . . $ CannedCinematic_LevelEndFadeWhite(3f38b1156214a1c2).(int camera_handle, float time, char *text_to_display); |
| 324 | static void Cinematic_DoFakeCannedCinematicscxx . . $ Cinematic_DoFakeCannedCinematics(30a3d576421cb7a4).(tCannedCinematicInfocxx . . $ tCannedCinematicInfo# *info); |
| 325 | |
| 326 | // Returns the hud mode before cinematics |
| 327 | tHUDModecxx . . $ tHUDMode# Cinematic_GetOldHudModecxx . . $ Cinematic_GetOldHudMode(d2d05048dda10524).(void) { return GameCinemacxx . . $ GameCinema..old_hudmodecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#old_hudmode.; } |
| 328 | |
| 329 | // Cinematic_Close |
| 330 | // |
| 331 | // Closes the in-game cinematics |
| 332 | void Cinematic_Closecxx . . $ Cinematic_Close(49f6e7a06ebc5aa8).(void) { |
| 333 | if (Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 334 | Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(); |
| 335 | } |
| 336 | |
| 337 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 338 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle.); |
| 339 | gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 340 | } |
| 341 | |
| 342 | if (gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 343 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle.); |
| 344 | gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 345 | } |
| 346 | |
| 347 | if (gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 348 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle.); |
| 349 | gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 350 | } |
| 351 | |
| 352 | if (gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 353 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle.); |
| 354 | gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 355 | } |
| 356 | |
| 357 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 358 | } |
| 359 | |
| 360 | // Cinematic_Init |
| 361 | // |
| 362 | // Initializes the in-game cinematics |
| 363 | void Cinematic_Initcxx . . $ Cinematic_Init(49f6e7a06ebc5aa8).(void) { |
| 364 | static bool called_once = false; |
| 365 | Cinematic_inusecxx . . $ Cinematic_inuse. = false; |
| 366 | |
| 367 | memset(&GameCinemacxx . . $ GameCinema., 0, sizeof(GameCinemacxx . . $ GameCinema.)); |
| 368 | |
| 369 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 370 | gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 371 | |
| 372 | gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(32, 32, 0); |
| 373 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 374 | uint16_tcxx . . $ uint16_t# *data = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle., 0); |
| 375 | int i, size = 32 * 32; |
| 376 | |
| 377 | for (i = 0; i < size; i++) |
| 378 | data[i] = GR_RGB16cxx . . $ GR_RGB16(6461fafb79bad5b9).(0, 0, 0) | OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!; |
| 379 | } |
| 380 | |
| 381 | gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).("ShieldBitmap.ogf", 0); |
| 382 | |
| 383 | gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(32, 32, 0); |
| 384 | if (gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 385 | uint16_tcxx . . $ uint16_t# *data = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle., 0); |
| 386 | int i, size = 32 * 32; |
| 387 | |
| 388 | for (i = 0; i < size; i++) |
| 389 | data[i] = GR_RGB16cxx . . $ GR_RGB16(6461fafb79bad5b9).(255, 255, 255) | OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!; |
| 390 | } |
| 391 | |
| 392 | gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(32, 32, 0); |
| 393 | |
| 394 | if (!called_once) { |
| 395 | atexitcxx . . $ atexit(cc8c495369588262).(Cinematic_Closecxx . . $ Cinematic_Close(49f6e7a06ebc5aa8).); |
| 396 | called_once = true; |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | void Cinematic_LevelInitcxx . . $ Cinematic_LevelInit(49f6e7a06ebc5aa8).(void) { |
| 401 | Cinematic_inusecxx . . $ Cinematic_inuse. = false; |
| 402 | Cinematic_fake_queuedcxx . . $ Cinematic_fake_queued. = false; |
| 403 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 404 | } |
| 405 | |
| 406 | static inline void verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(PercentageRangecxx . . $ PercentageRange# *range) { |
| 407 | if (range->mincxx . . $ PercentageRange#min. < 0.0f) |
| 408 | range->mincxx . . $ PercentageRange#min. = 0.0f; |
| 409 | if (range->mincxx . . $ PercentageRange#min. > 1.0f) |
| 410 | range->mincxx . . $ PercentageRange#min. = 1.0f; |
| 411 | if (range->maxcxx . . $ PercentageRange#max. < 0.0f) |
| 412 | range->maxcxx . . $ PercentageRange#max. = 0.0f; |
| 413 | if (range->maxcxx . . $ PercentageRange#max. > 1.0f) |
| 414 | range->maxcxx . . $ PercentageRange#max. = 1.0f; |
| 415 | |
| 416 | if (range->maxcxx . . $ PercentageRange#max. < range->mincxx . . $ PercentageRange#min.) { |
| 417 | float temp = range->maxcxx . . $ PercentageRange#max.; |
| 418 | range->maxcxx . . $ PercentageRange#max. = range->mincxx . . $ PercentageRange#min.; |
| 419 | range->mincxx . . $ PercentageRange#min. = temp; |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | // Cinematic_PerformFake |
| 424 | // |
| 425 | // Performs a fake cinematic...just calls certain functions that may need to be |
| 426 | // called for certain things to happen. For instance, some bosses are triggered when |
| 427 | // their boss intro cam is started, but in multiplayer there is no cinematics, so calling |
| 428 | // this would do what's needed. |
| 429 | void Cinematic_PerformFakecxx . . $ Cinematic_PerformFake(49f6e7a06ebc5aa8).(void) { |
| 430 | Cinematic_fake_queuedcxx . . $ Cinematic_fake_queued. = false; |
| 431 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cinematics: Faking Cinematic\n"); |
| 432 | objectcxx . . $ object# *target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Cinematic_fake_infocxx . . $ Cinematic_fake_info..target_objhandlecxx . . $ tGameCinematic#target_objhandle.); |
| 433 | if (!target) { |
| 434 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cinematics: Invalid target...can't fake\n"); |
| 435 | return; |
| 436 | } |
| 437 | |
| 438 | // tell the target it's the focus of a cinematic |
| 439 | AINotifycxx . . $ AINotify(f32b5964aaa42c22).(target, AIN_MOVIE_STARTcxx . . $ `Descent3/aistruct_external.h:312:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 440 | AINotifycxx . . $ AINotify(f32b5964aaa42c22).(target, AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 441 | |
| 442 | if (target->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 443 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 444 | |
| 445 | Osiris_CallLevelEventcxx . . $ Osiris_CallLevelEvent(a880c8b99cdc05b4).(EVT_PLAYER_MOVIE_STARTcxx . . $ `scripts/osiris_common.h:397:9`!, &ei); |
| 446 | Osiris_CallLevelEventcxx . . $ Osiris_CallLevelEvent(a880c8b99cdc05b4).(EVT_PLAYER_MOVIE_ENDcxx . . $ `scripts/osiris_common.h:398:9`!, &ei); |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | void Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(tGameCinematiccxx . . $ tGameCinematic# *info) { |
| 451 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(Cinematic_fake_queued == false); // ack trying to play 2 cinematics in one frame!? |
| 452 | |
| 453 | memcpy(&Cinematic_fake_infocxx . . $ Cinematic_fake_info., info, sizeof(tGameCinematiccxx . . $ tGameCinematic#)); |
| 454 | Cinematic_fake_queuedcxx . . $ Cinematic_fake_queued. = true; |
| 455 | } |
| 456 | |
| 457 | static inline int Cinematics_CreateCameracxx . . $ Cinematics_CreateCamera(b126dc7c1de90089).(void) { |
| 458 | int objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!, 0, Player_objectcxx . . $ Player_object.->roomnumcxx . . $ object#roomnum., &Player_objectcxx . . $ Player_object.->poscxx . . $ object#pos., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 459 | if (objnum == -1) |
| 460 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 461 | |
| 462 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 463 | DemoWriteObjCreatecxx . . $ DemoWriteObjCreate(5b923f0d7a56193f).(OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!, 0, Player_objectcxx . . $ Player_object.->roomnumcxx . . $ object#roomnum., &Player_objectcxx . . $ Player_object.->poscxx . . $ object#pos., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, |
| 464 | &Objectscxx . . $ Objects.[objnum]); |
| 465 | } |
| 466 | |
| 467 | return Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 468 | } |
| 469 | |
| 470 | // Cinematic_Start |
| 471 | // |
| 472 | // Starts an in-game cinematic sequence. text_string is the text to be displayed |
| 473 | // use pipes (|) to seperate lines. (calls demo routines to record) |
| 474 | bool Cinematic_Startcxx . . $ Cinematic_Start(1a0b6398b208db97).(tGameCinematiccxx . . $ tGameCinematic# *info, char *text_string) { |
| 475 | if (Demo_flagscxx . . $ Demo_flags. == DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`!) |
| 476 | return true; // demo system calls Cinematic_StartCine itself |
| 477 | |
| 478 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(info != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 479 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text_string != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 480 | if (!info || !text_string) |
| 481 | return false; |
| 482 | |
| 483 | if (Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 484 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 485 | return false; |
| 486 | } |
| 487 | |
| 488 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 489 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 490 | return false; // no cinematics in multiplayer |
| 491 | } |
| 492 | |
| 493 | if ((info->flagscxx . . $ tGameCinematic#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`!) { |
| 494 | info->orientcxx . . $ tGameCinematic#orient. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; // ensure that this is NULL |
| 495 | } |
| 496 | |
| 497 | int camera_handle = Cinematics_CreateCameracxx . . $ Cinematics_CreateCamera(b126dc7c1de90089).(); |
| 498 | |
| 499 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 500 | tCinematicDemoInfocxx . . $ tCinematicDemoInfo# demo_data; |
| 501 | demo_data.cinematic_typecxx . . $ tCinematicDemoInfo#cinematic_type. = CDI_NOT_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:272:9`!; |
| 502 | demo_data.text_stringcxx . . $ tCinematicDemoInfo#text_string. = text_string; |
| 503 | demo_data.cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data. = info; |
| 504 | demo_data.camera_objhandlecxx . . $ tCinematicDemoInfo#camera_objhandle. = camera_handle; |
| 505 | Cinematic_WriteDemoFileDatacxx . . $ Cinematic_WriteDemoFileData(94428571cf5c5a65).(&demo_data); |
| 506 | } |
| 507 | |
| 508 | return Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(info, text_string, camera_handle); |
| 509 | } |
| 510 | |
| 511 | static inline void Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(int objhandle) { |
| 512 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 513 | if (obj) { |
| 514 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(obj); |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | // Cinematic_StartCine |
| 519 | // |
| 520 | // Starts an in-game cinematic sequence. text_string is the text to be displayed |
| 521 | // use pipes (|) to seperate lines. (does not call demo routines) |
| 522 | bool Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(tGameCinematiccxx . . $ tGameCinematic# *info, const char *text_string, int camera_objhandle) { |
| 523 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(info != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 524 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text_string != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 525 | if (!info || !text_string) { |
| 526 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_objhandle); |
| 527 | return false; |
| 528 | } |
| 529 | |
| 530 | if (Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 531 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 532 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_objhandle); |
| 533 | return false; |
| 534 | } |
| 535 | |
| 536 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 537 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 538 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_objhandle); |
| 539 | return false; // no cinematics in multiplayer |
| 540 | } |
| 541 | |
| 542 | #ifdef _DEBUGcxx . . $ `<built-in>:482:9`! |
| 543 | if (!Cinematics_enabledcxx . . $ Cinematics_enabled.) { |
| 544 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 545 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_objhandle); |
| 546 | AddBlinkingHUDMessagecxx . . $ AddBlinkingHUDMessage(f90d95ab21fd6d97).("Cinematic: Not Displayed, they are disabled (DEL-SHIFT-C)"); |
| 547 | return true; |
| 548 | } |
| 549 | |
| 550 | if (!DoAIcxx . . $ DoAI.) { |
| 551 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(info); |
| 552 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_objhandle); |
| 553 | AddBlinkingHUDMessagecxx . . $ AddBlinkingHUDMessage(f90d95ab21fd6d97).("Cinematic: Not Displayed, AI is not turned on (DEL-A)"); |
| 554 | return true; |
| 555 | } |
| 556 | #endif |
| 557 | |
| 558 | // take the given values and setup the struct |
| 559 | memset(&GameCinemacxx . . $ GameCinema., 0, sizeof(GameCinemacxx . . $ GameCinema.)); |
| 560 | |
| 561 | // verify passed in values |
| 562 | verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(&info->text_displaycxx . . $ tGameCinematic#text_display.); |
| 563 | verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(&info->track_targetcxx . . $ tGameCinematic#track_target.); |
| 564 | verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(&info->player_disabledcxx . . $ tGameCinematic#player_disabled.); |
| 565 | verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(&info->in_camera_viewcxx . . $ tGameCinematic#in_camera_view.); |
| 566 | verify_percentranagecxx . . $ verify_percentranage(6d472142c0e012fa).(&info->quick_exitcxx . . $ tGameCinematic#quick_exit.); |
| 567 | |
| 568 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. = info->flagscxx . . $ tGameCinematic#flags.; |
| 569 | GameCinemacxx . . $ GameCinema..target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle. = info->target_objhandlecxx . . $ tGameCinematic#target_objhandle.; |
| 570 | GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback. = info->callbackcxx . . $ tGameCinematic#callback.; |
| 571 | GameCinemacxx . . $ GameCinema..old_hudmodecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#old_hudmode. = GetHUDModecxx . . $ GetHUDMode(d2d05048dda10524).(); |
| 572 | |
| 573 | int objnum; |
| 574 | objectcxx . . $ object# *c = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(camera_objhandle); |
| 575 | if (c) { |
| 576 | objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(c); |
| 577 | } else { |
| 578 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to create camera\n"); |
| 579 | return false; |
| 580 | } |
| 581 | |
| 582 | if ((info->flagscxx . . $ tGameCinematic#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`!) { |
| 583 | GameCinemacxx . . $ GameCinema..roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#room. = info->roomcxx . . $ tGameCinematic#room.; |
| 584 | GameCinemacxx . . $ GameCinema..positioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#position. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). info->positioncxx . . $ tGameCinematic#position.; |
| 585 | // objnum = ObjCreate(OBJ_CAMERA,0,info->room,&info->position,info->orient); |
| 586 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(c, &info->positioncxx . . $ tGameCinematic#position., info->roomcxx . . $ tGameCinematic#room., info->orientcxx . . $ tGameCinematic#orient., false); |
| 587 | |
| 588 | } else { |
| 589 | GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum. = info->pathidcxx . . $ tGameCinematic#pathid.; |
| 590 | if (GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum. == -1) { |
| 591 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid Path given\n"); |
| 592 | return false; |
| 593 | } |
| 594 | // Abort if not a good path |
| 595 | if (((info->flagscxx . . $ tGameCinematic#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`!)) { |
| 596 | if (GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].num_nodescxx . . $ game_path#num_nodes. < 2) { |
| 597 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Not a good path passed to Cinematic_Start\n"); |
| 598 | return false; |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | // objnum = |
| 603 | // ObjCreate(OBJ_CAMERA,0,GamePaths[GameCinema.pathnum].pathnodes[0].roomnum,&GamePaths[GameCinema.pathnum].pathnodes[0].pos,NULL); |
| 604 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(c, &GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos., GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].roomnumcxx . . $ node#roomnum., |
| 605 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, false); |
| 606 | } |
| 607 | |
| 608 | /* |
| 609 | if(objnum==-1){ |
| 610 | //couldn't create camera |
| 611 | mprintf(0,"Unable to create camera\n"); |
| 612 | return false; |
| 613 | } |
| 614 | */ |
| 615 | |
| 616 | GameCinemacxx . . $ GameCinema..camera_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_objhandle. = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 617 | GameCinemacxx . . $ GameCinema..target_triggeredcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_triggered. = false; |
| 618 | objectcxx . . $ object# *camera = &Objectscxx . . $ Objects.[objnum]; |
| 619 | |
| 620 | // parse the text line and extract the lines |
| 621 | GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines. = 0; |
| 622 | GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text. = mem_strdupcxx . . $ `mem/mem.h:81:9`!(text_string); |
| 623 | char *ptr = GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.; |
| 624 | if (!ptr) { |
| 625 | Errorcxx . . $ Error(326aeb464d16410c).("Out of Memory\n"); |
| 626 | } |
| 627 | while (*ptr) { |
| 628 | if (*ptr == '|') { |
| 629 | *ptr = '\0'; |
| 630 | GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.++; |
| 631 | } |
| 632 | ptr++; |
| 633 | } |
| 634 | GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.++; |
| 635 | |
| 636 | float start_time = Gametimecxx . . $ Gametime.; |
| 637 | GameCinemacxx . . $ GameCinema..end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_time. = start_time + info->max_time_playcxx . . $ tGameCinematic#max_time_play.; |
| 638 | GameCinemacxx . . $ GameCinema..text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min.); |
| 639 | GameCinemacxx . . $ GameCinema..text_display_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_stop. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max.); |
| 640 | GameCinemacxx . . $ GameCinema..track_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_start. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min.); |
| 641 | GameCinemacxx . . $ GameCinema..track_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_stop. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max.); |
| 642 | GameCinemacxx . . $ GameCinema..player_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_start. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min.); |
| 643 | GameCinemacxx . . $ GameCinema..player_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_stop. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max.); |
| 644 | GameCinemacxx . . $ GameCinema..camera_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_start. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min.); |
| 645 | GameCinemacxx . . $ GameCinema..camera_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_stop. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max.); |
| 646 | GameCinemacxx . . $ GameCinema..exit_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_start. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min.); |
| 647 | GameCinemacxx . . $ GameCinema..exit_endcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_end. = start_time + (info->max_time_playcxx . . $ tGameCinematic#max_time_play. * info->quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max.); |
| 648 | GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. = info->start_transitioncxx . . $ tGameCinematic#start_transition.; |
| 649 | GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. = info->end_transitioncxx . . $ tGameCinematic#end_transition.; |
| 650 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; // stop all pending end transitions |
| 651 | GameCinemacxx . . $ GameCinema..controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended. = false; |
| 652 | |
| 653 | if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_WACKYcxx . . $ `Descent3/gamecinematics_external.h:189:9`! || GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!) { |
| 654 | GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time. = start_time + info->max_time_playcxx . . $ tGameCinematic#max_time_play. - (END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! / 2.0f); |
| 655 | } |
| 656 | |
| 657 | if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!) { |
| 658 | GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time. = start_time; |
| 659 | } |
| 660 | |
| 661 | if (GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. == GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!) { |
| 662 | GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time. = start_time; |
| 663 | GameCinemacxx . . $ GameCinema..start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time. = start_time; |
| 664 | } else { |
| 665 | GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time. = GameCinemacxx . . $ GameCinema..start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time. = -1.0f; |
| 666 | } |
| 667 | |
| 668 | // The structs are setup, time to setup the camera and objects |
| 669 | |
| 670 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cinematic_Start\n"); |
| 671 | |
| 672 | Player_objectcxx . . $ Player_object.->flagscxx . . $ object#flags. &= ~OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 673 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_AFTERBURN_ONcxx . . $ `Descent3/player_external.h:92:9`!; |
| 674 | camera->flagscxx . . $ object#flags. &= ~OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 675 | |
| 676 | // setup camera physics |
| 677 | camera->movement_typecxx . . $ object#movement_type. = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 678 | camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_USES_THRUSTcxx . . $ `Descent3/object_external.h:319:9`!; |
| 679 | // camera->mtype.phys_info.flags |= PF_LEVELING; |
| 680 | camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 681 | camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..dragcxx . . $ physics_info#drag. = 0.1f; |
| 682 | camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..masscxx . . $ physics_info#mass. = 2.0f; |
| 683 | camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotdragcxx . . $ physics_info#rotdrag. = 0.1f; |
| 684 | |
| 685 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust.); |
| 686 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust.); |
| 687 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.); |
| 688 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&camera->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.); |
| 689 | |
| 690 | // setup camera AI |
| 691 | SetObjectControlTypecxx . . $ SetObjectControlType(766a1b7183ffa4b4).(camera, CT_AIcxx . . $ `Descent3/object_external.h:217:9`!); |
| 692 | memset(camera->ai_infocxx . . $ object#ai_info., 0, sizeof(ai_framecxx . . $ ai_frame#)); |
| 693 | |
| 694 | camera->ai_infocxx . . $ object#ai_info.->ai_classcxx . . $ ai_frame#ai_class. = AIC_STATICcxx . . $ `Descent3/aistruct.h:440:9`!; |
| 695 | camera->ai_infocxx . . $ object#ai_info.->ai_typecxx . . $ ai_frame#ai_type. = AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!; |
| 696 | |
| 697 | GoalInitTypeGoalscxx . . $ GoalInitTypeGoals(766a1b7183ffa4b4).(camera, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 698 | |
| 699 | float velocity_to_use = 75.0f; |
| 700 | |
| 701 | if ((info->flagscxx . . $ tGameCinematic#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`!) { |
| 702 | // determine velocity based on distance to travel on path |
| 703 | velocity_to_use = Cine_GetPathTravelSpeedcxx . . $ Cine_GetPathTravelSpeed(d7799857c894622e).(GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum., info->max_time_playcxx . . $ tGameCinematic#max_time_play.); |
| 704 | } |
| 705 | |
| 706 | camera->ai_infocxx . . $ object#ai_info.->flagscxx . . $ ai_frame#flags. = |
| 707 | AIF_PERSISTANTcxx . . $ `Descent3/aistruct_external.h:354:9`! | AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`! | AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 708 | camera->ai_infocxx . . $ object#ai_info.->max_velocitycxx . . $ ai_frame#max_velocity. = velocity_to_use; // Slightly faster than the real ship |
| 709 | camera->ai_infocxx . . $ object#ai_info.->max_delta_velocitycxx . . $ ai_frame#max_delta_velocity. = 40.0f; |
| 710 | camera->ai_infocxx . . $ object#ai_info.->max_turn_ratecxx . . $ ai_frame#max_turn_rate. = 14000; |
| 711 | camera->ai_infocxx . . $ object#ai_info.->awarenesscxx . . $ ai_frame#awareness. = AWARE_MOSTLYcxx . . $ `Descent3/aistruct_external.h:324:9`!; |
| 712 | camera->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type. = MC_FLYINGcxx . . $ `Descent3/object_external.h:246:9`!; |
| 713 | camera->ai_infocxx . . $ object#ai_info.->next_movementcxx . . $ ai_frame#next_movement. = AI_INVALID_INDEXcxx . . $ `Descent3/aistruct.h:404:9`!; |
| 714 | camera->ai_infocxx . . $ object#ai_info.->anim_sound_handlecxx . . $ ai_frame#anim_sound_handle. = 0; |
| 715 | camera->ai_infocxx . . $ object#ai_info.->status_regcxx . . $ ai_frame#status_reg. = 0; |
| 716 | camera->ai_infocxx . . $ object#ai_info.->last_played_sound_indexcxx . . $ ai_frame#last_played_sound_index. = -1; |
| 717 | camera->ai_infocxx . . $ object#ai_info.->weapon_speedcxx . . $ ai_frame#weapon_speed. = 0.0f; |
| 718 | camera->ai_infocxx . . $ object#ai_info.->animation_typecxx . . $ ai_frame#animation_type. = AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!; |
| 719 | camera->ai_infocxx . . $ object#ai_info.->next_melee_timecxx . . $ ai_frame#next_melee_time. = Gametimecxx . . $ Gametime.; |
| 720 | camera->ai_infocxx . . $ object#ai_info.->next_flinch_timecxx . . $ ai_frame#next_flinch_time. = Gametimecxx . . $ Gametime.; |
| 721 | camera->ai_infocxx . . $ object#ai_info.->target_handlecxx . . $ ai_frame#target_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 722 | camera->ai_infocxx . . $ object#ai_info.->next_check_see_target_timecxx . . $ ai_frame#next_check_see_target_time. = Gametimecxx . . $ Gametime.; |
| 723 | camera->ai_infocxx . . $ object#ai_info.->last_see_target_timecxx . . $ ai_frame#last_see_target_time. = Gametimecxx . . $ Gametime.; |
| 724 | camera->ai_infocxx . . $ object#ai_info.->last_render_timecxx . . $ ai_frame#last_render_time. = -1.0f; |
| 725 | camera->ai_infocxx . . $ object#ai_info.->next_target_update_timecxx . . $ ai_frame#next_target_update_time. = Gametimecxx . . $ Gametime.; |
| 726 | camera->ai_infocxx . . $ object#ai_info.->notify_flagscxx . . $ ai_frame#notify_flags. |= AI_NOTIFIES_ALWAYS_ONcxx . . $ `Descent3/aistruct_external.h:316:9`!; |
| 727 | camera->ai_infocxx . . $ object#ai_info.->last_see_target_poscxx . . $ ai_frame#last_see_target_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 728 | camera->ai_infocxx . . $ object#ai_info.->dodge_vel_percentcxx . . $ ai_frame#dodge_vel_percent. = 1.0f; |
| 729 | camera->ai_infocxx . . $ object#ai_info.->attack_vel_percentcxx . . $ ai_frame#attack_vel_percent. = 1.0f; |
| 730 | camera->ai_infocxx . . $ object#ai_info.->fight_samecxx . . $ ai_frame#fight_same. = 0.0f; |
| 731 | camera->ai_infocxx . . $ object#ai_info.->agressioncxx . . $ ai_frame#agression. = 0.0f; |
| 732 | camera->ai_infocxx . . $ object#ai_info.->avoid_friends_distancecxx . . $ ai_frame#avoid_friends_distance. = 0.0f; |
| 733 | camera->ai_infocxx . . $ object#ai_info.->biased_flight_importancecxx . . $ ai_frame#biased_flight_importance. = 0.0f; |
| 734 | camera->ai_infocxx . . $ object#ai_info.->circle_distancecxx . . $ ai_frame#circle_distance. = 0.0f; |
| 735 | camera->ai_infocxx . . $ object#ai_info.->dodge_percentcxx . . $ ai_frame#dodge_percent. = 0.0f; |
| 736 | camera->ai_infocxx . . $ object#ai_info.->fight_teamcxx . . $ ai_frame#fight_team. = 0.0; |
| 737 | |
| 738 | AIPathInitPathcxx . . $ AIPathInitPath(211cadd9cc3984f1).(&camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path.); |
| 739 | |
| 740 | // Move camera to start position |
| 741 | vectorcxx . . $ vector# c_pos; |
| 742 | int c_room; |
| 743 | matrixcxx . . $ matrix# c_orient; |
| 744 | |
| 745 | if ((info->flagscxx . . $ tGameCinematic#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`!) { |
| 746 | c_room = GameCinemacxx . . $ GameCinema..roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#room.; |
| 747 | c_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). GameCinemacxx . . $ GameCinema..positioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#position.; |
| 748 | if (info->orientcxx . . $ tGameCinematic#orient.) |
| 749 | c_orient =cxx . . $ matrix#`operator=`(4c6f8b29806742). *info->orientcxx . . $ tGameCinematic#orient.; |
| 750 | else |
| 751 | vm_MakeIdentitycxx . . $ vm_MakeIdentity(dca75c48c9ab5b54).(&c_orient); |
| 752 | } else { |
| 753 | // Set up path info |
| 754 | path_informationcxx . . $ path_information# pi; |
| 755 | |
| 756 | pi.path_idcxx . . $ path_information#path_id. = GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.; |
| 757 | pi.start_nodecxx . . $ path_information#start_node. = 0; |
| 758 | pi.end_nodecxx . . $ path_information#end_node. = GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 759 | |
| 760 | if (GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].num_nodescxx . . $ game_path#num_nodes. == 1) { |
| 761 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&c_orient, &GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].fveccxx . . $ node#fvec., |
| 762 | &GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].uveccxx . . $ node#uvec., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 763 | pi.next_nodecxx . . $ path_information#next_node. = 0; |
| 764 | } else { |
| 765 | vectorcxx . . $ vector# fvec = GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[1].poscxx . . $ node#pos. -cxx . . $ operator-(b77b703cd1e43e33). GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 766 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&c_orient, &fvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 767 | pi.next_nodecxx . . $ path_information#next_node. = 1; |
| 768 | } |
| 769 | |
| 770 | c_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 771 | c_room = GamePathscxx . . $ GamePaths.[GameCinemacxx . . $ GameCinema..pathnumcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#pathnum.].pathnodescxx . . $ game_path#pathnodes.[0].roomnumcxx . . $ node#roomnum.; |
| 772 | |
| 773 | // Make the player follow the path |
| 774 | GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(camera, AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!, (void *)&pi, 0, 10.0f, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`! | GF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:224:9`!); |
| 775 | } |
| 776 | |
| 777 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(camera, &c_pos, c_room, &c_orient, true); |
| 778 | |
| 779 | // Switch to correct hud mode |
| 780 | switch (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_SCREENFORMATcxx . . $ `Descent3/gamecinematics_external.h:157:9`!) { |
| 781 | case GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`!: |
| 782 | SetHUDModecxx . . $ SetHUDMode(1efe68d6753032ab).(HUD_LETTERBOXcxx . . $ HUD_LETTERBOX.); |
| 783 | break; |
| 784 | case GCF_FULLSCREENcxx . . $ `Descent3/gamecinematics_external.h:156:9`!: |
| 785 | SetHUDModecxx . . $ SetHUDMode(1efe68d6753032ab).(HUD_OBSERVERcxx . . $ HUD_OBSERVER.); |
| 786 | break; |
| 787 | } |
| 788 | |
| 789 | GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle. = -1; |
| 790 | GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line. = 0; |
| 791 | |
| 792 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_TEXT_MASKcxx . . $ `Descent3/gamecinematics_external.h:166:9`!) == GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!) { |
| 793 | |
| 794 | // create overlay bitmap |
| 795 | GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(128, 128, 0); |
| 796 | if (GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 797 | uint16_tcxx . . $ uint16_t# *data = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle., 0); |
| 798 | for (int j = 0; j < 128 * 128; j++) { |
| 799 | data[j] = GR_RGB16cxx . . $ GR_RGB16(6461fafb79bad5b9).(0, 0, 0) | OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!; |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | // determine longest line and add text to game messages |
| 805 | int old_font = grtext_GetFontcxx . . $ grtext_GetFont(b126dc7c1de90089).(); |
| 806 | grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(BIG_BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:112:9`!); |
| 807 | int pos = 0, len; |
| 808 | char *str_ptr; |
| 809 | |
| 810 | for (int i = 0; i < GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.; i++) { |
| 811 | int l; |
| 812 | |
| 813 | len = strlen(&GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 814 | |
| 815 | l = grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(&GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 816 | if (GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line. < l) |
| 817 | GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line. = l; |
| 818 | |
| 819 | // add text to game messages |
| 820 | str_ptr = &GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]; |
| 821 | while (*str_ptr && (*str_ptr == ' ' || *str_ptr == '\t')) |
| 822 | str_ptr++; |
| 823 | if (*str_ptr) |
| 824 | AddGameMessagecxx . . $ AddGameMessage(85c52e162fed56f9).(str_ptr); |
| 825 | |
| 826 | pos += len + 1; |
| 827 | } |
| 828 | GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line. += 10; |
| 829 | grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(old_font); |
| 830 | |
| 831 | Cinematic_inusecxx . . $ Cinematic_inuse. = true; |
| 832 | HUDPauseMessagescxx . . $ HUDPauseMessages(49f6e7a06ebc5aa8).(); |
| 833 | D3MusicStartCinematiccxx . . $ D3MusicStartCinematic(49f6e7a06ebc5aa8).(); |
| 834 | |
| 835 | if (GameCinemacxx . . $ GameCinema..camera_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_start. <= Gametimecxx . . $ Gametime.) { |
| 836 | Viewer_objectcxx . . $ Viewer_object. = camera; |
| 837 | |
| 838 | objectcxx . . $ object# *target; |
| 839 | target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle.); |
| 840 | |
| 841 | if (GameCinemacxx . . $ GameCinema..track_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_start. <= Gametimecxx . . $ Gametime. && target) { |
| 842 | // face target immediatly |
| 843 | vectorcxx . . $ vector# u_axis; |
| 844 | anglecxx . . $ angle# goal_angle; |
| 845 | |
| 846 | vectorcxx . . $ vector# turn_to = target->poscxx . . $ object#pos. -cxx . . $ operator-(b77b703cd1e43e33). camera->poscxx . . $ object#pos.; |
| 847 | vm_NormalizeVectorcxx . . $ vm_NormalizeVector(4939a7e530383cd4).(&turn_to); |
| 848 | |
| 849 | if (turn_to ==cxx . . $ `operator==`(718c890c104af0f3). Zero_vectorcxx . . $ Zero_vector.) { |
| 850 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cine: No turn_to or less than 1 degree off goal\n"); |
| 851 | goto continue_start; |
| 852 | } |
| 853 | |
| 854 | goal_angle = vm_DeltaAngVecNormcxx . . $ vm_DeltaAngVecNorm(2b95d4afcc0f9481).(&camera->orientcxx . . $ object#orient..fveccxx . . $ matrix#fvec., &turn_to, &u_axis); |
| 855 | if (goal_angle == 0) { |
| 856 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cine: Goal angle is zero\n"); |
| 857 | goto continue_start; |
| 858 | } |
| 859 | |
| 860 | camera->orientcxx . . $ object#orient..fveccxx . . $ matrix#fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). turn_to; |
| 861 | |
| 862 | camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. = camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. = 0.0f; |
| 863 | camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. = 1.0f; |
| 864 | |
| 865 | vm_Orthogonalizecxx . . $ vm_Orthogonalize(dca75c48c9ab5b54).(&camera->orientcxx . . $ object#orient.); |
| 866 | ObjSetOrientcxx . . $ ObjSetOrient(e1367e0f901c991f).(camera, &camera->orientcxx . . $ object#orient.); |
| 867 | |
| 868 | } else if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`!) { |
| 869 | // adjust to path node orientation (if we are on a path) |
| 870 | int cur_path = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..cur_pathcxx . . $ ai_path_info#cur_path.; |
| 871 | int cur_node = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..cur_nodecxx . . $ ai_path_info#cur_node.; |
| 872 | int end_node = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..path_end_nodecxx . . $ ai_path_info#path_end_node.[cur_path]; |
| 873 | int next_node = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(cur_node + 1, end_node); |
| 874 | int path_num = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..path_idcxx . . $ ai_path_info#path_id.[cur_path]; |
| 875 | |
| 876 | if (cur_node != next_node) { |
| 877 | vectorcxx . . $ vector# fvec = GamePathscxx . . $ GamePaths.[path_num].pathnodescxx . . $ game_path#pathnodes.[next_node].poscxx . . $ node#pos. -cxx . . $ operator-(b77b703cd1e43e33). GamePathscxx . . $ GamePaths.[path_num].pathnodescxx . . $ game_path#pathnodes.[cur_node].poscxx . . $ node#pos.; |
| 878 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&camera->orientcxx . . $ object#orient., &fvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 879 | vm_Orthogonalizecxx . . $ vm_Orthogonalize(dca75c48c9ab5b54).(&camera->orientcxx . . $ object#orient.); |
| 880 | ObjSetOrientcxx . . $ ObjSetOrient(e1367e0f901c991f).(camera, &camera->orientcxx . . $ object#orient.); |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | continue_start:; |
| 885 | } |
| 886 | |
| 887 | if (GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.) |
| 888 | (*GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.)(GCCT_STARTcxx . . $ `Descent3/gamecinematics_external.h:183:9`!); |
| 889 | |
| 890 | return true; |
| 891 | } |
| 892 | |
| 893 | static inline bool Cinematic_IsPlayerDeadcxx . . $ Cinematic_IsPlayerDead(c9857a73d68e59ba).(void) { |
| 894 | if (!Player_objectcxx . . $ Player_object. || (Player_objectcxx . . $ Player_object.->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!) || |
| 895 | (Player_objectcxx . . $ Player_object.->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && |
| 896 | Playerscxx . . $ Players.[Player_objectcxx . . $ Player_object.->idcxx . . $ object#id.].flagscxx . . $ player#flags. & (PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`! | PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!))) { |
| 897 | return true; |
| 898 | } |
| 899 | return false; |
| 900 | } |
| 901 | |
| 902 | // Cinematic_Stop |
| 903 | // |
| 904 | // Stops and clears up a in-game cinematic. |
| 905 | void Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(void) { |
| 906 | if (!Cinematic_inusecxx . . $ Cinematic_inuse.) |
| 907 | return; |
| 908 | |
| 909 | if (GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.) { |
| 910 | mem_freecxx . . $ `mem/mem.h:80:9`!(GameCinema.text); |
| 911 | GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 912 | } |
| 913 | |
| 914 | // tell the target object the cinematic is over |
| 915 | objectcxx . . $ object# *target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle.); |
| 916 | |
| 917 | if (GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.) |
| 918 | (*GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.)(GCCT_STOPcxx . . $ `Descent3/gamecinematics_external.h:184:9`!); |
| 919 | |
| 920 | // reset things back to normal, anything that might be messed up |
| 921 | bool dont_restore_viewer = false; |
| 922 | if (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_DONTRESTOREVIEWERcxx . . $ `Descent3/gamecinematics_external.h:177:9`!) { |
| 923 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "********NOT RESTORING VIEW TO PLAYER*************\n"); |
| 924 | dont_restore_viewer = true; |
| 925 | } |
| 926 | |
| 927 | if (!dont_restore_viewer) { |
| 928 | Viewer_objectcxx . . $ Viewer_object. = Player_objectcxx . . $ Player_object.; |
| 929 | } |
| 930 | Playerscxx . . $ Players.[Player_objectcxx . . $ Player_object.->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags. = 0xFFFFFFFF; |
| 931 | Player_objectcxx . . $ Player_object.->flagscxx . . $ object#flags. |= OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 932 | ResumeControlscxx . . $ ResumeControls(49f6e7a06ebc5aa8).(); |
| 933 | |
| 934 | // go back to full screen |
| 935 | if (!Cinematic_IsPlayerDeadcxx . . $ Cinematic_IsPlayerDead(c9857a73d68e59ba).() && GetScreenModecxx . . $ GetScreenMode(b126dc7c1de90089).() == SM_GAMEcxx . . $ SM_GAME.) // player death cam has started |
| 936 | SetHUDModecxx . . $ SetHUDMode(1efe68d6753032ab).(Cinematic_GetOldHudModecxx . . $ Cinematic_GetOldHudMode(d2d05048dda10524).()); |
| 937 | |
| 938 | if (GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 939 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle.); |
| 940 | } |
| 941 | |
| 942 | // delete the camera |
| 943 | if (!dont_restore_viewer) { |
| 944 | objectcxx . . $ object# *cam = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..camera_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_objhandle.); |
| 945 | if (cam) { |
| 946 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(cam); |
| 947 | } |
| 948 | } |
| 949 | |
| 950 | Cinematic_inusecxx . . $ Cinematic_inuse. = false; |
| 951 | HUDUnpauseMessagescxx . . $ HUDUnpauseMessages(49f6e7a06ebc5aa8).(); |
| 952 | D3MusicStopCinematiccxx . . $ D3MusicStopCinematic(49f6e7a06ebc5aa8).(); |
| 953 | |
| 954 | // Start fade out transition |
| 955 | if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`!) { |
| 956 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 957 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = Gametimecxx . . $ Gametime.; |
| 958 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = Gametimecxx . . $ Gametime. + END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`!; |
| 959 | } else if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_WACKYcxx . . $ `Descent3/gamecinematics_external.h:189:9`!) { |
| 960 | // only start the wacky transition if it already hasn't (early break) |
| 961 | if (!GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) { |
| 962 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 963 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = Gametimecxx . . $ Gametime. - (END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! / 2); |
| 964 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = Gametimecxx . . $ Gametime. + (END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! / 2); |
| 965 | } |
| 966 | } else if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!) { |
| 967 | // only start if it already hasn't |
| 968 | if (!GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) { |
| 969 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 970 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = Gametimecxx . . $ Gametime. - (END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! / 2); |
| 971 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = Gametimecxx . . $ Gametime. + (END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`! / 2); |
| 972 | } |
| 973 | } else if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!) { |
| 974 | if (!GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) { |
| 975 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 976 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time.; |
| 977 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = GameCinemacxx . . $ GameCinema..end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_time.; |
| 978 | } |
| 979 | } |
| 980 | |
| 981 | if (target) { |
| 982 | AINotifycxx . . $ AINotify(f32b5964aaa42c22).(target, AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 983 | |
| 984 | if (target->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 985 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 986 | Osiris_CallLevelEventcxx . . $ Osiris_CallLevelEvent(a880c8b99cdc05b4).(EVT_PLAYER_MOVIE_ENDcxx . . $ `scripts/osiris_common.h:398:9`!, &ei); |
| 987 | } |
| 988 | } |
| 989 | } |
| 990 | |
| 991 | bool Cinematic_IsKeyPressedcxx . . $ Cinematic_IsKeyPressed(c9857a73d68e59ba).(void) { |
| 992 | for (int i = 0; i < DDIO_MAX_KEYScxx . . $ `ddio/ddio_common.h:205:9`!; i++) { |
| 993 | if (ddio_InternalKeyStatecxx . . $ ddio_InternalKeyState(cef82f9be00a201a).(i)) |
| 994 | return true; |
| 995 | } |
| 996 | |
| 997 | return false; |
| 998 | } |
| 999 | |
| 1000 | // Cinematic_Frame |
| 1001 | // |
| 1002 | // Processes a frame for the Cinematics |
| 1003 | void Cinematic_Framecxx . . $ Cinematic_Frame(49f6e7a06ebc5aa8).(void) { |
| 1004 | if (Cinematic_fake_queuedcxx . . $ Cinematic_fake_queued.) { |
| 1005 | Cinematic_PerformFakecxx . . $ Cinematic_PerformFake(49f6e7a06ebc5aa8).(); |
| 1006 | } |
| 1007 | |
| 1008 | if (!Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 1009 | return; |
| 1010 | } |
| 1011 | |
| 1012 | // check to see if the player died somehow |
| 1013 | if ((!(GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_IGNOREPLAYERDEADcxx . . $ `Descent3/gamecinematics_external.h:179:9`!)) && Cinematic_IsPlayerDeadcxx . . $ Cinematic_IsPlayerDead(c9857a73d68e59ba).()) { |
| 1014 | Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(); |
| 1015 | return; |
| 1016 | } |
| 1017 | |
| 1018 | // check for end of cinematic |
| 1019 | if (Gametimecxx . . $ Gametime. > GameCinemacxx . . $ GameCinema..end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_time.) { |
| 1020 | Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(); |
| 1021 | return; |
| 1022 | } |
| 1023 | |
| 1024 | // check for keyboard quick exit |
| 1025 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..exit_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_start. && Gametimecxx . . $ Gametime. <= GameCinemacxx . . $ GameCinema..exit_endcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#exit_end.) { |
| 1026 | if (Cinematic_IsKeyPressedcxx . . $ Cinematic_IsKeyPressed(c9857a73d68e59ba).()) { |
| 1027 | // a key has been pressed, quick exit! |
| 1028 | ddio_KeyFlushcxx . . $ ddio_KeyFlush(49f6e7a06ebc5aa8).(); |
| 1029 | |
| 1030 | if (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_FORCETARGETTOENDcxx . . $ `Descent3/gamecinematics_external.h:175:9`!) { |
| 1031 | // move object to end of path |
| 1032 | objectcxx . . $ object# *target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle.); |
| 1033 | if (target && target->ai_infocxx . . $ object#ai_info. && target->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..num_pathscxx . . $ ai_path_info#num_paths. > 0) { |
| 1034 | bool shouldmove = true; |
| 1035 | |
| 1036 | #if defined(_DEBUGcxx . . $ `<built-in>:482:9`!) && defined(EDITOR) |
| 1037 | extern bool Game_being_played_from_quick_play; |
| 1038 | |
| 1039 | if (Game_being_played_from_quick_play && target->type == OBJ_PLAYER) { |
| 1040 | shouldmove = false; |
| 1041 | } |
| 1042 | #endif |
| 1043 | |
| 1044 | // its a target on a path |
| 1045 | matrixcxx . . $ matrix# orient; |
| 1046 | vectorcxx . . $ vector# pos; |
| 1047 | int room; |
| 1048 | |
| 1049 | int currpath = target->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..path_idcxx . . $ ai_path_info#path_id.[target->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..cur_pathcxx . . $ ai_path_info#cur_path.]; |
| 1050 | int endnode = GamePathscxx . . $ GamePaths.[currpath].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 1051 | |
| 1052 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &GamePathscxx . . $ GamePaths.[currpath].pathnodescxx . . $ game_path#pathnodes.[endnode].fveccxx . . $ node#fvec., |
| 1053 | &GamePathscxx . . $ GamePaths.[currpath].pathnodescxx . . $ game_path#pathnodes.[endnode].uveccxx . . $ node#uvec., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1054 | |
| 1055 | pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). GamePathscxx . . $ GamePaths.[currpath].pathnodescxx . . $ game_path#pathnodes.[endnode].poscxx . . $ node#pos.; |
| 1056 | room = GamePathscxx . . $ GamePaths.[currpath].pathnodescxx . . $ game_path#pathnodes.[endnode].roomnumcxx . . $ node#roomnum.; |
| 1057 | |
| 1058 | if (shouldmove) { |
| 1059 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(target, &pos, room, &orient, true); |
| 1060 | } |
| 1061 | } |
| 1062 | } |
| 1063 | Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(); |
| 1064 | return; |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | objectcxx . . $ object# *camera = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..camera_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_objhandle.); |
| 1069 | objectcxx . . $ object# *target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GameCinemacxx . . $ GameCinema..target_objhandlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_objhandle.); |
| 1070 | |
| 1071 | if (!target && GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_STOPIFTAGETDEADcxx . . $ `Descent3/gamecinematics_external.h:174:9`!) { |
| 1072 | Cinematic_Stopcxx . . $ Cinematic_Stop(49f6e7a06ebc5aa8).(); |
| 1073 | return; |
| 1074 | } |
| 1075 | |
| 1076 | // tell the target it's the focus of a cinematic |
| 1077 | if (target && !GameCinemacxx . . $ GameCinema..target_triggeredcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_triggered.) { |
| 1078 | GameCinemacxx . . $ GameCinema..target_triggeredcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#target_triggered. = true; |
| 1079 | AINotifycxx . . $ AINotify(f32b5964aaa42c22).(target, AIN_MOVIE_STARTcxx . . $ `Descent3/aistruct_external.h:312:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1080 | |
| 1081 | if (target->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 1082 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 1083 | Osiris_CallLevelEventcxx . . $ Osiris_CallLevelEvent(a880c8b99cdc05b4).(EVT_PLAYER_MOVIE_STARTcxx . . $ `scripts/osiris_common.h:397:9`!, &ei); |
| 1084 | } |
| 1085 | } |
| 1086 | |
| 1087 | // check to see if we should be looking through the camera |
| 1088 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..camera_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_start. && Gametimecxx . . $ Gametime. <= GameCinemacxx . . $ GameCinema..camera_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#camera_stop. && camera != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1089 | // camera should be the viewer |
| 1090 | Viewer_objectcxx . . $ Viewer_object. = camera; |
| 1091 | } else { |
| 1092 | Viewer_objectcxx . . $ Viewer_object. = Player_objectcxx . . $ Player_object.; |
| 1093 | } |
| 1094 | |
| 1095 | // check to see if we should be disabling player controls |
| 1096 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..player_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_start. && Gametimecxx . . $ Gametime. <= GameCinemacxx . . $ GameCinema..player_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#player_stop.) { |
| 1097 | // disable controls |
| 1098 | Playerscxx . . $ Players.[Player_objectcxx . . $ Player_object.->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags. = 0; |
| 1099 | |
| 1100 | // make sure play controls are suspended |
| 1101 | if (!GameCinemacxx . . $ GameCinema..controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended.) { |
| 1102 | SuspendControlscxx . . $ SuspendControls(49f6e7a06ebc5aa8).(); |
| 1103 | GameCinemacxx . . $ GameCinema..controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended. = true; |
| 1104 | } |
| 1105 | } else { |
| 1106 | // make sure controls are enabled |
| 1107 | Playerscxx . . $ Players.[Player_objectcxx . . $ Player_object.->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags. = 0xFFFFFFFF; |
| 1108 | |
| 1109 | // make sure play controls are enabled |
| 1110 | if (GameCinemacxx . . $ GameCinema..controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended.) { |
| 1111 | ResumeControlscxx . . $ ResumeControls(49f6e7a06ebc5aa8).(); |
| 1112 | GameCinemacxx . . $ GameCinema..controls_suspendedcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#controls_suspended. = false; |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | // adjust view to target |
| 1117 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..track_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_start. && Gametimecxx . . $ Gametime. <= GameCinemacxx . . $ GameCinema..track_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#track_stop. && target) { |
| 1118 | // track target |
| 1119 | |
| 1120 | vectorcxx . . $ vector# u_axis; |
| 1121 | anglecxx . . $ angle# goal_angle; |
| 1122 | |
| 1123 | vectorcxx . . $ vector# turn_to = target->poscxx . . $ object#pos. -cxx . . $ operator-(b77b703cd1e43e33). camera->poscxx . . $ object#pos.; |
| 1124 | vm_NormalizeVectorcxx . . $ vm_NormalizeVector(4939a7e530383cd4).(&turn_to); |
| 1125 | |
| 1126 | if (turn_to ==cxx . . $ `operator==`(718c890c104af0f3). Zero_vectorcxx . . $ Zero_vector.) { |
| 1127 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cine: No turn_to or less than 1 degree off goal\n"); |
| 1128 | goto continue_frame; |
| 1129 | } |
| 1130 | |
| 1131 | goal_angle = vm_DeltaAngVecNormcxx . . $ vm_DeltaAngVecNorm(2b95d4afcc0f9481).(&camera->orientcxx . . $ object#orient..fveccxx . . $ matrix#fvec., &turn_to, &u_axis); |
| 1132 | if (goal_angle == 0) { |
| 1133 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Cine: Goal angle is zero\n"); |
| 1134 | goto continue_frame; |
| 1135 | } |
| 1136 | |
| 1137 | camera->orientcxx . . $ object#orient..fveccxx . . $ matrix#fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). turn_to; |
| 1138 | |
| 1139 | camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. = camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. = 0.0f; |
| 1140 | camera->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. = 1.0f; |
| 1141 | |
| 1142 | vm_Orthogonalizecxx . . $ vm_Orthogonalize(dca75c48c9ab5b54).(&camera->orientcxx . . $ object#orient.); |
| 1143 | ObjSetOrientcxx . . $ ObjSetOrient(e1367e0f901c991f).(camera, &camera->orientcxx . . $ object#orient.); |
| 1144 | |
| 1145 | } else if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_CAMERAPLACEMENTcxx . . $ `Descent3/gamecinematics_external.h:161:9`!) == GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`!) { |
| 1146 | // adjust to path node orientation (if we are on a path) |
| 1147 | int cur_path = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..cur_pathcxx . . $ ai_path_info#cur_path.; |
| 1148 | int cur_node = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..cur_nodecxx . . $ ai_path_info#cur_node.; |
| 1149 | int end_node = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..path_end_nodecxx . . $ ai_path_info#path_end_node.[cur_path]; |
| 1150 | int next_node = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(cur_node + 1, end_node); |
| 1151 | int path_num = camera->ai_infocxx . . $ object#ai_info.->pathcxx . . $ ai_frame#path..path_idcxx . . $ ai_path_info#path_id.[cur_path]; |
| 1152 | |
| 1153 | if (cur_node != next_node) { |
| 1154 | vectorcxx . . $ vector# fvec = GamePathscxx . . $ GamePaths.[path_num].pathnodescxx . . $ game_path#pathnodes.[next_node].poscxx . . $ node#pos. -cxx . . $ operator-(b77b703cd1e43e33). GamePathscxx . . $ GamePaths.[path_num].pathnodescxx . . $ game_path#pathnodes.[cur_node].poscxx . . $ node#pos.; |
| 1155 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&camera->orientcxx . . $ object#orient., &fvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1156 | vm_Orthogonalizecxx . . $ vm_Orthogonalize(dca75c48c9ab5b54).(&camera->orientcxx . . $ object#orient.); |
| 1157 | ObjSetOrientcxx . . $ ObjSetOrient(e1367e0f901c991f).(camera, &camera->orientcxx . . $ object#orient.); |
| 1158 | } |
| 1159 | } else { |
| 1160 | // don't adjust at all |
| 1161 | } |
| 1162 | |
| 1163 | continue_frame: |
| 1164 | |
| 1165 | if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_WACKYcxx . . $ `Descent3/gamecinematics_external.h:189:9`! || GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!) { |
| 1166 | if (Gametimecxx . . $ Gametime. > GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time. && !GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) { |
| 1167 | // start the transition early |
| 1168 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 1169 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = Gametimecxx . . $ Gametime.; |
| 1170 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = Gametimecxx . . $ Gametime. + END_TRANSITION_TIMEcxx . . $ `Descent3/gamecinematics.cpp:304:9`!; |
| 1171 | } |
| 1172 | } |
| 1173 | |
| 1174 | if (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type. == GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!) { |
| 1175 | if (Gametimecxx . . $ Gametime. > GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time. && !GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) { |
| 1176 | // start the transition early |
| 1177 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = true; |
| 1178 | GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time. = GameCinemacxx . . $ GameCinema..early_trans_end_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#early_trans_end_start_time.; |
| 1179 | GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. = GameCinemacxx . . $ GameCinema..end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_time.; |
| 1180 | } |
| 1181 | } |
| 1182 | } |
| 1183 | |
| 1184 | // Renders anything that needs to be rendered for the cinematic frame |
| 1185 | void Cinematic_RenderFramecxx . . $ Cinematic_RenderFrame(49f6e7a06ebc5aa8).(void) { |
| 1186 | if (!Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 1187 | if (GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) |
| 1188 | Cinematic_DoEndTransitioncxx . . $ Cinematic_DoEndTransition(49f6e7a06ebc5aa8).(); |
| 1189 | return; |
| 1190 | } |
| 1191 | |
| 1192 | if (GetHUDModecxx . . $ GetHUDMode(d2d05048dda10524).() == HUD_LETTERBOXcxx . . $ HUD_LETTERBOX.) { |
| 1193 | // clear letterbox areas |
| 1194 | Clear_screencxx . . $ Clear_screen. = 4; |
| 1195 | } |
| 1196 | |
| 1197 | if (GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. != GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!) { |
| 1198 | Cinematic_DoStartTransitioncxx . . $ Cinematic_DoStartTransition(49f6e7a06ebc5aa8).(); |
| 1199 | } |
| 1200 | |
| 1201 | if (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_DOTRANSBEFORETEXTcxx . . $ `Descent3/gamecinematics_external.h:180:9`!) { |
| 1202 | // some end transitions start early...process now |
| 1203 | if (GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) |
| 1204 | Cinematic_DoEndTransitioncxx . . $ Cinematic_DoEndTransition(49f6e7a06ebc5aa8).(); |
| 1205 | |
| 1206 | // see if we should be displaying text |
| 1207 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start. && Gametimecxx . . $ Gametime. < GameCinemacxx . . $ GameCinema..text_display_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_stop.) { |
| 1208 | // Display text |
| 1209 | Cinematic_DrawTextcxx . . $ Cinematic_DrawText(49f6e7a06ebc5aa8).(); |
| 1210 | } |
| 1211 | |
| 1212 | } else { |
| 1213 | // see if we should be displaying text |
| 1214 | if (Gametimecxx . . $ Gametime. >= GameCinemacxx . . $ GameCinema..text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start. && Gametimecxx . . $ Gametime. < GameCinemacxx . . $ GameCinema..text_display_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_stop.) { |
| 1215 | // Display text |
| 1216 | Cinematic_DrawTextcxx . . $ Cinematic_DrawText(49f6e7a06ebc5aa8).(); |
| 1217 | } |
| 1218 | |
| 1219 | // some end transitions start early...process now |
| 1220 | if (GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) |
| 1221 | Cinematic_DoEndTransitioncxx . . $ Cinematic_DoEndTransition(49f6e7a06ebc5aa8).(); |
| 1222 | } |
| 1223 | |
| 1224 | if (GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.) |
| 1225 | (*GameCinemacxx . . $ GameCinema..callbackcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#callback.)(GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`!); |
| 1226 | } |
| 1227 | |
| 1228 | void Cinematic_DrawTextcxx . . $ Cinematic_DrawText(49f6e7a06ebc5aa8).(void) { |
| 1229 | int font_height = grfont_GetHeightcxx . . $ grfont_GetHeight(7864480464b09eea).(BIG_BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:112:9`!) + 2; |
| 1230 | int old_font = grtext_GetFontcxx . . $ grtext_GetFont(b126dc7c1de90089).(); |
| 1231 | grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(BIG_BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:112:9`!); |
| 1232 | grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 255)); |
| 1233 | |
| 1234 | int start_y; |
| 1235 | int end_y; |
| 1236 | |
| 1237 | // determine y positions |
| 1238 | switch (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_LAYOUT_MASKcxx . . $ `Descent3/gamecinematics_external.h:172:9`!) { |
| 1239 | case GCF_LAYOUT_LOWcxx . . $ `Descent3/gamecinematics_external.h:171:9`!: { |
| 1240 | end_y = 0.6667f * (float)(Max_window_hcxx . . $ Max_window_h.); |
| 1241 | start_y = end_y - (GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines. * font_height); |
| 1242 | |
| 1243 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(start_y >= 0); // too many lines of text! |
| 1244 | |
| 1245 | } break; |
| 1246 | case GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`!: { |
| 1247 | end_y = Max_window_hcxx . . $ Max_window_h.; |
| 1248 | start_y = end_y - (GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines. * font_height); |
| 1249 | |
| 1250 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(start_y >= 0); // too many lines of text! |
| 1251 | } break; |
| 1252 | case GCF_LAYOUT_TOPcxx . . $ `Descent3/gamecinematics_external.h:169:9`!: { |
| 1253 | start_y = 2; |
| 1254 | end_y = (GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines. * font_height) + start_y; |
| 1255 | |
| 1256 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(end_y < Max_window_h); // too many lines of text! |
| 1257 | } break; |
| 1258 | case GCF_LAYOUT_MIDDLEcxx . . $ `Descent3/gamecinematics_external.h:170:9`!: { |
| 1259 | int total_height = GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines. * font_height; |
| 1260 | start_y = (Max_window_hcxx . . $ Max_window_h. / 2) - (total_height / 2); |
| 1261 | end_y = start_y + total_height; |
| 1262 | |
| 1263 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(start_y >= 0 && end_y < Max_window_h); // too many lines of text |
| 1264 | |
| 1265 | } break; |
| 1266 | } |
| 1267 | |
| 1268 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_TEXT_MASKcxx . . $ `Descent3/gamecinematics_external.h:166:9`!) == GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!) { |
| 1269 | // see if this mode is allowed (only if letterbox and not in middle layout) |
| 1270 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_SCREENFORMATcxx . . $ `Descent3/gamecinematics_external.h:157:9`!) != GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`!) { |
| 1271 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. &= ~GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!; |
| 1272 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. |= GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`!; |
| 1273 | } else { |
| 1274 | // it's letter box, make sure it's not middle |
| 1275 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_LAYOUT_MASKcxx . . $ `Descent3/gamecinematics_external.h:172:9`!) == GCF_LAYOUT_MIDDLEcxx . . $ `Descent3/gamecinematics_external.h:170:9`!) { |
| 1276 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. &= ~GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!; |
| 1277 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. |= GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`!; |
| 1278 | } |
| 1279 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_LAYOUT_MASKcxx . . $ `Descent3/gamecinematics_external.h:172:9`!) == GCF_LAYOUT_LOWcxx . . $ `Descent3/gamecinematics_external.h:171:9`!) { |
| 1280 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. &= ~GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!; |
| 1281 | GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. |= GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`!; |
| 1282 | } |
| 1283 | } |
| 1284 | } |
| 1285 | |
| 1286 | float total_text_time = GameCinemacxx . . $ GameCinema..text_display_stopcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_stop. - GameCinemacxx . . $ GameCinema..text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start.; |
| 1287 | if (total_text_time <= 0.0f) { |
| 1288 | grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(old_font); |
| 1289 | return; |
| 1290 | } |
| 1291 | |
| 1292 | float time_in = Gametimecxx . . $ Gametime. - GameCinemacxx . . $ GameCinema..text_display_startcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text_display_start.; |
| 1293 | float perc = time_in / total_text_time; |
| 1294 | if (perc < 0.0f) |
| 1295 | perc = 0.0f; |
| 1296 | if (perc > 1.0f) |
| 1297 | perc = 1.0f; |
| 1298 | |
| 1299 | switch (GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_TEXT_MASKcxx . . $ `Descent3/gamecinematics_external.h:166:9`!) { |
| 1300 | case GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`!: { |
| 1301 | // first 1/3 is alpha in |
| 1302 | // last 2/3 is solid |
| 1303 | uint8_tcxx . . $ uint8_t# alpha = 0; |
| 1304 | |
| 1305 | if (perc > 0.33f) { |
| 1306 | // middle 1/3 |
| 1307 | alpha = 255; |
| 1308 | } else if (perc <= 0.33f) { |
| 1309 | // first 1/3 |
| 1310 | float new_p = perc / 0.33f; |
| 1311 | alpha = (uint8_tcxx . . $ uint8_t#)(new_p * 255.0f); |
| 1312 | } |
| 1313 | grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(alpha); |
| 1314 | |
| 1315 | int len, pos = 0; |
| 1316 | int y = start_y; |
| 1317 | for (int i = 0; i < GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.; i++) { |
| 1318 | len = strlen(&GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1319 | grtext_CenteredPrintfcxx . . $ grtext_CenteredPrintf(9514e36549094170).(0, y, &GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1320 | |
| 1321 | y += font_height; |
| 1322 | pos += len + 1; |
| 1323 | } |
| 1324 | grtext_Flushcxx . . $ grtext_Flush(49f6e7a06ebc5aa8).(); |
| 1325 | |
| 1326 | // Due alpha overlay effect |
| 1327 | if (GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1328 | float alphas[4] = {0.0f, 1.0f, 1.0f, 0.0f}; |
| 1329 | float p = (perc > 0.18f) ? 1.0f : (perc / 0.18f); |
| 1330 | |
| 1331 | int gl, gr, gt, gb; |
| 1332 | grtext_GetParameterscxx . . $ grtext_GetParameters(adf20dddcf83aa52).(&gl, >, &gr, &gb, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1333 | |
| 1334 | int width = (1.0f - p) * GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line.; |
| 1335 | int rx = gl + (gr - gl) / 2 + (GameCinemacxx . . $ GameCinema..longest_linecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#longest_line. / 2); |
| 1336 | int lx = gl + rx - width; |
| 1337 | |
| 1338 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_VERTEXcxx . . $ `lib/renderer.h:403:9`!); |
| 1339 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1340 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1341 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1342 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1343 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1344 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1345 | |
| 1346 | int t_y, b_y; |
| 1347 | if ((GameCinemacxx . . $ GameCinema..flagscxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#flags. & GCF_LAYOUT_MASKcxx . . $ `Descent3/gamecinematics_external.h:172:9`!) == GCF_LAYOUT_TOPcxx . . $ `Descent3/gamecinematics_external.h:169:9`!) { |
| 1348 | t_y = 0; |
| 1349 | b_y = Game_window_ycxx . . $ Game_window_y.; |
| 1350 | } else { |
| 1351 | t_y = Game_window_ycxx . . $ Game_window_y. + Game_window_hcxx . . $ Game_window_h.; |
| 1352 | b_y = Max_window_hcxx . . $ Max_window_h.; |
| 1353 | } |
| 1354 | |
| 1355 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(lx, t_y, rx, b_y, GameCinemacxx . . $ GameCinema..bmp_handlecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#bmp_handle., 0, 0, 1, 1, -1, alphas); |
| 1356 | |
| 1357 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1358 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1359 | } |
| 1360 | } break; |
| 1361 | case GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`!: { |
| 1362 | // first 1/3 is alpha in |
| 1363 | // middle 1/3 is solid |
| 1364 | // last 1/3 is alpha out |
| 1365 | uint8_tcxx . . $ uint8_t# alpha; |
| 1366 | |
| 1367 | if (perc > 0.33f && perc <= 0.66f) { |
| 1368 | // middle 1/3 |
| 1369 | alpha = 255; |
| 1370 | } else if (perc <= 0.33f) { |
| 1371 | // first 1/3 |
| 1372 | float new_p = perc / 0.33f; |
| 1373 | alpha = (uint8_tcxx . . $ uint8_t#)(new_p * 255.0f); |
| 1374 | } else { |
| 1375 | // last 1/3 |
| 1376 | float new_p = (perc - 0.66f) / 0.33f; |
| 1377 | if (new_p < 0.0f) |
| 1378 | new_p = 0.0f; |
| 1379 | if (new_p > 1.0f) |
| 1380 | new_p = 1.0f; |
| 1381 | alpha = (uint8_tcxx . . $ uint8_t#)(255.0f - (new_p * 255.0f)); |
| 1382 | } |
| 1383 | grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(alpha); |
| 1384 | |
| 1385 | int len, pos = 0; |
| 1386 | int y = start_y; |
| 1387 | for (int i = 0; i < GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.; i++) { |
| 1388 | len = strlen(&GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1389 | grtext_CenteredPrintfcxx . . $ grtext_CenteredPrintf(9514e36549094170).(0, y, &GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1390 | |
| 1391 | y += font_height; |
| 1392 | pos += len + 1; |
| 1393 | } |
| 1394 | grtext_Flushcxx . . $ grtext_Flush(49f6e7a06ebc5aa8).(); |
| 1395 | } break; |
| 1396 | case GCF_TEXT_NOEFFECTcxx . . $ `Descent3/gamecinematics_external.h:165:9`!: { |
| 1397 | int len, pos = 0; |
| 1398 | int y = start_y; |
| 1399 | for (int i = 0; i < GameCinemacxx . . $ GameCinema..num_linescxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#num_lines.; i++) { |
| 1400 | len = strlen(&GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1401 | grtext_CenteredPrintfcxx . . $ grtext_CenteredPrintf(9514e36549094170).(0, y, &GameCinemacxx . . $ GameCinema..textcxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#text.[pos]); |
| 1402 | |
| 1403 | y += font_height; |
| 1404 | pos += len + 1; |
| 1405 | } |
| 1406 | grtext_Flushcxx . . $ grtext_Flush(49f6e7a06ebc5aa8).(); |
| 1407 | } break; |
| 1408 | } |
| 1409 | |
| 1410 | grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(old_font); |
| 1411 | } |
| 1412 | |
| 1413 | void Cinematic_DoStartTransitioncxx . . $ Cinematic_DoStartTransition(49f6e7a06ebc5aa8).(void) { |
| 1414 | if (GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. == GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!) |
| 1415 | return; |
| 1416 | |
| 1417 | if (GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time. == -1.0f) { |
| 1418 | // calculate |
| 1419 | GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time. = Gametimecxx . . $ Gametime.; |
| 1420 | GameCinemacxx . . $ GameCinema..start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time. = Gametimecxx . . $ Gametime. + 2.0f; |
| 1421 | } |
| 1422 | |
| 1423 | if (GameCinemacxx . . $ GameCinema..start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time. < Gametimecxx . . $ Gametime.) |
| 1424 | return; |
| 1425 | |
| 1426 | float total_time = GameCinemacxx . . $ GameCinema..start_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_end_time. - GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time.; |
| 1427 | float time_in = Gametimecxx . . $ Gametime. - GameCinemacxx . . $ GameCinema..start_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_start_time.; |
| 1428 | |
| 1429 | if (time_in < 0 || time_in > total_time) |
| 1430 | return; |
| 1431 | |
| 1432 | float perc = time_in / total_time; |
| 1433 | |
| 1434 | if (perc < 0.0f) |
| 1435 | perc = 0.0f; |
| 1436 | if (perc > 1.0f) |
| 1437 | perc = 1.0f; |
| 1438 | |
| 1439 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`! || gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1440 | GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. = GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!; |
| 1441 | return; |
| 1442 | } |
| 1443 | |
| 1444 | float alpha = 1.0f - perc; |
| 1445 | |
| 1446 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_CONSTANTcxx . . $ `lib/renderer.h:400:9`!); |
| 1447 | rend_SetAlphaValuecxx . . $ rend_SetAlphaValue(ac50b47256ae7414).(alpha * 255.0f); |
| 1448 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1449 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1450 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1451 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1452 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1453 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1454 | |
| 1455 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).( |
| 1456 | 0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h., |
| 1457 | (GameCinemacxx . . $ GameCinema..start_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#start_transition_type. == GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!) ? gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle. : gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle., 0, 0, 1, 1); |
| 1458 | |
| 1459 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1460 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1461 | } |
| 1462 | |
| 1463 | void Cinematic_DoEndTransitioncxx . . $ Cinematic_DoEndTransition(49f6e7a06ebc5aa8).(void) { |
| 1464 | if (!GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition.) |
| 1465 | return; |
| 1466 | |
| 1467 | if (Gametimecxx . . $ Gametime. > GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time.) { |
| 1468 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1469 | return; |
| 1470 | } |
| 1471 | |
| 1472 | if (Gametimecxx . . $ Gametime. < GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time.) { |
| 1473 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1474 | return; |
| 1475 | } |
| 1476 | |
| 1477 | float time_in = Gametimecxx . . $ Gametime. - GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time.; |
| 1478 | float time_full = GameCinemacxx . . $ GameCinema..end_transition_end_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_end_time. - GameCinemacxx . . $ GameCinema..end_transition_start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_start_time.; |
| 1479 | float perc = time_in / time_full; |
| 1480 | |
| 1481 | if (perc < 0.0f) |
| 1482 | perc = 0.0f; |
| 1483 | if (perc > 1.0f) |
| 1484 | perc = 1.0f; |
| 1485 | |
| 1486 | switch (GameCinemacxx . . $ GameCinema..end_transition_typecxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#end_transition_type.) { |
| 1487 | case GCTT_WACKYcxx . . $ `Descent3/gamecinematics_external.h:189:9`!: { |
| 1488 | if (gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1489 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1490 | return; |
| 1491 | } |
| 1492 | int w, h; |
| 1493 | w = bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle., 0); |
| 1494 | h = bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle., 0); |
| 1495 | |
| 1496 | float wscale, hscale; |
| 1497 | wscale = (float)(Max_window_wcxx . . $ Max_window_w.) / (float)(w); |
| 1498 | hscale = (float)(Max_window_hcxx . . $ Max_window_h.) / (float)(h); |
| 1499 | |
| 1500 | if (wscale < hscale) { |
| 1501 | float whratio = (float)(w) / (float)(h); |
| 1502 | |
| 1503 | // width is bigger |
| 1504 | h = Max_window_hcxx . . $ Max_window_h. * whratio; |
| 1505 | w = Max_window_wcxx . . $ Max_window_w.; |
| 1506 | } else { |
| 1507 | float hwratio = (float)(h) / (float)(w); |
| 1508 | |
| 1509 | // height is bigger |
| 1510 | h = Max_window_hcxx . . $ Max_window_h.; |
| 1511 | w = Max_window_wcxx . . $ Max_window_w. * hwratio; |
| 1512 | } |
| 1513 | |
| 1514 | float ratio = 0.0f; |
| 1515 | |
| 1516 | if (perc < 0.5f) { |
| 1517 | // small->large |
| 1518 | ratio = perc / 0.5f; |
| 1519 | } else { |
| 1520 | // large->small |
| 1521 | ratio = 1.0f - ((perc - 0.5f) / 0.5f); |
| 1522 | } |
| 1523 | |
| 1524 | w *= ratio; |
| 1525 | h *= ratio; |
| 1526 | |
| 1527 | int x, y; |
| 1528 | |
| 1529 | x = (Max_window_wcxx . . $ Max_window_w. / 2) - (w / 2); |
| 1530 | y = (Max_window_hcxx . . $ Max_window_h. / 2) - (h / 2); |
| 1531 | |
| 1532 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_TEXTUREcxx . . $ `lib/renderer.h:401:9`!); |
| 1533 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1534 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1535 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1536 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1537 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1538 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1539 | |
| 1540 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(x, y, x + w, y + h, gc_wacky_bmp_handlecxx . . $ gc_wacky_bmp_handle., 0, 0, 1, 1); |
| 1541 | |
| 1542 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1543 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1544 | |
| 1545 | } break; |
| 1546 | |
| 1547 | case GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`!: { |
| 1548 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1549 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1550 | return; |
| 1551 | } |
| 1552 | |
| 1553 | float alpha = 1.0f - perc; |
| 1554 | |
| 1555 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_CONSTANTcxx . . $ `lib/renderer.h:400:9`!); |
| 1556 | rend_SetAlphaValuecxx . . $ rend_SetAlphaValue(ac50b47256ae7414).(alpha * 255.0f); |
| 1557 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1558 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1559 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1560 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1561 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1562 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1563 | |
| 1564 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h., gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle., 0, 0, 1, 1); |
| 1565 | |
| 1566 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1567 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1568 | |
| 1569 | } break; |
| 1570 | |
| 1571 | case GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!: { |
| 1572 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1573 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1574 | return; |
| 1575 | } |
| 1576 | |
| 1577 | float alpha = 0.0f; |
| 1578 | |
| 1579 | if (perc < 0.5f) { |
| 1580 | // transparent->opaque |
| 1581 | alpha = perc / 0.5f; |
| 1582 | } else { |
| 1583 | // opaque->transparent |
| 1584 | alpha = 1.0f - ((perc - 0.5f) / 0.5f); |
| 1585 | } |
| 1586 | |
| 1587 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_CONSTANTcxx . . $ `lib/renderer.h:400:9`!); |
| 1588 | rend_SetAlphaValuecxx . . $ rend_SetAlphaValue(ac50b47256ae7414).(alpha * 255.0f); |
| 1589 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1590 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1591 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1592 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1593 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1594 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1595 | |
| 1596 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h., gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle., 0, 0, 1, 1); |
| 1597 | |
| 1598 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1599 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1600 | |
| 1601 | } break; |
| 1602 | case GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!: { |
| 1603 | if (gc_fade_bmp_handlecxx . . $ gc_fade_bmp_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1604 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1605 | return; |
| 1606 | } |
| 1607 | |
| 1608 | #define CUTOFFcxx . . $ `Descent3/gamecinematics.cpp:1608:9`! 0.8f |
| 1609 | |
| 1610 | float alpha; |
| 1611 | bool use_white; |
| 1612 | if (perc < CUTOFFcxx . . $ `Descent3/gamecinematics.cpp:1608:9`!) { |
| 1613 | // to white |
| 1614 | alpha = perc / CUTOFFcxx . . $ `Descent3/gamecinematics.cpp:1608:9`!; |
| 1615 | use_white = true; |
| 1616 | } else { |
| 1617 | // to black |
| 1618 | alpha = 1.0f; |
| 1619 | use_white = false; |
| 1620 | } |
| 1621 | |
| 1622 | rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_CONSTANTcxx . . $ `lib/renderer.h:400:9`!); |
| 1623 | rend_SetAlphaValuecxx . . $ rend_SetAlphaValue(ac50b47256ae7414).(alpha * 255.0f); |
| 1624 | rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.); |
| 1625 | rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_MONOcxx . . $ CM_MONO.); |
| 1626 | rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!); |
| 1627 | rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.); |
| 1628 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(0); |
| 1629 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0); |
| 1630 | |
| 1631 | if (use_white) { |
| 1632 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h., gc_fadewhite_bmp_handlecxx . . $ gc_fadewhite_bmp_handle., 0, 0, 1, 1); |
| 1633 | } else { |
| 1634 | if (gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1635 | float fade_out_perc = 1.0f - ((perc - CUTOFFcxx . . $ `Descent3/gamecinematics.cpp:1608:9`!) / (1.0f - CUTOFFcxx . . $ `Descent3/gamecinematics.cpp:1608:9`!)); |
| 1636 | int grey = 255.0f * fade_out_perc; |
| 1637 | uint16_tcxx . . $ uint16_t# *data = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle., 0); |
| 1638 | int i, size = 32 * 32; |
| 1639 | |
| 1640 | for (i = 0; i < size; i++) |
| 1641 | data[i] = GR_RGB16cxx . . $ GR_RGB16(6461fafb79bad5b9).(grey, grey, grey) | OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!; |
| 1642 | |
| 1643 | GameBitmapscxx . . $ GameBitmaps.[gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle.].flagscxx . . $ bms_bitmap#flags. |= BF_CHANGEDcxx . . $ `lib/bitmap.h:46:9`!; |
| 1644 | |
| 1645 | rend_DrawScaledBitmapcxx . . $ rend_DrawScaledBitmap(bffd21ce5f93b71b).(0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h., gc_temp_bmp_handlecxx . . $ gc_temp_bmp_handle., 0, 0, 1, 1); |
| 1646 | } |
| 1647 | } |
| 1648 | |
| 1649 | rend_SetFilteringcxx . . $ rend_SetFiltering(4af4fd0e2b26c4ac).(1); |
| 1650 | rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1); |
| 1651 | |
| 1652 | } break; |
| 1653 | |
| 1654 | case GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!: |
| 1655 | GameCinemacxx . . $ GameCinema..doing_end_transitioncxx . . $ $anonymous_type_4acd0a58d5fe86d1_0#doing_end_transition. = false; |
| 1656 | return; |
| 1657 | break; |
| 1658 | } |
| 1659 | } |
| 1660 | |
| 1661 | float Cine_GetPathTravelSpeedcxx . . $ Cine_GetPathTravelSpeed(d7799857c894622e).(int pathnum, float time) { |
| 1662 | float velocity_to_use = 75.0f; |
| 1663 | |
| 1664 | // determine velocity based on distance to travel on path |
| 1665 | int num_nodes = GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes.; |
| 1666 | float distance; |
| 1667 | distance = 0; |
| 1668 | |
| 1669 | for (int n = 0; n < num_nodes - 1; n++) { |
| 1670 | distance += vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[n].poscxx . . $ node#pos., &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[n + 1].poscxx . . $ node#pos.); |
| 1671 | } |
| 1672 | |
| 1673 | if (time > 0) |
| 1674 | velocity_to_use = distance / time; |
| 1675 | |
| 1676 | return velocity_to_use; |
| 1677 | } |
| 1678 | |
| 1679 | /* |
| 1680 | *********************************************************************** |
| 1681 | Intro Movie Canned Cinematic |
| 1682 | *********************************************************************** |
| 1683 | */ |
| 1684 | |
| 1685 | structcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2# { |
| 1686 | int player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#player_path.; |
| 1687 | float cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#cinematic_time.; |
| 1688 | bool should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust.; |
| 1689 | } CannedCinematicIntrocxx . . $ CannedCinematicIntro.; |
| 1690 | |
| 1691 | void CannedCinematicIntroCallbackcxx . . $ CannedCinematicIntroCallback(d4f767463ce0a6b3).(int type) { |
| 1692 | switch (type) { |
| 1693 | case GCCT_STARTcxx . . $ `Descent3/gamecinematics_external.h:183:9`!: { |
| 1694 | // start the player on the path |
| 1695 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "START PLAYER ON PATH\n"); |
| 1696 | |
| 1697 | // determine how fast they need to travel |
| 1698 | int pathnum = CannedCinematicIntrocxx . . $ CannedCinematicIntro..player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#player_path.; |
| 1699 | float velocity = Cine_GetPathTravelSpeedcxx . . $ Cine_GetPathTravelSpeed(d7799857c894622e).(pathnum, CannedCinematicIntrocxx . . $ CannedCinematicIntro..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#cinematic_time.); |
| 1700 | |
| 1701 | SuspendControlscxx . . $ SuspendControls(49f6e7a06ebc5aa8).(); |
| 1702 | |
| 1703 | if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum. > -1) { |
| 1704 | objectcxx . . $ object# *playerobj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]; |
| 1705 | ClearPlayerFiringcxx . . $ ClearPlayerFiring(766a1b7183ffa4b4).(playerobj, PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!); |
| 1706 | ClearPlayerFiringcxx . . $ ClearPlayerFiring(766a1b7183ffa4b4).(playerobj, PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!); |
| 1707 | } |
| 1708 | |
| 1709 | PlayerSetControlToAIcxx . . $ PlayerSetControlToAI(43c79ee2f1b9aefe).(Player_numcxx . . $ Player_num., velocity); |
| 1710 | |
| 1711 | // move the target (player) to the first node of the path |
| 1712 | // this makes it multiplayer friendly since this will only be called |
| 1713 | // in a single player game |
| 1714 | vectorcxx . . $ vector# pos; |
| 1715 | matrixcxx . . $ matrix# orient; |
| 1716 | int roomnum; |
| 1717 | int next_node; |
| 1718 | |
| 1719 | if (pathnum == -1) { |
| 1720 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "ILLEGAL PATH FOR PLAYER\n"); |
| 1721 | break; |
| 1722 | } |
| 1723 | |
| 1724 | if (GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. > 1) { |
| 1725 | next_node = 1; |
| 1726 | vectorcxx . . $ vector# fvec = GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[1].poscxx . . $ node#pos. -cxx . . $ operator-(b77b703cd1e43e33). GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 1727 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &fvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1728 | |
| 1729 | // see if it is a hacked 2 node path (i.e. its such a small distance he should move |
| 1730 | if (GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. == 2) { |
| 1731 | if (fabscxx . . $ fabs(fbcf3211dfe1bfd1).(vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[1].poscxx . . $ node#pos., &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.)) > |
| 1732 | 30.0f) { |
| 1733 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust. = true; |
| 1734 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Player should thrust\n"); |
| 1735 | } else { |
| 1736 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust. = false; |
| 1737 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Player should NOT thrust\n"); |
| 1738 | } |
| 1739 | } else { |
| 1740 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust. = true; |
| 1741 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Player should thrust\n"); |
| 1742 | } |
| 1743 | } else { |
| 1744 | next_node = 0; |
| 1745 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust. = false; |
| 1746 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Player should NOT thrust\n"); |
| 1747 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].fveccxx . . $ node#fvec., &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].uveccxx . . $ node#uvec., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1748 | } |
| 1749 | pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 1750 | roomnum = GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].roomnumcxx . . $ node#roomnum.; |
| 1751 | |
| 1752 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(Player_objectcxx . . $ Player_object., &pos, roomnum, &orient, true); |
| 1753 | |
| 1754 | if (CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust.) { |
| 1755 | // Set up path info |
| 1756 | path_informationcxx . . $ path_information# pi; |
| 1757 | pi.path_idcxx . . $ path_information#path_id. = pathnum; |
| 1758 | pi.start_nodecxx . . $ path_information#start_node. = 0; |
| 1759 | pi.next_nodecxx . . $ path_information#next_node. = next_node; |
| 1760 | pi.end_nodecxx . . $ path_information#end_node. = GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 1761 | |
| 1762 | // Make the player follow the path |
| 1763 | GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(Player_objectcxx . . $ Player_object., AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!, (void *)&pi, 0, 1.0f, GF_ORIENT_PATH_NODEcxx . . $ `Descent3/aistruct_external.h:237:9`! | GF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:224:9`!); |
| 1764 | } |
| 1765 | } break; |
| 1766 | case GCCT_STOPcxx . . $ `Descent3/gamecinematics_external.h:184:9`!: { |
| 1767 | // stop the player on the path |
| 1768 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "STOP PLAYER ON PATH\n"); |
| 1769 | ResetPlayerControlTypecxx . . $ ResetPlayerControlType(d4f767463ce0a6b3).(Player_numcxx . . $ Player_num.); |
| 1770 | ResumeControlscxx . . $ ResumeControls(49f6e7a06ebc5aa8).(); |
| 1771 | |
| 1772 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&Player_objectcxx . . $ Player_object.->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.); |
| 1773 | |
| 1774 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 1775 | |
| 1776 | } break; |
| 1777 | case GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`!: { |
| 1778 | if (CannedCinematicIntrocxx . . $ CannedCinematicIntro..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#should_thrust.) |
| 1779 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. |= PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 1780 | else |
| 1781 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 1782 | } break; |
| 1783 | } |
| 1784 | } |
| 1785 | |
| 1786 | void CannedCinematic_Introcxx . . $ CannedCinematic_Intro(f0b38ffdd91e5d66).(int PathID, const char *Text, int PlayerPath, float Seconds, int camera_handle) { |
| 1787 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#player_path. = PlayerPath; |
| 1788 | CannedCinematicIntrocxx . . $ CannedCinematicIntro..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_2#cinematic_time. = Seconds; |
| 1789 | |
| 1790 | tGameCinematiccxx . . $ tGameCinematic# info; |
| 1791 | info.flagscxx . . $ tGameCinematic#flags. = 0; |
| 1792 | info.flagscxx . . $ tGameCinematic#flags. = (GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`! | GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`! | GCF_TEXT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:164:9`! | GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`! | GCF_FORCETARGETTOENDcxx . . $ `Descent3/gamecinematics_external.h:175:9`!); |
| 1793 | info.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = Player_objectcxx . . $ Player_object.->handlecxx . . $ object#handle.; |
| 1794 | info.max_time_playcxx . . $ tGameCinematic#max_time_play. = Seconds; |
| 1795 | info.callbackcxx . . $ tGameCinematic#callback. = CannedCinematicIntroCallbackcxx . . $ CannedCinematicIntroCallback(d4f767463ce0a6b3).; |
| 1796 | info.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = 0.40f; |
| 1797 | info.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = 0.80f; |
| 1798 | info.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1799 | info.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1800 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1801 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1802 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1803 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1804 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = 0.25f; |
| 1805 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1806 | |
| 1807 | info.end_transitioncxx . . $ tGameCinematic#end_transition. = GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!; |
| 1808 | info.start_transitioncxx . . $ tGameCinematic#start_transition. = GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`!; |
| 1809 | info.pathidcxx . . $ tGameCinematic#pathid. = PathID; |
| 1810 | |
| 1811 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&info, Text, camera_handle); |
| 1812 | } |
| 1813 | |
| 1814 | structcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3# { |
| 1815 | int player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#player_path.; |
| 1816 | float cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#cinematic_time.; |
| 1817 | bool should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust.; |
| 1818 | } CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel.; |
| 1819 | extern bool EndLevelcxx . . $ EndLevel(c9857a73d68e59ba).(); |
| 1820 | |
| 1821 | void CannedCinematicEndLevelCallbackcxx . . $ CannedCinematicEndLevelCallback(d4f767463ce0a6b3).(int type) { |
| 1822 | switch (type) { |
| 1823 | case GCCT_STARTcxx . . $ `Descent3/gamecinematics_external.h:183:9`!: { |
| 1824 | // if the player is dead, bring them back from the dead |
| 1825 | if ((Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. & PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!) || (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!)) { |
| 1826 | // the player is currently dead |
| 1827 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bringing player back from the dead\n"); |
| 1828 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. &= ~(PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`! | PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!); |
| 1829 | Player_objectcxx . . $ Player_object.->shieldscxx . . $ object#shields. = 1.0f; |
| 1830 | } |
| 1831 | |
| 1832 | // Make player invulnerable |
| 1833 | MakePlayerInvulnerablecxx . . $ MakePlayerInvulnerable(a421cb528a2d8d2f).(Player_numcxx . . $ Player_num., CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#cinematic_time., false); |
| 1834 | |
| 1835 | // start the player on the path |
| 1836 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "START PLAYER ON PATH\n"); |
| 1837 | |
| 1838 | // determine how fast they need to travel |
| 1839 | int pathnum = CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#player_path.; |
| 1840 | |
| 1841 | if (pathnum == -1) { |
| 1842 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "ILLEGAL PATH FOR PLAYER\n"); |
| 1843 | break; |
| 1844 | } |
| 1845 | |
| 1846 | float velocity = Cine_GetPathTravelSpeedcxx . . $ Cine_GetPathTravelSpeed(d7799857c894622e).(pathnum, CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#cinematic_time.); |
| 1847 | |
| 1848 | SuspendControlscxx . . $ SuspendControls(49f6e7a06ebc5aa8).(); |
| 1849 | if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum. > -1) { |
| 1850 | objectcxx . . $ object# *playerobj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]; |
| 1851 | ClearPlayerFiringcxx . . $ ClearPlayerFiring(766a1b7183ffa4b4).(playerobj, PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!); |
| 1852 | ClearPlayerFiringcxx . . $ ClearPlayerFiring(766a1b7183ffa4b4).(playerobj, PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!); |
| 1853 | } |
| 1854 | |
| 1855 | PlayerSetControlToAIcxx . . $ PlayerSetControlToAI(43c79ee2f1b9aefe).(Player_numcxx . . $ Player_num., velocity); |
| 1856 | |
| 1857 | // move the target (player) to the first node of the path |
| 1858 | // this makes it multiplayer friendly since this will only be called |
| 1859 | // in a single player game |
| 1860 | vectorcxx . . $ vector# pos; |
| 1861 | matrixcxx . . $ matrix# orient; |
| 1862 | int roomnum; |
| 1863 | int next_node; |
| 1864 | |
| 1865 | if (GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. > 1) { |
| 1866 | next_node = 1; |
| 1867 | vectorcxx . . $ vector# fvec = GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[1].poscxx . . $ node#pos. -cxx . . $ operator-(b77b703cd1e43e33). GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 1868 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &fvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1869 | |
| 1870 | if (GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. == 2) { |
| 1871 | if (fabscxx . . $ fabs(fbcf3211dfe1bfd1).(vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[1].poscxx . . $ node#pos., &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.)) > |
| 1872 | 30.0f) { |
| 1873 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust. = true; |
| 1874 | } else { |
| 1875 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust. = false; |
| 1876 | } |
| 1877 | } else { |
| 1878 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust. = true; |
| 1879 | } |
| 1880 | } else { |
| 1881 | next_node = 0; |
| 1882 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].fveccxx . . $ node#fvec., &GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].uveccxx . . $ node#uvec., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1883 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust. = false; |
| 1884 | } |
| 1885 | pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].poscxx . . $ node#pos.; |
| 1886 | roomnum = GamePathscxx . . $ GamePaths.[pathnum].pathnodescxx . . $ game_path#pathnodes.[0].roomnumcxx . . $ node#roomnum.; |
| 1887 | |
| 1888 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(Player_objectcxx . . $ Player_object., &pos, roomnum, &orient, true); |
| 1889 | |
| 1890 | if (CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust.) { |
| 1891 | |
| 1892 | // Set up path info |
| 1893 | path_informationcxx . . $ path_information# pi; |
| 1894 | pi.path_idcxx . . $ path_information#path_id. = pathnum; |
| 1895 | pi.start_nodecxx . . $ path_information#start_node. = 0; |
| 1896 | pi.next_nodecxx . . $ path_information#next_node. = next_node; |
| 1897 | pi.end_nodecxx . . $ path_information#end_node. = GamePathscxx . . $ GamePaths.[pathnum].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 1898 | |
| 1899 | // Make the player follow the path |
| 1900 | GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(Player_objectcxx . . $ Player_object., AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!, (void *)&pi, 0, 1.0f, GF_ORIENT_PATH_NODEcxx . . $ `Descent3/aistruct_external.h:237:9`! | GF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:224:9`!); |
| 1901 | } |
| 1902 | } break; |
| 1903 | case GCCT_STOPcxx . . $ `Descent3/gamecinematics_external.h:184:9`!: { |
| 1904 | // stop the player on the path |
| 1905 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "STOP PLAYER ON PATH\n"); |
| 1906 | ResetPlayerControlTypecxx . . $ ResetPlayerControlType(d4f767463ce0a6b3).(Player_numcxx . . $ Player_num.); |
| 1907 | ResumeControlscxx . . $ ResumeControls(49f6e7a06ebc5aa8).(); |
| 1908 | |
| 1909 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&Player_objectcxx . . $ Player_object.->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.); |
| 1910 | |
| 1911 | SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 1912 | } break; |
| 1913 | case GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`!: { |
| 1914 | if (CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..should_thrustcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#should_thrust.) |
| 1915 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. |= PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 1916 | else |
| 1917 | Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 1918 | } break; |
| 1919 | } |
| 1920 | } |
| 1921 | |
| 1922 | void CannedCinematic_EndLevelPathcxx . . $ CannedCinematic_EndLevelPath(f0b38ffdd91e5d66).(int PathID, const char *Text, int PlayerPath, float Seconds, int camera_handle) { |
| 1923 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#player_path. = PlayerPath; |
| 1924 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#cinematic_time. = Seconds; |
| 1925 | |
| 1926 | tGameCinematiccxx . . $ tGameCinematic# info; |
| 1927 | info.flagscxx . . $ tGameCinematic#flags. = 0; |
| 1928 | info.flagscxx . . $ tGameCinematic#flags. = (GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`! | GCF_USEPATHcxx . . $ `Descent3/gamecinematics_external.h:159:9`! | GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`! | GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`! | GCF_FORCETARGETTOENDcxx . . $ `Descent3/gamecinematics_external.h:175:9`! | |
| 1929 | GCF_DONTRESTOREVIEWERcxx . . $ `Descent3/gamecinematics_external.h:177:9`!); |
| 1930 | info.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = Player_objectcxx . . $ Player_object.->handlecxx . . $ object#handle.; |
| 1931 | info.max_time_playcxx . . $ tGameCinematic#max_time_play. = Seconds; |
| 1932 | info.callbackcxx . . $ tGameCinematic#callback. = CannedCinematicEndLevelCallbackcxx . . $ CannedCinematicEndLevelCallback(d4f767463ce0a6b3).; |
| 1933 | info.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = 0.40f; |
| 1934 | info.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = 0.80f; |
| 1935 | info.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1936 | info.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1937 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1938 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1939 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1940 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1941 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = 1.0f; |
| 1942 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1943 | |
| 1944 | info.end_transitioncxx . . $ tGameCinematic#end_transition. = GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!; |
| 1945 | info.start_transitioncxx . . $ tGameCinematic#start_transition. = GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`!; |
| 1946 | info.pathidcxx . . $ tGameCinematic#pathid. = PathID; |
| 1947 | |
| 1948 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&info, Text, camera_handle); |
| 1949 | } |
| 1950 | |
| 1951 | void CannedCinematic_EndLevelPointcxx . . $ CannedCinematic_EndLevelPoint(2a027840dfd00599).(vectorcxx . . $ vector# *pos, int room, const char *Text, int PlayerPath, float Seconds, |
| 1952 | int camera_handle) { |
| 1953 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..player_pathcxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#player_path. = PlayerPath; |
| 1954 | CannedCinematicEndLevelcxx . . $ CannedCinematicEndLevel..cinematic_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_3#cinematic_time. = Seconds; |
| 1955 | |
| 1956 | tGameCinematiccxx . . $ tGameCinematic# info; |
| 1957 | info.flagscxx . . $ tGameCinematic#flags. = 0; |
| 1958 | info.flagscxx . . $ tGameCinematic#flags. = (GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`! | GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`! | GCF_TEXT_WIPEINcxx . . $ `Descent3/gamecinematics_external.h:163:9`! | GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`! | GCF_FORCETARGETTOENDcxx . . $ `Descent3/gamecinematics_external.h:175:9`! | |
| 1959 | GCF_DONTRESTOREVIEWERcxx . . $ `Descent3/gamecinematics_external.h:177:9`!); |
| 1960 | info.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = Player_objectcxx . . $ Player_object.->handlecxx . . $ object#handle.; |
| 1961 | info.max_time_playcxx . . $ tGameCinematic#max_time_play. = Seconds; |
| 1962 | info.callbackcxx . . $ tGameCinematic#callback. = CannedCinematicEndLevelCallbackcxx . . $ CannedCinematicEndLevelCallback(d4f767463ce0a6b3).; |
| 1963 | info.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = 0.40f; |
| 1964 | info.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = 0.80f; |
| 1965 | info.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1966 | info.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1967 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1968 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1969 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = 0.0f; |
| 1970 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1971 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = 1.0f; |
| 1972 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 1973 | info.end_transitioncxx . . $ tGameCinematic#end_transition. = GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!; |
| 1974 | info.start_transitioncxx . . $ tGameCinematic#start_transition. = GCTT_FADEcxx . . $ `Descent3/gamecinematics_external.h:190:9`!; |
| 1975 | |
| 1976 | info.positioncxx . . $ tGameCinematic#position. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *pos; |
| 1977 | info.roomcxx . . $ tGameCinematic#room. = room; |
| 1978 | info.orientcxx . . $ tGameCinematic#orient. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1979 | |
| 1980 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&info, Text, camera_handle); |
| 1981 | } |
| 1982 | |
| 1983 | structcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4# { |
| 1984 | objectcxx . . $ object# *playercxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#player.; |
| 1985 | int roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#room.; |
| 1986 | vectorcxx . . $ vector# poscxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#pos.; |
| 1987 | matrixcxx . . $ matrix# orientcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#orient.; |
| 1988 | } CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade.; |
| 1989 | |
| 1990 | void CannedCinematicMovePlayerFadeCallbackcxx . . $ CannedCinematicMovePlayerFadeCallback(d4f767463ce0a6b3).(int type) { |
| 1991 | switch (type) { |
| 1992 | case GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`!: |
| 1993 | objectcxx . . $ object# *player = CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..playercxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#player.; |
| 1994 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(player, &CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..poscxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#pos., CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#room., |
| 1995 | &CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..orientcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#orient., true); |
| 1996 | break; |
| 1997 | } |
| 1998 | } |
| 1999 | |
| 2000 | void CannedCinematic_MovePlayerFadecxx . . $ CannedCinematic_MovePlayerFade(a6a0a45dc3a450).(objectcxx . . $ object# *player, int room, vectorcxx . . $ vector# *pos, matrixcxx . . $ matrix# *orient, int camera_handle) { |
| 2001 | CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..playercxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#player. = player; |
| 2002 | CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..roomcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#room. = room; |
| 2003 | CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..poscxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *pos; |
| 2004 | CannedCinematicMovePlayerFadecxx . . $ CannedCinematicMovePlayerFade..orientcxx . . $ $anonymous_type_4acd0a58d5fe86d1_4#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). *orient; |
| 2005 | |
| 2006 | tGameCinematiccxx . . $ tGameCinematic# info; |
| 2007 | info.flagscxx . . $ tGameCinematic#flags. = 0; |
| 2008 | info.flagscxx . . $ tGameCinematic#flags. = (GCF_FULLSCREENcxx . . $ `Descent3/gamecinematics_external.h:156:9`! | GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`! | GCF_TEXT_NOEFFECTcxx . . $ `Descent3/gamecinematics_external.h:165:9`! | GCF_LAYOUT_BOTTOMcxx . . $ `Descent3/gamecinematics_external.h:168:9`!); |
| 2009 | info.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2010 | info.max_time_playcxx . . $ tGameCinematic#max_time_play. = 1.0f; |
| 2011 | info.callbackcxx . . $ tGameCinematic#callback. = CannedCinematicMovePlayerFadeCallbackcxx . . $ CannedCinematicMovePlayerFadeCallback(d4f767463ce0a6b3).; |
| 2012 | info.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2013 | info.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2014 | info.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2015 | info.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2016 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2017 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2018 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = 0.0f; |
| 2019 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2020 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2021 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2022 | info.end_transitioncxx . . $ tGameCinematic#end_transition. = GCTT_FADEINOUTcxx . . $ `Descent3/gamecinematics_external.h:191:9`!; |
| 2023 | info.start_transitioncxx . . $ tGameCinematic#start_transition. = GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!; |
| 2024 | |
| 2025 | info.positioncxx . . $ tGameCinematic#position. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). player->poscxx . . $ object#pos.; |
| 2026 | info.roomcxx . . $ tGameCinematic#room. = player->roomnumcxx . . $ object#roomnum.; |
| 2027 | info.orientcxx . . $ tGameCinematic#orient. = &player->orientcxx . . $ object#orient.; |
| 2028 | |
| 2029 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&info, "", camera_handle); |
| 2030 | } |
| 2031 | |
| 2032 | structcxx . . $ $anonymous_type_4acd0a58d5fe86d1_5# { |
| 2033 | float start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_5#start_time.; |
| 2034 | float max_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_5#max_time.; |
| 2035 | } CannedCinematicLevelEndFadeWhitecxx . . $ CannedCinematicLevelEndFadeWhite.; |
| 2036 | |
| 2037 | void CannedCinematicLevelEndFadeWhiteCallbackcxx . . $ CannedCinematicLevelEndFadeWhiteCallback(d4f767463ce0a6b3).(int type) { |
| 2038 | switch (type) { |
| 2039 | case GCCT_STARTcxx . . $ `Descent3/gamecinematics_external.h:183:9`!: |
| 2040 | break; |
| 2041 | case GCCT_FRAMEcxx . . $ `Descent3/gamecinematics_external.h:185:9`!: |
| 2042 | break; |
| 2043 | case GCCT_STOPcxx . . $ `Descent3/gamecinematics_external.h:184:9`!: |
| 2044 | SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 2045 | break; |
| 2046 | } |
| 2047 | } |
| 2048 | |
| 2049 | void CannedCinematic_LevelEndFadeWhitecxx . . $ CannedCinematic_LevelEndFadeWhite(818fb24820cdd2d5).(int camera_handle, float time, const char *text_to_display) { |
| 2050 | CannedCinematicLevelEndFadeWhitecxx . . $ CannedCinematicLevelEndFadeWhite..start_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_5#start_time. = Gametimecxx . . $ Gametime.; |
| 2051 | CannedCinematicLevelEndFadeWhitecxx . . $ CannedCinematicLevelEndFadeWhite..max_timecxx . . $ $anonymous_type_4acd0a58d5fe86d1_5#max_time. = time; |
| 2052 | |
| 2053 | tGameCinematiccxx . . $ tGameCinematic# info; |
| 2054 | info.flagscxx . . $ tGameCinematic#flags. = (GCF_LETTERBOXcxx . . $ `Descent3/gamecinematics_external.h:155:9`! | GCF_USEPOINTcxx . . $ `Descent3/gamecinematics_external.h:160:9`! | GCF_TEXT_NOEFFECTcxx . . $ `Descent3/gamecinematics_external.h:165:9`! | GCF_LAYOUT_MIDDLEcxx . . $ `Descent3/gamecinematics_external.h:170:9`! | GCF_DONTRESTOREVIEWERcxx . . $ `Descent3/gamecinematics_external.h:177:9`! | |
| 2055 | GCF_IGNOREPLAYERDEADcxx . . $ `Descent3/gamecinematics_external.h:179:9`! | GCF_DOTRANSBEFORETEXTcxx . . $ `Descent3/gamecinematics_external.h:180:9`!); |
| 2056 | info.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2057 | info.max_time_playcxx . . $ tGameCinematic#max_time_play. = time; |
| 2058 | info.callbackcxx . . $ tGameCinematic#callback. = CannedCinematicLevelEndFadeWhiteCallbackcxx . . $ CannedCinematicLevelEndFadeWhiteCallback(d4f767463ce0a6b3).; |
| 2059 | info.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = 0.0f; |
| 2060 | info.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2061 | info.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2062 | info.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2063 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2064 | info.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2065 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2066 | info.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2067 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = 1.0f; |
| 2068 | info.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = 1.0f; |
| 2069 | info.end_transitioncxx . . $ tGameCinematic#end_transition. = GCTT_FADEWHITEcxx . . $ `Descent3/gamecinematics_external.h:192:9`!; |
| 2070 | info.start_transitioncxx . . $ tGameCinematic#start_transition. = GCTT_NONEcxx . . $ `Descent3/gamecinematics_external.h:188:9`!; |
| 2071 | |
| 2072 | info.positioncxx . . $ tGameCinematic#position. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Player_objectcxx . . $ Player_object.->poscxx . . $ object#pos.; |
| 2073 | info.roomcxx . . $ tGameCinematic#room. = Player_objectcxx . . $ Player_object.->roomnumcxx . . $ object#roomnum.; |
| 2074 | info.orientcxx . . $ tGameCinematic#orient. = &Player_objectcxx . . $ Player_object.->orientcxx . . $ object#orient.; |
| 2075 | |
| 2076 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&info, (text_to_display) ? text_to_display : "", camera_handle); |
| 2077 | } |
| 2078 | |
| 2079 | //============================================================================== |
| 2080 | // Canned Cinematic interface |
| 2081 | |
| 2082 | void Cinematic_DoFakeCannedCinematicscxx . . $ Cinematic_DoFakeCannedCinematics(30a3d576421cb7a4).(tCannedCinematicInfocxx . . $ tCannedCinematicInfo# *info) { |
| 2083 | switch (info->typecxx . . $ tCannedCinematicInfo#type.) { |
| 2084 | case CANNED_LEVEL_INTROcxx . . $ `Descent3/gamecinematics_external.h:93:9`!: |
| 2085 | break; |
| 2086 | case CANNED_LEVEL_END_PATHcxx . . $ `Descent3/gamecinematics_external.h:94:9`!: |
| 2087 | case CANNED_LEVEL_END_POINTcxx . . $ `Descent3/gamecinematics_external.h:95:9`!: |
| 2088 | case CANNED_LEVEL_END_FADE_WHITEcxx . . $ `Descent3/gamecinematics_external.h:97:9`!: |
| 2089 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 2090 | MultiEndLevelcxx . . $ MultiEndLevel(49f6e7a06ebc5aa8).(); |
| 2091 | } else { |
| 2092 | SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 2093 | } |
| 2094 | break; |
| 2095 | case CANNED_MOVE_PLAYER_FADEcxx . . $ `Descent3/gamecinematics_external.h:96:9`!: |
| 2096 | break; |
| 2097 | } |
| 2098 | } |
| 2099 | |
| 2100 | void Cinematic_StartCannedScriptcxx . . $ Cinematic_StartCannedScript(30a3d576421cb7a4).(tCannedCinematicInfocxx . . $ tCannedCinematicInfo# *info) { |
| 2101 | if (Demo_flagscxx . . $ Demo_flags. == DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`!) |
| 2102 | return; // demo system calls Cinematic_StartCanned itself |
| 2103 | |
| 2104 | Cinematic_StartCannedcxx . . $ Cinematic_StartCanned(82030af976e0116c).(info); |
| 2105 | } |
| 2106 | |
| 2107 | void Cinematic_StartCannedcxx . . $ Cinematic_StartCanned(82030af976e0116c).(tCannedCinematicInfocxx . . $ tCannedCinematicInfo# *info, int camera_handle) { |
| 2108 | if (Cinematic_inusecxx . . $ Cinematic_inuse.) { |
| 2109 | tGameCinematiccxx . . $ tGameCinematic# gc; |
| 2110 | memset(&gc, 0, sizeof(tGameCinematiccxx . . $ tGameCinematic#)); |
| 2111 | switch (info->typecxx . . $ tCannedCinematicInfo#type.) { |
| 2112 | case CANNED_LEVEL_INTROcxx . . $ `Descent3/gamecinematics_external.h:93:9`!: |
| 2113 | case CANNED_LEVEL_END_PATHcxx . . $ `Descent3/gamecinematics_external.h:94:9`!: |
| 2114 | case CANNED_LEVEL_END_POINTcxx . . $ `Descent3/gamecinematics_external.h:95:9`!: |
| 2115 | case CANNED_MOVE_PLAYER_FADEcxx . . $ `Descent3/gamecinematics_external.h:96:9`!: |
| 2116 | case CANNED_LEVEL_END_FADE_WHITEcxx . . $ `Descent3/gamecinematics_external.h:97:9`!: |
| 2117 | gc.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = Player_objectcxx . . $ Player_object.->handlecxx . . $ object#handle.; |
| 2118 | break; |
| 2119 | default: { |
| 2120 | gc.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2121 | } break; |
| 2122 | } |
| 2123 | |
| 2124 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(&gc); |
| 2125 | Cinematic_DoFakeCannedCinematicscxx . . $ Cinematic_DoFakeCannedCinematics(30a3d576421cb7a4).(info); |
| 2126 | if (camera_handle != -1) |
| 2127 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_handle); |
| 2128 | return; |
| 2129 | } |
| 2130 | |
| 2131 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 2132 | tGameCinematiccxx . . $ tGameCinematic# gc; |
| 2133 | memset(&gc, 0, sizeof(tGameCinematiccxx . . $ tGameCinematic#)); |
| 2134 | switch (info->typecxx . . $ tCannedCinematicInfo#type.) { |
| 2135 | case CANNED_LEVEL_INTROcxx . . $ `Descent3/gamecinematics_external.h:93:9`!: |
| 2136 | case CANNED_LEVEL_END_PATHcxx . . $ `Descent3/gamecinematics_external.h:94:9`!: |
| 2137 | case CANNED_LEVEL_END_POINTcxx . . $ `Descent3/gamecinematics_external.h:95:9`!: |
| 2138 | case CANNED_MOVE_PLAYER_FADEcxx . . $ `Descent3/gamecinematics_external.h:96:9`!: |
| 2139 | case CANNED_LEVEL_END_FADE_WHITEcxx . . $ `Descent3/gamecinematics_external.h:97:9`!: |
| 2140 | gc.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = Player_objectcxx . . $ Player_object.->handlecxx . . $ object#handle.; |
| 2141 | break; |
| 2142 | default: { |
| 2143 | gc.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2144 | } break; |
| 2145 | } |
| 2146 | |
| 2147 | Cinematic_SetForFakeCinematiccxx . . $ Cinematic_SetForFakeCinematic(83c97bda212be1e7).(&gc); |
| 2148 | Cinematic_DoFakeCannedCinematicscxx . . $ Cinematic_DoFakeCannedCinematics(30a3d576421cb7a4).(info); |
| 2149 | if (camera_handle != -1) |
| 2150 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_handle); |
| 2151 | return; // no cinematics in multiplayer |
| 2152 | } |
| 2153 | |
| 2154 | if (camera_handle == -1) { |
| 2155 | // when playing back a demo, this should have a value |
| 2156 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(Demo_flags != DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`!); |
| 2157 | camera_handle = Cinematics_CreateCameracxx . . $ Cinematics_CreateCamera(b126dc7c1de90089).(); |
| 2158 | } |
| 2159 | |
| 2160 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 2161 | tCinematicDemoInfocxx . . $ tCinematicDemoInfo# demo_data; |
| 2162 | demo_data.cinematic_typecxx . . $ tCinematicDemoInfo#cinematic_type. = CDI_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:273:9`!; |
| 2163 | demo_data.text_stringcxx . . $ tCinematicDemoInfo#text_string. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2164 | demo_data.canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data. = info; |
| 2165 | demo_data.camera_objhandlecxx . . $ tCinematicDemoInfo#camera_objhandle. = camera_handle; |
| 2166 | Cinematic_WriteDemoFileDatacxx . . $ Cinematic_WriteDemoFileData(94428571cf5c5a65).(&demo_data); |
| 2167 | } |
| 2168 | |
| 2169 | switch (info->typecxx . . $ tCannedCinematicInfo#type.) { |
| 2170 | case CANNED_LEVEL_INTROcxx . . $ `Descent3/gamecinematics_external.h:93:9`!: |
| 2171 | CannedCinematic_Introcxx . . $ CannedCinematic_Intro(f0b38ffdd91e5d66).(info->camera_pathidcxx . . $ tCannedCinematicInfo#camera_pathid., info->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display., info->target_pathidcxx . . $ tCannedCinematicInfo#target_pathid., info->timecxx . . $ tCannedCinematicInfo#time., camera_handle); |
| 2172 | break; |
| 2173 | case CANNED_LEVEL_END_PATHcxx . . $ `Descent3/gamecinematics_external.h:94:9`!: |
| 2174 | CannedCinematic_EndLevelPathcxx . . $ CannedCinematic_EndLevelPath(f0b38ffdd91e5d66).(info->camera_pathidcxx . . $ tCannedCinematicInfo#camera_pathid., info->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display., info->target_pathidcxx . . $ tCannedCinematicInfo#target_pathid., info->timecxx . . $ tCannedCinematicInfo#time., |
| 2175 | camera_handle); |
| 2176 | break; |
| 2177 | case CANNED_LEVEL_END_POINTcxx . . $ `Descent3/gamecinematics_external.h:95:9`!: { |
| 2178 | objectcxx . . $ object# *cam = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(info->object_to_use_for_pointcxx . . $ tCannedCinematicInfo#object_to_use_for_point.); |
| 2179 | if (cam) { |
| 2180 | CannedCinematic_EndLevelPointcxx . . $ CannedCinematic_EndLevelPoint(2a027840dfd00599).(&cam->poscxx . . $ object#pos., cam->roomnumcxx . . $ object#roomnum., info->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display., info->target_pathidcxx . . $ tCannedCinematicInfo#target_pathid., info->timecxx . . $ tCannedCinematicInfo#time., |
| 2181 | camera_handle); |
| 2182 | } else { |
| 2183 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Passed in object handle for canned cinematic (level end) for camera position does not exist\n"); |
| 2184 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_handle); |
| 2185 | SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 2186 | } |
| 2187 | } break; |
| 2188 | case CANNED_MOVE_PLAYER_FADEcxx . . $ `Descent3/gamecinematics_external.h:96:9`!: { |
| 2189 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(info->target_objhandlecxx . . $ tCannedCinematicInfo#target_objhandle.); |
| 2190 | if (!player || player->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 2191 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid player passed to CANNED_MOVE_PLAYER_FADE\n"); |
| 2192 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_handle); |
| 2193 | return; |
| 2194 | } |
| 2195 | |
| 2196 | CannedCinematic_MovePlayerFadecxx . . $ CannedCinematic_MovePlayerFade(a6a0a45dc3a450).(player, info->roomcxx . . $ tCannedCinematicInfo#room., &info->poscxx . . $ tCannedCinematicInfo#pos., &info->orientcxx . . $ tCannedCinematicInfo#orient., camera_handle); |
| 2197 | |
| 2198 | } break; |
| 2199 | case CANNED_LEVEL_END_FADE_WHITEcxx . . $ `Descent3/gamecinematics_external.h:97:9`!: { |
| 2200 | CannedCinematic_LevelEndFadeWhitecxx . . $ CannedCinematic_LevelEndFadeWhite(818fb24820cdd2d5).(camera_handle, info->timecxx . . $ tCannedCinematicInfo#time., info->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display.); |
| 2201 | } break; |
| 2202 | default: { |
| 2203 | Cinematic_DeleteCameracxx . . $ Cinematic_DeleteCamera(d4f767463ce0a6b3).(camera_handle); |
| 2204 | } break; |
| 2205 | } |
| 2206 | } |
| 2207 | |
| 2208 | //================================================== |
| 2209 | // Demo file support |
| 2210 | //================================================== |
| 2211 | static void mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, int data); |
| 2212 | static void mf_WriteShortcxx . . $ mf_WriteShort(6c8a7537152b2ec).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, int16_t data); |
| 2213 | static void mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# data); |
| 2214 | static void mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, float data); |
| 2215 | static void mf_WriteBytescxx . . $ mf_WriteBytes(848ba6763c953e0e).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# *data, int len); |
| 2216 | static void mf_WriteStringcxx . . $ mf_WriteString(6ad544f2a1c8341c).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, const char *string); |
| 2217 | static int mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer); |
| 2218 | static int16_t mf_ReadShortcxx . . $ mf_ReadShort(82c3ad32bc1210f5).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer); |
| 2219 | static uint8_tcxx . . $ uint8_t# mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer); |
| 2220 | static float mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer); |
| 2221 | static void mf_ReadBytescxx . . $ mf_ReadBytes(848ba6763c953e0e).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# *data, int len); |
| 2222 | static void mf_ReadStringcxx . . $ mf_ReadString(1be23879e92b01e8).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, char *string); |
| 2223 | |
| 2224 | void Cinematic_DoDemoFileDatacxx . . $ Cinematic_DoDemoFileData(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *buffer) { |
| 2225 | int count = 0; |
| 2226 | char text_string[512]; |
| 2227 | tCannedCinematicInfocxx . . $ tCannedCinematicInfo# canned_data; |
| 2228 | tGameCinematiccxx . . $ tGameCinematic# cinematic_data; |
| 2229 | int old_camera_objnum, camera_objnum, camera_handle; |
| 2230 | |
| 2231 | // see what kind of cinematic we are loading |
| 2232 | switch (mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(buffer, &count)) { |
| 2233 | case CDI_NOT_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:272:9`!: { |
| 2234 | matrixcxx . . $ matrix# fake_orient; |
| 2235 | vm_MakeIdentitycxx . . $ vm_MakeIdentity(dca75c48c9ab5b54).(&fake_orient); |
| 2236 | |
| 2237 | cinematic_data.orientcxx . . $ tGameCinematic#orient. = &fake_orient; |
| 2238 | cinematic_data.callbackcxx . . $ tGameCinematic#callback. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2239 | cinematic_data.flagscxx . . $ tGameCinematic#flags. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2240 | cinematic_data.target_objhandlecxx . . $ tGameCinematic#target_objhandle. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2241 | cinematic_data.end_transitioncxx . . $ tGameCinematic#end_transition. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2242 | cinematic_data.start_transitioncxx . . $ tGameCinematic#start_transition. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2243 | cinematic_data.pathidcxx . . $ tGameCinematic#pathid. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2244 | cinematic_data.positioncxx . . $ tGameCinematic#position..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2245 | cinematic_data.positioncxx . . $ tGameCinematic#position..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2246 | cinematic_data.positioncxx . . $ tGameCinematic#position..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2247 | cinematic_data.roomcxx . . $ tGameCinematic#room. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2248 | if (mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(buffer, &count)) { |
| 2249 | fake_orient.fveccxx . . $ matrix#fvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2250 | fake_orient.fveccxx . . $ matrix#fvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2251 | fake_orient.fveccxx . . $ matrix#fvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2252 | fake_orient.uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2253 | fake_orient.uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2254 | fake_orient.uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2255 | fake_orient.rveccxx . . $ matrix#rvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2256 | fake_orient.rveccxx . . $ matrix#rvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2257 | fake_orient.rveccxx . . $ matrix#rvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2258 | } |
| 2259 | |
| 2260 | cinematic_data.max_time_playcxx . . $ tGameCinematic#max_time_play. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2261 | cinematic_data.text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2262 | cinematic_data.text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2263 | cinematic_data.track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2264 | cinematic_data.track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2265 | cinematic_data.player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2266 | cinematic_data.player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2267 | cinematic_data.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2268 | cinematic_data.in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2269 | cinematic_data.quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2270 | cinematic_data.quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2271 | mf_ReadStringcxx . . $ mf_ReadString(1be23879e92b01e8).(buffer, &count, text_string); |
| 2272 | |
| 2273 | old_camera_objnum = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2274 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(old_camera_objnum >= 0 && old_camera_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 2275 | camera_objnum = Demo_obj_mapcxx . . $ Demo_obj_map.[old_camera_objnum]; |
| 2276 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(camera_objnum >= 0 && camera_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`! && Objects[camera_objnum].type == OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!); |
| 2277 | camera_handle = Objectscxx . . $ Objects.[camera_objnum].handlecxx . . $ object#handle.; |
| 2278 | |
| 2279 | Cinematic_StartCinecxx . . $ Cinematic_StartCine(a76b701ae5c10f4a).(&cinematic_data, text_string, camera_handle); |
| 2280 | |
| 2281 | } break; |
| 2282 | case CDI_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:273:9`!: { |
| 2283 | canned_data.typecxx . . $ tCannedCinematicInfo#type. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2284 | canned_data.camera_pathidcxx . . $ tCannedCinematicInfo#camera_pathid. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2285 | canned_data.target_pathidcxx . . $ tCannedCinematicInfo#target_pathid. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2286 | canned_data.target_objhandlecxx . . $ tCannedCinematicInfo#target_objhandle. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2287 | canned_data.timecxx . . $ tCannedCinematicInfo#time. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2288 | canned_data.object_to_use_for_pointcxx . . $ tCannedCinematicInfo#object_to_use_for_point. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2289 | canned_data.roomcxx . . $ tCannedCinematicInfo#room. = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2290 | canned_data.poscxx . . $ tCannedCinematicInfo#pos..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2291 | canned_data.poscxx . . $ tCannedCinematicInfo#pos..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2292 | canned_data.poscxx . . $ tCannedCinematicInfo#pos..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2293 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2294 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2295 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2296 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2297 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2298 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2299 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..xcxx . . $ vector#x. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2300 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..ycxx . . $ vector#y. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2301 | canned_data.orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..zcxx . . $ vector#z. = mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(buffer, &count); |
| 2302 | |
| 2303 | mf_ReadStringcxx . . $ mf_ReadString(1be23879e92b01e8).(buffer, &count, text_string); |
| 2304 | canned_data.text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display. = text_string; |
| 2305 | |
| 2306 | old_camera_objnum = mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(buffer, &count); |
| 2307 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(old_camera_objnum >= 0 && old_camera_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 2308 | camera_objnum = Demo_obj_mapcxx . . $ Demo_obj_map.[old_camera_objnum]; |
| 2309 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(camera_objnum >= 0 && camera_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`! && Objects[camera_objnum].type == OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!); |
| 2310 | camera_handle = Objectscxx . . $ Objects.[camera_objnum].handlecxx . . $ object#handle.; |
| 2311 | |
| 2312 | Cinematic_StartCannedcxx . . $ Cinematic_StartCanned(82030af976e0116c).(&canned_data, camera_handle); |
| 2313 | |
| 2314 | } break; |
| 2315 | } |
| 2316 | } |
| 2317 | |
| 2318 | void Cinematic_WriteDemoFileDatacxx . . $ Cinematic_WriteDemoFileData(94428571cf5c5a65).(tCinematicDemoInfocxx . . $ tCinematicDemoInfo# *info) { |
| 2319 | uint8_tcxx . . $ uint8_t# buffer[1500]; |
| 2320 | int count = 0; |
| 2321 | |
| 2322 | // what kind of cinematic are we saving |
| 2323 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, &count, info->cinematic_typecxx . . $ tCinematicDemoInfo#cinematic_type.); |
| 2324 | |
| 2325 | switch (info->cinematic_typecxx . . $ tCinematicDemoInfo#cinematic_type.) { |
| 2326 | case CDI_NOT_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:272:9`!: { |
| 2327 | |
| 2328 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->flagscxx . . $ tGameCinematic#flags.); |
| 2329 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->target_objhandlecxx . . $ tGameCinematic#target_objhandle.); |
| 2330 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->end_transitioncxx . . $ tGameCinematic#end_transition.); |
| 2331 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->start_transitioncxx . . $ tGameCinematic#start_transition.); |
| 2332 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->pathidcxx . . $ tGameCinematic#pathid.); |
| 2333 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->positioncxx . . $ tGameCinematic#position..xcxx . . $ vector#x.); |
| 2334 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->positioncxx . . $ tGameCinematic#position..ycxx . . $ vector#y.); |
| 2335 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->positioncxx . . $ tGameCinematic#position..zcxx . . $ vector#z.); |
| 2336 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->roomcxx . . $ tGameCinematic#room.); |
| 2337 | |
| 2338 | if (info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.) { |
| 2339 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, &count, 1); |
| 2340 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->fveccxx . . $ matrix#fvec..xcxx . . $ vector#x.); |
| 2341 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->fveccxx . . $ matrix#fvec..ycxx . . $ vector#y.); |
| 2342 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->fveccxx . . $ matrix#fvec..zcxx . . $ vector#z.); |
| 2343 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->uveccxx . . $ matrix#uvec..xcxx . . $ vector#x.); |
| 2344 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->uveccxx . . $ matrix#uvec..ycxx . . $ vector#y.); |
| 2345 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->uveccxx . . $ matrix#uvec..zcxx . . $ vector#z.); |
| 2346 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->rveccxx . . $ matrix#rvec..xcxx . . $ vector#x.); |
| 2347 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->rveccxx . . $ matrix#rvec..ycxx . . $ vector#y.); |
| 2348 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->orientcxx . . $ tGameCinematic#orient.->rveccxx . . $ matrix#rvec..zcxx . . $ vector#z.); |
| 2349 | |
| 2350 | } else { |
| 2351 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, &count, 0); |
| 2352 | } |
| 2353 | |
| 2354 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->max_time_playcxx . . $ tGameCinematic#max_time_play.); |
| 2355 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->text_displaycxx . . $ tGameCinematic#text_display..maxcxx . . $ PercentageRange#max.); |
| 2356 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->text_displaycxx . . $ tGameCinematic#text_display..mincxx . . $ PercentageRange#min.); |
| 2357 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->track_targetcxx . . $ tGameCinematic#track_target..maxcxx . . $ PercentageRange#max.); |
| 2358 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->track_targetcxx . . $ tGameCinematic#track_target..mincxx . . $ PercentageRange#min.); |
| 2359 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->player_disabledcxx . . $ tGameCinematic#player_disabled..maxcxx . . $ PercentageRange#max.); |
| 2360 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->player_disabledcxx . . $ tGameCinematic#player_disabled..mincxx . . $ PercentageRange#min.); |
| 2361 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->in_camera_viewcxx . . $ tGameCinematic#in_camera_view..maxcxx . . $ PercentageRange#max.); |
| 2362 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->in_camera_viewcxx . . $ tGameCinematic#in_camera_view..mincxx . . $ PercentageRange#min.); |
| 2363 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->quick_exitcxx . . $ tGameCinematic#quick_exit..maxcxx . . $ PercentageRange#max.); |
| 2364 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->cinematic_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#cinematic_data.->quick_exitcxx . . $ tGameCinematic#quick_exit..mincxx . . $ PercentageRange#min.); |
| 2365 | |
| 2366 | if (info->text_stringcxx . . $ tCinematicDemoInfo#text_string.) |
| 2367 | mf_WriteStringcxx . . $ mf_WriteString(6ad544f2a1c8341c).(buffer, &count, info->text_stringcxx . . $ tCinematicDemoInfo#text_string.); |
| 2368 | else |
| 2369 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, &count, 0); |
| 2370 | |
| 2371 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(info->camera_objhandlecxx . . $ tCinematicDemoInfo#camera_objhandle.); |
| 2372 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj && obj->type == OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!); |
| 2373 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, OBJNUMcxx . . $ `Descent3/object.h:700:9`!(obj)); |
| 2374 | |
| 2375 | } break; |
| 2376 | case CDI_CANNEDcxx . . $ `Descent3/gamecinematics.cpp:273:9`!: { |
| 2377 | |
| 2378 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->typecxx . . $ tCannedCinematicInfo#type.); |
| 2379 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->camera_pathidcxx . . $ tCannedCinematicInfo#camera_pathid.); |
| 2380 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->target_pathidcxx . . $ tCannedCinematicInfo#target_pathid.); |
| 2381 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->target_objhandlecxx . . $ tCannedCinematicInfo#target_objhandle.); |
| 2382 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->timecxx . . $ tCannedCinematicInfo#time.); |
| 2383 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->object_to_use_for_pointcxx . . $ tCannedCinematicInfo#object_to_use_for_point.); |
| 2384 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->roomcxx . . $ tCannedCinematicInfo#room.); |
| 2385 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->poscxx . . $ tCannedCinematicInfo#pos..xcxx . . $ vector#x.); |
| 2386 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->poscxx . . $ tCannedCinematicInfo#pos..ycxx . . $ vector#y.); |
| 2387 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->poscxx . . $ tCannedCinematicInfo#pos..zcxx . . $ vector#z.); |
| 2388 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..xcxx . . $ vector#x.); |
| 2389 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..ycxx . . $ vector#y.); |
| 2390 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..fveccxx . . $ matrix#fvec..zcxx . . $ vector#z.); |
| 2391 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..xcxx . . $ vector#x.); |
| 2392 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..ycxx . . $ vector#y.); |
| 2393 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..uveccxx . . $ matrix#uvec..zcxx . . $ vector#z.); |
| 2394 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..xcxx . . $ vector#x.); |
| 2395 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..ycxx . . $ vector#y.); |
| 2396 | mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->orientcxx . . $ tCannedCinematicInfo#orient..rveccxx . . $ matrix#rvec..zcxx . . $ vector#z.); |
| 2397 | |
| 2398 | if (info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display.) |
| 2399 | mf_WriteStringcxx . . $ mf_WriteString(6ad544f2a1c8341c).(buffer, &count, info->canned_datacxx . . $ tCinematicDemoInfo#$anonymous_type_1#canned_data.->text_to_displaycxx . . $ tCannedCinematicInfo#text_to_display.); |
| 2400 | else |
| 2401 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, &count, 0); |
| 2402 | |
| 2403 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(info->camera_objhandlecxx . . $ tCinematicDemoInfo#camera_objhandle.); |
| 2404 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj && obj->type == OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`!); |
| 2405 | mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(buffer, &count, OBJNUMcxx . . $ `Descent3/object.h:700:9`!(obj)); |
| 2406 | |
| 2407 | } break; |
| 2408 | } |
| 2409 | |
| 2410 | DemoWriteCinematicscxx . . $ DemoWriteCinematics(5f425e2ac950790c).(buffer, count); |
| 2411 | } |
| 2412 | |
| 2413 | void mf_WriteIntcxx . . $ mf_WriteInt(13e9d0583eaf7eb4).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, int data) { |
| 2414 | memcpy(&buffer[(*pointer)], &data, sizeof(int)); |
| 2415 | (*pointer) += sizeof(int); |
| 2416 | } |
| 2417 | |
| 2418 | void mf_WriteShortcxx . . $ mf_WriteShort(6c8a7537152b2ec).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, int16_t data) { |
| 2419 | memcpy(&buffer[(*pointer)], &data, sizeof(int16_t)); |
| 2420 | (*pointer) += sizeof(int16_t); |
| 2421 | } |
| 2422 | |
| 2423 | void mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# data) { |
| 2424 | memcpy(&buffer[(*pointer)], &data, sizeof(uint8_tcxx . . $ uint8_t#)); |
| 2425 | (*pointer) += sizeof(uint8_tcxx . . $ uint8_t#); |
| 2426 | } |
| 2427 | |
| 2428 | void mf_WriteFloatcxx . . $ mf_WriteFloat(5bff2d99695c72c5).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, float data) { |
| 2429 | memcpy(&buffer[(*pointer)], &data, sizeof(float)); |
| 2430 | (*pointer) += sizeof(float); |
| 2431 | } |
| 2432 | |
| 2433 | void mf_WriteBytescxx . . $ mf_WriteBytes(848ba6763c953e0e).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# *data, int len) { |
| 2434 | memcpy(&buffer[(*pointer)], data, len); |
| 2435 | (*pointer) += len; |
| 2436 | } |
| 2437 | |
| 2438 | void mf_WriteStringcxx . . $ mf_WriteString(6ad544f2a1c8341c).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, const char *string) { |
| 2439 | while (*string) { |
| 2440 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, pointer, (*string)); |
| 2441 | string++; |
| 2442 | } |
| 2443 | mf_WriteBytecxx . . $ mf_WriteByte(c99d45faf09534).(buffer, pointer, (*string)); |
| 2444 | } |
| 2445 | |
| 2446 | int mf_ReadIntcxx . . $ mf_ReadInt(7337501fe74387bd).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer) { |
| 2447 | int value; |
| 2448 | memcpy(&value, &buffer[(*pointer)], sizeof(value)); |
| 2449 | (*pointer) += sizeof(value); |
| 2450 | return value; |
| 2451 | } |
| 2452 | |
| 2453 | int16_t mf_ReadShortcxx . . $ mf_ReadShort(82c3ad32bc1210f5).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer) { |
| 2454 | int16_t value; |
| 2455 | memcpy(&value, &buffer[(*pointer)], sizeof(value)); |
| 2456 | (*pointer) += sizeof(value); |
| 2457 | return value; |
| 2458 | } |
| 2459 | |
| 2460 | uint8_tcxx . . $ uint8_t# mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer) { |
| 2461 | uint8_tcxx . . $ uint8_t# value; |
| 2462 | memcpy(&value, &buffer[(*pointer)], sizeof(value)); |
| 2463 | (*pointer) += sizeof(value); |
| 2464 | return value; |
| 2465 | } |
| 2466 | |
| 2467 | float mf_ReadFloatcxx . . $ mf_ReadFloat(fe244d2c191680c4).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer) { |
| 2468 | float value; |
| 2469 | memcpy(&value, &buffer[(*pointer)], sizeof(value)); |
| 2470 | (*pointer) += sizeof(value); |
| 2471 | return value; |
| 2472 | } |
| 2473 | |
| 2474 | void mf_ReadBytescxx . . $ mf_ReadBytes(848ba6763c953e0e).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, uint8_tcxx . . $ uint8_t# *data, int len) { |
| 2475 | memcpy(data, &buffer[(*pointer)], len); |
| 2476 | (*pointer) += len; |
| 2477 | } |
| 2478 | |
| 2479 | void mf_ReadStringcxx . . $ mf_ReadString(1be23879e92b01e8).(uint8_tcxx . . $ uint8_t# *buffer, int *pointer, char *string) { |
| 2480 | uint8_tcxx . . $ uint8_t# data; |
| 2481 | data = mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(buffer, pointer); |
| 2482 | while (data) { |
| 2483 | *string = data; |
| 2484 | string++; |
| 2485 | data = mf_ReadBytecxx . . $ mf_ReadByte(96e36f15bd3e0281).(buffer, pointer); |
| 2486 | } |
| 2487 | *string = '\0'; |
| 2488 | } |