| 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/TelComEffects.cpp $ |
| 21 | * $Revision: 33 $ |
| 22 | * $Date: 5/13/99 3:42p $ |
| 23 | * $Author: Ardussi $ |
| 24 | * |
| 25 | * TelCom Effect class defines |
| 26 | * |
| 27 | * $Log: /DescentIII/Main/TelComEffects.cpp $ |
| 28 | * |
| 29 | * 33 5/13/99 3:42p Ardussi |
| 30 | * changes for compiling on the Mac |
| 31 | * |
| 32 | * 32 4/14/99 3:57a Jeff |
| 33 | * fixed case mismatch in #includes |
| 34 | * |
| 35 | * 31 2/17/99 6:55p Jeff |
| 36 | * added jump button type. Added no early render flag for bitmaps. Fixed |
| 37 | * color bug for type text |
| 38 | * |
| 39 | * 30 2/16/99 11:54a Jeff |
| 40 | * fixed bug with 0 length strings |
| 41 | * |
| 42 | * 29 2/05/99 7:04p Jeff |
| 43 | * table file parsing macros put in |
| 44 | * |
| 45 | * 28 2/03/99 1:23p Jeff |
| 46 | * more updates to single player ship selection...all thats left is stats |
| 47 | * |
| 48 | * 27 2/03/99 12:14a Jeff |
| 49 | * updated single player ship selection to full functional...needs effects |
| 50 | * added in. Had to add flag to buttons for gain focus to register as a |
| 51 | * click |
| 52 | * |
| 53 | * 26 2/02/99 7:32p Jeff |
| 54 | * begining of single player ship selection |
| 55 | * |
| 56 | * 25 11/01/98 1:57a Jeff |
| 57 | * converted the vsprintf calls to use the Pvsprintf, which is a safe |
| 58 | * vsprintf, no buffer overflows allowed |
| 59 | * |
| 60 | * 24 10/12/98 11:39p Jeff |
| 61 | * finished up new focus system of telcom |
| 62 | * |
| 63 | * 23 10/12/98 8:32p Jeff |
| 64 | * changed the way focus is handled |
| 65 | * |
| 66 | * 22 10/08/98 4:23p Kevin |
| 67 | * Changed code to comply with memory library usage. Always use mem_malloc |
| 68 | * , mem_free and mem_strdup |
| 69 | * |
| 70 | * 21 9/17/98 2:29p Jeff |
| 71 | * added focus filenames to button effect |
| 72 | * |
| 73 | * 20 8/27/98 2:51p Jeff |
| 74 | * New TelCom finally checked in |
| 75 | * |
| 76 | * 19 8/19/98 1:38p Jeff |
| 77 | * removed update2dsound |
| 78 | * |
| 79 | * 18 6/15/98 4:00p Jason |
| 80 | * replaced monochromatic polymodel lighting with rgb lighting |
| 81 | * |
| 82 | * 17 5/19/98 3:40p Jeff |
| 83 | * poly models functional |
| 84 | * |
| 85 | * 16 5/15/98 5:16p Jeff |
| 86 | * use regular draw chunk bitmap |
| 87 | * |
| 88 | * 15 5/11/98 6:21p Jeff |
| 89 | * fixed setting glitch offsets |
| 90 | * |
| 91 | * 14 5/07/98 3:31p Jeff |
| 92 | * various optimizations, removed Copy and similar functions |
| 93 | * |
| 94 | * 13 5/05/98 6:50p Jeff |
| 95 | * Telcom doesn't use rend_DrawLFBitmap anymore...more speed! |
| 96 | * |
| 97 | * 12 5/04/98 6:22p Jeff |
| 98 | * fixed possible sound bugs |
| 99 | * |
| 100 | * 11 5/04/98 5:29p Jeff |
| 101 | * Added sounds to TelCom events |
| 102 | * |
| 103 | * 10 5/04/98 1:35p Jeff |
| 104 | * Changes made for mouse handling |
| 105 | * |
| 106 | * 9 5/04/98 11:01a Jeff |
| 107 | * added scroll parameter to text |
| 108 | * |
| 109 | * 8 5/03/98 7:57p Jeff |
| 110 | * Got scrolling textboxes working |
| 111 | * |
| 112 | * 7 5/01/98 2:17p Jeff |
| 113 | * Added sound effect support |
| 114 | * |
| 115 | * 6 4/30/98 7:18p Jeff |
| 116 | * fixed poly model rotation |
| 117 | * |
| 118 | * 5 4/29/98 4:36p Jeff |
| 119 | * fixed text going beyond bottom of text box |
| 120 | * |
| 121 | * 4 4/28/98 6:58p Jeff |
| 122 | * Added new poly model effect driver |
| 123 | * |
| 124 | * 3 4/26/98 7:20p Jeff |
| 125 | * Added the rest of the effect drivers except for scrolling text. Added |
| 126 | * invert bitmaps and stretch bitmaps |
| 127 | * |
| 128 | * 2 4/26/98 2:54a Jeff |
| 129 | * Initial Creation |
| 130 | * |
| 131 | * 1 4/25/98 4:23p Jeff |
| 132 | * |
| 133 | * $NoKeywords: $ |
| 134 | */ |
| 135 | |
| 136 | #include <cstdarg> |
| 137 | #include <cstdio> |
| 138 | |
| 139 | #include "TelComEffects.h"cxx . . $ `<file>/Descent3/TelComEffects.h`/ |
| 140 | #include "mem.h"cxx . . $ `<file>/mem/mem.h`/ |
| 141 | #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/ |
| 142 | #include <string.h> |
| 143 | #include "textaux.h"cxx . . $ `<file>/lib/textaux.h`/ |
| 144 | #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/ |
| 145 | #include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/ |
| 146 | |
| 147 | tceffectcxx . . $ tceffect# TCEffectscxx . . $ TCEffects.[MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!]; |
| 148 | int Screen_rootscxx . . $ Screen_roots.[MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!]; |
| 149 | static bool Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!]; |
| 150 | |
| 151 | // Initializes the effects |
| 152 | void EfxInitcxx . . $ EfxInit(49f6e7a06ebc5aa8).(void) { |
| 153 | int i; |
| 154 | |
| 155 | for (i = 0; i < MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!; i++) { |
| 156 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[i]; |
| 157 | tce->typecxx . . $ tceffect#type. = EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!; |
| 158 | tce->monitorcxx . . $ tceffect#monitor. = -1; |
| 159 | tce->screencxx . . $ tceffect#screen. = -1; |
| 160 | tce->idcxx . . $ tceffect#id. = INVALID_EFFECT_IDcxx . . $ `Descent3/TelComEffects.h:175:9`!; |
| 161 | tce->prevcxx . . $ tceffect#prev. = -1; |
| 162 | tce->nextcxx . . $ tceffect#next. = -1; |
| 163 | tce->text_buffercxx . . $ tceffect#text_buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 164 | tce->tab_stopcxx . . $ tceffect#tab_stop. = false; |
| 165 | tce->has_focuscxx . . $ tceffect#has_focus. = false; |
| 166 | for (int j = 0; j < MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`!; j++) |
| 167 | tce->event_queuecxx . . $ tceffect#event_queue.[j].idcxx . . $ tTCEvent#id. = -1; |
| 168 | } |
| 169 | |
| 170 | for (i = 0; i < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!; i++) { |
| 171 | Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[i] = false; |
| 172 | Screen_rootscxx . . $ Screen_roots.[i] = -1; |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | // Shutdown of effects |
| 177 | void EfxClosecxx . . $ EfxClose(49f6e7a06ebc5aa8).(void) { |
| 178 | for (int i = 0; i < MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!; i++) { |
| 179 | if (TCEffectscxx . . $ TCEffects.[i].typecxx . . $ tceffect#type. != EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!) { |
| 180 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[i]; |
| 181 | EfxFreeEffectcxx . . $ EfxFreeEffect(81d02e5e28eb5e61).(tce); |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | // Destroys all the screens |
| 187 | void EfxDestroyAllScreenscxx . . $ EfxDestroyAllScreens(49f6e7a06ebc5aa8).(void) { |
| 188 | for (int i = 0; i < MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!; i++) { |
| 189 | if (TCEffectscxx . . $ TCEffects.[i].typecxx . . $ tceffect#type. != EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!) { |
| 190 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[i]; |
| 191 | EfxFreeEffectcxx . . $ EfxFreeEffect(81d02e5e28eb5e61).(tce); |
| 192 | } |
| 193 | } |
| 194 | EfxInitcxx . . $ EfxInit(49f6e7a06ebc5aa8).(); |
| 195 | } |
| 196 | |
| 197 | // Destroys the screens within a monitor |
| 198 | void EfxDestroyScreencxx . . $ EfxDestroyScreen(d4f767463ce0a6b3).(int screen) { |
| 199 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(screen >= 0 && screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 200 | int node = Screen_rootscxx . . $ Screen_roots.[screen]; |
| 201 | tceffectcxx . . $ tceffect# *tce; |
| 202 | while (node != -1) { |
| 203 | tce = &TCEffectscxx . . $ TCEffects.[node]; |
| 204 | node = TCEffectscxx . . $ TCEffects.[node].nextcxx . . $ tceffect#next.; |
| 205 | |
| 206 | EfxFreeEffectcxx . . $ EfxFreeEffect(81d02e5e28eb5e61).(tce); |
| 207 | tce->typecxx . . $ tceffect#type. = EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!; |
| 208 | tce->monitorcxx . . $ tceffect#monitor. = -1; |
| 209 | tce->screencxx . . $ tceffect#screen. = -1; |
| 210 | tce->prevcxx . . $ tceffect#prev. = tce->nextcxx . . $ tceffect#next. = -1; |
| 211 | tce->idcxx . . $ tceffect#id. = INVALID_EFFECT_IDcxx . . $ `Descent3/TelComEffects.h:175:9`!; |
| 212 | tce->text_buffercxx . . $ tceffect#text_buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 213 | for (int j = 0; j < MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`!; j++) |
| 214 | tce->event_queuecxx . . $ tceffect#event_queue.[j].idcxx . . $ tTCEvent#id. = -1; |
| 215 | } |
| 216 | Screen_rootscxx . . $ Screen_roots.[screen] = -1; |
| 217 | Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[screen] = false; |
| 218 | } |
| 219 | |
| 220 | // Creates an instance of an Effect |
| 221 | int EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(int type, int monitor, int screen, int id, bool is_tab_stop) { |
| 222 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(type != EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!); |
| 223 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(monitor >= 0 && monitor < MAX_MONITORcxx . . $ `Descent3/TelCom.h:100:9`!); |
| 224 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(screen >= 0 && screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 225 | |
| 226 | bool make_focus = false; |
| 227 | |
| 228 | // find an available index |
| 229 | for (int i = 0; i < MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!; i++) { |
| 230 | if (TCEffectscxx . . $ TCEffects.[i].typecxx . . $ tceffect#type. == EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!) { |
| 231 | // we found a slot |
| 232 | TCEffectscxx . . $ TCEffects.[i].typecxx . . $ tceffect#type. = type; |
| 233 | TCEffectscxx . . $ TCEffects.[i].monitorcxx . . $ tceffect#monitor. = monitor; |
| 234 | TCEffectscxx . . $ TCEffects.[i].screencxx . . $ tceffect#screen. = screen; |
| 235 | TCEffectscxx . . $ TCEffects.[i].idcxx . . $ tceffect#id. = id; |
| 236 | |
| 237 | if (is_tab_stop && !Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[screen]) { |
| 238 | // this effect should get focus |
| 239 | make_focus = true; |
| 240 | } |
| 241 | |
| 242 | EfxInitcxx . . $ EfxInit(67e45776e5bc3bc1).(&TCEffectscxx . . $ TCEffects.[i], is_tab_stop, make_focus); |
| 243 | return i; |
| 244 | } |
| 245 | } |
| 246 | return INVALID_EFFECT_HANDLEcxx . . $ `Descent3/TelComEffects.h:137:9`!; |
| 247 | } |
| 248 | |
| 249 | // Frees up any memory allocated for effect, sets type to EFX_NONE |
| 250 | void EfxFreeEffectcxx . . $ EfxFreeEffect(81d02e5e28eb5e61).(tceffectcxx . . $ tceffect# *tce) { |
| 251 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce); |
| 252 | |
| 253 | // unlink it out of the list |
| 254 | int prev, next; |
| 255 | prev = tce->prevcxx . . $ tceffect#prev.; |
| 256 | next = tce->nextcxx . . $ tceffect#next.; |
| 257 | |
| 258 | if (prev == -1) { |
| 259 | // removing a root |
| 260 | if (next != -1) { |
| 261 | Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.] = next; |
| 262 | } else { |
| 263 | Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.] = -1; |
| 264 | } |
| 265 | } else { |
| 266 | // removing a middle node |
| 267 | TCEffectscxx . . $ TCEffects.[prev].nextcxx . . $ tceffect#next. = next; |
| 268 | if (next != -1) |
| 269 | TCEffectscxx . . $ TCEffects.[next].prevcxx . . $ tceffect#prev. = prev; |
| 270 | } |
| 271 | tce->prevcxx . . $ tceffect#prev. = tce->nextcxx . . $ tceffect#next. = -1; |
| 272 | |
| 273 | if (tce->text_buffercxx . . $ tceffect#text_buffer.) { |
| 274 | mem_freecxx . . $ `mem/mem.h:80:9`!(tce->text_buffer); |
| 275 | tce->text_buffercxx . . $ tceffect#text_buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 276 | } |
| 277 | |
| 278 | if (tce->has_focuscxx . . $ tceffect#has_focus.) { |
| 279 | // disable the tab stop |
| 280 | tce->tab_stopcxx . . $ tceffect#tab_stop. = false; |
| 281 | |
| 282 | // uh oh, we're removing the item on the screen that has focus |
| 283 | Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[tce->screencxx . . $ tceffect#screen.] = false; |
| 284 | |
| 285 | // see if we can find another item and give it focus |
| 286 | int node = Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.]; |
| 287 | while (node != -1) { |
| 288 | if (TCEffectscxx . . $ TCEffects.[node].tab_stopcxx . . $ tceffect#tab_stop.) { |
| 289 | // ok we found some one with a tab stop, give em focus |
| 290 | TCEffectscxx . . $ TCEffects.[node].has_focuscxx . . $ tceffect#has_focus. = true; |
| 291 | Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[tce->screencxx . . $ tceffect#screen.] = true; |
| 292 | break; |
| 293 | } |
| 294 | node = TCEffectscxx . . $ TCEffects.[node].nextcxx . . $ tceffect#next.; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | int i; |
| 299 | |
| 300 | switch (tce->typecxx . . $ tceffect#type.) { |
| 301 | case EFX_TEXT_TYPEcxx . . $ `Descent3/TelComEffects.h:142:9`!: |
| 302 | TelcomStopSoundcxx . . $ TelcomStopSound(d4f767463ce0a6b3).(TCSND_TYPINGcxx . . $ `Descent3/TelCom.h:323:9`!); |
| 303 | break; |
| 304 | case EFX_TEXT_STATICcxx . . $ `Descent3/TelComEffects.h:141:9`!: |
| 305 | case EFX_TEXT_FADEcxx . . $ `Descent3/TelComEffects.h:143:9`!: |
| 306 | break; |
| 307 | case EFX_BMP_STATICcxx . . $ `Descent3/TelComEffects.h:144:9`!: |
| 308 | case EFX_BMP_BLURcxx . . $ `Descent3/TelComEffects.h:145:9`!: |
| 309 | case EFX_BMP_SCANLINEcxx . . $ `Descent3/TelComEffects.h:146:9`!: |
| 310 | case EFX_BMP_INVERTcxx . . $ `Descent3/TelComEffects.h:147:9`!: |
| 311 | case EFX_BMP_STRETCHcxx . . $ `Descent3/TelComEffects.h:148:9`!: |
| 312 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 313 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle.); |
| 314 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = -1; |
| 315 | |
| 316 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 317 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle.); |
| 318 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = -1; |
| 319 | |
| 320 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.) { |
| 321 | for (i = 0; i < tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_countcxx . . $ tBitmapInfo#bm_count.; i++) { |
| 322 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[i] > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 323 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[i]); |
| 324 | } |
| 325 | mem_freecxx . . $ `mem/mem.h:80:9`!(tce->bmpinfo.bitmaps); |
| 326 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 327 | } |
| 328 | |
| 329 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. != 0 || tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. != 0) { |
| 330 | bm_DestroyChunkedBitmapcxx . . $ bm_DestroyChunkedBitmap(1635f60f4d3c1317).(&tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp.); |
| 331 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 332 | } |
| 333 | break; |
| 334 | case EFX_BACKGROUNDcxx . . $ `Descent3/TelComEffects.h:149:9`!: |
| 335 | break; |
| 336 | case EFX_MOVIEcxx . . $ `Descent3/TelComEffects.h:150:9`!: |
| 337 | if (tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle.) { |
| 338 | EndMoviecxx . . $ EndMovie(3a711f4329c1fcf3).(tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle.); |
| 339 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 340 | } |
| 341 | |
| 342 | if (tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename.) { |
| 343 | mem_freecxx . . $ `mem/mem.h:80:9`!(tce->movieinfo.filename); |
| 344 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 345 | } |
| 346 | break; |
| 347 | case EFX_POLYMODELcxx . . $ `Descent3/TelComEffects.h:151:9`!: |
| 348 | break; |
| 349 | case EFX_SOUNDcxx . . $ `Descent3/TelComEffects.h:152:9`!: |
| 350 | break; |
| 351 | case EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!: |
| 352 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 353 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle.); |
| 354 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle. = -1; |
| 355 | |
| 356 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 357 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle.); |
| 358 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle. = -1; |
| 359 | |
| 360 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. != 0 || tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. != 0) { |
| 361 | bm_DestroyChunkedBitmapcxx . . $ bm_DestroyChunkedBitmap(1635f60f4d3c1317).(&tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp.); |
| 362 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 363 | } |
| 364 | |
| 365 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..pwcxx . . $ chunked_bitmap#pw. != 0 || tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..phcxx . . $ chunked_bitmap#ph. != 0) { |
| 366 | bm_DestroyChunkedBitmapcxx . . $ bm_DestroyChunkedBitmap(1635f60f4d3c1317).(&tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp.); |
| 367 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 368 | } |
| 369 | |
| 370 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 371 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle.); |
| 372 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle. = -1; |
| 373 | |
| 374 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 375 | bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle.); |
| 376 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle. = -1; |
| 377 | |
| 378 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..pwcxx . . $ chunked_bitmap#pw. != 0 || tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..phcxx . . $ chunked_bitmap#ph. != 0) { |
| 379 | bm_DestroyChunkedBitmapcxx . . $ bm_DestroyChunkedBitmap(1635f60f4d3c1317).(&tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk.); |
| 380 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..phcxx . . $ chunked_bitmap#ph. = 0; |
| 381 | } |
| 382 | |
| 383 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..pwcxx . . $ chunked_bitmap#pw. != 0 || tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..phcxx . . $ chunked_bitmap#ph. != 0) { |
| 384 | bm_DestroyChunkedBitmapcxx . . $ bm_DestroyChunkedBitmap(1635f60f4d3c1317).(&tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk.); |
| 385 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..phcxx . . $ chunked_bitmap#ph. = 0; |
| 386 | } |
| 387 | |
| 388 | break; |
| 389 | default: |
| 390 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // invalid type |
| 391 | break; |
| 392 | } |
| 393 | tce->typecxx . . $ tceffect#type. = EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!; |
| 394 | tce->monitorcxx . . $ tceffect#monitor. = -1; |
| 395 | } |
| 396 | |
| 397 | // Initializes an effect based on it's type |
| 398 | void EfxInitcxx . . $ EfxInit(67e45776e5bc3bc1).(tceffectcxx . . $ tceffect# *tce, bool tab_stop, bool gets_focus) { |
| 399 | |
| 400 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce); |
| 401 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce->type != EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!); |
| 402 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce->monitor >= 0 && tce->monitor < MAX_MONITORcxx . . $ `Descent3/TelCom.h:100:9`!); |
| 403 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce->screen >= 0 && tce->screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 404 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce >= TCEffects); |
| 405 | |
| 406 | // Link effect in |
| 407 | int root = Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.]; |
| 408 | int effect_num = (tce - TCEffectscxx . . $ TCEffects.); |
| 409 | tce->tab_stopcxx . . $ tceffect#tab_stop. = tab_stop; |
| 410 | tce->has_focuscxx . . $ tceffect#has_focus. = (tab_stop) ? gets_focus : false; |
| 411 | if (tce->has_focuscxx . . $ tceffect#has_focus.) { |
| 412 | // the screen has a definite focus, so set the global |
| 413 | Screen_has_effect_with_focuscxx . . $ Screen_has_effect_with_focus.[tce->screencxx . . $ tceffect#screen.] = true; |
| 414 | } |
| 415 | |
| 416 | if (root == -1) { |
| 417 | // no roots for this monitor, add it |
| 418 | Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.] = effect_num; |
| 419 | tce->prevcxx . . $ tceffect#prev. = -1; |
| 420 | tce->nextcxx . . $ tceffect#next. = -1; |
| 421 | } else { |
| 422 | // traverse until we get to the end, then add it |
| 423 | int curr, next = -1; |
| 424 | bool done = false; |
| 425 | |
| 426 | curr = root; |
| 427 | |
| 428 | if (tce->typecxx . . $ tceffect#type. == EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!) { |
| 429 | // go to the end of the list |
| 430 | while (!done) { |
| 431 | if (TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next. == -1) { |
| 432 | done = true; |
| 433 | } else { |
| 434 | curr = TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next.; |
| 435 | } |
| 436 | } |
| 437 | TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next. = effect_num; |
| 438 | TCEffectscxx . . $ TCEffects.[effect_num].prevcxx . . $ tceffect#prev. = curr; |
| 439 | TCEffectscxx . . $ TCEffects.[effect_num].nextcxx . . $ tceffect#next. = -1; |
| 440 | } else { |
| 441 | // go to where the buttons start |
| 442 | if (TCEffectscxx . . $ TCEffects.[root].typecxx . . $ tceffect#type. == EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!) { |
| 443 | // replace the root |
| 444 | Screen_rootscxx . . $ Screen_roots.[tce->screencxx . . $ tceffect#screen.] = effect_num; |
| 445 | TCEffectscxx . . $ TCEffects.[effect_num].prevcxx . . $ tceffect#prev. = -1; |
| 446 | TCEffectscxx . . $ TCEffects.[effect_num].nextcxx . . $ tceffect#next. = root; |
| 447 | TCEffectscxx . . $ TCEffects.[root].prevcxx . . $ tceffect#prev. = effect_num; |
| 448 | } else { |
| 449 | while (!done) { |
| 450 | if (TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next. == -1 || TCEffectscxx . . $ TCEffects.[TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next.].typecxx . . $ tceffect#type. == EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!) { |
| 451 | next = TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next.; |
| 452 | done = true; |
| 453 | } else { |
| 454 | curr = TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next.; |
| 455 | } |
| 456 | } |
| 457 | TCEffectscxx . . $ TCEffects.[curr].nextcxx . . $ tceffect#next. = effect_num; |
| 458 | TCEffectscxx . . $ TCEffects.[effect_num].prevcxx . . $ tceffect#prev. = curr; |
| 459 | TCEffectscxx . . $ TCEffects.[effect_num].nextcxx . . $ tceffect#next. = next; |
| 460 | } |
| 461 | } // end else |
| 462 | } // end else |
| 463 | |
| 464 | tce->pos_xcxx . . $ tceffect#pos_x. = tce->pos_ycxx . . $ tceffect#pos_y. = 0; |
| 465 | tce->text_buffercxx . . $ tceffect#text_buffer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 466 | tce->agecxx . . $ tceffect#age. = 0; |
| 467 | tce->flagscxx . . $ tceffect#flags. = 0; |
| 468 | tce->colorcxx . . $ tceffect#color. = GR_GREENcxx . . $ GR_GREEN.; |
| 469 | tce->wcxx . . $ tceffect#w. = tce->hcxx . . $ tceffect#h. = 0; |
| 470 | tce->speedcxx . . $ tceffect#speed. = 1.0f; |
| 471 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 472 | |
| 473 | // clear the event queue |
| 474 | for (int j = 0; j < MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`!; j++) |
| 475 | tce->event_queuecxx . . $ tceffect#event_queue.[j].idcxx . . $ tTCEvent#id. = -1; |
| 476 | |
| 477 | switch (tce->typecxx . . $ tceffect#type.) { |
| 478 | case EFX_TEXT_STATICcxx . . $ `Descent3/TelComEffects.h:141:9`!: |
| 479 | case EFX_TEXT_TYPEcxx . . $ `Descent3/TelComEffects.h:142:9`!: |
| 480 | case EFX_TEXT_FADEcxx . . $ `Descent3/TelComEffects.h:143:9`!: |
| 481 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..last_lettercxx . . $ tTextInfo#last_letter. = 0; |
| 482 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..sound_indexcxx . . $ tTextInfo#sound_index. = -1; |
| 483 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..font_indexcxx . . $ tTextInfo#font_index. = BRIEF_FONT_INDEXcxx . . $ `Descent3/gamefont.h:113:9`!; |
| 484 | ; |
| 485 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..line_indexcxx . . $ tTextInfo#line_index. = 0; |
| 486 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..scroll_ucxx . . $ tTextInfo#scroll_u. = tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..scroll_dcxx . . $ tTextInfo#scroll_d. = false; |
| 487 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..scrollcxx . . $ tTextInfo#scroll. = false; |
| 488 | break; |
| 489 | case EFX_BMP_STATICcxx . . $ `Descent3/TelComEffects.h:144:9`!: |
| 490 | case EFX_BMP_BLURcxx . . $ `Descent3/TelComEffects.h:145:9`!: |
| 491 | case EFX_BMP_SCANLINEcxx . . $ `Descent3/TelComEffects.h:146:9`!: |
| 492 | case EFX_BMP_INVERTcxx . . $ `Descent3/TelComEffects.h:147:9`!: |
| 493 | case EFX_BMP_STRETCHcxx . . $ `Descent3/TelComEffects.h:148:9`!: |
| 494 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = -1; |
| 495 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..stagecxx . . $ tBitmapInfo#stage. = 0; |
| 496 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 497 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_countcxx . . $ tBitmapInfo#bm_count. = 0; |
| 498 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = -1; |
| 499 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 500 | break; |
| 501 | case EFX_BACKGROUNDcxx . . $ `Descent3/TelComEffects.h:149:9`!: |
| 502 | break; |
| 503 | case EFX_MOVIEcxx . . $ `Descent3/TelComEffects.h:150:9`!: |
| 504 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 505 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 506 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..fpscxx . . $ tMovieInfo#fps. = 20.0f; |
| 507 | break; |
| 508 | case EFX_POLYMODELcxx . . $ `Descent3/TelComEffects.h:151:9`!: |
| 509 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&tce->polyinfocxx . . $ tceffect#$anonymous_type_0#polyinfo..m_Rotcxx . . $ tPolyInfo#m_Rot.); |
| 510 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&tce->polyinfocxx . . $ tceffect#$anonymous_type_0#polyinfo..m_Poscxx . . $ tPolyInfo#m_Pos.); |
| 511 | vm_MakeZerocxx . . $ vm_MakeZero(ec8cf6451c36d470).(&tce->polyinfocxx . . $ tceffect#$anonymous_type_0#polyinfo..m_Oricxx . . $ tPolyInfo#m_Ori.); |
| 512 | vm_MakeIdentitycxx . . $ vm_MakeIdentity(dca75c48c9ab5b54).(&tce->polyinfocxx . . $ tceffect#$anonymous_type_0#polyinfo..m_mOrientcxx . . $ tPolyInfo#m_mOrient.); |
| 513 | tce->polyinfocxx . . $ tceffect#$anonymous_type_0#polyinfo..handlecxx . . $ tPolyInfo#handle. = -1; |
| 514 | break; |
| 515 | case EFX_SOUNDcxx . . $ `Descent3/TelComEffects.h:152:9`!: |
| 516 | tce->soundinfocxx . . $ tceffect#$anonymous_type_0#soundinfo..startedcxx . . $ tSoundInfo#started. = false; |
| 517 | tce->soundinfocxx . . $ tceffect#$anonymous_type_0#soundinfo..handlecxx . . $ tSoundInfo#handle. = -1; |
| 518 | break; |
| 519 | case EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!: |
| 520 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..click_typecxx . . $ tButtonInfo#click_type. = CLICKTYPE_CLICKUPcxx . . $ `Descent3/TelComEffects.h:188:9`!; |
| 521 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..button_typecxx . . $ tButtonInfo#button_type. = BUTT_NEXTPAGEcxx . . $ `Descent3/TelComEffects.h:180:9`!; |
| 522 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..siblingcxx . . $ tButtonInfo#sibling. = -1; |
| 523 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..parentcxx . . $ tButtonInfo#parent. = -1; |
| 524 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..internalcxx . . $ tButtonInfo#internal. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 525 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..jump_pagecxx . . $ tButtonInfo#jump_page. = 0; |
| 526 | break; |
| 527 | default: |
| 528 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // Invalid Effect |
| 529 | } |
| 530 | } |
| 531 | |
| 532 | // Renders a Monitor |
| 533 | void RenderScreencxx . . $ RenderScreen(b1f405cd48763783).(int screen, tTelComInfocxx . . $ tTelComInfo# *tsys, float Frametime) { |
| 534 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(screen >= -1 && screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 535 | |
| 536 | int node = Screen_rootscxx . . $ Screen_roots.[screen]; |
| 537 | tceffectcxx . . $ tceffect# *tce; |
| 538 | |
| 539 | int count = 0; |
| 540 | int x, y; |
| 541 | |
| 542 | while (node != -1) { |
| 543 | tce = &TCEffectscxx . . $ TCEffects.[node]; |
| 544 | x = tsys->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[tce->monitorcxx . . $ tceffect#monitor.].leftcxx . . $ box#left.; |
| 545 | y = tsys->Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[tce->monitorcxx . . $ tceffect#monitor.].topcxx . . $ box#top.; |
| 546 | |
| 547 | if (tce->start_timecxx . . $ tceffect#start_time. <= 0) { |
| 548 | RenderEffectcxx . . $ RenderEffect(cedd11bfcbfae79).(tce, Frametime, x, y, true); |
| 549 | count++; |
| 550 | } else { |
| 551 | RenderEffectcxx . . $ RenderEffect(cedd11bfcbfae79).(tce, Frametime, x, y, false); |
| 552 | tce->start_timecxx . . $ tceffect#start_time. -= Frametime; |
| 553 | } |
| 554 | |
| 555 | node = TCEffectscxx . . $ TCEffects.[node].nextcxx . . $ tceffect#next.; |
| 556 | } |
| 557 | // mprintf(0,"Effect Count: %d effects\n",count); |
| 558 | } |
| 559 | |
| 560 | // Renders an effect |
| 561 | void RenderEffectcxx . . $ RenderEffect(cedd11bfcbfae79).(tceffectcxx . . $ tceffect# *tce, float frametime, int xoff, int yoff, bool ok_to_render) { |
| 562 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce->type != EFX_NONEcxx . . $ `Descent3/TelComEffects.h:140:9`!); |
| 563 | |
| 564 | switch (tce->typecxx . . $ tceffect#type.) { |
| 565 | case EFX_TEXT_STATICcxx . . $ `Descent3/TelComEffects.h:141:9`!: |
| 566 | RenderTextStaticcxx . . $ RenderTextStatic(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 567 | break; |
| 568 | case EFX_TEXT_TYPEcxx . . $ `Descent3/TelComEffects.h:142:9`!: |
| 569 | RenderTextTypecxx . . $ RenderTextType(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 570 | break; |
| 571 | case EFX_TEXT_FADEcxx . . $ `Descent3/TelComEffects.h:143:9`!: |
| 572 | RenderTextFadecxx . . $ RenderTextFade(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 573 | break; |
| 574 | case EFX_BMP_STATICcxx . . $ `Descent3/TelComEffects.h:144:9`!: |
| 575 | RenderBmpStaticcxx . . $ RenderBmpStatic(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 576 | break; |
| 577 | case EFX_BMP_BLURcxx . . $ `Descent3/TelComEffects.h:145:9`!: |
| 578 | RenderBmpBlurcxx . . $ RenderBmpBlur(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 579 | break; |
| 580 | case EFX_BMP_SCANLINEcxx . . $ `Descent3/TelComEffects.h:146:9`!: |
| 581 | RenderBmpScanlinecxx . . $ RenderBmpScanline(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 582 | break; |
| 583 | case EFX_BMP_INVERTcxx . . $ `Descent3/TelComEffects.h:147:9`!: |
| 584 | RenderBmpInvertcxx . . $ RenderBmpInvert(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 585 | break; |
| 586 | case EFX_BMP_STRETCHcxx . . $ `Descent3/TelComEffects.h:148:9`!: |
| 587 | RenderBmpStretchcxx . . $ RenderBmpStretch(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 588 | break; |
| 589 | case EFX_BACKGROUNDcxx . . $ `Descent3/TelComEffects.h:149:9`!: |
| 590 | RenderBackgroundcxx . . $ RenderBackground(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 591 | break; |
| 592 | case EFX_MOVIEcxx . . $ `Descent3/TelComEffects.h:150:9`!: |
| 593 | RenderMoviecxx . . $ RenderMovie(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 594 | break; |
| 595 | case EFX_POLYMODELcxx . . $ `Descent3/TelComEffects.h:151:9`!: |
| 596 | RenderPolyModelcxx . . $ RenderPolyModel(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 597 | break; |
| 598 | case EFX_SOUNDcxx . . $ `Descent3/TelComEffects.h:152:9`!: |
| 599 | RenderSoundcxx . . $ RenderSound(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 600 | break; |
| 601 | case EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!: |
| 602 | RenderButtoncxx . . $ RenderButton(cedd11bfcbfae79).(tce, frametime, xoff, yoff, ok_to_render); |
| 603 | break; |
| 604 | default: |
| 605 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 606 | }; |
| 607 | } |
| 608 | |
| 609 | // Sends an event to an effect |
| 610 | void SendEventToEffectcxx . . $ SendEventToEffect(748afa4755bc9595).(int effect, int event, int parm1, int parm2) { |
| 611 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(effect >= 0 && effect < MAX_TCEFFECTScxx . . $ `Descent3/TelComEffects.h:135:9`!); |
| 612 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(event >= 0); |
| 613 | |
| 614 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[effect]; |
| 615 | |
| 616 | for (int j = 0; j < MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`!; j++) { |
| 617 | if (tce->event_queuecxx . . $ tceffect#event_queue.[j].idcxx . . $ tTCEvent#id. == -1) { |
| 618 | tce->event_queuecxx . . $ tceffect#event_queue.[j].idcxx . . $ tTCEvent#id. = event; |
| 619 | tce->event_queuecxx . . $ tceffect#event_queue.[j].parmscxx . . $ tTCEvent#parms.[0] = parm1; |
| 620 | tce->event_queuecxx . . $ tceffect#event_queue.[j].parmscxx . . $ tTCEvent#parms.[1] = parm2; |
| 621 | return; |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | // if we got here than the event queue is filled up |
| 626 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Warning: Event queue filled up for effect %d\n", effect); |
| 627 | } |
| 628 | |
| 629 | // Pops off an event for processesing, returns -1 if no event available |
| 630 | bool PopEventcxx . . $ PopEvent(6a9d2426593e3e3).(tceffectcxx . . $ tceffect# *tce, tTCEventcxx . . $ tTCEvent# *evt) { |
| 631 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(tce); |
| 632 | int ret = tce->event_queuecxx . . $ tceffect#event_queue.[0].idcxx . . $ tTCEvent#id.; |
| 633 | |
| 634 | if (ret == -1) |
| 635 | return false; |
| 636 | |
| 637 | memcpy(evt, &tce->event_queuecxx . . $ tceffect#event_queue.[0], sizeof(tTCEventcxx . . $ tTCEvent#)); |
| 638 | |
| 639 | // slide everything up (if it isn't -1) |
| 640 | for (int j = 1; j < MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`!; j++) { |
| 641 | memcpy(&tce->event_queuecxx . . $ tceffect#event_queue.[j - 1], &tce->event_queuecxx . . $ tceffect#event_queue.[j], sizeof(tTCEventcxx . . $ tTCEvent#)); |
| 642 | } |
| 643 | tce->event_queuecxx . . $ tceffect#event_queue.[MAX_EFFECT_EVENTScxx . . $ `Descent3/TelComEffects.h:136:9`! - 1].idcxx . . $ tTCEvent#id. = -1; |
| 644 | return true; |
| 645 | } |
| 646 | |
| 647 | // Returns the efxnum given an id & screen, -1 if not found |
| 648 | int GetEfxNumFromIDcxx . . $ GetEfxNumFromID(9b79fb6aee4c0440).(int id, int screen) { |
| 649 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(screen >= 0 && screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 650 | |
| 651 | int node = Screen_rootscxx . . $ Screen_roots.[screen]; |
| 652 | |
| 653 | while (node != -1) { |
| 654 | if (TCEffectscxx . . $ TCEffects.[node].idcxx . . $ tceffect#id. == id) { |
| 655 | return node; |
| 656 | } |
| 657 | |
| 658 | node = TCEffectscxx . . $ TCEffects.[node].nextcxx . . $ tceffect#next.; |
| 659 | } |
| 660 | return -1; |
| 661 | } |
| 662 | |
| 663 | // returns the efxnum of the button that contains the X,Y on the given monitor/screen, -1 if none |
| 664 | int FindButtonEffectByXYcxx . . $ FindButtonEffectByXY(2326284602b0bb2d).(int x, int y, int screen) { |
| 665 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(screen >= 0 && screen < MAX_TELCOM_SCREENScxx . . $ `Descent3/TelCom.h:93:9`!); |
| 666 | tceffectcxx . . $ tceffect# *tce; |
| 667 | int node = Screen_rootscxx . . $ Screen_roots.[screen]; |
| 668 | |
| 669 | while (node != -1) { |
| 670 | if (TCEffectscxx . . $ TCEffects.[node].typecxx . . $ tceffect#type. == EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!) { |
| 671 | tce = &TCEffectscxx . . $ TCEffects.[node]; |
| 672 | if ((tce->pos_xcxx . . $ tceffect#pos_x. + glitch_dxcxx . . $ glitch_dx. <= x) && (x <= tce->pos_xcxx . . $ tceffect#pos_x. + tce->wcxx . . $ tceffect#w. + glitch_dxcxx . . $ glitch_dx.) && (tce->pos_ycxx . . $ tceffect#pos_y. + glitch_dycxx . . $ glitch_dy. <= y) && |
| 673 | (y <= tce->pos_ycxx . . $ tceffect#pos_y. + tce->hcxx . . $ tceffect#h. + glitch_dycxx . . $ glitch_dy.)) { |
| 674 | // we got a winner |
| 675 | return node; |
| 676 | } |
| 677 | } |
| 678 | node = TCEffectscxx . . $ TCEffects.[node].nextcxx . . $ tceffect#next.; |
| 679 | } |
| 680 | return -1; |
| 681 | } |
| 682 | |
| 683 | ///////////////////////////////////////////////////////////////////////// |
| 684 | char *formatcxx . . $ format(a849077ff1b8d812).(const char *fmt, ...) { |
| 685 | static char tempbuffer[8192]; |
| 686 | |
| 687 | stdcxx . . $ std/::va_listcxx . . $ std/va_list# ap; |
| 688 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(ap, fmt); |
| 689 | stdcxx . . $ std/::vsnprintfcxx . . $ std/vsnprintf(348eb892742d8727).(tempbuffer, sizeof(tempbuffer), fmt, ap); |
| 690 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(ap); |
| 691 | return tempbuffer; |
| 692 | } |
| 693 | |
| 694 | bool CreateTextEffectcxx . . $ CreateTextEffect(b73a9a5c42deb467).(TCTEXTDESCcxx . . $ TCTEXTDESC#* desc, const char *text, int monitor, int screen, int id) { |
| 695 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 696 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text); |
| 697 | |
| 698 | int efxtype = -1; |
| 699 | switch (desc->typecxx . . $ TCTEXTDESC#type.) { |
| 700 | case TC_TEXT_STATICcxx . . $ `Descent3/TelComEfxStructs.h:135:9`!: |
| 701 | efxtype = EFX_TEXT_STATICcxx . . $ `Descent3/TelComEffects.h:141:9`!; |
| 702 | break; |
| 703 | case TC_TEXT_FADEcxx . . $ `Descent3/TelComEfxStructs.h:137:9`!: |
| 704 | efxtype = EFX_TEXT_FADEcxx . . $ `Descent3/TelComEffects.h:143:9`!; |
| 705 | break; |
| 706 | case TC_TEXT_FLASHcxx . . $ `Descent3/TelComEfxStructs.h:138:9`!: |
| 707 | efxtype = EFX_TEXT_TYPEcxx . . $ `Descent3/TelComEffects.h:142:9`!; |
| 708 | break; |
| 709 | default: |
| 710 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // not supported |
| 711 | } |
| 712 | if (efxtype == -1) |
| 713 | return false; |
| 714 | |
| 715 | // Creates an instance of the Effect |
| 716 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(efxtype, monitor, screen, id, (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_TABSTOPcxx . . $ `Descent3/TelComEfxStructs.h:113:9`!) ? true : false); |
| 717 | if (efxnum == -1) |
| 718 | return false; |
| 719 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 720 | |
| 721 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_FONTcxx . . $ `Descent3/TelComEfxStructs.h:106:9`!) |
| 722 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..font_indexcxx . . $ tTextInfo#font_index. = desc->fontcxx . . $ TCTEXTDESC#font.; |
| 723 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:107:9`!) |
| 724 | tce->colorcxx . . $ tceffect#color. = desc->colorcxx . . $ TCTEXTDESC#color.; |
| 725 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_SPEEDcxx . . $ `Descent3/TelComEfxStructs.h:108:9`!) |
| 726 | tce->speedcxx . . $ tceffect#speed. = desc->speedcxx . . $ TCTEXTDESC#speed.; |
| 727 | else |
| 728 | tce->speedcxx . . $ tceffect#speed. = 1.0f; |
| 729 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_TEXTBOXcxx . . $ `Descent3/TelComEfxStructs.h:111:9`!) { |
| 730 | tce->pos_xcxx . . $ tceffect#pos_x. = desc->textboxcxx . . $ TCTEXTDESC#textbox..leftcxx . . $ tc_text#left.; |
| 731 | tce->pos_ycxx . . $ tceffect#pos_y. = desc->textboxcxx . . $ TCTEXTDESC#textbox..topcxx . . $ tc_text#top.; |
| 732 | tce->wcxx . . $ tceffect#w. = desc->textboxcxx . . $ TCTEXTDESC#textbox..rightcxx . . $ tc_text#right. - desc->textboxcxx . . $ TCTEXTDESC#textbox..leftcxx . . $ tc_text#left.; |
| 733 | tce->hcxx . . $ tceffect#h. = desc->textboxcxx . . $ TCTEXTDESC#textbox..bottomcxx . . $ tc_text#bottom. - desc->textboxcxx . . $ TCTEXTDESC#textbox..topcxx . . $ tc_text#top.; |
| 734 | } else |
| 735 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // need a text box |
| 736 | |
| 737 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_SCROLLcxx . . $ `Descent3/TelComEfxStructs.h:112:9`!) |
| 738 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..scrollcxx . . $ tTextInfo#scroll. = true; |
| 739 | |
| 740 | tce->flagscxx . . $ tceffect#flags. = desc->flagscxx . . $ TCTEXTDESC#flags.; |
| 741 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:110:9`!) |
| 742 | tce->start_timecxx . . $ tceffect#start_time. = desc->waittimecxx . . $ TCTEXTDESC#waittime.; |
| 743 | else |
| 744 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 745 | if (desc->capscxx . . $ TCTEXTDESC#caps. & TCTD_TABSTOPcxx . . $ `Descent3/TelComEfxStructs.h:113:9`!) |
| 746 | tce->tab_stopcxx . . $ tceffect#tab_stop. = true; |
| 747 | else |
| 748 | tce->tab_stopcxx . . $ tceffect#tab_stop. = false; |
| 749 | |
| 750 | tce->idcxx . . $ tceffect#id. = id; |
| 751 | |
| 752 | switch (tce->typecxx . . $ tceffect#type.) { |
| 753 | case EFX_TEXT_STATICcxx . . $ `Descent3/TelComEffects.h:141:9`!: |
| 754 | return CreateTextStaticcxx . . $ CreateTextStatic(51ee7deabd7da03d).(tce, text); |
| 755 | case EFX_TEXT_FADEcxx . . $ `Descent3/TelComEffects.h:143:9`!: |
| 756 | return CreateTextFadecxx . . $ CreateTextFade(51ee7deabd7da03d).(tce, text); |
| 757 | case EFX_TEXT_TYPEcxx . . $ `Descent3/TelComEffects.h:142:9`!: |
| 758 | return CreateTextTypecxx . . $ CreateTextType(51ee7deabd7da03d).(tce, text); |
| 759 | } |
| 760 | return false; |
| 761 | } |
| 762 | |
| 763 | bool CreateBitmapEffectcxx . . $ CreateBitmapEffect(a6e53fec506ced4b).(TCBMPDESCcxx . . $ TCBMPDESC#* desc, int monitor, int screen, int id) { |
| 764 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 765 | int efxtype = -1; |
| 766 | switch (desc->typecxx . . $ TCBMPDESC#type.) { |
| 767 | case TC_BMP_STATICcxx . . $ `Descent3/TelComEfxStructs.h:139:9`!: |
| 768 | efxtype = EFX_BMP_STATICcxx . . $ `Descent3/TelComEffects.h:144:9`!; |
| 769 | break; |
| 770 | case TC_BMP_BLURcxx . . $ `Descent3/TelComEfxStructs.h:140:9`!: |
| 771 | efxtype = EFX_BMP_BLURcxx . . $ `Descent3/TelComEffects.h:145:9`!; |
| 772 | break; |
| 773 | case TC_BMP_SCANLINEcxx . . $ `Descent3/TelComEfxStructs.h:141:9`!: |
| 774 | efxtype = EFX_BMP_SCANLINEcxx . . $ `Descent3/TelComEffects.h:146:9`!; |
| 775 | break; |
| 776 | case TC_BMP_INVERTcxx . . $ `Descent3/TelComEfxStructs.h:142:9`!: |
| 777 | efxtype = EFX_BMP_INVERTcxx . . $ `Descent3/TelComEffects.h:147:9`!; |
| 778 | break; |
| 779 | case TC_BMP_STRETCHcxx . . $ `Descent3/TelComEfxStructs.h:143:9`!: |
| 780 | efxtype = EFX_BMP_STRETCHcxx . . $ `Descent3/TelComEffects.h:148:9`!; |
| 781 | break; |
| 782 | default: |
| 783 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 784 | } |
| 785 | if (efxtype == -1) |
| 786 | return false; |
| 787 | |
| 788 | // Creates an instance of the Effect |
| 789 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(efxtype, monitor, screen, id); |
| 790 | if (efxnum == -1) |
| 791 | return false; |
| 792 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 793 | |
| 794 | if (desc->capscxx . . $ TCBMPDESC#caps. & TCBD_XYcxx . . $ `Descent3/TelComEfxStructs.h:115:9`!) { |
| 795 | tce->pos_xcxx . . $ tceffect#pos_x. = desc->xcxx . . $ TCBMPDESC#x.; |
| 796 | tce->pos_ycxx . . $ tceffect#pos_y. = desc->ycxx . . $ TCBMPDESC#y.; |
| 797 | } else { |
| 798 | tce->pos_xcxx . . $ tceffect#pos_x. = tce->pos_ycxx . . $ tceffect#pos_y. = 0; |
| 799 | } |
| 800 | if (desc->capscxx . . $ TCBMPDESC#caps. & TCBD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:117:9`!) |
| 801 | tce->start_timecxx . . $ tceffect#start_time. = desc->waittimecxx . . $ TCBMPDESC#waittime.; |
| 802 | else |
| 803 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 804 | if (desc->capscxx . . $ TCBMPDESC#caps. & TCBD_SPEEDcxx . . $ `Descent3/TelComEfxStructs.h:118:9`!) |
| 805 | tce->speedcxx . . $ tceffect#speed. = desc->speedcxx . . $ TCBMPDESC#speed.; |
| 806 | else |
| 807 | tce->speedcxx . . $ tceffect#speed. = 1; |
| 808 | tce->flagscxx . . $ tceffect#flags. = desc->flagscxx . . $ TCBMPDESC#flags.; |
| 809 | |
| 810 | switch (tce->typecxx . . $ tceffect#type.) { |
| 811 | case EFX_BMP_STATICcxx . . $ `Descent3/TelComEffects.h:144:9`!: |
| 812 | return CreateBmpStaticcxx . . $ CreateBmpStatic(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCBMPDESC#filename.); |
| 813 | case EFX_BMP_BLURcxx . . $ `Descent3/TelComEffects.h:145:9`!: |
| 814 | return CreateBmpBlurcxx . . $ CreateBmpBlur(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCBMPDESC#filename.); |
| 815 | case EFX_BMP_SCANLINEcxx . . $ `Descent3/TelComEffects.h:146:9`!: |
| 816 | return CreateBmpScanlinecxx . . $ CreateBmpScanline(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCBMPDESC#filename.); |
| 817 | case EFX_BMP_INVERTcxx . . $ `Descent3/TelComEffects.h:147:9`!: |
| 818 | return CreateBmpInvertcxx . . $ CreateBmpInvert(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCBMPDESC#filename.); |
| 819 | case EFX_BMP_STRETCHcxx . . $ `Descent3/TelComEffects.h:148:9`!: |
| 820 | return CreateBmpStretchcxx . . $ CreateBmpStretch(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCBMPDESC#filename.); |
| 821 | } |
| 822 | return false; |
| 823 | } |
| 824 | |
| 825 | bool CreateMovieEffectcxx . . $ CreateMovieEffect(8c6beb65af861305).(TCMOVIEDESCcxx . . $ TCMOVIEDESC#* desc, int monitor, int screen, int id) { |
| 826 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 827 | int efxtype = -1; |
| 828 | switch (desc->typecxx . . $ TCMOVIEDESC#type.) { |
| 829 | case TC_MOVIE_STATICcxx . . $ `Descent3/TelComEfxStructs.h:145:9`!: |
| 830 | efxtype = EFX_MOVIEcxx . . $ `Descent3/TelComEffects.h:150:9`!; |
| 831 | break; |
| 832 | default: |
| 833 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 834 | } |
| 835 | if (efxtype == -1) |
| 836 | return false; |
| 837 | // Creates an instance of the Effect |
| 838 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(efxtype, monitor, screen, id); |
| 839 | if (efxnum == -1) |
| 840 | return false; |
| 841 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 842 | |
| 843 | if (desc->capscxx . . $ TCMOVIEDESC#caps. & TCMD_XYcxx . . $ `Descent3/TelComEfxStructs.h:120:9`!) |
| 844 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..fpscxx . . $ tMovieInfo#fps. = desc->fpscxx . . $ TCMOVIEDESC#fps.; |
| 845 | else |
| 846 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..fpscxx . . $ tMovieInfo#fps. = 20.0f; |
| 847 | if (desc->capscxx . . $ TCMOVIEDESC#caps. & TCMD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:122:9`!) |
| 848 | tce->start_timecxx . . $ tceffect#start_time. = desc->waittimecxx . . $ TCMOVIEDESC#waittime.; |
| 849 | else |
| 850 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 851 | if (desc->capscxx . . $ TCMOVIEDESC#caps. & TCMD_XYcxx . . $ `Descent3/TelComEfxStructs.h:120:9`!) { |
| 852 | tce->pos_xcxx . . $ tceffect#pos_x. = desc->xcxx . . $ TCMOVIEDESC#x.; |
| 853 | tce->pos_ycxx . . $ tceffect#pos_y. = desc->ycxx . . $ TCMOVIEDESC#y.; |
| 854 | } else { |
| 855 | tce->pos_xcxx . . $ tceffect#pos_x. = tce->pos_ycxx . . $ tceffect#pos_y. = 0; |
| 856 | } |
| 857 | |
| 858 | switch (tce->typecxx . . $ tceffect#type.) { |
| 859 | case EFX_MOVIEcxx . . $ `Descent3/TelComEffects.h:150:9`!: |
| 860 | return CreateMoviecxx . . $ CreateMovie(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCMOVIEDESC#filename.); |
| 861 | } |
| 862 | |
| 863 | return false; |
| 864 | } |
| 865 | |
| 866 | extern tTelComInfocxx . . $ tTelComInfo# Telcom_systemcxx . . $ Telcom_system.; |
| 867 | bool CreateBackgroundEffectcxx . . $ CreateBackgroundEffect(36995d1e7af252ca).(TCBKGDESCcxx . . $ TCBKGDESC#* desc, int monitor, int screen, int id) { |
| 868 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 869 | int efxtype = -1; |
| 870 | switch (desc->typecxx . . $ TCBKGDESC#type.) { |
| 871 | case TC_BACK_STATICcxx . . $ `Descent3/TelComEfxStructs.h:144:9`!: |
| 872 | efxtype = EFX_BACKGROUNDcxx . . $ `Descent3/TelComEffects.h:149:9`!; |
| 873 | break; |
| 874 | default: |
| 875 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 876 | } |
| 877 | if (efxtype == -1) |
| 878 | return false; |
| 879 | // Creates an instance of the Effect |
| 880 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(efxtype, monitor, screen, id); |
| 881 | if (efxnum == -1) |
| 882 | return false; |
| 883 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 884 | |
| 885 | if (desc->capscxx . . $ TCBKGDESC#caps. & TCBGD_COLORcxx . . $ `Descent3/TelComEfxStructs.h:127:9`!) |
| 886 | tce->colorcxx . . $ tceffect#color. = desc->colorcxx . . $ TCBKGDESC#color.; |
| 887 | else |
| 888 | tce->colorcxx . . $ tceffect#color. = GR_BLUEcxx . . $ GR_BLUE.; |
| 889 | if (desc->capscxx . . $ TCBKGDESC#caps. & TCBGD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:126:9`!) |
| 890 | tce->start_timecxx . . $ tceffect#start_time. = desc->waittimecxx . . $ TCBKGDESC#waittime.; |
| 891 | else |
| 892 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 893 | |
| 894 | tce->pos_xcxx . . $ tceffect#pos_x. = 0; |
| 895 | tce->pos_ycxx . . $ tceffect#pos_y. = 0; |
| 896 | tce->wcxx . . $ tceffect#w. = Telcom_systemcxx . . $ Telcom_system..Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[monitor].rightcxx . . $ box#right. - Telcom_systemcxx . . $ Telcom_system..Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[monitor].leftcxx . . $ box#left.; |
| 897 | tce->hcxx . . $ tceffect#h. = Telcom_systemcxx . . $ Telcom_system..Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[monitor].bottomcxx . . $ box#bottom. - Telcom_systemcxx . . $ Telcom_system..Monitor_coordscxx . . $ tTelComInfo#Monitor_coords.[monitor].topcxx . . $ box#top.; |
| 898 | |
| 899 | switch (tce->typecxx . . $ tceffect#type.) { |
| 900 | case EFX_BACKGROUNDcxx . . $ `Descent3/TelComEffects.h:149:9`!: |
| 901 | return CreateBackgroundcxx . . $ CreateBackground(cd24ba14dc1954b5).(tce); |
| 902 | } |
| 903 | return false; |
| 904 | } |
| 905 | |
| 906 | bool CreatePolyModelEffectcxx . . $ CreatePolyModelEffect(be6c0a3ab1323a8d).(TCPOLYDESCcxx . . $ TCPOLYDESC#* desc, int monitor, int screen, int id) { |
| 907 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 908 | int efxtype = -1; |
| 909 | switch (desc->typecxx . . $ TCPOLYDESC#type.) { |
| 910 | case TC_POLY_STATICcxx . . $ `Descent3/TelComEfxStructs.h:146:9`!: |
| 911 | efxtype = EFX_POLYMODELcxx . . $ `Descent3/TelComEffects.h:151:9`!; |
| 912 | break; |
| 913 | default: |
| 914 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 915 | } |
| 916 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // polymodel not supported yet |
| 917 | return false; |
| 918 | } |
| 919 | |
| 920 | bool CreateSoundEffectcxx . . $ CreateSoundEffect(ab0b0cfe910b3644).(TCSNDDESCcxx . . $ TCSNDDESC#* desc, int monitor, int screen, int id) { |
| 921 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 922 | int efxtype = -1; |
| 923 | switch (desc->typecxx . . $ TCSNDDESC#type.) { |
| 924 | case TC_SND_STATICcxx . . $ `Descent3/TelComEfxStructs.h:147:9`!: |
| 925 | efxtype = EFX_SOUNDcxx . . $ `Descent3/TelComEffects.h:152:9`!; |
| 926 | break; |
| 927 | default: |
| 928 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 929 | } |
| 930 | if (efxtype == -1) |
| 931 | return false; |
| 932 | // Creates an instance of the Effect |
| 933 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(efxtype, monitor, screen, id); |
| 934 | if (efxnum == -1) |
| 935 | return false; |
| 936 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 937 | if (desc->capscxx . . $ TCSNDDESC#caps. & TCSD_WAITTIMEcxx . . $ `Descent3/TelComEfxStructs.h:131:9`!) |
| 938 | tce->start_timecxx . . $ tceffect#start_time. = desc->waittimecxx . . $ TCSNDDESC#waittime.; |
| 939 | else |
| 940 | tce->start_timecxx . . $ tceffect#start_time. = 0; |
| 941 | |
| 942 | switch (tce->typecxx . . $ tceffect#type.) { |
| 943 | case EFX_SOUNDcxx . . $ `Descent3/TelComEffects.h:152:9`!: |
| 944 | return CreateSoundcxx . . $ CreateSound(51ee7deabd7da03d).(tce, desc->filenamecxx . . $ TCSNDDESC#filename.); |
| 945 | } |
| 946 | return false; |
| 947 | } |
| 948 | |
| 949 | int CreateButtonEffectcxx . . $ CreateButtonEffect(41aa3ad94772acea).(TCBUTTONDESCcxx . . $ TCBUTTONDESC#* desc, int monitor, int screen, int id) { |
| 950 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(desc); |
| 951 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(monitor == MONITOR_MAINcxx . . $ `Descent3/TelCom.h:98:9`!); |
| 952 | |
| 953 | // Creates an instance of the Effect |
| 954 | int efxnum = EfxCreatecxx . . $ EfxCreate(74f64f8596f35e6e).(EFX_BUTTONcxx . . $ `Descent3/TelComEffects.h:153:9`!, monitor, screen, id, desc->tab_stopcxx . . $ TCBUTTONDESC#tab_stop.); |
| 955 | if (efxnum == -1) |
| 956 | return -1; |
| 957 | tceffectcxx . . $ tceffect# *tce = &TCEffectscxx . . $ TCEffects.[efxnum]; |
| 958 | |
| 959 | // Load in regular bitmap |
| 960 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 961 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(desc->filename), 0); |
| 962 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle. == -1) { |
| 963 | desc->wcxx . . $ TCBUTTONDESC#w. = desc->hcxx . . $ TCBUTTONDESC#h. = 0; |
| 964 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 965 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", desc->filename); |
| 966 | } else { |
| 967 | desc->wcxx . . $ TCBUTTONDESC#w. = bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle., 0); |
| 968 | desc->hcxx . . $ TCBUTTONDESC#h. = bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle., 0); |
| 969 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bm_handlecxx . . $ tButtonInfo#bm_handle., &tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunk_bmpcxx . . $ tButtonInfo#chunk_bmp.); |
| 970 | } |
| 971 | |
| 972 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 973 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(desc->filename_focus), 0); |
| 974 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle. == -1) { |
| 975 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 976 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", desc->filename_focus); |
| 977 | } else { |
| 978 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..bmfocus_handlecxx . . $ tButtonInfo#bmfocus_handle., &tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..chunkfocus_bmpcxx . . $ tButtonInfo#chunkfocus_bmp.); |
| 979 | } |
| 980 | |
| 981 | // Load in flash/glow bitmap |
| 982 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk..phcxx . . $ chunked_bitmap#ph. = 0; |
| 983 | if (desc->flashercxx . . $ TCBUTTONDESC#flasher.) { |
| 984 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(desc->flash_filename), 0); |
| 985 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle. == -1) { |
| 986 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", desc->flash_filename); |
| 987 | } else { |
| 988 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle., &tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_chunkcxx . . $ tButtonInfo#flash_chunk.); |
| 989 | } |
| 990 | } else { |
| 991 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_handlecxx . . $ tButtonInfo#flash_handle. = -1; |
| 992 | } |
| 993 | |
| 994 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..pwcxx . . $ chunked_bitmap#pw. = tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk..phcxx . . $ chunked_bitmap#ph. = 0; |
| 995 | if (desc->flashercxx . . $ TCBUTTONDESC#flasher.) { |
| 996 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(desc->flash_filename_focus), 0); |
| 997 | if (tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle. == -1) { |
| 998 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", desc->flash_filename_focus); |
| 999 | } else { |
| 1000 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle., &tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_chunkcxx . . $ tButtonInfo#flashfocus_chunk.); |
| 1001 | } |
| 1002 | } else { |
| 1003 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flashfocus_handlecxx . . $ tButtonInfo#flashfocus_handle. = -1; |
| 1004 | } |
| 1005 | |
| 1006 | if (desc->button_typecxx . . $ TCBUTTONDESC#button_type. == BUTT_INTERNALcxx . . $ `Descent3/TelComEffects.h:183:9`!) { |
| 1007 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..internalcxx . . $ tButtonInfo#internal. = desc->internalcxx . . $ TCBUTTONDESC#internal.; |
| 1008 | } else { |
| 1009 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..internalcxx . . $ tButtonInfo#internal. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1010 | } |
| 1011 | |
| 1012 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..siblingcxx . . $ tButtonInfo#sibling. = desc->sibling_idcxx . . $ TCBUTTONDESC#sibling_id.; |
| 1013 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..parentcxx . . $ tButtonInfo#parent. = desc->parent_idcxx . . $ TCBUTTONDESC#parent_id.; |
| 1014 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..button_typecxx . . $ tButtonInfo#button_type. = desc->button_typecxx . . $ TCBUTTONDESC#button_type.; |
| 1015 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..click_typecxx . . $ tButtonInfo#click_type. = desc->click_typecxx . . $ TCBUTTONDESC#click_type.; |
| 1016 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..flash_timecxx . . $ tButtonInfo#flash_time. = desc->flash_timecxx . . $ TCBUTTONDESC#flash_time.; |
| 1017 | tce->wcxx . . $ tceffect#w. = desc->wcxx . . $ TCBUTTONDESC#w.; |
| 1018 | tce->hcxx . . $ tceffect#h. = desc->hcxx . . $ TCBUTTONDESC#h.; |
| 1019 | tce->pos_xcxx . . $ tceffect#pos_x. = desc->xcxx . . $ TCBUTTONDESC#x.; |
| 1020 | tce->pos_ycxx . . $ tceffect#pos_y. = desc->ycxx . . $ TCBUTTONDESC#y.; |
| 1021 | tce->flagscxx . . $ tceffect#flags. = desc->osflagscxx . . $ TCBUTTONDESC#osflags.; |
| 1022 | tce->buttoninfocxx . . $ tceffect#$anonymous_type_0#buttoninfo..jump_pagecxx . . $ tButtonInfo#jump_page. = desc->jump_pagecxx . . $ TCBUTTONDESC#jump_page.; |
| 1023 | |
| 1024 | return efxnum; |
| 1025 | } |
| 1026 | |
| 1027 | //////////////////////////////////////////////////////////////////// |
| 1028 | bool CreateTextStaticcxx . . $ CreateTextStatic(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *text) { |
| 1029 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text); |
| 1030 | if (!text) |
| 1031 | return false; |
| 1032 | |
| 1033 | tce->text_buffercxx . . $ tceffect#text_buffer. = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1034 | if (!tce->text_buffercxx . . $ tceffect#text_buffer.) |
| 1035 | return false; |
| 1036 | |
| 1037 | tce->alphacxx . . $ tceffect#alpha. = 255; |
| 1038 | |
| 1039 | char *tempbuffer = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1040 | if (!tempbuffer) |
| 1041 | return false; |
| 1042 | strcpy(tempbuffer, text); |
| 1043 | |
| 1044 | // apply the word wrap |
| 1045 | textaux_WordWrapcxx . . $ textaux_WordWrap(2480230cce71d9d7).(tempbuffer, tce->text_buffercxx . . $ tceffect#text_buffer., tce->wcxx . . $ tceffect#w., Game_fontscxx . . $ Game_fonts.[tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..font_indexcxx . . $ tTextInfo#font_index.]); |
| 1046 | |
| 1047 | mem_freecxx . . $ `mem/mem.h:80:9`!(tempbuffer); |
| 1048 | |
| 1049 | return true; |
| 1050 | } |
| 1051 | |
| 1052 | bool CreateTextFadecxx . . $ CreateTextFade(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *text) { |
| 1053 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text); |
| 1054 | if (!text || text[0] == '\0') |
| 1055 | return false; |
| 1056 | tce->text_buffercxx . . $ tceffect#text_buffer. = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1057 | if (!tce->text_buffercxx . . $ tceffect#text_buffer.) |
| 1058 | return false; |
| 1059 | |
| 1060 | char *tempbuffer = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1061 | if (!tempbuffer) |
| 1062 | return false; |
| 1063 | strcpy(tempbuffer, text); |
| 1064 | |
| 1065 | // apply the word wrap |
| 1066 | textaux_WordWrapcxx . . $ textaux_WordWrap(2480230cce71d9d7).(tempbuffer, tce->text_buffercxx . . $ tceffect#text_buffer., tce->wcxx . . $ tceffect#w., Game_fontscxx . . $ Game_fonts.[tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..font_indexcxx . . $ tTextInfo#font_index.]); |
| 1067 | |
| 1068 | mem_freecxx . . $ `mem/mem.h:80:9`!(tempbuffer); |
| 1069 | |
| 1070 | switch (tce->flagscxx . . $ tceffect#flags.) { |
| 1071 | case TC_TEXTF_OUTcxx . . $ `Descent3/TelComEfxStructs.h:155:9`!: |
| 1072 | tce->alphacxx . . $ tceffect#alpha. = 255.0f; |
| 1073 | break; |
| 1074 | case TC_TEXTF_INcxx . . $ `Descent3/TelComEfxStructs.h:154:9`!: |
| 1075 | case TC_TEXTF_PINGPONGcxx . . $ `Descent3/TelComEfxStructs.h:156:9`!: |
| 1076 | default: |
| 1077 | tce->alphacxx . . $ tceffect#alpha. = 0.01f; |
| 1078 | break; |
| 1079 | } |
| 1080 | return true; |
| 1081 | } |
| 1082 | |
| 1083 | bool CreateTextTypecxx . . $ CreateTextType(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *text) { |
| 1084 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(text); |
| 1085 | if (!text || text[0] == '\0') |
| 1086 | return false; |
| 1087 | tce->text_buffercxx . . $ tceffect#text_buffer. = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1088 | if (!tce->text_buffercxx . . $ tceffect#text_buffer.) |
| 1089 | return false; |
| 1090 | |
| 1091 | char *tempbuffer = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(text) + 10); |
| 1092 | if (!tempbuffer) |
| 1093 | return false; |
| 1094 | strcpy(tempbuffer, text); |
| 1095 | |
| 1096 | // apply the word wrap |
| 1097 | textaux_WordWrapcxx . . $ textaux_WordWrap(2480230cce71d9d7).(tempbuffer, tce->text_buffercxx . . $ tceffect#text_buffer., tce->wcxx . . $ tceffect#w., Game_fontscxx . . $ Game_fonts.[tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..font_indexcxx . . $ tTextInfo#font_index.]); |
| 1098 | |
| 1099 | mem_freecxx . . $ `mem/mem.h:80:9`!(tempbuffer); |
| 1100 | |
| 1101 | tce->textinfocxx . . $ tceffect#$anonymous_type_0#textinfo..last_lettercxx . . $ tTextInfo#last_letter. = 0; |
| 1102 | return true; |
| 1103 | } |
| 1104 | |
| 1105 | bool CreateBmpStaticcxx . . $ CreateBmpStatic(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1106 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1107 | |
| 1108 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 1109 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename), 0); |
| 1110 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. == -1) { |
| 1111 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1112 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", filename); |
| 1113 | } else |
| 1114 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., &tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp.); |
| 1115 | return true; |
| 1116 | } |
| 1117 | |
| 1118 | bool CreateBmpBlurcxx . . $ CreateBmpBlur(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1119 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1120 | |
| 1121 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 1122 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename), 0); |
| 1123 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. == -1) { |
| 1124 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1125 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", filename); |
| 1126 | } else { |
| 1127 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), 0); |
| 1128 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. == -1) |
| 1129 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1130 | |
| 1131 | if (tce->flagscxx . . $ tceffect#flags. == TC_BMPF_OUTcxx . . $ `Descent3/TelComEfxStructs.h:159:9`!) |
| 1132 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..stagecxx . . $ tBitmapInfo#stage. = BLUR_STAGEScxx . . $ `Descent3/TelComEffects.h:174:9`!; |
| 1133 | else |
| 1134 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..stagecxx . . $ tBitmapInfo#stage. = 0; |
| 1135 | |
| 1136 | // create the chunk bitmap for use |
| 1137 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., &tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp.); |
| 1138 | } |
| 1139 | return true; |
| 1140 | } |
| 1141 | |
| 1142 | bool CreateBmpScanlinecxx . . $ CreateBmpScanline(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1143 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1144 | |
| 1145 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 1146 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename), 0); |
| 1147 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1148 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. == -1) { |
| 1149 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1150 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", filename); |
| 1151 | } else { |
| 1152 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), 0); |
| 1153 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. == -1) |
| 1154 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1155 | |
| 1156 | // create the chunk bitmap for use |
| 1157 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., &tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp.); |
| 1158 | } |
| 1159 | return true; |
| 1160 | } |
| 1161 | |
| 1162 | bool CreateBmpInvertcxx . . $ CreateBmpInvert(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1163 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1164 | |
| 1165 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 1166 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename), 0); |
| 1167 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1168 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. == -1) { |
| 1169 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1170 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", filename); |
| 1171 | } else { |
| 1172 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0), 0); |
| 1173 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. == -1) |
| 1174 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..temp_bmhandlecxx . . $ tBitmapInfo#temp_bmhandle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1175 | |
| 1176 | // create the chunk bitmap for use |
| 1177 | bm_CreateChunkedBitmapcxx . . $ bm_CreateChunkedBitmap(b9fa1b176cbdfaf1).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., &tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp.); |
| 1178 | } |
| 1179 | return true; |
| 1180 | } |
| 1181 | |
| 1182 | bool CreateBmpStretchcxx . . $ CreateBmpStretch(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1183 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1184 | |
| 1185 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..pwcxx . . $ chunked_bitmap#pw. = tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..chunk_bmpcxx . . $ tBitmapInfo#chunk_bmp..phcxx . . $ chunked_bitmap#ph. = 0; |
| 1186 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = bm_AllocLoadFileBitmapcxx . . $ bm_AllocLoadFileBitmap(1163be050dbfff7).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename), 0); |
| 1187 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1188 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_countcxx . . $ tBitmapInfo#bm_count. = 0; |
| 1189 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. == -1) { |
| 1190 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1191 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to load bmp '%s'\n", filename); |
| 1192 | } else { |
| 1193 | // determine how many wide we need |
| 1194 | int src_w = bm_wcxx . . $ bm_w(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0); |
| 1195 | int w_count = 0; |
| 1196 | w_count = ((src_w + 63) / 64); |
| 1197 | // determine how many tall we need |
| 1198 | int src_h = bm_hcxx . . $ bm_h(9b79fb6aee4c0440).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0); |
| 1199 | int h_count = 0; |
| 1200 | h_count = ((src_h + 63) / 64); |
| 1201 | |
| 1202 | int total = w_count * h_count; |
| 1203 | int index; |
| 1204 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_countcxx . . $ tBitmapInfo#bm_count. = total; |
| 1205 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps. = (int *)mem_malloccxx . . $ `mem/mem.h:79:9`!(sizeof(int) * total); |
| 1206 | if (!tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.) |
| 1207 | return false; |
| 1208 | |
| 1209 | for (index = 0; index < total; index++) { |
| 1210 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[index] = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(64, 64, 0); |
| 1211 | if (tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[index] == -1) |
| 1212 | tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[index] = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 1213 | } |
| 1214 | |
| 1215 | // now fill in the bitmaps |
| 1216 | int realx, realy; |
| 1217 | realx = 0; |
| 1218 | realy = 0; |
| 1219 | |
| 1220 | int wi, hi; |
| 1221 | uint16_tcxx . . $ uint16_t# *srcdata = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bm_handlecxx . . $ tBitmapInfo#bm_handle., 0); |
| 1222 | uint16_tcxx . . $ uint16_t# *destdata; |
| 1223 | |
| 1224 | realx = 0; |
| 1225 | realy = 0; |
| 1226 | index = 0; |
| 1227 | for (hi = 0, realy = 0; hi < h_count; hi++, realy += 64) |
| 1228 | for (wi = 0, realx = 0; wi < w_count; wi++, realx += 64) { |
| 1229 | int x, y; |
| 1230 | int ix, iy; |
| 1231 | |
| 1232 | destdata = bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(tce->bmpinfocxx . . $ tceffect#$anonymous_type_0#bmpinfo..bitmapscxx . . $ tBitmapInfo#bitmaps.[index], 0); |
| 1233 | |
| 1234 | for (y = realy, iy = 0; y < realy + 64; iy++, y++) |
| 1235 | for (x = realx, ix = 0; x < realx + 64; ix++, x++) { |
| 1236 | if ((x < src_w) && (y < src_h)) { |
| 1237 | destdata[(iy * 64) + ix] = srcdata[(y * src_w) + x]; |
| 1238 | } else { |
| 1239 | destdata[(iy * 64) + ix] = NEW_TRANSPARENT_COLORcxx . . $ `lib/grdefs.h:71:9`!; |
| 1240 | } |
| 1241 | } |
| 1242 | index++; |
| 1243 | } |
| 1244 | } |
| 1245 | return true; |
| 1246 | } |
| 1247 | |
| 1248 | bool CreateMoviecxx . . $ CreateMovie(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1249 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(filename); |
| 1250 | |
| 1251 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1252 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1253 | tce->wcxx . . $ tceffect#w. = tce->hcxx . . $ tceffect#h. = 100; |
| 1254 | |
| 1255 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename. = (char *)mem_malloccxx . . $ `mem/mem.h:79:9`!(strlen(filename) + 1); |
| 1256 | if (!tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename.) |
| 1257 | return false; |
| 1258 | strcpy(tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..filenamecxx . . $ tMovieInfo#filename., filename); |
| 1259 | tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle. = StartMoviecxx . . $ StartMovie(deeedf85fc470a35).(filename); |
| 1260 | if (!tce->movieinfocxx . . $ tceffect#$anonymous_type_0#movieinfo..handlecxx . . $ tMovieInfo#handle.) |
| 1261 | return false; |
| 1262 | return true; |
| 1263 | } |
| 1264 | |
| 1265 | bool CreateBackgroundcxx . . $ CreateBackground(cd24ba14dc1954b5).(tceffectcxx . . $ tceffect# *tce) { return true; } |
| 1266 | |
| 1267 | bool CreateSoundcxx . . $ CreateSound(51ee7deabd7da03d).(tceffectcxx . . $ tceffect# *tce, const char *filename) { |
| 1268 | tce->soundinfocxx . . $ tceffect#$anonymous_type_0#soundinfo..handlecxx . . $ tSoundInfo#handle. = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(filename)); |
| 1269 | if (tce->soundinfocxx . . $ tceffect#$anonymous_type_0#soundinfo..handlecxx . . $ tSoundInfo#handle. == -1) { |
| 1270 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unable to find sound '%s'\n", filename); |
| 1271 | } |
| 1272 | return true; |
| 1273 | } |
| 1274 | |
| 1275 | void BltBmpToScreencxx . . $ BltBmpToScreen(df47d900db23a9c5).(int dx, int dy, chunked_bitmapcxx . . $ chunked_bitmap# *src_bmp) { |
| 1276 | BltBmpToScreencxx . . $ BltBmpToScreen(19947dc49169eac1).(dx, dy, src_bmp, 0, 0, src_bmp->pwcxx . . $ chunked_bitmap#pw., src_bmp->phcxx . . $ chunked_bitmap#ph.); |
| 1277 | } |
| 1278 | void BltBmpToScreencxx . . $ BltBmpToScreen(19947dc49169eac1).(int dx, int dy, chunked_bitmapcxx . . $ chunked_bitmap# *src_bmp, int sx, int sy, int sw, int sh) { |
| 1279 | rend_DrawChunkedBitmapcxx . . $ rend_DrawChunkedBitmap(529c7906ea1e7bf7).(src_bmp, dx, dy, 255); |
| 1280 | } |
| 1281 | // forces a chunk bitmap to be uploaded |
| 1282 | void UploadChunkcxx . . $ UploadChunk(1635f60f4d3c1317).(chunked_bitmapcxx . . $ chunked_bitmap# *bmp) { |
| 1283 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(bmp); |
| 1284 | |
| 1285 | int count = bmp->wcxx . . $ chunked_bitmap#w. * bmp->hcxx . . $ chunked_bitmap#h.; |
| 1286 | |
| 1287 | for (int index = 0; index < count; index++) { |
| 1288 | int bm = bmp->bm_arraycxx . . $ chunked_bitmap#bm_array.[index]; |
| 1289 | GameBitmapscxx . . $ GameBitmaps.[bm].flagscxx . . $ bms_bitmap#flags. |= BF_CHANGEDcxx . . $ `lib/bitmap.h:46:9`!; |
| 1290 | } |
| 1291 | } |