| 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/osiris_predefs.cpp $ |
| 21 | * $Revision: 128 $ |
| 22 | * $Date: 4/13/00 2:31p $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * implementation code for osiris predefined functions |
| 26 | * |
| 27 | * $Log: /DescentIII/main/osiris_predefs.cpp $ |
| 28 | * |
| 29 | * 128 4/13/00 2:31p Matt |
| 30 | * Don't allow scripts to kill the guidebot. |
| 31 | * |
| 32 | * 127 11/05/99 4:28p Jay |
| 33 | * Made sure the wb is a valid index |
| 34 | * |
| 35 | * 126 11/04/99 3:08p Jeff |
| 36 | * fixed uint16_t check with -1 bug |
| 37 | * |
| 38 | * 125 11/03/99 10:20a Chris |
| 39 | * Added the ability to find out if a room is volatile |
| 40 | * |
| 41 | * 124 11/02/99 12:16p Chris |
| 42 | * More Merc code - added support for ignore_obj_lists for the Osiris |
| 43 | * RayCast function |
| 44 | * |
| 45 | * 123 10/27/99 4:19p 3dsmax |
| 46 | * added cloak flag for object value get |
| 47 | * |
| 48 | * 122 10/23/99 2:43a Chris |
| 49 | * Added the PutObjectOnObject AI Goal |
| 50 | * |
| 51 | * 121 10/22/99 11:31a Matt |
| 52 | * Mac merge |
| 53 | * |
| 54 | * 120 10/20/99 5:40p Chris |
| 55 | * Added the Red Guidebot |
| 56 | * |
| 57 | * 119 10/19/99 10:18p 3dsmax |
| 58 | * error check object name retreival. |
| 59 | * |
| 60 | * 118 10/16/99 9:56p Jeff |
| 61 | * added a way to strip all players of all weapons and energy |
| 62 | * |
| 63 | * 117 10/16/99 8:46p Jeff |
| 64 | * player value function to strip a player of weapons and energy |
| 65 | * |
| 66 | * 116 10/12/99 12:44p Jeff |
| 67 | * added obj_value things for negative light and virus infection |
| 68 | * |
| 69 | * 115 9/13/99 12:26p Samir |
| 70 | * added AIG_GUARD_AREA to add goal, since it exits in AIGoal.cpp already. |
| 71 | * |
| 72 | * 114 9/10/99 11:03a Samir |
| 73 | * added command to get object's name from Obj_Value. |
| 74 | * |
| 75 | * 113 5/23/99 5:50p Chris |
| 76 | * Fixed problems with msafe send on over non-changed information |
| 77 | * |
| 78 | * 112 5/23/99 12:33a Chris |
| 79 | * Cannot change the control type of dying objects |
| 80 | * |
| 81 | * 111 5/21/99 7:29a Chris |
| 82 | * More tweaking... |
| 83 | * |
| 84 | * 110 5/20/99 1:16a Chris |
| 85 | * Fixed the AIV_I_TARGET_HANDLE set function |
| 86 | * |
| 87 | * 109 5/19/99 3:25p Jason |
| 88 | * fixed wrong ordering of InitObjectScripts and MultiSendObject |
| 89 | * |
| 90 | * 108 5/12/99 8:03p Jason |
| 91 | * fixed bug where multiplayer and demo code was playing a sound before an |
| 92 | * object was even created |
| 93 | * |
| 94 | * 107 5/12/99 6:18a Chris |
| 95 | * GetNearby objects doesn't return dead or RT_NONE objects |
| 96 | * |
| 97 | * 106 5/10/99 8:21a Chris |
| 98 | * FindNearby... ignores dead objects (OF_DEAD) |
| 99 | * |
| 100 | * 105 5/10/99 12:23a Chris |
| 101 | * Fixed another hearing/seeing case. :) Buddy bot now is in the player |
| 102 | * ship at respawn |
| 103 | * |
| 104 | * 104 5/07/99 1:32p Jeff |
| 105 | * made osipf for sounds multisafe |
| 106 | * |
| 107 | * 103 5/06/99 4:54p Matt |
| 108 | * Fixed array bounds error. |
| 109 | * |
| 110 | * 102 5/05/99 4:56p Chris |
| 111 | * Added the RType powerup for the GB |
| 112 | * |
| 113 | * 101 5/04/99 2:51a Chris |
| 114 | * Fixed bug with fire sounds in Obj_WBValue |
| 115 | * |
| 116 | * 100 4/29/99 7:15p Jeff |
| 117 | * added initial velocity parameter to Obj_Create |
| 118 | * |
| 119 | * 99 4/29/99 4:50p Chris |
| 120 | * Fixed matcen and Osiris created objects so thier ambient sounds play |
| 121 | * |
| 122 | * 98 4/29/99 3:25p Chris |
| 123 | * Added support to find out if an object has wbs |
| 124 | * |
| 125 | * 97 4/28/99 2:26a Jeff |
| 126 | * fixed places in code where only checking OBJ_PLAYER, added OBJ_GHOST |
| 127 | * and OBJ_OBSERVER where applicable |
| 128 | * |
| 129 | * 96 4/27/99 4:43a Jeff |
| 130 | * changed to call msafe functions for guidebot name commands |
| 131 | * |
| 132 | * 95 4/26/99 5:53p Jason |
| 133 | * make sure no objects are being created from script that are flagged |
| 134 | * with lightmaps |
| 135 | * |
| 136 | * 94 4/26/99 4:28a Jeff |
| 137 | * added multisafe functions to check a player's weapons, and add/remove |
| 138 | * weapons from a player |
| 139 | * |
| 140 | * 93 4/25/99 10:38p Matt |
| 141 | * Made the Osiris kill object function work on players. |
| 142 | * |
| 143 | * 92 4/25/99 10:19p Matt |
| 144 | * Fixed multiplayer and demo problems will killing an object from script, |
| 145 | * and cleaned up the death code a bit in the process. |
| 146 | * |
| 147 | * 91 4/24/99 6:46p Jeff |
| 148 | * added functions for theif so he can steal things other than weapons |
| 149 | * |
| 150 | * 90 4/24/99 2:19a Chris |
| 151 | * Added another parameter to FollowPathSimple |
| 152 | * |
| 153 | * 89 4/24/99 12:09a Jeff |
| 154 | * added path value functions |
| 155 | * |
| 156 | * 88 4/22/99 10:25p Chris |
| 157 | * Corrected the mprintf for Player_Value |
| 158 | * |
| 159 | * 87 4/22/99 5:46p Jason |
| 160 | * made weapons work in multiplayer |
| 161 | * |
| 162 | * 86 4/21/99 3:01p Matt |
| 163 | * Added a new type for dying objects that have AI, instead of keeping a |
| 164 | * flag in the dying info. |
| 165 | * |
| 166 | * 85 4/21/99 11:05a Kevin |
| 167 | * new ps_rand and ps_srand to replace rand & srand |
| 168 | * |
| 169 | * 84 4/20/99 8:56p Chris |
| 170 | * Fixed problem with robots not being able to open locked doors that a |
| 171 | * player has the key for. |
| 172 | * |
| 173 | * 83 4/20/99 7:29p Jeff |
| 174 | * handle set/get guidebot name |
| 175 | * |
| 176 | * 82 4/18/99 7:27a Chris |
| 177 | * Added AIAF_IMMEDIATE to force non-tiling and instant anim loop changes |
| 178 | * |
| 179 | * 81 4/14/99 3:57a Jeff |
| 180 | * fixed case mismatch in #includes |
| 181 | * |
| 182 | * 80 4/12/99 6:15p Samir |
| 183 | * Sound priorities pass 1 |
| 184 | * |
| 185 | * 79 4/03/99 1:13a Jeff |
| 186 | * added multisafe/dallas actions to set an object on fire |
| 187 | * |
| 188 | * 78 4/02/99 10:13p Jeff |
| 189 | * made ship permissions multi safe |
| 190 | * |
| 191 | * 77 4/02/99 11:23a Matt |
| 192 | * Made KillObject not take a death_info struct, but rather the death info |
| 193 | * as individual parameters. Moved death_info into objinfo.h, since it's |
| 194 | * only used for generic objects. Took out fade-away death hack, now that |
| 195 | * fade-away deaths can be explicitely set. |
| 196 | * |
| 197 | * 76 4/02/99 10:18a Chris |
| 198 | * We can now mess with the Object_info anim stuff |
| 199 | * |
| 200 | * 75 3/30/99 7:25p Chris |
| 201 | * Fixed the bug where dead objects would get a valid type |
| 202 | * |
| 203 | * 74 3/30/99 4:32p Chris |
| 204 | * Moved subtype to the main goal sturct (from goal_info). Made move |
| 205 | * relative object vec finishable. (Like get behind player) |
| 206 | * |
| 207 | * 73 3/29/99 11:53a Chris |
| 208 | * Corrected a objnum to obj ref problem in RayCast() |
| 209 | * |
| 210 | * 72 3/27/99 12:53p Chris |
| 211 | * Added new enabler types |
| 212 | * |
| 213 | * 71 3/23/99 5:53p Matt |
| 214 | * Fixed bug in physics set flags code |
| 215 | * |
| 216 | * 70 3/22/99 10:59a Chris |
| 217 | * Awareness code was tweaked. Multisafe stuff added for objects. |
| 218 | * |
| 219 | * 69 3/17/99 11:47a Jeff |
| 220 | * exported function to get what language we are using |
| 221 | * |
| 222 | * 68 3/16/99 11:26a Chris |
| 223 | * Buddy is now smarter -- gets to trigger level goals |
| 224 | * |
| 225 | * 67 3/10/99 1:33p Chris |
| 226 | * Fixes for multi-line gb messages |
| 227 | * |
| 228 | * 66 3/03/99 3:01a Chris |
| 229 | * Exported the difficulty stuff to OSIRIS |
| 230 | * |
| 231 | * 65 3/03/99 12:49a Chris |
| 232 | * |
| 233 | * 64 3/03/99 12:13a Chris |
| 234 | * |
| 235 | * 63 3/03/99 12:12a Chris |
| 236 | * |
| 237 | * 62 3/03/99 12:11a Chris |
| 238 | * one more AI path check function |
| 239 | * |
| 240 | * 61 3/03/99 12:07a Chris |
| 241 | * Added the two new OSIRIS predefs for AI path finding |
| 242 | * |
| 243 | * 60 3/01/99 8:13p Chris |
| 244 | * major hack so that goal text can be displayed |
| 245 | * |
| 246 | * 59 3/01/99 8:05p Chris |
| 247 | * Fixed bugs with the Level goal value functions |
| 248 | * |
| 249 | * 58 3/01/99 7:20p Chris |
| 250 | * Fixed dist problems with finding nearby objects |
| 251 | * |
| 252 | * 57 2/28/99 11:30p Chris |
| 253 | * FindObjOfType and OSIRIS controllable deaths |
| 254 | * |
| 255 | * 56 2/25/99 5:43p Chris |
| 256 | * Massive improvement to BOA and AI (again) |
| 257 | * |
| 258 | * 55 2/22/99 8:21p Chris |
| 259 | * |
| 260 | * 54 2/22/99 5:59p Chris |
| 261 | * Level Goals are now in OSIRIS. :) |
| 262 | * |
| 263 | * 53 2/21/99 5:51p Chris |
| 264 | * FIxed a bug with OBJV_C_TYPE (It should have been OBJV_I_TYPE). Added |
| 265 | * Obj_FindType() |
| 266 | * |
| 267 | * 52 2/20/99 5:08p Chris |
| 268 | * |
| 269 | * 51 2/18/99 4:27p Jeff |
| 270 | * added lookup functions for matcen, paths, level goals |
| 271 | * |
| 272 | * 50 2/13/99 3:14p Dan |
| 273 | * Check for no AI info for object in osipf_ObjectCustomAnim() |
| 274 | * |
| 275 | * 49 2/12/99 6:56p Chris |
| 276 | * |
| 277 | * 48 2/12/99 6:44p Chris |
| 278 | * |
| 279 | * 47 2/11/99 2:56a Jeff |
| 280 | * improvements to introcam |
| 281 | * |
| 282 | * 45 2/10/99 4:45p Jeff |
| 283 | * table file parser stuff |
| 284 | * |
| 285 | * 44 2/10/99 1:47p Matt |
| 286 | * Changed object handle symbolic constants |
| 287 | * |
| 288 | * 43 2/09/99 9:58a Chris |
| 289 | * Massive BOA update :) Terrain happy now. Vis happy now. Sound happy |
| 290 | * now. |
| 291 | * |
| 292 | * 42 2/08/99 3:06a Jeff |
| 293 | * created a function to switch a player between ai and flying control |
| 294 | * types (not exported to osiris...instead used in multisafe) |
| 295 | * |
| 296 | * 41 2/06/99 12:55p Chris |
| 297 | * Converted the path stuff to base-1 |
| 298 | * |
| 299 | * 40 2/03/99 1:51a Jeff |
| 300 | * added predefs for ship permissions |
| 301 | * |
| 302 | * 39 2/03/99 12:43a Chris |
| 303 | * Added Obj_GetGroundPos |
| 304 | * |
| 305 | * 38 1/29/99 5:10p Chris |
| 306 | * Added an optional parent handle check for FindObjOfType |
| 307 | * |
| 308 | * 37 1/26/99 2:51p Chris |
| 309 | * AIG_WANDER improvements |
| 310 | * |
| 311 | * 36 1/26/99 9:31a Chris |
| 312 | * Obj_Value now correctly return OBJ_NONE when doing a TYPE check on an |
| 313 | * invalid objref |
| 314 | * |
| 315 | * 35 1/25/99 6:13p Matt |
| 316 | * When doing a radius attach to a powerup, cut the radius ratio in half, |
| 317 | * since powerups use double their actual radius. |
| 318 | * |
| 319 | * 34 1/25/99 8:38a Chris |
| 320 | * The the GUID to AI_FollowPathSimple |
| 321 | * |
| 322 | * 33 1/25/99 7:43a Chris |
| 323 | * Added the GUID (Goal Unique Id) and added the ability for weapon |
| 324 | * batteries to always fire exactly forward. |
| 325 | * |
| 326 | * 32 1/24/99 11:39p Chris |
| 327 | * Added AIG_FOLLOW_PATH to AI_AddGoal for OSIRIS |
| 328 | * |
| 329 | * 31 1/24/99 8:17p Chris |
| 330 | * Updated AI and OSIRIS. Externalized fireball constants for spew and |
| 331 | * sparks. Added CreateRandomSparks to OSIRIS, renamed a bunch of AI |
| 332 | * Notify names to use underscores. Fixed a memory access leak in the |
| 333 | * matcen effect code. |
| 334 | * |
| 335 | * 30 1/24/99 6:36p Matt |
| 336 | * Made AIGoalFollowPathSimple() use slot 3 instead of slot 0 (with |
| 337 | * ChrisP) |
| 338 | * |
| 339 | * 29 1/23/99 4:48p Matt |
| 340 | * Fixed a pair of small bugs |
| 341 | * |
| 342 | * 28 1/22/99 6:53p Chris |
| 343 | * Fixed LoadandBind Aux notify problems, fixed static path problems, |
| 344 | * fixed AIF_FORCE_AWARE Problems, improved path code |
| 345 | * |
| 346 | * 27 1/22/99 4:47p Jeff |
| 347 | * |
| 348 | * 26 1/21/99 11:15p Jeff |
| 349 | * pulled out some structs and defines from header files and moved them |
| 350 | * into seperate header files so that multiplayer dlls don't require major |
| 351 | * game headers, just those new headers. Side effect is a shorter build |
| 352 | * time. Also cleaned up some header file #includes that weren't needed. |
| 353 | * This affected polymodel.h, object.h, player.h, vecmat.h, room.h, |
| 354 | * manage.h and multi.h |
| 355 | * |
| 356 | * 25 1/21/99 3:56p Nate |
| 357 | * Changed osipf_FindObjectName() so that it returns a handle |
| 358 | * |
| 359 | * 24 1/20/99 4:16p Jeff |
| 360 | * added ai notify child events and predefs to get ids of sound, room, |
| 361 | * trigger, object names |
| 362 | * |
| 363 | * 23 1/20/99 1:01a Chris |
| 364 | * Improved AI and OSIRIS intergration |
| 365 | * |
| 366 | * 22 1/18/99 2:46p Matt |
| 367 | * Combined flags & flags2 fields in object struct |
| 368 | * |
| 369 | * 21 1/18/99 9:05a Chris |
| 370 | * Improved OSIRIS, AI, and ATTACH system, changed wiggle code, changed |
| 371 | * attach code for rad attaches, and added the AIG_ATTACH_OBJ goal |
| 372 | * |
| 373 | * 20 1/15/99 5:59p Chris |
| 374 | * |
| 375 | * 19 1/13/99 5:20p Jeff |
| 376 | * added 4 new file operation predefs |
| 377 | * |
| 378 | * 18 1/13/99 3:29a Chris |
| 379 | * oops, forgot to include sounds.h |
| 380 | * |
| 381 | * 17 1/13/99 3:25a Chris |
| 382 | * Added Obj_Burning and Obj_IsEffect to OSIRIS |
| 383 | * |
| 384 | * 16 1/13/99 2:29a Chris |
| 385 | * Massive AI, OSIRIS update |
| 386 | * |
| 387 | * 15 1/11/99 2:14p Chris |
| 388 | * Massive work on OSIRIS and AI |
| 389 | * |
| 390 | * 14 1/05/99 12:24p Chris |
| 391 | * More OSIRIS improvements |
| 392 | * |
| 393 | * 13 1/05/99 11:34a Jeff |
| 394 | * fixed bugs in mission_flagget/set (needed to decrement flag before |
| 395 | * using) |
| 396 | * |
| 397 | * 12 1/04/99 6:43p Jeff |
| 398 | * added support to get/set mission flag values |
| 399 | * |
| 400 | * 11 1/04/99 12:42p Chris |
| 401 | * Updated OSIRIS with "xxxx_external.h" files and Obj_Value, and |
| 402 | * Matcen_XXX functions |
| 403 | * |
| 404 | * 10 12/30/98 3:46p Chris |
| 405 | * Incremental AI changes |
| 406 | * |
| 407 | * 9 12/23/98 12:10p Chris |
| 408 | * Added Gametime and Frametime to OSIRIS |
| 409 | * |
| 410 | * 8 12/22/98 4:51p Chris |
| 411 | * Added a ObjCreate predefined function |
| 412 | * |
| 413 | * 7 12/22/98 2:46p Chris |
| 414 | * Added the AIValue predefined function |
| 415 | * |
| 416 | * 6 12/21/98 5:30p Samir |
| 417 | * predef for determining if object is being rendered. |
| 418 | * |
| 419 | * 5 12/18/98 4:01p Samir |
| 420 | * implemented controls functions. |
| 421 | * |
| 422 | * 4 12/17/98 6:44p Samir |
| 423 | * added control manipulation predefs. |
| 424 | * |
| 425 | * 3 12/17/98 5:43p Jeff |
| 426 | * created timer system for osiris and save restore events |
| 427 | * |
| 428 | * 2 12/16/98 10:14p Jeff |
| 429 | * created osiris predefined function file |
| 430 | * |
| 431 | * $NoKeywords: $ |
| 432 | */ |
| 433 | #include <stdarg.h> |
| 434 | #include "osiris_predefs.h"cxx . . $ `<file>/Descent3/osiris_predefs.h`/ |
| 435 | #include "object.h"cxx . . $ `<file>/Descent3/object.h`/ |
| 436 | #include "mono.h"cxx . . $ `<file>/ddebug/mono.h`/ |
| 437 | #include "trigger.h"cxx . . $ `<file>/Descent3/trigger.h`/ |
| 438 | #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/ |
| 439 | #include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/ |
| 440 | #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/ |
| 441 | #include "gamepath.h"cxx . . $ `<file>/Descent3/gamepath.h`/ |
| 442 | #include "AIGoal.h"cxx . . $ `<file>/Descent3/AIGoal.h`/ |
| 443 | #include "AIMain.h"cxx . . $ `<file>/Descent3/AIMain.h`/ |
| 444 | #include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/ |
| 445 | #include "room.h"cxx . . $ `<file>/Descent3/room.h`/ |
| 446 | #include "objinfo.h"cxx . . $ `<file>/Descent3/objinfo.h`/ |
| 447 | #include "weapon.h"cxx . . $ `<file>/Descent3/weapon.h`/ |
| 448 | #include "game.h"cxx . . $ `<file>/Descent3/game.h`/ |
| 449 | #include "terrain.h"cxx . . $ `<file>/Descent3/terrain.h`/ |
| 450 | #include "attach.h"cxx . . $ `<file>/Descent3/attach.h`/ |
| 451 | #include "matcen.h"cxx . . $ `<file>/Descent3/matcen.h`/ |
| 452 | #include "findintersection.h"cxx . . $ `<file>/physics/findintersection.h`/ |
| 453 | #include "controls.h"cxx . . $ `<file>/Descent3/controls.h`/ |
| 454 | #include "Controller.h"cxx . . $ `<file>/lib/Controller.h`/ |
| 455 | #include "ship.h"cxx . . $ `<file>/Descent3/ship.h`/ |
| 456 | #include "Mission.h"cxx . . $ `<file>/Descent3/Mission.h`/ |
| 457 | #include "osiris_share.h"cxx . . $ `<file>/Descent3/osiris_share.h`/ |
| 458 | #include "multisafe.h"cxx . . $ `<file>/Descent3/multisafe.h`/ |
| 459 | #include "sounds.h"cxx . . $ `<file>/Descent3/sounds.h`/ |
| 460 | #include "polymodel.h"cxx . . $ `<file>/model/polymodel.h`/ |
| 461 | #include "multi.h"cxx . . $ `<file>/Descent3/multi.h`/ |
| 462 | #include "viseffect.h"cxx . . $ `<file>/Descent3/viseffect.h`/ |
| 463 | #include "physics.h"cxx . . $ `<file>/physics/physics.h`/ |
| 464 | #include "levelgoal.h"cxx . . $ `<file>/Descent3/levelgoal.h`/ |
| 465 | #include "BOA.h"cxx . . $ `<file>/Descent3/BOA.h`/ |
| 466 | #include "marker.h"cxx . . $ `<file>/Descent3/marker.h`/ |
| 467 | #include "damage.h"cxx . . $ `<file>/Descent3/damage.h`/ |
| 468 | #include "aipath.h"cxx . . $ `<file>/Descent3/aipath.h`/ |
| 469 | #include "difficulty.h"cxx . . $ `<file>/Descent3/difficulty.h`/ |
| 470 | #include "localization.h"cxx . . $ `<file>/Descent3/localization.h`/ |
| 471 | #include "psrand.h"cxx . . $ `<file>/misc/psrand.h`/ |
| 472 | #include "demofile.h"cxx . . $ `<file>/lib/demofile.h`/ |
| 473 | |
| 474 | int *hack_ilistcxx . . $ hack_ilist. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 475 | int hack_listcxx . . $ hack_list.[100]; |
| 476 | |
| 477 | // osipf_CallObjectEvent |
| 478 | // Sends an event to an object. Returns true if the default action should |
| 479 | // continue to process. |
| 480 | bool osipf_CallObjectEventcxx . . $ osipf_CallObjectEvent(a44368be0f65be02).(int objhandle, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *ei) { |
| 481 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 482 | if (!objp) |
| 483 | return false; |
| 484 | |
| 485 | return Osiris_CallEventcxx . . $ Osiris_CallEvent(91e8d3045aa5549c).(objp, event, ei); |
| 486 | } |
| 487 | |
| 488 | // osipf_CallTriggerEvent |
| 489 | // Sends an event to a trigger. Returns true if the default action should |
| 490 | // continue to process. |
| 491 | bool osipf_CallTriggerEventcxx . . $ osipf_CallTriggerEvent(a44368be0f65be02).(int trignum, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *ei) { |
| 492 | if (trignum < 0 || trignum >= Num_triggerscxx . . $ Num_triggers.) |
| 493 | return false; |
| 494 | |
| 495 | return Osiris_CallTriggerEventcxx . . $ Osiris_CallTriggerEvent(a44368be0f65be02).(trignum, event, ei); |
| 496 | } |
| 497 | |
| 498 | /* |
| 499 | |
| 500 | *Get/Set Object Position |
| 501 | *Kill object |
| 502 | *Get Object max shields |
| 503 | *Get Object energy max |
| 504 | *Check to see if player has weapon |
| 505 | *Add weapon to a player |
| 506 | *Add weapon ammo |
| 507 | *Get weapon ammo |
| 508 | *Get/Set Player flags |
| 509 | *Is doorway openable |
| 510 | *play sound 2d/3d |
| 511 | *stop sound |
| 512 | *adjust 2d sound |
| 513 | *pickup powerup? |
| 514 | *end level |
| 515 | *timer events |
| 516 | *explode object |
| 517 | *start/stop spew |
| 518 | *get object type |
| 519 | *get object radius |
| 520 | *is object alive |
| 521 | *create pop-up view |
| 522 | *start end level sequence |
| 523 | *add type/id to inventory |
| 524 | *remove from inventory |
| 525 | *get inventory count |
| 526 | *use inventory item |
| 527 | *check for inventory item |
| 528 | *get player room |
| 529 | *set/get lighting effect distance |
| 530 | *set/get room wind |
| 531 | *get object fvec,rvec,uvec |
| 532 | *get/set object velocity |
| 533 | *get/set object parent |
| 534 | *enable WB |
| 535 | *get object anim frame |
| 536 | *play voice/stream |
| 537 | *add counter measure |
| 538 | *get counter measure count |
| 539 | *set portal render |
| 540 | *change face texture |
| 541 | *set object lighting effect parms |
| 542 | *ghost/unghost object |
| 543 | *set/get quad firing |
| 544 | *add player way point |
| 545 | */ |
| 546 | |
| 547 | // searches through GamePath index and returns index of path matching name |
| 548 | // returns -1 if not found |
| 549 | int osipf_AIGetPathIDcxx . . $ osipf_AIGetPathID(1ef8e6ec083aabb9).(char *string) { |
| 550 | // extract string reference |
| 551 | return FindGamePathNamecxx . . $ FindGamePathName(5c4306d8553b3696).(string); |
| 552 | } |
| 553 | |
| 554 | int osipf_AIGoalFollowPathSimplecxx . . $ osipf_AIGoalFollowPathSimple(ea6ae529d4ec1c7a).(int objhandle, int path_id, int guid, int flags, int slot) { |
| 555 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 556 | path_informationcxx . . $ path_information# path_info; |
| 557 | |
| 558 | if (!obj) { |
| 559 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal object passed to AIGoalFollowPathSimple\n"); |
| 560 | return -1; |
| 561 | } |
| 562 | |
| 563 | if (path_id == -1) { |
| 564 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Path Id Passed To AIGoalFollowPathSimple\n"); |
| 565 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 566 | return -1; |
| 567 | } |
| 568 | |
| 569 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 570 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object CT Passed To AIGoalFollowPathSimple\n"); |
| 571 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 572 | return -1; |
| 573 | } |
| 574 | |
| 575 | path_info.path_idcxx . . $ path_information#path_id. = path_id; |
| 576 | |
| 577 | if (flags & GF_PATH_MOVE_REVERSE_DIRcxx . . $ `Descent3/aistruct_external.h:242:9`!) |
| 578 | path_info.next_nodecxx . . $ path_information#next_node. = GamePathscxx . . $ GamePaths.[path_id].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 579 | else |
| 580 | path_info.next_nodecxx . . $ path_information#next_node. = 0; |
| 581 | |
| 582 | path_info.start_nodecxx . . $ path_information#start_node. = 0; |
| 583 | path_info.end_nodecxx . . $ path_information#end_node. = GamePathscxx . . $ GamePaths.[path_id].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 584 | |
| 585 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!, (void *)&path_info, slot, 1.0f, flags, guid); |
| 586 | } |
| 587 | |
| 588 | int osipf_AIPowerSwitchcxx . . $ osipf_AIPowerSwitch(e01ba461194aa403).(int objhandle, uint8_tcxx . . $ uint8_t# f_power_on) { |
| 589 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 590 | if (!obj) { |
| 591 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object passed to AIPowerSwitch\n"); |
| 592 | return -1; |
| 593 | } |
| 594 | |
| 595 | if (f_power_on) |
| 596 | AIPowerSwitchcxx . . $ AIPowerSwitch(674fac047436fc5b).(obj, true); |
| 597 | else |
| 598 | AIPowerSwitchcxx . . $ AIPowerSwitch(674fac047436fc5b).(obj, false); |
| 599 | |
| 600 | return 0; |
| 601 | } |
| 602 | |
| 603 | // Touches a sound file so it loads into memory |
| 604 | void osipf_SoundTouchcxx . . $ osipf_SoundTouch(fda57c8427c60377).(char *str) { |
| 605 | int id = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(str)); |
| 606 | |
| 607 | if (id == -1) { |
| 608 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sound %s was not found. Unable to touch.\n", str); |
| 609 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 610 | } else |
| 611 | Sound_systemcxx . . $ Sound_system..CheckAndForceSoundDataAlloccxx . . $ hlsSystem#CheckAndForceSoundDataAlloc(83c267b20bac841a).(id); |
| 612 | } |
| 613 | |
| 614 | // Gets room values |
| 615 | void osipf_RoomValuecxx . . $ osipf_RoomValue(504a19c195c7574e).(int roomnum, char op, char vtype, void *ptr, int index) { |
| 616 | if (roomnum < 0 || roomnum > Highest_room_indexcxx . . $ Highest_room_index. || !Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.) { |
| 617 | if (vtype == RMV_C_USEDcxx . . $ `scripts/osiris_common.h:686:9`!) |
| 618 | *(char *)ptr = 0; |
| 619 | else |
| 620 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "RoomValue: Illegal Room Passed\n"); |
| 621 | |
| 622 | return; |
| 623 | } |
| 624 | |
| 625 | roomcxx . . $ room# *rp = &Roomscxx . . $ Rooms.[roomnum]; |
| 626 | |
| 627 | switch (vtype) { |
| 628 | case RMV_I_FLAGScxx . . $ `scripts/osiris_common.h:684:9`!: |
| 629 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 630 | *(int *)ptr = rp->flagscxx . . $ room#flags.; |
| 631 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 632 | rp->flagscxx . . $ room#flags. = *(int *)ptr; |
| 633 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 634 | rp->flagscxx . . $ room#flags. |= *(int *)ptr; |
| 635 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 636 | rp->flagscxx . . $ room#flags. &= ~(*(int *)ptr); |
| 637 | break; |
| 638 | case RMV_V_WINDcxx . . $ `scripts/osiris_common.h:685:9`!: |
| 639 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 640 | rp->windcxx . . $ room#wind. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 641 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 642 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rp->windcxx . . $ room#wind.; |
| 643 | break; |
| 644 | case RMV_C_USEDcxx . . $ `scripts/osiris_common.h:686:9`!: |
| 645 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 646 | *(char *)ptr = (rp->usedcxx . . $ room#used. != 0); |
| 647 | break; |
| 648 | |
| 649 | case RMV_I_NUM_PATH_PNTScxx . . $ `scripts/osiris_common.h:688:9`!: |
| 650 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 651 | *(int *)ptr = 1; // chrishack -- might change if the multi point intraroom points are added |
| 652 | break; |
| 653 | case RMSV_V_PATH_PNTcxx . . $ `scripts/osiris_common.h:689:9`!: |
| 654 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 655 | rp->path_pntcxx . . $ room#path_pnt. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 656 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 657 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rp->path_pntcxx . . $ room#path_pnt.; |
| 658 | break; |
| 659 | |
| 660 | case RMV_I_NUM_FACEScxx . . $ `scripts/osiris_common.h:691:9`!: |
| 661 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 662 | *(int *)ptr = rp->num_facescxx . . $ room#num_faces.; |
| 663 | break; |
| 664 | case RMSV_I_FACE_TEXTURE_IDcxx . . $ `scripts/osiris_common.h:692:9`!: |
| 665 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 666 | rp->facescxx . . $ room#faces.[index].tmapcxx . . $ face#tmap. = *(int *)ptr; |
| 667 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 668 | *(int *)ptr = rp->facescxx . . $ room#faces.[index].tmapcxx . . $ face#tmap.; |
| 669 | break; |
| 670 | case RMSV_I_FACE_FLAGScxx . . $ `scripts/osiris_common.h:693:9`!: |
| 671 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 672 | *(int *)ptr = rp->facescxx . . $ room#faces.[index].flagscxx . . $ face#flags.; |
| 673 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 674 | rp->facescxx . . $ room#faces.[index].flagscxx . . $ face#flags. = *(int *)ptr; |
| 675 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 676 | rp->facescxx . . $ room#faces.[index].flagscxx . . $ face#flags. |= *(int *)ptr; |
| 677 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 678 | rp->facescxx . . $ room#faces.[index].flagscxx . . $ face#flags. &= ~(*(int *)ptr); |
| 679 | break; |
| 680 | case RMSV_V_FACE_NORMALcxx . . $ `scripts/osiris_common.h:694:9`!: |
| 681 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 682 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rp->facescxx . . $ room#faces.[index].normalcxx . . $ face#normal.; |
| 683 | break; |
| 684 | case RMSV_V_FACE_CENTER_PNTcxx . . $ `scripts/osiris_common.h:695:9`!: |
| 685 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 686 | int i; |
| 687 | |
| 688 | if (index < 0 || index >= rp->num_facescxx . . $ room#num_faces. || rp->facescxx . . $ room#faces.[index].num_vertscxx . . $ face#num_verts. <= 0) { |
| 689 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rp->path_pntcxx . . $ room#path_pnt.; |
| 690 | } else { |
| 691 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 692 | |
| 693 | for (i = 0; i < rp->facescxx . . $ room#faces.[index].num_vertscxx . . $ face#num_verts.; i++) { |
| 694 | *(vectorcxx . . $ vector# *)ptr +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). rp->vertscxx . . $ room#verts.[rp->facescxx . . $ room#faces.[index].face_vertscxx . . $ face#face_verts.[i]]; |
| 695 | } |
| 696 | |
| 697 | *(vectorcxx . . $ vector# *)ptr /=cxx . . $ `operator/=`(f132838b2cd11d6). rp->facescxx . . $ room#faces.[index].num_vertscxx . . $ face#num_verts.; |
| 698 | } |
| 699 | } |
| 700 | break; |
| 701 | case RMV_I_NUM_PORTALScxx . . $ `scripts/osiris_common.h:697:9`!: |
| 702 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 703 | *(int *)ptr = rp->num_portalscxx . . $ room#num_portals.; |
| 704 | break; |
| 705 | case RMSV_V_PORTAL_PATH_PNTcxx . . $ `scripts/osiris_common.h:698:9`!: |
| 706 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 707 | rp->portalscxx . . $ room#portals.[index].path_pntcxx . . $ portal#path_pnt. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; // chrishack -- make sure save game accounts for this |
| 708 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 709 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rp->portalscxx . . $ room#portals.[index].path_pntcxx . . $ portal#path_pnt.; |
| 710 | break; |
| 711 | case RMSV_I_PORTAL_CONNECT_ROOMcxx . . $ `scripts/osiris_common.h:699:9`!: |
| 712 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 713 | *(int *)ptr = rp->portalscxx . . $ room#portals.[index].croomcxx . . $ portal#croom.; |
| 714 | break; |
| 715 | case RMSV_I_PORTAL_CONNECT_PORTALcxx . . $ `scripts/osiris_common.h:700:9`!: |
| 716 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 717 | *(int *)ptr = rp->portalscxx . . $ room#portals.[index].cportalcxx . . $ portal#cportal.; |
| 718 | break; |
| 719 | case RMSV_I_PORTAL_FACEcxx . . $ `scripts/osiris_common.h:701:9`!: |
| 720 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 721 | *(int *)ptr = rp->portalscxx . . $ room#portals.[index].portal_facecxx . . $ portal#portal_face.; |
| 722 | break; |
| 723 | case RMV_F_DAMAGEcxx . . $ `scripts/osiris_common.h:704:9`!: |
| 724 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 725 | *(float *)ptr = rp->damagecxx . . $ room#damage.; |
| 726 | break; |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | void osipf_PlayerValuecxx . . $ osipf_PlayerValue(504a19c195c7574e).(int obj_handle, char op, char vhandle, void *ptr, int index) { |
| 731 | objectcxx . . $ object# *objp; |
| 732 | int id; |
| 733 | bool extract_info = true; |
| 734 | |
| 735 | if (vhandle == PLYV_I_STRIP_WEAPONScxx . . $ `scripts/osiris_common.h:482:9`!) { |
| 736 | // check to see if ptr is a -1, if so, don't extract info |
| 737 | if ((*(int *)ptr) == -1) |
| 738 | extract_info = false; |
| 739 | } |
| 740 | |
| 741 | if (extract_info) { |
| 742 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 743 | |
| 744 | if (!objp || (!(objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || objp->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`! || objp->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!))) { |
| 745 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Player Value: Illegal Object Passed\n"); |
| 746 | return; |
| 747 | } |
| 748 | |
| 749 | id = objp->idcxx . . $ object#id.; |
| 750 | } |
| 751 | |
| 752 | switch (vhandle) { |
| 753 | case PLYV_I_FLAGScxx . . $ `scripts/osiris_common.h:481:9`!: { |
| 754 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 755 | *(int *)ptr = Playerscxx . . $ Players.[id].flagscxx . . $ player#flags.; |
| 756 | } |
| 757 | } break; |
| 758 | case PLYV_F_ENERGYcxx . . $ `scripts/osiris_common.h:458:9`!: |
| 759 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 760 | *(float *)ptr = Playerscxx . . $ Players.[id].energycxx . . $ player#energy.; |
| 761 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 762 | Playerscxx . . $ Players.[id].energycxx . . $ player#energy. = *(float *)ptr; |
| 763 | break; |
| 764 | case PLYV_F_MOVEMENT_SCALARcxx . . $ `scripts/osiris_common.h:459:9`!: |
| 765 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 766 | *(float *)ptr = Playerscxx . . $ Players.[id].movement_scalarcxx . . $ player#movement_scalar.; |
| 767 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 768 | Playerscxx . . $ Players.[id].movement_scalarcxx . . $ player#movement_scalar. = *(float *)ptr; |
| 769 | break; |
| 770 | case PLYV_F_RECHARGE_SCALARcxx . . $ `scripts/osiris_common.h:460:9`!: |
| 771 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 772 | *(float *)ptr = Playerscxx . . $ Players.[id].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar.; |
| 773 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 774 | Playerscxx . . $ Players.[id].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar. = *(float *)ptr; |
| 775 | break; |
| 776 | case PLYV_F_WSPEED_SCALARcxx . . $ `scripts/osiris_common.h:461:9`!: |
| 777 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 778 | *(float *)ptr = Playerscxx . . $ Players.[id].weapon_speed_scalarcxx . . $ player#weapon_speed_scalar.; |
| 779 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 780 | Playerscxx . . $ Players.[id].weapon_speed_scalarcxx . . $ player#weapon_speed_scalar. = *(float *)ptr; |
| 781 | break; |
| 782 | case PLYV_F_DAMAGE_SCALARcxx . . $ `scripts/osiris_common.h:462:9`!: |
| 783 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 784 | *(float *)ptr = Playerscxx . . $ Players.[id].damage_scalarcxx . . $ player#damage_scalar.; |
| 785 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 786 | Playerscxx . . $ Players.[id].damage_scalarcxx . . $ player#damage_scalar. = *(float *)ptr; |
| 787 | break; |
| 788 | case PLYV_F_ARMOR_SCALARcxx . . $ `scripts/osiris_common.h:463:9`!: |
| 789 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 790 | *(float *)ptr = Playerscxx . . $ Players.[id].armor_scalarcxx . . $ player#armor_scalar.; |
| 791 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 792 | Playerscxx . . $ Players.[id].armor_scalarcxx . . $ player#armor_scalar. = *(float *)ptr; |
| 793 | break; |
| 794 | case PLYV_I_BUDDY_HANDLEcxx . . $ `scripts/osiris_common.h:464:9`!: |
| 795 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 796 | *(int *)ptr = Buddy_handlecxx . . $ Buddy_handle.[id]; |
| 797 | break; |
| 798 | case PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!: |
| 799 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 800 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 801 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 802 | mstruct.indexcxx . . $ msafe_struct#index. = index; |
| 803 | msafe_GetValuecxx . . $ msafe_GetValue(a41cef1a93aeae18).(MSAFE_WEAPON_CHECKcxx . . $ `scripts/osiris_common.h:913:9`!, &mstruct); |
| 804 | |
| 805 | if (!mstruct.statecxx . . $ msafe_struct#state.) { |
| 806 | *(int *)ptr = 0; |
| 807 | } else { |
| 808 | if (index >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) |
| 809 | *(int *)ptr = mstruct.countcxx . . $ msafe_struct#count.; |
| 810 | else |
| 811 | *(int *)ptr = 1; |
| 812 | } |
| 813 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 814 | int amount = *(int *)ptr; |
| 815 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 816 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 817 | mstruct.indexcxx . . $ msafe_struct#index. = index; |
| 818 | mstruct.statecxx . . $ msafe_struct#state. = (index >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) ? 0 : 1; |
| 819 | mstruct.countcxx . . $ msafe_struct#count. = amount; |
| 820 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_WEAPON_ADDcxx . . $ `scripts/osiris_common.h:914:9`!, &mstruct); |
| 821 | } |
| 822 | break; |
| 823 | |
| 824 | case PLYV_CS_GUIDEBOTNAMEcxx . . $ `scripts/osiris_common.h:475:9`!: { |
| 825 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 826 | char *dest = (char *)ptr; |
| 827 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(dest); |
| 828 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 829 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 830 | msafe_GetValuecxx . . $ msafe_GetValue(a41cef1a93aeae18).(MSAFE_MISC_GUIDEBOT_NAMEcxx . . $ `scripts/osiris_common.h:890:9`!, &mstruct); |
| 831 | strcpy(dest, mstruct.namecxx . . $ msafe_struct#name.); |
| 832 | } else { |
| 833 | char *src = (char *)ptr; |
| 834 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(src); |
| 835 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 836 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 837 | strcpy(mstruct.namecxx . . $ msafe_struct#name., src); |
| 838 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_MISC_GUIDEBOT_NAMEcxx . . $ `scripts/osiris_common.h:890:9`!, &mstruct); |
| 839 | } |
| 840 | |
| 841 | } break; |
| 842 | |
| 843 | case PLYSV_US_WEAPON_POWERUP_IDcxx . . $ `scripts/osiris_common.h:469:9`!: { |
| 844 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 845 | *(uint16_tcxx . . $ uint16_t# *)ptr = Shipscxx . . $ Ships.[Playerscxx . . $ Players.[id].ship_indexcxx . . $ player#ship_index.].spew_powerupcxx . . $ ship#spew_powerup.[index]; |
| 846 | } break; |
| 847 | case PLYSV_I_WEAPON_AMMOcxx . . $ `scripts/osiris_common.h:468:9`!: |
| 848 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 849 | if (index >= 0 && index < 10) { |
| 850 | *(int *)ptr = Playerscxx . . $ Players.[id].weapon_ammocxx . . $ player#weapon_ammo.[index]; |
| 851 | } |
| 852 | break; |
| 853 | case PLYV_B_THIEF_PLAYERHASITEMcxx . . $ `scripts/osiris_common.h:478:9`!: |
| 854 | // note this is multiplayer friendly |
| 855 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 856 | bool ret = ThiefPlayerHasItemcxx . . $ ThiefPlayerHasItem(cf9ef193275fa6d8).(obj_handle, index); |
| 857 | *((bool *)ptr) = ret; |
| 858 | } else { |
| 859 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 860 | } |
| 861 | break; |
| 862 | case PLYV_I_THIEF_STEALPLAYERITEMcxx . . $ `scripts/osiris_common.h:479:9`!: |
| 863 | // note this is multiplayer friendly |
| 864 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 865 | ThiefStealItemcxx . . $ ThiefStealItem(3e454b8ccf442868).(obj_handle, index); |
| 866 | } else { |
| 867 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 868 | } |
| 869 | break; |
| 870 | case PLYV_I_STRIP_WEAPONScxx . . $ `scripts/osiris_common.h:482:9`!: |
| 871 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 872 | if ((*(int *)ptr) == -1) { |
| 873 | MultiSendStripPlayercxx . . $ MultiSendStripPlayer(d4f767463ce0a6b3).(-1); |
| 874 | } else { |
| 875 | MultiSendStripPlayercxx . . $ MultiSendStripPlayer(d4f767463ce0a6b3).(id); |
| 876 | } |
| 877 | } |
| 878 | break; |
| 879 | // case PLYSV_F_ACCESSORY: |
| 880 | // if(op == VF_GET) |
| 881 | // *(float *)ptr = Players[id] |
| 882 | // else if(op == VF_SET) |
| 883 | // break; |
| 884 | } |
| 885 | } |
| 886 | |
| 887 | extern void AIUpdateAnimcxx . . $ AIUpdateAnim(419c470199a90a97).(objectcxx . . $ object# *obj); |
| 888 | |
| 889 | void osipf_ObjectCustomAnimcxx . . $ osipf_ObjectCustomAnim(d2ce4cea4bbae452).(int handle, float start, float end, float time, char flags, int sound_handle, |
| 890 | char next_anim_type) { |
| 891 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 892 | |
| 893 | if (!objp) { |
| 894 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIValue: Illegal Object Passed\n"); |
| 895 | return; |
| 896 | } |
| 897 | |
| 898 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..anim_flagscxx . . $ polyobj_info#anim_flags. |= AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!; |
| 899 | |
| 900 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..anim_start_framecxx . . $ custom_anim#anim_start_frame. = start; |
| 901 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..anim_end_framecxx . . $ custom_anim#anim_end_frame. = end; |
| 902 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..anim_timecxx . . $ custom_anim#anim_time. = time; |
| 903 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..flagscxx . . $ custom_anim#flags. = flags; |
| 904 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..anim_sound_indexcxx . . $ custom_anim#anim_sound_index. = sound_handle; |
| 905 | objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info..next_anim_typecxx . . $ custom_anim#next_anim_type. = next_anim_type; |
| 906 | |
| 907 | if (objp->ai_infocxx . . $ object#ai_info.) |
| 908 | objp->ai_infocxx . . $ object#ai_info.->next_animation_typecxx . . $ ai_frame#next_animation_type. = AS_CUSTOMcxx . . $ `Descent3/aistruct_external.h:445:9`!; |
| 909 | else |
| 910 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "ERROR: Changing animation for non-AI object.\n"); |
| 911 | |
| 912 | if (flags & AIAF_IMMEDIATEcxx . . $ `Descent3/aistruct_external.h:119:9`!) { |
| 913 | AIUpdateAnimcxx . . $ AIUpdateAnim(419c470199a90a97).(objp); |
| 914 | } |
| 915 | } |
| 916 | |
| 917 | // searches for an object id given it's name |
| 918 | int osipf_ObjectFindIDcxx . . $ osipf_ObjectFindID(5c4306d8553b3696).(const char *name) { return FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name)); } |
| 919 | |
| 920 | // searches for an object id given it's name |
| 921 | int osipf_ObjectFindTypecxx . . $ osipf_ObjectFindType(5c4306d8553b3696).(const char *name) { |
| 922 | int id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name)); |
| 923 | |
| 924 | if (id >= 0) { |
| 925 | return Object_infocxx . . $ Object_info.[id].typecxx . . $ object_info#type.; |
| 926 | } |
| 927 | |
| 928 | return OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 929 | } |
| 930 | |
| 931 | // searches through the weapons for a name and returns the id |
| 932 | int osipf_WeaponFindIDcxx . . $ osipf_WeaponFindID(5c4306d8553b3696).(const char *name) { return FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name)); } |
| 933 | |
| 934 | // returns how long an object has lived |
| 935 | float osipf_ObjectGetTimeLivedcxx . . $ osipf_ObjectGetTimeLived(5cde91ea12d43f46).(int objhandle) { |
| 936 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 937 | |
| 938 | if (!objp) { |
| 939 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal object passed to ObjectGetTimeLived\n"); |
| 940 | return 0; |
| 941 | } |
| 942 | |
| 943 | return (Gametimecxx . . $ Gametime. - objp->creation_timecxx . . $ object#creation_time.); |
| 944 | } |
| 945 | |
| 946 | void osipf_AIValuecxx . . $ osipf_AIValue(a441d934cb70081d).(int objhandle, char op, char vtype, void *ptr) { |
| 947 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 948 | |
| 949 | if (!objp) { |
| 950 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIValue: Illegal Object Passed\n"); |
| 951 | return; |
| 952 | } |
| 953 | |
| 954 | if ((objp->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) && (objp->control_typecxx . . $ object#control_type. != CT_DYING_AND_AIcxx . . $ `Descent3/object_external.h:230:9`!)) { |
| 955 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIValue: Illegal Object CT Passed\n"); |
| 956 | return; |
| 957 | } |
| 958 | |
| 959 | ai_framecxx . . $ ai_frame# *ai_info = objp->ai_infocxx . . $ object#ai_info.; |
| 960 | |
| 961 | switch (vtype) { |
| 962 | case AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!: |
| 963 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 964 | ai_info->max_velocitycxx . . $ ai_frame#max_velocity. = *((float *)ptr); |
| 965 | } else { |
| 966 | *((float *)ptr) = ai_info->max_velocitycxx . . $ ai_frame#max_velocity.; |
| 967 | } |
| 968 | break; |
| 969 | case AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!: |
| 970 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 971 | ai_info->max_delta_velocitycxx . . $ ai_frame#max_delta_velocity. = *((float *)ptr); |
| 972 | } else { |
| 973 | *((float *)ptr) = ai_info->max_delta_velocitycxx . . $ ai_frame#max_delta_velocity.; |
| 974 | } |
| 975 | break; |
| 976 | case AIV_F_MAX_TURN_RATEcxx . . $ `scripts/osiris_common.h:507:9`!: |
| 977 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 978 | ai_info->max_turn_ratecxx . . $ ai_frame#max_turn_rate. = *((float *)ptr); |
| 979 | } else { |
| 980 | *((float *)ptr) = ai_info->max_turn_ratecxx . . $ ai_frame#max_turn_rate.; |
| 981 | } |
| 982 | break; |
| 983 | case AIV_F_MAX_DELTA_TURN_RATEcxx . . $ `scripts/osiris_common.h:508:9`!: |
| 984 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 985 | ai_info->max_delta_turn_ratecxx . . $ ai_frame#max_delta_turn_rate. = *((float *)ptr); |
| 986 | } else { |
| 987 | *((float *)ptr) = ai_info->max_delta_turn_ratecxx . . $ ai_frame#max_delta_turn_rate.; |
| 988 | } |
| 989 | break; |
| 990 | case AIV_F_ATTACK_VEL_PERCENTcxx . . $ `scripts/osiris_common.h:509:9`!: |
| 991 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 992 | ai_info->attack_vel_percentcxx . . $ ai_frame#attack_vel_percent. = *((float *)ptr); |
| 993 | } else { |
| 994 | *((float *)ptr) = ai_info->attack_vel_percentcxx . . $ ai_frame#attack_vel_percent.; |
| 995 | } |
| 996 | break; |
| 997 | case AIV_F_FLEE_VEL_PERCENTcxx . . $ `scripts/osiris_common.h:510:9`!: |
| 998 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 999 | ai_info->flee_vel_percentcxx . . $ ai_frame#flee_vel_percent. = *((float *)ptr); |
| 1000 | } else { |
| 1001 | *((float *)ptr) = ai_info->flee_vel_percentcxx . . $ ai_frame#flee_vel_percent.; |
| 1002 | } |
| 1003 | break; |
| 1004 | case AIV_F_DODGE_VEL_PERCENTcxx . . $ `scripts/osiris_common.h:511:9`!: |
| 1005 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1006 | ai_info->dodge_vel_percentcxx . . $ ai_frame#dodge_vel_percent. = *((float *)ptr); |
| 1007 | } else { |
| 1008 | *((float *)ptr) = ai_info->dodge_vel_percentcxx . . $ ai_frame#dodge_vel_percent.; |
| 1009 | } |
| 1010 | break; |
| 1011 | case AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!: |
| 1012 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1013 | ai_info->circle_distancecxx . . $ ai_frame#circle_distance. = *((float *)ptr); |
| 1014 | } else { |
| 1015 | *((float *)ptr) = ai_info->circle_distancecxx . . $ ai_frame#circle_distance.; |
| 1016 | } |
| 1017 | break; |
| 1018 | case AIV_F_DODGE_PERCENTcxx . . $ `scripts/osiris_common.h:513:9`!: |
| 1019 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1020 | ai_info->dodge_percentcxx . . $ ai_frame#dodge_percent. = *((float *)ptr); |
| 1021 | } else { |
| 1022 | *((float *)ptr) = ai_info->dodge_percentcxx . . $ ai_frame#dodge_percent.; |
| 1023 | } |
| 1024 | break; |
| 1025 | case AIV_F_MELEE_DAMAGE1cxx . . $ `scripts/osiris_common.h:514:9`!: |
| 1026 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1027 | ai_info->melee_damagecxx . . $ ai_frame#melee_damage.[0] = *((float *)ptr); |
| 1028 | } else { |
| 1029 | *((float *)ptr) = ai_info->melee_damagecxx . . $ ai_frame#melee_damage.[0]; |
| 1030 | } |
| 1031 | break; |
| 1032 | case AIV_F_MELEE_DAMAGE2cxx . . $ `scripts/osiris_common.h:515:9`!: |
| 1033 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1034 | ai_info->melee_damagecxx . . $ ai_frame#melee_damage.[1] = *((float *)ptr); |
| 1035 | } else { |
| 1036 | *((float *)ptr) = ai_info->melee_damagecxx . . $ ai_frame#melee_damage.[1]; |
| 1037 | } |
| 1038 | break; |
| 1039 | case AIV_F_MELEE_LATENCY1cxx . . $ `scripts/osiris_common.h:516:9`!: |
| 1040 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1041 | ai_info->melee_latencycxx . . $ ai_frame#melee_latency.[0] = *((float *)ptr); |
| 1042 | } else { |
| 1043 | *((float *)ptr) = ai_info->melee_latencycxx . . $ ai_frame#melee_latency.[0]; |
| 1044 | } |
| 1045 | break; |
| 1046 | case AIV_F_MELEE_LATENCY2cxx . . $ `scripts/osiris_common.h:517:9`!: |
| 1047 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1048 | ai_info->melee_latencycxx . . $ ai_frame#melee_latency.[1] = *((float *)ptr); |
| 1049 | } else { |
| 1050 | *((float *)ptr) = ai_info->melee_latencycxx . . $ ai_frame#melee_latency.[1]; |
| 1051 | } |
| 1052 | break; |
| 1053 | case AIV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:518:9`!: |
| 1054 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1055 | ai_info->movement_typecxx . . $ ai_frame#movement_type. = *((char *)ptr); |
| 1056 | } else { |
| 1057 | *((char *)ptr) = ai_info->movement_typecxx . . $ ai_frame#movement_type.; |
| 1058 | } |
| 1059 | break; |
| 1060 | case AIV_C_MOVEMENT_SUBTYPEcxx . . $ `scripts/osiris_common.h:519:9`!: |
| 1061 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1062 | ai_info->movement_subtypecxx . . $ ai_frame#movement_subtype. = *((char *)ptr); |
| 1063 | } else { |
| 1064 | *((char *)ptr) = ai_info->movement_subtypecxx . . $ ai_frame#movement_subtype.; |
| 1065 | } |
| 1066 | break; |
| 1067 | case AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!: |
| 1068 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1069 | ai_info->animation_typecxx . . $ ai_frame#animation_type. = *((char *)ptr); |
| 1070 | } else { |
| 1071 | *((char *)ptr) = ai_info->animation_typecxx . . $ ai_frame#animation_type.; |
| 1072 | } |
| 1073 | break; |
| 1074 | case AIV_C_NEXT_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:521:9`!: |
| 1075 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1076 | ai_info->next_animation_typecxx . . $ ai_frame#next_animation_type. = *((char *)ptr); |
| 1077 | } else { |
| 1078 | *((char *)ptr) = ai_info->next_animation_typecxx . . $ ai_frame#next_animation_type.; |
| 1079 | } |
| 1080 | break; |
| 1081 | case AIV_C_NEXT_MOVEMENTcxx . . $ `scripts/osiris_common.h:522:9`!: |
| 1082 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1083 | ai_info->next_movementcxx . . $ ai_frame#next_movement. = *((char *)ptr); |
| 1084 | } else { |
| 1085 | *((char *)ptr) = ai_info->next_movementcxx . . $ ai_frame#next_movement.; |
| 1086 | } |
| 1087 | break; |
| 1088 | case AIV_C_CURRENT_WB_FIRINGcxx . . $ `scripts/osiris_common.h:523:9`!: |
| 1089 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1090 | ai_info->current_wb_firingcxx . . $ ai_frame#current_wb_firing. = *((char *)ptr); |
| 1091 | } else { |
| 1092 | *((char *)ptr) = ai_info->current_wb_firingcxx . . $ ai_frame#current_wb_firing.; |
| 1093 | } |
| 1094 | break; |
| 1095 | case AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!: |
| 1096 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1097 | AISetTargetcxx . . $ AISetTarget(9985ed114f2bfc78).(objp, *((int *)ptr)); |
| 1098 | } else { |
| 1099 | *((int *)ptr) = ai_info->target_handlecxx . . $ ai_frame#target_handle.; |
| 1100 | } |
| 1101 | break; |
| 1102 | case AIV_F_NEXT_TARGET_UPDATE_TIMEcxx . . $ `scripts/osiris_common.h:525:9`!: |
| 1103 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1104 | ai_info->next_target_update_timecxx . . $ ai_frame#next_target_update_time. = *((float *)ptr); |
| 1105 | } else { |
| 1106 | *((float *)ptr) = ai_info->next_target_update_timecxx . . $ ai_frame#next_target_update_time.; |
| 1107 | } |
| 1108 | break; |
| 1109 | case AIV_F_DIST_TO_TARGETcxx . . $ `scripts/osiris_common.h:526:9`!: |
| 1110 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1111 | ai_info->dist_to_target_actualcxx . . $ ai_frame#dist_to_target_actual. = ai_info->dist_to_target_perceivedcxx . . $ ai_frame#dist_to_target_perceived. = *((float *)ptr); |
| 1112 | } else { |
| 1113 | *((float *)ptr) = ai_info->dist_to_target_perceivedcxx . . $ ai_frame#dist_to_target_perceived.; |
| 1114 | } |
| 1115 | break; |
| 1116 | case AIV_V_VEC_TO_TARGETcxx . . $ `scripts/osiris_common.h:527:9`!: |
| 1117 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1118 | ai_info->vec_to_target_actualcxx . . $ ai_frame#vec_to_target_actual. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ai_info->vec_to_target_perceivedcxx . . $ ai_frame#vec_to_target_perceived. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *((vectorcxx . . $ vector# *)ptr); |
| 1119 | } else { |
| 1120 | *((vectorcxx . . $ vector# *)ptr) =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ai_info->vec_to_target_perceivedcxx . . $ ai_frame#vec_to_target_perceived.; |
| 1121 | } |
| 1122 | break; |
| 1123 | case AIV_F_NEXT_CHECK_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:528:9`!: |
| 1124 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1125 | ai_info->next_check_see_target_timecxx . . $ ai_frame#next_check_see_target_time. = *((float *)ptr); |
| 1126 | } else { |
| 1127 | *((float *)ptr) = ai_info->next_check_see_target_timecxx . . $ ai_frame#next_check_see_target_time.; |
| 1128 | } |
| 1129 | break; |
| 1130 | case AIV_V_LAST_SEE_TARGET_POScxx . . $ `scripts/osiris_common.h:529:9`!: |
| 1131 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1132 | ai_info->last_see_target_poscxx . . $ ai_frame#last_see_target_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *((vectorcxx . . $ vector# *)ptr); |
| 1133 | } else { |
| 1134 | *((vectorcxx . . $ vector# *)ptr) =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ai_info->last_see_target_poscxx . . $ ai_frame#last_see_target_pos.; |
| 1135 | } |
| 1136 | break; |
| 1137 | case AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!: |
| 1138 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1139 | ai_info->last_see_target_timecxx . . $ ai_frame#last_see_target_time. = *((float *)ptr); |
| 1140 | if (ai_info->last_see_target_timecxx . . $ ai_frame#last_see_target_time. == Gametimecxx . . $ Gametime.) { |
| 1141 | AINotifycxx . . $ AINotify(f32b5964aaa42c22).(objp, AIN_SEE_TARGETcxx . . $ `Descent3/aistruct_external.h:289:9`!, ObjGetcxx . . $ ObjGet(11672e354c0b263a).(ai_info->target_handlecxx . . $ ai_frame#target_handle.)); |
| 1142 | } |
| 1143 | } else { |
| 1144 | *((float *)ptr) = ai_info->last_see_target_timecxx . . $ ai_frame#last_see_target_time.; |
| 1145 | } |
| 1146 | break; |
| 1147 | case AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!: |
| 1148 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1149 | ai_info->last_hear_target_timecxx . . $ ai_frame#last_hear_target_time. = *((float *)ptr); |
| 1150 | } else { |
| 1151 | *((float *)ptr) = ai_info->last_hear_target_timecxx . . $ ai_frame#last_hear_target_time.; |
| 1152 | } |
| 1153 | break; |
| 1154 | case AIV_F_WEAPON_SPEEDcxx . . $ `scripts/osiris_common.h:531:9`!: |
| 1155 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1156 | ai_info->weapon_speedcxx . . $ ai_frame#weapon_speed. = *((float *)ptr); |
| 1157 | } else { |
| 1158 | *((float *)ptr) = ai_info->weapon_speedcxx . . $ ai_frame#weapon_speed.; |
| 1159 | } |
| 1160 | break; |
| 1161 | case AIV_F_NEXT_MELEE_TIMEcxx . . $ `scripts/osiris_common.h:532:9`!: |
| 1162 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1163 | ai_info->next_melee_timecxx . . $ ai_frame#next_melee_time. = *((float *)ptr); |
| 1164 | } else { |
| 1165 | *((float *)ptr) = ai_info->next_melee_timecxx . . $ ai_frame#next_melee_time.; |
| 1166 | } |
| 1167 | break; |
| 1168 | case AIV_F_LAST_RENDER_TIMEcxx . . $ `scripts/osiris_common.h:533:9`!: |
| 1169 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1170 | ai_info->last_render_timecxx . . $ ai_frame#last_render_time. = *((float *)ptr); |
| 1171 | } else { |
| 1172 | *((float *)ptr) = ai_info->last_render_timecxx . . $ ai_frame#last_render_time.; |
| 1173 | } |
| 1174 | break; |
| 1175 | case AIV_F_NEXT_FLINCH_TIMEcxx . . $ `scripts/osiris_common.h:534:9`!: |
| 1176 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1177 | ai_info->next_flinch_timecxx . . $ ai_frame#next_flinch_time. = *((float *)ptr); |
| 1178 | } else { |
| 1179 | *((float *)ptr) = ai_info->next_flinch_timecxx . . $ ai_frame#next_flinch_time.; |
| 1180 | } |
| 1181 | break; |
| 1182 | case AIV_V_MOVEMENT_DIRcxx . . $ `scripts/osiris_common.h:535:9`!: |
| 1183 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1184 | ai_info->movement_dircxx . . $ ai_frame#movement_dir. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *((vectorcxx . . $ vector# *)ptr); |
| 1185 | } else { |
| 1186 | *((vectorcxx . . $ vector# *)ptr) =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ai_info->movement_dircxx . . $ ai_frame#movement_dir.; |
| 1187 | } |
| 1188 | break; |
| 1189 | case AIV_V_ROT_THRUST_VECTORcxx . . $ `scripts/osiris_common.h:536:9`!: |
| 1190 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1191 | ai_info->rot_thrust_vectorcxx . . $ ai_frame#rot_thrust_vector. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *((vectorcxx . . $ vector# *)ptr); |
| 1192 | } else { |
| 1193 | *((vectorcxx . . $ vector# *)ptr) =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ai_info->rot_thrust_vectorcxx . . $ ai_frame#rot_thrust_vector.; |
| 1194 | } |
| 1195 | break; |
| 1196 | case AIV_F_FOVcxx . . $ `scripts/osiris_common.h:537:9`!: |
| 1197 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1198 | ai_info->fovcxx . . $ ai_frame#fov. = *((float *)ptr); |
| 1199 | } else { |
| 1200 | *((float *)ptr) = ai_info->fovcxx . . $ ai_frame#fov.; |
| 1201 | } |
| 1202 | break; |
| 1203 | case AIV_F_AVOID_FRIENDS_DISTcxx . . $ `scripts/osiris_common.h:538:9`!: |
| 1204 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1205 | ai_info->avoid_friends_distancecxx . . $ ai_frame#avoid_friends_distance. = *((float *)ptr); |
| 1206 | } else { |
| 1207 | *((float *)ptr) = ai_info->avoid_friends_distancecxx . . $ ai_frame#avoid_friends_distance.; |
| 1208 | } |
| 1209 | break; |
| 1210 | case AIV_F_FRUSTRATIONcxx . . $ `scripts/osiris_common.h:539:9`!: |
| 1211 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1212 | ai_info->frustrationcxx . . $ ai_frame#frustration. = *((float *)ptr); |
| 1213 | } else { |
| 1214 | *((float *)ptr) = ai_info->frustrationcxx . . $ ai_frame#frustration.; |
| 1215 | } |
| 1216 | break; |
| 1217 | case AIV_F_CURIOUSITYcxx . . $ `scripts/osiris_common.h:540:9`!: |
| 1218 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1219 | ai_info->curiousitycxx . . $ ai_frame#curiousity. = *((float *)ptr); |
| 1220 | } else { |
| 1221 | *((float *)ptr) = ai_info->curiousitycxx . . $ ai_frame#curiousity.; |
| 1222 | } |
| 1223 | break; |
| 1224 | case AIV_F_FIRE_SPREADcxx . . $ `scripts/osiris_common.h:541:9`!: |
| 1225 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1226 | ai_info->fire_spreadcxx . . $ ai_frame#fire_spread. = *((float *)ptr); |
| 1227 | } else { |
| 1228 | *((float *)ptr) = ai_info->fire_spreadcxx . . $ ai_frame#fire_spread.; |
| 1229 | } |
| 1230 | break; |
| 1231 | case AIV_F_AGRESSIONcxx . . $ `scripts/osiris_common.h:542:9`!: |
| 1232 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1233 | ai_info->agressioncxx . . $ ai_frame#agression. = *((float *)ptr); |
| 1234 | } else { |
| 1235 | *((float *)ptr) = ai_info->agressioncxx . . $ ai_frame#agression.; |
| 1236 | } |
| 1237 | break; |
| 1238 | case AIV_F_NIGHT_VISIONcxx . . $ `scripts/osiris_common.h:543:9`!: |
| 1239 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1240 | ai_info->night_visioncxx . . $ ai_frame#night_vision. = *((float *)ptr); |
| 1241 | } else { |
| 1242 | *((float *)ptr) = ai_info->night_visioncxx . . $ ai_frame#night_vision.; |
| 1243 | } |
| 1244 | break; |
| 1245 | case AIV_F_FOG_VISIONcxx . . $ `scripts/osiris_common.h:544:9`!: |
| 1246 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1247 | ai_info->fog_visioncxx . . $ ai_frame#fog_vision. = *((float *)ptr); |
| 1248 | } else { |
| 1249 | *((float *)ptr) = ai_info->fog_visioncxx . . $ ai_frame#fog_vision.; |
| 1250 | } |
| 1251 | break; |
| 1252 | case AIV_F_LEAD_ACCURACYcxx . . $ `scripts/osiris_common.h:545:9`!: |
| 1253 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1254 | ai_info->lead_accuracycxx . . $ ai_frame#lead_accuracy. = *((float *)ptr); |
| 1255 | } else { |
| 1256 | *((float *)ptr) = ai_info->lead_accuracycxx . . $ ai_frame#lead_accuracy.; |
| 1257 | } |
| 1258 | break; |
| 1259 | case AIV_F_LEAD_VARIENCEcxx . . $ `scripts/osiris_common.h:546:9`!: |
| 1260 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1261 | ai_info->lead_variencecxx . . $ ai_frame#lead_varience. = *((float *)ptr); |
| 1262 | } else { |
| 1263 | *((float *)ptr) = ai_info->lead_variencecxx . . $ ai_frame#lead_varience.; |
| 1264 | } |
| 1265 | break; |
| 1266 | case AIV_F_FIGHT_TEAMcxx . . $ `scripts/osiris_common.h:547:9`!: |
| 1267 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1268 | ai_info->fight_teamcxx . . $ ai_frame#fight_team. = *((float *)ptr); |
| 1269 | } else { |
| 1270 | *((float *)ptr) = ai_info->fight_teamcxx . . $ ai_frame#fight_team.; |
| 1271 | } |
| 1272 | break; |
| 1273 | case AIV_F_FIGHT_SAMEcxx . . $ `scripts/osiris_common.h:548:9`!: |
| 1274 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1275 | ai_info->fight_samecxx . . $ ai_frame#fight_same. = *((float *)ptr); |
| 1276 | } else { |
| 1277 | *((float *)ptr) = ai_info->fight_samecxx . . $ ai_frame#fight_same.; |
| 1278 | } |
| 1279 | break; |
| 1280 | case AIV_F_HEARINGcxx . . $ `scripts/osiris_common.h:549:9`!: |
| 1281 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1282 | ai_info->hearingcxx . . $ ai_frame#hearing. = *((float *)ptr); |
| 1283 | } else { |
| 1284 | *((float *)ptr) = ai_info->hearingcxx . . $ ai_frame#hearing.; |
| 1285 | } |
| 1286 | break; |
| 1287 | case AIV_F_ROAMINGcxx . . $ `scripts/osiris_common.h:550:9`!: |
| 1288 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1289 | ai_info->roamingcxx . . $ ai_frame#roaming. = *((float *)ptr); |
| 1290 | } else { |
| 1291 | *((float *)ptr) = ai_info->roamingcxx . . $ ai_frame#roaming.; |
| 1292 | } |
| 1293 | break; |
| 1294 | case AIV_F_LIFE_PRESERVATIONcxx . . $ `scripts/osiris_common.h:551:9`!: |
| 1295 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1296 | ai_info->life_preservationcxx . . $ ai_frame#life_preservation. = *((float *)ptr); |
| 1297 | } else { |
| 1298 | *((float *)ptr) = ai_info->life_preservationcxx . . $ ai_frame#life_preservation.; |
| 1299 | } |
| 1300 | break; |
| 1301 | case AIV_F_BIASED_FLIGHT_IMPORTANCEcxx . . $ `scripts/osiris_common.h:552:9`!: |
| 1302 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1303 | ai_info->biased_flight_importancecxx . . $ ai_frame#biased_flight_importance. = *((float *)ptr); |
| 1304 | } else { |
| 1305 | *((float *)ptr) = ai_info->biased_flight_importancecxx . . $ ai_frame#biased_flight_importance.; |
| 1306 | } |
| 1307 | break; |
| 1308 | case AIV_F_BIASED_FLIGHT_MINcxx . . $ `scripts/osiris_common.h:553:9`!: |
| 1309 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1310 | ai_info->biased_flight_mincxx . . $ ai_frame#biased_flight_min. = *((float *)ptr); |
| 1311 | } else { |
| 1312 | *((float *)ptr) = ai_info->biased_flight_mincxx . . $ ai_frame#biased_flight_min.; |
| 1313 | } |
| 1314 | break; |
| 1315 | case AIV_F_BIASED_FLIGHT_MAXcxx . . $ `scripts/osiris_common.h:554:9`!: |
| 1316 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1317 | ai_info->biased_flight_maxcxx . . $ ai_frame#biased_flight_max. = *((float *)ptr); |
| 1318 | } else { |
| 1319 | *((float *)ptr) = ai_info->biased_flight_maxcxx . . $ ai_frame#biased_flight_max.; |
| 1320 | } |
| 1321 | break; |
| 1322 | case AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!: |
| 1323 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1324 | ai_info->awarenesscxx . . $ ai_frame#awareness. = *((float *)ptr); |
| 1325 | } else { |
| 1326 | *((float *)ptr) = ai_info->awarenesscxx . . $ ai_frame#awareness.; |
| 1327 | } |
| 1328 | break; |
| 1329 | case AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!: |
| 1330 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1331 | *((int *)ptr) = ai_info->flagscxx . . $ ai_frame#flags.; |
| 1332 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1333 | ai_info->flagscxx . . $ ai_frame#flags. = *((int *)ptr); |
| 1334 | } else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) { |
| 1335 | ai_info->flagscxx . . $ ai_frame#flags. |= *((int *)ptr); |
| 1336 | } else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) { |
| 1337 | ai_info->flagscxx . . $ ai_frame#flags. &= ~(*((int *)ptr)); |
| 1338 | } |
| 1339 | break; |
| 1340 | case AIV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:557:9`!: |
| 1341 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1342 | *((int *)ptr) = ai_info->status_regcxx . . $ ai_frame#status_reg.; |
| 1343 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1344 | ai_info->status_regcxx . . $ ai_frame#status_reg. = *((int *)ptr); |
| 1345 | } else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) { |
| 1346 | ai_info->status_regcxx . . $ ai_frame#status_reg. |= *((int *)ptr); |
| 1347 | } else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) { |
| 1348 | ai_info->status_regcxx . . $ ai_frame#status_reg. &= ~(*((int *)ptr)); |
| 1349 | } |
| 1350 | break; |
| 1351 | } |
| 1352 | } |
| 1353 | |
| 1354 | void osipf_ObjectValuecxx . . $ osipf_ObjectValue(504a19c195c7574e).(int handle, char op, char var_handle, void *ptr, int index) { |
| 1355 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 1356 | if (!obj) { |
| 1357 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`! && var_handle == OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!) |
| 1358 | *(int *)ptr = (int)OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 1359 | |
| 1360 | return; |
| 1361 | } |
| 1362 | |
| 1363 | msafe_structcxx . . $ msafe_struct# m; |
| 1364 | m.objhandlecxx . . $ msafe_struct#objhandle. = obj->handlecxx . . $ object#handle.; |
| 1365 | |
| 1366 | switch (var_handle) { |
| 1367 | case OBJV_PI_HACK_FVI_IGNORE_LISTcxx . . $ `scripts/osiris_common.h:653:9`!: { |
| 1368 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1369 | if (ptr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1370 | int count = 0; |
| 1371 | |
| 1372 | do { |
| 1373 | hack_listcxx . . $ hack_list.[count] = ((int *)ptr)[count]; |
| 1374 | count++; |
| 1375 | } while (hack_listcxx . . $ hack_list.[count - 1] != -1); |
| 1376 | |
| 1377 | hack_ilistcxx . . $ hack_ilist. = hack_listcxx . . $ hack_list.; |
| 1378 | } else { |
| 1379 | hack_ilistcxx . . $ hack_ilist. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 1380 | } |
| 1381 | } |
| 1382 | } break; |
| 1383 | case OBJV_F_ROTDRAGcxx . . $ `scripts/osiris_common.h:640:9`!: |
| 1384 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1385 | m.rot_dragcxx . . $ msafe_struct#rot_drag. = *(float *)ptr; |
| 1386 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_ROTDRAGcxx . . $ `scripts/osiris_common.h:835:9`!, &m); |
| 1387 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1388 | *(float *)ptr = obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotdragcxx . . $ physics_info#rotdrag.; |
| 1389 | break; |
| 1390 | case OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!: |
| 1391 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1392 | m.shieldscxx . . $ msafe_struct#shields. = *(float *)ptr; |
| 1393 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 1394 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1395 | *(float *)ptr = obj->shieldscxx . . $ object#shields.; |
| 1396 | break; |
| 1397 | case OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!: |
| 1398 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1399 | m.typecxx . . $ msafe_struct#type. = *(int *)ptr; |
| 1400 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_TYPEcxx . . $ `scripts/osiris_common.h:812:9`!, &m); |
| 1401 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1402 | (*(int *)ptr) = obj->typecxx . . $ object#type.; |
| 1403 | break; |
| 1404 | case OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!: |
| 1405 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1406 | m.idcxx . . $ msafe_struct#id. = *(uint16_tcxx . . $ uint16_t# *)ptr; |
| 1407 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!, &m); |
| 1408 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1409 | (*(uint16_tcxx . . $ uint16_t# *)ptr) = obj->idcxx . . $ object#id.; |
| 1410 | break; |
| 1411 | case OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!: |
| 1412 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1413 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, (vectorcxx . . $ vector# *)ptr, obj->roomnumcxx . . $ object#roomnum., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, true); |
| 1414 | obj->flagscxx . . $ object#flags. |= OF_MOVED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:274:9`!; |
| 1415 | obj->flagscxx . . $ object#flags. &= ~OF_STOPPED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:272:9`!; |
| 1416 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1417 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->poscxx . . $ object#pos.; |
| 1418 | break; |
| 1419 | case OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!: |
| 1420 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1421 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &obj->poscxx . . $ object#pos., obj->roomnumcxx . . $ object#roomnum., (matrixcxx . . $ matrix# *)ptr, true); |
| 1422 | obj->flagscxx . . $ object#flags. |= OF_MOVED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:274:9`!; |
| 1423 | obj->flagscxx . . $ object#flags. &= ~OF_STOPPED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:272:9`!; |
| 1424 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1425 | *(matrixcxx . . $ matrix# *)ptr =cxx . . $ matrix#`operator=`(4c6f8b29806742). obj->orientcxx . . $ object#orient.; |
| 1426 | break; |
| 1427 | case OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!: |
| 1428 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1429 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &obj->poscxx . . $ object#pos., *(int *)ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, false); |
| 1430 | obj->flagscxx . . $ object#flags. |= OF_MOVED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:274:9`!; |
| 1431 | obj->flagscxx . . $ object#flags. &= ~OF_STOPPED_THIS_FRAMEcxx . . $ `Descent3/object_external.h:272:9`!; |
| 1432 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1433 | *(int *)ptr = obj->roomnumcxx . . $ object#roomnum.; |
| 1434 | break; |
| 1435 | case OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!: |
| 1436 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1437 | obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 1438 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1439 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.; |
| 1440 | break; |
| 1441 | case OBJV_V_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:632:9`!: |
| 1442 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1443 | obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 1444 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1445 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; |
| 1446 | break; |
| 1447 | break; |
| 1448 | case OBJV_V_THRUSTcxx . . $ `scripts/osiris_common.h:633:9`!: |
| 1449 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1450 | obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 1451 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1452 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust.; |
| 1453 | break; |
| 1454 | break; |
| 1455 | case OBJV_V_ROTTHRUSTcxx . . $ `scripts/osiris_common.h:634:9`!: |
| 1456 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1457 | obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 1458 | else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1459 | (*(vectorcxx . . $ vector# *)ptr) =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust.; |
| 1460 | break; |
| 1461 | break; |
| 1462 | case OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!: { |
| 1463 | int result = obj->flagscxx . . $ object#flags.; |
| 1464 | |
| 1465 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1466 | (*(int *)ptr) = obj->flagscxx . . $ object#flags.; |
| 1467 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1468 | result = (*(int *)ptr); |
| 1469 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 1470 | result |= (*(int *)ptr); |
| 1471 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 1472 | result &= ~(*(int *)ptr); |
| 1473 | |
| 1474 | if (op != VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1475 | m.flagscxx . . $ msafe_struct#flags. = result; |
| 1476 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_FLAGScxx . . $ `scripts/osiris_common.h:827:9`!, &m); |
| 1477 | } |
| 1478 | } break; |
| 1479 | case OBJV_F_SIZEcxx . . $ `scripts/osiris_common.h:636:9`!: |
| 1480 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1481 | *(float *)ptr = obj->sizecxx . . $ object#size.; |
| 1482 | break; |
| 1483 | case OBJV_S_NAMEcxx . . $ `scripts/osiris_common.h:649:9`!: |
| 1484 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1485 | if (obj->namecxx . . $ object#name.) { |
| 1486 | strcpy((char *)ptr, obj->namecxx . . $ object#name.); |
| 1487 | } else { |
| 1488 | *((char *)ptr) = 0; |
| 1489 | } |
| 1490 | } |
| 1491 | break; |
| 1492 | case OBJV_C_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:637:9`!: |
| 1493 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1494 | m.control_typecxx . . $ msafe_struct#control_type. = *(char *)ptr; |
| 1495 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:829:9`!, &m); |
| 1496 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1497 | *(char *)ptr = obj->control_typecxx . . $ object#control_type.; |
| 1498 | break; |
| 1499 | case OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!: |
| 1500 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1501 | m.movement_typecxx . . $ msafe_struct#movement_type. = *(char *)ptr; |
| 1502 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:830:9`!, &m); |
| 1503 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1504 | *(char *)ptr = obj->movement_typecxx . . $ object#movement_type.; |
| 1505 | break; |
| 1506 | case OBJV_F_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:639:9`!: |
| 1507 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1508 | m.creation_timecxx . . $ msafe_struct#creation_time. = *(float *)ptr; |
| 1509 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:831:9`!, &m); |
| 1510 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1511 | *(float *)ptr = obj->creation_timecxx . . $ object#creation_time.; |
| 1512 | break; |
| 1513 | case OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!: { |
| 1514 | int result = obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags.; |
| 1515 | |
| 1516 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1517 | (*(int *)ptr) = obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags.; |
| 1518 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1519 | result = (*(int *)ptr); |
| 1520 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 1521 | result |= (*(int *)ptr); |
| 1522 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 1523 | result &= ~(*(int *)ptr); |
| 1524 | |
| 1525 | if (op != VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1526 | m.physics_flagscxx . . $ msafe_struct#physics_flags. = result; |
| 1527 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:833:9`!, &m); |
| 1528 | } |
| 1529 | } break; |
| 1530 | case OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!: |
| 1531 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1532 | m.ithandlecxx . . $ msafe_struct#ithandle. = *(int *)ptr; |
| 1533 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_PARENTcxx . . $ `scripts/osiris_common.h:834:9`!, &m); |
| 1534 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1535 | (*(int *)ptr) = obj->parent_handlecxx . . $ object#parent_handle.; |
| 1536 | break; |
| 1537 | case OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!: |
| 1538 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1539 | *(float *)ptr = obj->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..anim_framecxx . . $ polyobj_info#anim_frame.; |
| 1540 | break; |
| 1541 | case OBJV_F_MAX_SHIELDScxx . . $ `scripts/osiris_common.h:644:9`!: |
| 1542 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1543 | if (obj->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || obj->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`! || obj->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) |
| 1544 | *(float *)ptr = 200.0f; |
| 1545 | else // chrishack -- make sure it is a generic object |
| 1546 | *(float *)ptr = Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].hit_pointscxx . . $ object_info#hit_points.; |
| 1547 | } |
| 1548 | break; |
| 1549 | case OBJV_PC_MARKER_MESSAGEcxx . . $ `scripts/osiris_common.h:645:9`!: |
| 1550 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1551 | if (obj->typecxx . . $ object#type. == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 1552 | strcpy((char *)ptr, MarkerMessagescxx . . $ MarkerMessages.[obj->idcxx . . $ object#id.]); |
| 1553 | } else { |
| 1554 | ((char *)ptr)[0] = '\0'; |
| 1555 | } |
| 1556 | } |
| 1557 | break; |
| 1558 | case OBJSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:646:9`!: |
| 1559 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) |
| 1560 | return; |
| 1561 | |
| 1562 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1563 | (*(float *)ptr) = Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].fromcxx . . $ anim_entry#from.; |
| 1564 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1565 | Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].fromcxx . . $ anim_entry#from. = (*(float *)ptr); |
| 1566 | break; |
| 1567 | case OBJSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:647:9`!: |
| 1568 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) |
| 1569 | return; |
| 1570 | |
| 1571 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1572 | (*(float *)ptr) = Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].tocxx . . $ anim_entry#to.; |
| 1573 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1574 | Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].tocxx . . $ anim_entry#to. = (*(float *)ptr); |
| 1575 | break; |
| 1576 | case OBJSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:648:9`!: |
| 1577 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) |
| 1578 | return; |
| 1579 | |
| 1580 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 1581 | (*(float *)ptr) = Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].spccxx . . $ anim_entry#spc.; |
| 1582 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 1583 | Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].animcxx . . $ object_info#anim.[obj->ai_infocxx . . $ object#ai_info.->movement_typecxx . . $ ai_frame#movement_type.].elemcxx . . $ anim_elem#elem.[index].spccxx . . $ anim_entry#spc. = (*(float *)ptr); |
| 1584 | break; |
| 1585 | |
| 1586 | case OBJV_C_VIRUS_INFECTEDcxx . . $ `scripts/osiris_common.h:650:9`!: { |
| 1587 | // the object show signs of virus infection |
| 1588 | if (!obj->effect_infocxx . . $ object#effect_info.) |
| 1589 | return; |
| 1590 | |
| 1591 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1592 | (*(char *)ptr) = (obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_VIRUS_INFECTEDcxx . . $ `Descent3/object_external.h:213:9`!) ? 1 : 0; |
| 1593 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1594 | bool enable = (*(char *)ptr) ? true : false; |
| 1595 | |
| 1596 | if (enable) { |
| 1597 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_VIRUS_INFECTEDcxx . . $ `Descent3/object_external.h:213:9`!; |
| 1598 | } else { |
| 1599 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. &= ~EF_VIRUS_INFECTEDcxx . . $ `Descent3/object_external.h:213:9`!; |
| 1600 | } |
| 1601 | } |
| 1602 | } break; |
| 1603 | |
| 1604 | case OBJV_C_IS_CLOAKEDcxx . . $ `scripts/osiris_common.h:652:9`!: |
| 1605 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1606 | if (!obj->effect_infocxx . . $ object#effect_info.) { |
| 1607 | (*(char *)ptr) = 0; |
| 1608 | } else { |
| 1609 | (*(char *)ptr) = (obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_CLOAKEDcxx . . $ `Descent3/object_external.h:197:9`!) ? 1 : 0; |
| 1610 | } |
| 1611 | } |
| 1612 | break; |
| 1613 | |
| 1614 | case OBJV_C_NEGATIVE_LIGHTcxx . . $ `scripts/osiris_common.h:651:9`!: { |
| 1615 | // the object casts negative light |
| 1616 | if (!obj->effect_infocxx . . $ object#effect_info.) |
| 1617 | return; |
| 1618 | |
| 1619 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 1620 | (*(char *)ptr) = (obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_NEGATIVE_LIGHTcxx . . $ `Descent3/object_external.h:212:9`!) ? 1 : 0; |
| 1621 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 1622 | bool enable = (*(char *)ptr) ? true : false; |
| 1623 | |
| 1624 | if (enable) { |
| 1625 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_NEGATIVE_LIGHTcxx . . $ `Descent3/object_external.h:212:9`!; |
| 1626 | } else { |
| 1627 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. &= ~EF_NEGATIVE_LIGHTcxx . . $ `Descent3/object_external.h:212:9`!; |
| 1628 | } |
| 1629 | } |
| 1630 | |
| 1631 | } break; |
| 1632 | } |
| 1633 | } |
| 1634 | |
| 1635 | uint8_tcxx . . $ uint8_t# osipf_AITurnTowardsVectorscxx . . $ osipf_AITurnTowardsVectors(afcf2412f024945b).(int objhandle, vectorcxx . . $ vector# *fvec, vectorcxx . . $ vector# *uvec) { |
| 1636 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1637 | |
| 1638 | if (!objp) { |
| 1639 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AITurnTowardsVectors: Illegal Object Passed\n"); |
| 1640 | return 0; |
| 1641 | } |
| 1642 | |
| 1643 | if (objp->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 1644 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AITurnTowardsVectors: Illegal Object CT Passed\n"); |
| 1645 | return 0; |
| 1646 | } |
| 1647 | |
| 1648 | matrixcxx . . $ matrix# g_orient; |
| 1649 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&g_orient, fvec, uvec, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1650 | |
| 1651 | return AITurnTowardsMatrixcxx . . $ AITurnTowardsMatrix(4158910ac60c491b).(objp, objp->ai_infocxx . . $ object#ai_info.->max_turn_ratecxx . . $ ai_frame#max_turn_rate., &g_orient); |
| 1652 | } |
| 1653 | |
| 1654 | void osipf_AISetTypecxx . . $ osipf_AISetType(3e454b8ccf442868).(int objhandle, int type) { |
| 1655 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1656 | |
| 1657 | if (!objp) { |
| 1658 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AISetType: Illegal Object Passed\n"); |
| 1659 | return; |
| 1660 | } |
| 1661 | |
| 1662 | if (objp->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 1663 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AISetType: Illegal Object CT Passed\n"); |
| 1664 | return; |
| 1665 | } |
| 1666 | |
| 1667 | if (type < 0 || type >= MAX_AI_INIT_TYPEScxx . . $ `Descent3/aistruct.h:422:9`!) |
| 1668 | return; |
| 1669 | |
| 1670 | GoalInitTypeGoalscxx . . $ GoalInitTypeGoals(766a1b7183ffa4b4).(objp, type); |
| 1671 | } |
| 1672 | |
| 1673 | vectorcxx . . $ vector# osipf_AIFindHidePoscxx . . $ osipf_AIFindHidePos(380bcd033903a44f).(int hideobjhandle, int viewobjhandle, float time, int *hide_room) { |
| 1674 | objectcxx . . $ object# *hide_obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(hideobjhandle); |
| 1675 | objectcxx . . $ object# *view_obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(viewobjhandle); |
| 1676 | |
| 1677 | vectorcxx . . $ vector# hpos; |
| 1678 | int hroom; |
| 1679 | |
| 1680 | if (hide_obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1681 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Hide Object Passed To AIFindHidePos\n"); |
| 1682 | *hide_room = -1; |
| 1683 | return Zero_vectorcxx . . $ Zero_vector.; |
| 1684 | } |
| 1685 | |
| 1686 | if (hide_obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 1687 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object CT Passed To AIFindHidePos\n"); |
| 1688 | *hide_room = -1; |
| 1689 | return Zero_vectorcxx . . $ Zero_vector.; |
| 1690 | } |
| 1691 | |
| 1692 | if (view_obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1693 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal View Object Passed To AIFindHidePos\n"); |
| 1694 | *hide_room = hide_obj->roomnumcxx . . $ object#roomnum.; |
| 1695 | return hide_obj->poscxx . . $ object#pos.; |
| 1696 | } |
| 1697 | |
| 1698 | if (time <= 0.0) { |
| 1699 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIFindHidePos: Illegal Time Passed bashing to 1sec\n"); |
| 1700 | time = 1.0f; |
| 1701 | } else if (time > 15.0) { |
| 1702 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIFindHidePos: Illegal Time Passed bashing to 15sec\n"); |
| 1703 | time = 15.0f; |
| 1704 | } |
| 1705 | |
| 1706 | // Returns the hide object's pos/room if it cannot find a valid hide position |
| 1707 | AIFindHidePoscxx . . $ AIFindHidePos(5b8d3226dd1a19bc).(hide_obj, view_obj, &hpos, &hroom, time); |
| 1708 | |
| 1709 | *hide_room = hroom; |
| 1710 | return hpos; |
| 1711 | } |
| 1712 | |
| 1713 | int osipf_AIGoalAddEnablercxx . . $ osipf_AIGoalAddEnabler(7005af0289a2b79f).(int objhandle, int goal_index, int enabler_type, float percent, float interval, void *ptr) { |
| 1714 | objectcxx . . $ object# *obj; |
| 1715 | |
| 1716 | obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1717 | |
| 1718 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || obj->ai_infocxx . . $ object#ai_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1719 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal object passed to AIGoalAddEnabler\n"); |
| 1720 | return -1; |
| 1721 | } |
| 1722 | |
| 1723 | if (!ptr) |
| 1724 | return -1; |
| 1725 | |
| 1726 | return GoalAddEnablercxx . . $ GoalAddEnabler(abecc65ce55ccb39).(obj, goal_index, enabler_type, ptr, percent, interval); |
| 1727 | } |
| 1728 | |
| 1729 | int osipf_AIGoalAddcxx . . $ osipf_AIGoalAdd(b390d4eb1785c68).(int objhandle, int goal_type, int level, float influence, int guid, int flags, ...) { |
| 1730 | objectcxx . . $ object# *obj; |
| 1731 | goal_infocxx . . $ goal_info# g_info; |
| 1732 | va_listcxx . . $ va_list# marker; |
| 1733 | |
| 1734 | obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1735 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || obj->ai_infocxx . . $ object#ai_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1736 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal object passed to AIGoalAdd\n"); |
| 1737 | return -1; |
| 1738 | } |
| 1739 | |
| 1740 | switch (goal_type) { |
| 1741 | case AIG_GET_AWAY_FROM_OBJcxx . . $ `Descent3/aistruct_external.h:181:9`!: |
| 1742 | case AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!: |
| 1743 | case AIG_GUARD_OBJcxx . . $ `Descent3/aistruct_external.h:190:9`!: |
| 1744 | case AIG_DODGE_OBJcxx . . $ `Descent3/aistruct_external.h:194:9`!: |
| 1745 | case AIG_MOVE_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:198:9`!: |
| 1746 | case AIG_MOVE_RELATIVE_OBJcxx . . $ `Descent3/aistruct_external.h:200:9`!: |
| 1747 | case AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!: { |
| 1748 | // Pop Goal Local Variables |
| 1749 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1750 | int objref = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1751 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1752 | |
| 1753 | // Do the actual goal and return; |
| 1754 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&objref, level, influence, flags, guid); |
| 1755 | } break; |
| 1756 | |
| 1757 | case AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!: { |
| 1758 | path_informationcxx . . $ path_information# path_info; |
| 1759 | |
| 1760 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1761 | path_info.path_idcxx . . $ path_information#path_id. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1762 | path_info.start_nodecxx . . $ path_information#start_node. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int) - 1; |
| 1763 | path_info.end_nodecxx . . $ path_information#end_node. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int) - 1; |
| 1764 | path_info.next_nodecxx . . $ path_information#next_node. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int) - 1; |
| 1765 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1766 | |
| 1767 | if (path_info.path_idcxx . . $ path_information#path_id. >= 0 && path_info.end_nodecxx . . $ path_information#end_node. < 0) { |
| 1768 | path_info.end_nodecxx . . $ path_information#end_node. = GamePathscxx . . $ GamePaths.[path_info.path_idcxx . . $ path_information#path_id.].num_nodescxx . . $ game_path#num_nodes. - 1; |
| 1769 | } |
| 1770 | |
| 1771 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, AIG_FOLLOW_PATHcxx . . $ `Descent3/aistruct_external.h:195:9`!, (void *)&path_info, level, influence, flags, guid); |
| 1772 | } break; |
| 1773 | |
| 1774 | case AIG_ATTACH_TO_OBJcxx . . $ `Descent3/aistruct_external.h:184:9`!: |
| 1775 | case AIG_PLACE_OBJ_ON_OBJcxx . . $ `Descent3/aistruct_external.h:189:9`!: { |
| 1776 | goal_infocxx . . $ goal_info# g_info; |
| 1777 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..flagscxx . . $ g_attach#flags. = 0; |
| 1778 | |
| 1779 | // Pop Goal Local Variables |
| 1780 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1781 | g_info.handlecxx . . $ goal_info#$anonymous_type_1#handle. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1782 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..parent_apcxx . . $ g_attach#parent_ap. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1783 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..child_apcxx . . $ g_attach#child_ap. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1784 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..radcxx . . $ g_attach#rad. = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, double); |
| 1785 | |
| 1786 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(g_info.handlecxx . . $ goal_info#$anonymous_type_1#handle.); |
| 1787 | if (objp && (objp->typecxx . . $ object#type. == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!)) |
| 1788 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..radcxx . . $ g_attach#rad. /= 2; |
| 1789 | |
| 1790 | if (va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int) != 0) |
| 1791 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..flagscxx . . $ g_attach#flags. = GAF_ALIGNEDcxx . . $ `Descent3/aistruct.h:578:9`!; |
| 1792 | if (va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int) != 0) |
| 1793 | g_info.attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..flagscxx . . $ g_attach#flags. |= GAF_SPHEREcxx . . $ `Descent3/aistruct.h:579:9`!; |
| 1794 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1795 | |
| 1796 | // Do the actual goal and return; |
| 1797 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&g_info, level, influence, flags, guid); |
| 1798 | } break; |
| 1799 | |
| 1800 | case AIG_FIRE_AT_OBJcxx . . $ `Descent3/aistruct_external.h:185:9`!: { |
| 1801 | // Pop Goal Local Variables |
| 1802 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1803 | int i = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1804 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1805 | |
| 1806 | gi_firecxx . . $ gi_fire# attack_info; |
| 1807 | |
| 1808 | attack_info.cur_wbcxx . . $ gi_fire#cur_wb. = i; |
| 1809 | attack_info.cur_maskcxx . . $ gi_fire#cur_mask. = obj->dynamic_wbcxx . . $ object#dynamic_wb.[i].cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask.; |
| 1810 | |
| 1811 | // Do the actual goal and return; |
| 1812 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&attack_info, level, influence, flags, guid); |
| 1813 | } break; |
| 1814 | |
| 1815 | case AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!: { |
| 1816 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1817 | // Pop Goal Local Variables |
| 1818 | int objref = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1819 | int i_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1820 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1821 | |
| 1822 | g_info.handlecxx . . $ goal_info#$anonymous_type_1#handle. = objref; |
| 1823 | |
| 1824 | // Do the actual goal and return; |
| 1825 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&g_info, level, influence, flags, guid, i_value); |
| 1826 | } break; |
| 1827 | |
| 1828 | case AIG_HIDE_FROM_OBJcxx . . $ `Descent3/aistruct_external.h:182:9`!: { |
| 1829 | // Pop Goal Local Variables |
| 1830 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1831 | int objref = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1832 | int f_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1833 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1834 | |
| 1835 | g_info.handlecxx . . $ goal_info#$anonymous_type_1#handle. = objref; |
| 1836 | g_info.timecxx . . $ goal_info#$anonymous_type_2#time. = f_value; |
| 1837 | |
| 1838 | // Do the actual goal and return; |
| 1839 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&g_info, level, influence, flags, guid); |
| 1840 | } break; |
| 1841 | |
| 1842 | case AIG_GUARD_AREAcxx . . $ `Descent3/aistruct_external.h:191:9`!: |
| 1843 | case AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!: { |
| 1844 | // Pop Goal Local Variables |
| 1845 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1846 | vectorcxx . . $ vector# *pos = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, vector *); |
| 1847 | int roomnum = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1848 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1849 | |
| 1850 | g_info.poscxx . . $ goal_info#$anonymous_type_2#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). (*pos); |
| 1851 | g_info.roomnumcxx . . $ goal_info#$anonymous_type_1#roomnum. = roomnum; |
| 1852 | |
| 1853 | // Do the actual goal and return; |
| 1854 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&g_info, level, influence, flags, guid); |
| 1855 | } break; |
| 1856 | |
| 1857 | case AIG_MELEE_TARGETcxx . . $ `Descent3/aistruct_external.h:186:9`!: { |
| 1858 | // Do the actual goal and return; |
| 1859 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, level, influence, flags, guid); |
| 1860 | } break; |
| 1861 | |
| 1862 | case AIG_SET_ANIMcxx . . $ `Descent3/aistruct_external.h:196:9`!: // Animation index |
| 1863 | case AIG_DO_MELEE_ANIMcxx . . $ `Descent3/aistruct_external.h:202:9`!: // Which melee attack |
| 1864 | case AIG_USE_MOVEMENT_TYPEcxx . . $ `Descent3/aistruct_external.h:188:9`!: // MT_INDEX |
| 1865 | case AIG_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:197:9`!: { |
| 1866 | // Pop Goal Local Variables |
| 1867 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1868 | int i_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1869 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1870 | |
| 1871 | // Do the actual goal and return; |
| 1872 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&i_value, level, influence, flags, guid); |
| 1873 | } break; |
| 1874 | |
| 1875 | case AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!: // Initial room |
| 1876 | { |
| 1877 | // Pop Goal Local Variables |
| 1878 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1879 | int i_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1880 | int j_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, int); |
| 1881 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1882 | |
| 1883 | // Do the actual goal and return; |
| 1884 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)&i_value, level, influence, flags, guid); |
| 1885 | } break; |
| 1886 | |
| 1887 | case AIG_FACE_DIRcxx . . $ `Descent3/aistruct_external.h:193:9`!: // MT_INDEX |
| 1888 | { |
| 1889 | // Pop Goal Local Variables |
| 1890 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, flags); |
| 1891 | vectorcxx . . $ vector# *v_value = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, vector *); |
| 1892 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 1893 | |
| 1894 | // Do the actual goal and return; |
| 1895 | return GoalAddGoalcxx . . $ GoalAddGoal(e0a3c222b6aee5c7).(obj, goal_type, (void *)v_value, level, influence, flags, guid); |
| 1896 | } break; |
| 1897 | |
| 1898 | default: |
| 1899 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIGoalAdd Error: Get chris - goal %d is not available of scripting\n", goal_type); |
| 1900 | } |
| 1901 | |
| 1902 | return -1; |
| 1903 | } |
| 1904 | |
| 1905 | void osipf_AIGoalClearcxx . . $ osipf_AIGoalClear(3e454b8ccf442868).(int objhandle, int goal_index) { |
| 1906 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1907 | |
| 1908 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1909 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid Object Passed To AIGoalClear\n"); |
| 1910 | return; |
| 1911 | } |
| 1912 | |
| 1913 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 1914 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "AIGoalClear: Illegal Object CT Passed\n"); |
| 1915 | return; |
| 1916 | } |
| 1917 | |
| 1918 | if (goal_index < 0) { |
| 1919 | GoalClearAllcxx . . $ GoalClearAll(419c470199a90a97).(obj); |
| 1920 | } else if (goal_index < MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`!) { |
| 1921 | GoalClearGoalcxx . . $ GoalClearGoal(5f6922bcf6358e70).(obj, &obj->ai_infocxx . . $ object#ai_info.->goalscxx . . $ ai_frame#goals.[goal_index]); |
| 1922 | } |
| 1923 | } |
| 1924 | |
| 1925 | int osipf_AIFindObjOfTypecxx . . $ osipf_AIFindObjOfType(7a8817038ab5ca8a).(int objhandle, int type, int id, bool f_ignore_init_room, int parent_handle) { |
| 1926 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1927 | objectcxx . . $ object# *f_obj; |
| 1928 | |
| 1929 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1930 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AIFindObjOfType\n"); |
| 1931 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 1932 | } |
| 1933 | |
| 1934 | if ((f_obj = AIFindObjOfTypecxx . . $ AIFindObjOfType(21432d3b7e9150b9).(obj, type, id, f_ignore_init_room, parent_handle))) |
| 1935 | return f_obj->handlecxx . . $ object#handle.; |
| 1936 | |
| 1937 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 1938 | } |
| 1939 | |
| 1940 | int osipf_ObjMakeListOfTypecxx . . $ osipf_ObjMakeListOfType(1d4c0abf60f4d13a).(int objhandle, int type, int id, bool f_ignore_init_room, int parent_handle, |
| 1941 | int max_recorded, int *handles) { |
| 1942 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1943 | |
| 1944 | int num_recorded = 0; |
| 1945 | int i; |
| 1946 | |
| 1947 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 1948 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To Obj_MakeListOfType\n"); |
| 1949 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 1950 | } |
| 1951 | |
| 1952 | for (i = 0; i <= Highest_object_indexcxx . . $ Highest_object_index.; i++) { |
| 1953 | if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == type) { |
| 1954 | if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) |
| 1955 | continue; |
| 1956 | |
| 1957 | if (&Objectscxx . . $ Objects.[i] == obj) |
| 1958 | continue; |
| 1959 | |
| 1960 | if (f_ignore_init_room && Objectscxx . . $ Objects.[i].roomnumcxx . . $ object#roomnum. == obj->roomnumcxx . . $ object#roomnum.) |
| 1961 | continue; |
| 1962 | |
| 1963 | if (parent_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`! && Objectscxx . . $ Objects.[i].parent_handlecxx . . $ object#parent_handle. != parent_handle) |
| 1964 | continue; |
| 1965 | |
| 1966 | if (id != -1 && Objectscxx . . $ Objects.[i].idcxx . . $ object#id. != id) |
| 1967 | continue; |
| 1968 | |
| 1969 | handles[num_recorded++] = Objectscxx . . $ Objects.[i].handlecxx . . $ object#handle.; |
| 1970 | |
| 1971 | if (num_recorded >= max_recorded) |
| 1972 | break; |
| 1973 | } |
| 1974 | } |
| 1975 | |
| 1976 | return num_recorded; |
| 1977 | } |
| 1978 | |
| 1979 | vectorcxx . . $ vector# osipf_AIGetRoomPathPointcxx . . $ osipf_AIGetRoomPathPoint(e9e56017a0d09194).(int roomnum) { |
| 1980 | if (ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!(roomnum)) { |
| 1981 | int cell = CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(roomnum); |
| 1982 | |
| 1983 | if (cell >= TERRAIN_DEPTHcxx . . $ `Descent3/terrain.h:32:9`! * TERRAIN_WIDTHcxx . . $ `Descent3/terrain.h:31:9`!) { |
| 1984 | return Zero_vectorcxx . . $ Zero_vector.; |
| 1985 | } else { |
| 1986 | vectorcxx . . $ vector# pos; |
| 1987 | |
| 1988 | ComputeTerrainSegmentCentercxx . . $ ComputeTerrainSegmentCenter(86b7faebfcd459cf).(&pos, cell); |
| 1989 | pos.ycxx . . $ vector#y. += 15.0f + ((float)ps_randcxx . . $ ps_rand(b126dc7c1de90089).() / (float)D3_RAND_MAXcxx . . $ `misc/psrand.h:41:9`!) * 20; // between 15 and 35 |
| 1990 | |
| 1991 | return pos; |
| 1992 | } |
| 1993 | } else if (roomnum <= Highest_room_indexcxx . . $ Highest_room_index. && Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.) { |
| 1994 | return Roomscxx . . $ Rooms.[roomnum].path_pntcxx . . $ room#path_pnt.; |
| 1995 | } |
| 1996 | |
| 1997 | return Zero_vectorcxx . . $ Zero_vector.; |
| 1998 | } |
| 1999 | |
| 2000 | int osipf_AIFindEnergyCentercxx . . $ osipf_AIFindEnergyCenter(7864480464b09eea).(int objhandle) { |
| 2001 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2002 | |
| 2003 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2004 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AIFindEnergyCenter\n"); |
| 2005 | return -1; |
| 2006 | } |
| 2007 | |
| 2008 | // returns the roomnum of the closest room with that flag |
| 2009 | return AIFindRoomWithFlagcxx . . $ AIFindRoomWithFlag(174cacb9d899a77a).(obj, RF_FUELCENcxx . . $ `Descent3/room_external.h:175:9`!); |
| 2010 | } |
| 2011 | |
| 2012 | float osipf_AIGetDistToObjcxx . . $ osipf_AIGetDistToObj(ac70f22789a9917c).(int objhandle, int otherobjhandle) { |
| 2013 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2014 | objectcxx . . $ object# *fobj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(otherobjhandle); |
| 2015 | |
| 2016 | float dist; |
| 2017 | |
| 2018 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2019 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AIGetDistToObj\n"); |
| 2020 | return 0; |
| 2021 | } |
| 2022 | |
| 2023 | if (fobj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2024 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Find Object Passed To AIGetDistToObj\n"); |
| 2025 | return 0; |
| 2026 | } |
| 2027 | |
| 2028 | BOA_ComputeMinDistcxx . . $ BOA_ComputeMinDist(d76bc30baaf01f3b).(obj->roomnumcxx . . $ object#roomnum., fobj->roomnumcxx . . $ object#roomnum., 0.0f, &dist, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2029 | |
| 2030 | return dist; |
| 2031 | } |
| 2032 | |
| 2033 | int osipf_AISetGoalFlagscxx . . $ osipf_AISetGoalFlags(e2d1abf64f7ceb5).(int objhandle, int goal_handle, int flags, uint8_tcxx . . $ uint8_t# f_enable) { |
| 2034 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2035 | |
| 2036 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2037 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AISetGoalFlags\n"); |
| 2038 | return 0; |
| 2039 | } |
| 2040 | |
| 2041 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 2042 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Non-AI Object Passed To AISetGoalFlags\n"); |
| 2043 | return 0; |
| 2044 | } |
| 2045 | |
| 2046 | ai_framecxx . . $ ai_frame# *ai_info = obj->ai_infocxx . . $ object#ai_info.; |
| 2047 | |
| 2048 | if (goal_handle >= 0 && goal_handle < MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`! && ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].usedcxx . . $ goal#used. != 0) { |
| 2049 | if (f_enable) |
| 2050 | ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].flagscxx . . $ goal#flags. |= flags; |
| 2051 | else |
| 2052 | ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].flagscxx . . $ goal#flags. &= ~flags; |
| 2053 | } |
| 2054 | |
| 2055 | return (ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].flagscxx . . $ goal#flags.); |
| 2056 | } |
| 2057 | |
| 2058 | void osipf_AISetGoalCircleDistcxx . . $ osipf_AISetGoalCircleDist(c2f439e40e2f19ed).(int objhandle, int goal_handle, float dist) { |
| 2059 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2060 | |
| 2061 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2062 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AISetGoalCircleDist\n"); |
| 2063 | return; |
| 2064 | } |
| 2065 | |
| 2066 | if (obj->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 2067 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Non-AI Object Passed To AISetGoalCircleDist\n"); |
| 2068 | return; |
| 2069 | } |
| 2070 | |
| 2071 | ai_framecxx . . $ ai_frame# *ai_info = obj->ai_infocxx . . $ object#ai_info.; |
| 2072 | |
| 2073 | if (goal_handle >= 0 && goal_handle < MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`! && ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].usedcxx . . $ goal#used. != 0) { |
| 2074 | ai_info->goalscxx . . $ ai_frame#goals.[goal_handle].circle_distancecxx . . $ goal#circle_distance. = dist; |
| 2075 | } |
| 2076 | } |
| 2077 | |
| 2078 | void osipf_GetGunPoscxx . . $ osipf_GetGunPos(acebd7a68d406969).(int objhandle, int gun_number, vectorcxx . . $ vector# *gun_pnt, vectorcxx . . $ vector# *gun_normal) { |
| 2079 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2080 | |
| 2081 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2082 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To AIGetGunPosition\n"); |
| 2083 | *gun_pnt =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 2084 | *gun_normal =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 2085 | return; |
| 2086 | } |
| 2087 | |
| 2088 | WeaponCalcGuncxx . . $ WeaponCalcGun(85e3752e9562a225).(gun_pnt, gun_normal, obj, gun_number); |
| 2089 | } |
| 2090 | |
| 2091 | void osipf_GetGroundPoscxx . . $ osipf_GetGroundPos(acebd7a68d406969).(int objhandle, int ground_number, vectorcxx . . $ vector# *ground_pnt, vectorcxx . . $ vector# *ground_normal) { |
| 2092 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2093 | |
| 2094 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 2095 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Illegal Object Passed To Obj_GetGroundPos\n"); |
| 2096 | *ground_pnt =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 2097 | *ground_normal =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 2098 | return; |
| 2099 | } |
| 2100 | |
| 2101 | PhysCalcGroundcxx . . $ PhysCalcGround(85e3752e9562a225).(ground_pnt, ground_normal, obj, ground_number); |
| 2102 | } |
| 2103 | |
| 2104 | uint8_tcxx . . $ uint8_t# osipf_IsRoomValidcxx . . $ osipf_IsRoomValid(bc0fba5608a0bfe7).(int roomnum) { |
| 2105 | if (roomnum == -1.0) { |
| 2106 | return 0; |
| 2107 | } else if (ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!(roomnum)) { |
| 2108 | int cell = CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(roomnum); |
| 2109 | |
| 2110 | if ((CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(cell) < 0) || (cell >= TERRAIN_WIDTHcxx . . $ `Descent3/terrain.h:31:9`! * TERRAIN_DEPTHcxx . . $ `Descent3/terrain.h:32:9`!)) { |
| 2111 | return 0; |
| 2112 | } else { |
| 2113 | return 1; |
| 2114 | } |
| 2115 | } else { |
| 2116 | if (roomnum < 0 || roomnum > Highest_room_indexcxx . . $ Highest_room_index. || Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used. == 0) { |
| 2117 | return 0; |
| 2118 | } else { |
| 2119 | return 2; |
| 2120 | } |
| 2121 | } |
| 2122 | |
| 2123 | return 0; |
| 2124 | } |
| 2125 | |
| 2126 | int osipf_GetAttachParentcxx . . $ osipf_GetAttachParent(7864480464b09eea).(int childhandle) { |
| 2127 | objectcxx . . $ object# *child = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(childhandle); |
| 2128 | |
| 2129 | if ((child) && (child->flagscxx . . $ object#flags. & OF_ATTACHEDcxx . . $ `Descent3/object_external.h:273:9`!)) { |
| 2130 | return (child->attach_parent_handlecxx . . $ object#attach_parent_handle.); |
| 2131 | } |
| 2132 | |
| 2133 | return (OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 2134 | } |
| 2135 | |
| 2136 | int osipf_GetNumAttachSlotscxx . . $ osipf_GetNumAttachSlots(7864480464b09eea).(int objhandle) { |
| 2137 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2138 | |
| 2139 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2140 | poly_modelcxx . . $ poly_model# *parent_pm = &Poly_modelscxx . . $ Poly_models.[parent->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num.]; |
| 2141 | return (parent_pm->n_attachcxx . . $ poly_model#n_attach.); |
| 2142 | } |
| 2143 | |
| 2144 | return 0; |
| 2145 | } |
| 2146 | |
| 2147 | int osipf_GetAttachChildHandlecxx . . $ osipf_GetAttachChildHandle(f1fc93eb4bb86021).(int objhandle, char attachpoint) { |
| 2148 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2149 | char parent_ap = attachpoint; |
| 2150 | |
| 2151 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2152 | poly_modelcxx . . $ poly_model# *parent_pm = &Poly_modelscxx . . $ Poly_models.[parent->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num.]; |
| 2153 | if (parent_ap >= 0 && parent_ap < parent_pm->n_attachcxx . . $ poly_model#n_attach.) { |
| 2154 | return (parent->attach_childrencxx . . $ object#attach_children.[parent_ap]); |
| 2155 | } |
| 2156 | } |
| 2157 | |
| 2158 | return (OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 2159 | } |
| 2160 | |
| 2161 | int osipf_AttachObjectAPcxx . . $ osipf_AttachObjectAP(f0a0b4f1b22bb461).(int parenthandle, char parent_ap, int childhandle, char child_ap, uint8_tcxx . . $ uint8_t# f_use_aligned) { |
| 2162 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(parenthandle); |
| 2163 | objectcxx . . $ object# *child = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(childhandle); |
| 2164 | |
| 2165 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!) && (child) && (child->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2166 | return AttachObjectcxx . . $ AttachObject(f6b18a350068acc8).(parent, parent_ap, child, child_ap, (bool)(f_use_aligned != 0)); |
| 2167 | } |
| 2168 | |
| 2169 | return 0; |
| 2170 | } |
| 2171 | |
| 2172 | int osipf_AttachObjectRadcxx . . $ osipf_AttachObjectRad(f8f331ec1480dc64).(int parenthandle, char parent_ap, int childhandle, float percent_rad) { |
| 2173 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(parenthandle); |
| 2174 | objectcxx . . $ object# *child = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(childhandle); |
| 2175 | |
| 2176 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!) && (child) && (child->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2177 | return AttachObjectcxx . . $ AttachObject(45561ecb6c1b979f).(parent, parent_ap, child, percent_rad); |
| 2178 | } |
| 2179 | |
| 2180 | return 0; |
| 2181 | } |
| 2182 | |
| 2183 | void osipf_UnattachFromParentcxx . . $ osipf_UnattachFromParent(d4f767463ce0a6b3).(int objhandle) { |
| 2184 | objectcxx . . $ object# *child = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2185 | |
| 2186 | if ((child) && (child->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2187 | UnattachFromParentcxx . . $ UnattachFromParent(39516aeee13ca5ab).(child); |
| 2188 | } |
| 2189 | } |
| 2190 | |
| 2191 | void osipf_UnattachChildcxx . . $ osipf_UnattachChild(5016a63d0a5aceb0).(int objhandle, char parent_ap) { |
| 2192 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2193 | |
| 2194 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2195 | UnattachChildcxx . . $ UnattachChild(9646b7081aeecba4).(parent, parent_ap); |
| 2196 | } |
| 2197 | } |
| 2198 | |
| 2199 | void osipf_UnattachChildrencxx . . $ osipf_UnattachChildren(d4f767463ce0a6b3).(int objhandle) { |
| 2200 | objectcxx . . $ object# *parent = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2201 | |
| 2202 | if ((parent) && (parent->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!)) { |
| 2203 | UnattachChildrencxx . . $ UnattachChildren(39516aeee13ca5ab).(parent); |
| 2204 | } |
| 2205 | } |
| 2206 | |
| 2207 | void osipf_MatcenValuecxx . . $ osipf_MatcenValue(504a19c195c7574e).(int matcen_id, char op, char var_handle, void *ptr, int index) { |
| 2208 | if (matcen_id < 0 || matcen_id >= Num_matcenscxx . . $ Num_matcens. || !Matcencxx . . $ Matcen.[matcen_id]) |
| 2209 | return; |
| 2210 | switch (var_handle) { |
| 2211 | case MTNV_C_ATTACH_TYPEcxx . . $ `scripts/osiris_common.h:736:9`!: |
| 2212 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2213 | (*(char *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetAttachTypecxx . . $ matcen#GetAttachType(6e9c618e4dd2eafc).(); |
| 2214 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2215 | Matcencxx . . $ Matcen.[matcen_id]->SetAttachTypecxx . . $ matcen#SetAttachType(b5fd09639b7a0261).(*(char *)ptr); |
| 2216 | break; |
| 2217 | case MTNV_C_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:737:9`!: |
| 2218 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2219 | (*(char *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetControlTypecxx . . $ matcen#GetControlType(6e9c618e4dd2eafc).(); |
| 2220 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2221 | Matcencxx . . $ Matcen.[matcen_id]->SetControlTypecxx . . $ matcen#SetControlType(b5fd09639b7a0261).(*(char *)ptr); |
| 2222 | break; |
| 2223 | case MTNV_I_ATTACHcxx . . $ `scripts/osiris_common.h:738:9`!: |
| 2224 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2225 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetAttachcxx . . $ matcen#GetAttach(b126dc7c1de90089).(); |
| 2226 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2227 | Matcencxx . . $ Matcen.[matcen_id]->SetAttachcxx . . $ matcen#SetAttach(83c267b20bac841a).(*(int *)ptr); |
| 2228 | break; |
| 2229 | case MTNV_V_CREATE_POINTcxx . . $ `scripts/osiris_common.h:739:9`!: |
| 2230 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2231 | Matcencxx . . $ Matcen.[matcen_id]->GetCreatePntcxx . . $ matcen#GetCreatePnt(4719af520dcffa60).((vectorcxx . . $ vector# *)ptr); |
| 2232 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2233 | Matcencxx . . $ Matcen.[matcen_id]->SetCreatePntcxx . . $ matcen#SetCreatePnt(4719af520dcffa60).((vectorcxx . . $ vector# *)ptr); |
| 2234 | break; |
| 2235 | case MTNV_I_CREATE_ROOMcxx . . $ `scripts/osiris_common.h:740:9`!: |
| 2236 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2237 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetCreateRoomcxx . . $ matcen#GetCreateRoom(b126dc7c1de90089).(); |
| 2238 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2239 | Matcencxx . . $ Matcen.[matcen_id]->SetCreateRoomcxx . . $ matcen#SetCreateRoom(83c267b20bac841a).(*(int *)ptr); |
| 2240 | break; |
| 2241 | case MTNV_PC_NAMEcxx . . $ `scripts/osiris_common.h:741:9`!: |
| 2242 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2243 | Matcencxx . . $ Matcen.[matcen_id]->GetNamecxx . . $ matcen#GetName(fda57c8427c60377).((char *)ptr); |
| 2244 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2245 | Matcencxx . . $ Matcen.[matcen_id]->SetNamecxx . . $ matcen#SetName(c5f7da30cbc0f4e9).((char *)ptr); |
| 2246 | break; |
| 2247 | case MTNV_I_MAX_PRODcxx . . $ `scripts/osiris_common.h:742:9`!: |
| 2248 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2249 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetMaxProdcxx . . $ matcen#GetMaxProd(b126dc7c1de90089).(); |
| 2250 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2251 | Matcencxx . . $ Matcen.[matcen_id]->SetMaxProdcxx . . $ matcen#SetMaxProd(83c267b20bac841a).(*(int *)ptr); |
| 2252 | break; |
| 2253 | case MTNV_F_PROD_MULTIPLIERcxx . . $ `scripts/osiris_common.h:743:9`!: |
| 2254 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2255 | (*(float *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetProdMultipliercxx . . $ matcen#GetProdMultiplier(9b8c9e39889c762c).(); |
| 2256 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2257 | Matcencxx . . $ Matcen.[matcen_id]->SetProdMultipliercxx . . $ matcen#SetProdMultiplier(4e2b510d3867ab27).(*(float *)ptr); |
| 2258 | break; |
| 2259 | case MTNV_I_STATUScxx . . $ `scripts/osiris_common.h:744:9`!: |
| 2260 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2261 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetStatuscxx . . $ matcen#GetStatus(b126dc7c1de90089).(); |
| 2262 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 2263 | Matcencxx . . $ Matcen.[matcen_id]->SetStatuscxx . . $ matcen#SetStatus(9609253e83e89946).(*(int *)ptr, true); |
| 2264 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 2265 | Matcencxx . . $ Matcen.[matcen_id]->SetStatuscxx . . $ matcen#SetStatus(9609253e83e89946).(*(int *)ptr, false); |
| 2266 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2267 | int status = Matcencxx . . $ Matcen.[matcen_id]->GetStatuscxx . . $ matcen#GetStatus(b126dc7c1de90089).(); |
| 2268 | int diff_flags = (*(int *)ptr) ^ status; |
| 2269 | int clear_flags = status & diff_flags; |
| 2270 | int set_flags = (~(status)) & diff_flags; |
| 2271 | |
| 2272 | if (set_flags) |
| 2273 | Matcencxx . . $ Matcen.[matcen_id]->SetStatuscxx . . $ matcen#SetStatus(9609253e83e89946).(set_flags, true); |
| 2274 | if (clear_flags) |
| 2275 | Matcencxx . . $ Matcen.[matcen_id]->SetStatuscxx . . $ matcen#SetStatus(9609253e83e89946).(clear_flags, false); |
| 2276 | } |
| 2277 | break; |
| 2278 | case MTNV_C_CREATION_EFFECTcxx . . $ `scripts/osiris_common.h:745:9`!: |
| 2279 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2280 | (*(char *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetCreationEffectcxx . . $ matcen#GetCreationEffect(6e9c618e4dd2eafc).(); |
| 2281 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2282 | Matcencxx . . $ Matcen.[matcen_id]->SetCreationEffectcxx . . $ matcen#SetCreationEffect(b5fd09639b7a0261).(*(char *)ptr); |
| 2283 | break; |
| 2284 | case MTNV_I_MAX_ALIVE_CHILDRENcxx . . $ `scripts/osiris_common.h:746:9`!: |
| 2285 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2286 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetMaxAliveChildrencxx . . $ matcen#GetMaxAliveChildren(b126dc7c1de90089).(); |
| 2287 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2288 | Matcencxx . . $ Matcen.[matcen_id]->SetMaxAliveChildrencxx . . $ matcen#SetMaxAliveChildren(83c267b20bac841a).(*(int *)ptr); |
| 2289 | break; |
| 2290 | case MTNV_F_PRE_PROD_TIMEcxx . . $ `scripts/osiris_common.h:747:9`!: |
| 2291 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2292 | (*(float *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetPreProdTimecxx . . $ matcen#GetPreProdTime(9b8c9e39889c762c).(); |
| 2293 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2294 | Matcencxx . . $ Matcen.[matcen_id]->SetPreProdTimecxx . . $ matcen#SetPreProdTime(4e2b510d3867ab27).(*(float *)ptr); |
| 2295 | break; |
| 2296 | case MTNV_F_POST_PROD_TIMEcxx . . $ `scripts/osiris_common.h:748:9`!: |
| 2297 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2298 | (*(float *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetPostProdTimecxx . . $ matcen#GetPostProdTime(9b8c9e39889c762c).(); |
| 2299 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2300 | Matcencxx . . $ Matcen.[matcen_id]->SetPostProdTimecxx . . $ matcen#SetPostProdTime(4e2b510d3867ab27).(*(float *)ptr); |
| 2301 | break; |
| 2302 | case MTNSV_I_SOUNDcxx . . $ `scripts/osiris_common.h:751:9`!: |
| 2303 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2304 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetSoundcxx . . $ matcen#GetSound(784f3405e7e545be).(index); |
| 2305 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2306 | Matcencxx . . $ Matcen.[matcen_id]->SetSoundcxx . . $ matcen#SetSound(2878427ea6fbc47b).(index, (*(int *)ptr)); |
| 2307 | break; |
| 2308 | case MTNV_S_CREATION_TEXTUREcxx . . $ `scripts/osiris_common.h:749:9`!: |
| 2309 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2310 | (*(int16_t *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetCreationTexturecxx . . $ matcen#GetCreationTexture(4c3706f7850cf040).(); |
| 2311 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2312 | Matcencxx . . $ Matcen.[matcen_id]->SetCreationTexturecxx . . $ matcen#SetCreationTexture(68e3ae50fe6578a9).(*(int16_t *)ptr); |
| 2313 | break; |
| 2314 | |
| 2315 | case MTNV_C_NUM_SPAWN_PTScxx . . $ `scripts/osiris_common.h:753:9`!: |
| 2316 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2317 | (*(char *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetNumSpawnPntscxx . . $ matcen#GetNumSpawnPnts(6e9c618e4dd2eafc).(); |
| 2318 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2319 | Matcencxx . . $ Matcen.[matcen_id]->SetNumSpawnPntscxx . . $ matcen#SetNumSpawnPnts(b5fd09639b7a0261).(*(char *)ptr); |
| 2320 | break; |
| 2321 | case MTNSV_I_SPAWN_POINTcxx . . $ `scripts/osiris_common.h:754:9`!: |
| 2322 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2323 | Matcencxx . . $ Matcen.[matcen_id]->SetSpawnPntcxx . . $ matcen#SetSpawnPnt(2878427ea6fbc47b).(index, *(int *)ptr); |
| 2324 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2325 | (*(int *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetSpawnPntcxx . . $ matcen#GetSpawnPnt(784f3405e7e545be).(index); |
| 2326 | break; |
| 2327 | |
| 2328 | case MTNV_C_NUM_PROD_TYPEScxx . . $ `scripts/osiris_common.h:756:9`!: |
| 2329 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2330 | (*(char *)ptr) = Matcencxx . . $ Matcen.[matcen_id]->GetNumProdTypescxx . . $ matcen#GetNumProdTypes(6e9c618e4dd2eafc).(); |
| 2331 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2332 | Matcencxx . . $ Matcen.[matcen_id]->SetNumSpawnPntscxx . . $ matcen#SetNumSpawnPnts(b5fd09639b7a0261).(*(char *)ptr); |
| 2333 | break; |
| 2334 | case MTNSV_I_PROD_ITEM_IDcxx . . $ `scripts/osiris_common.h:757:9`!: |
| 2335 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2336 | Matcencxx . . $ Matcen.[matcen_id]->GetProdInfocxx . . $ matcen#GetProdInfo(a55cc0d2b0f04aaa).(index, (int *)ptr, 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`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2337 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2338 | Matcencxx . . $ Matcen.[matcen_id]->SetProdInfocxx . . $ matcen#SetProdInfo(a55cc0d2b0f04aaa).(index, (int *)ptr, 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`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2339 | break; |
| 2340 | case MTNSV_I_PROD_ITEM_PRIORITYcxx . . $ `scripts/osiris_common.h:758:9`!: |
| 2341 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2342 | Matcencxx . . $ Matcen.[matcen_id]->GetProdInfocxx . . $ matcen#GetProdInfo(a55cc0d2b0f04aaa).(index, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr, 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`!); |
| 2343 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2344 | Matcencxx . . $ Matcen.[matcen_id]->SetProdInfocxx . . $ matcen#SetProdInfo(a55cc0d2b0f04aaa).(index, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr, 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`!); |
| 2345 | break; |
| 2346 | case MTNSV_F_PROD_ITEM_TIMEcxx . . $ `scripts/osiris_common.h:759:9`!: |
| 2347 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2348 | Matcencxx . . $ Matcen.[matcen_id]->GetProdInfocxx . . $ matcen#GetProdInfo(a55cc0d2b0f04aaa).(index, 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`!, (float *)ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2349 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2350 | Matcencxx . . $ Matcen.[matcen_id]->SetProdInfocxx . . $ matcen#SetProdInfo(a55cc0d2b0f04aaa).(index, 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`!, (float *)ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2351 | break; |
| 2352 | case MTNSV_I_PROD_ITEM_MAX_PRODcxx . . $ `scripts/osiris_common.h:760:9`!: |
| 2353 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2354 | Matcencxx . . $ Matcen.[matcen_id]->GetProdInfocxx . . $ matcen#GetProdInfo(a55cc0d2b0f04aaa).(index, 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`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr); |
| 2355 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 2356 | Matcencxx . . $ Matcen.[matcen_id]->SetProdInfocxx . . $ matcen#SetProdInfo(a55cc0d2b0f04aaa).(index, 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`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr); |
| 2357 | break; |
| 2358 | } |
| 2359 | } |
| 2360 | |
| 2361 | void osipf_MatcenResetcxx . . $ osipf_MatcenReset(d4f767463ce0a6b3).(int matcen_id) { |
| 2362 | if (matcen_id >= 0 && matcen_id < Num_matcenscxx . . $ Num_matcens. && Matcencxx . . $ Matcen.[matcen_id]) { |
| 2363 | Matcencxx . . $ Matcen.[matcen_id]->Resetcxx . . $ matcen#Reset(49f6e7a06ebc5aa8).(); |
| 2364 | } |
| 2365 | } |
| 2366 | |
| 2367 | int osipf_MatcenCreatecxx . . $ osipf_MatcenCreate(1ef8e6ec083aabb9).(char *str) { |
| 2368 | bool name_changed; |
| 2369 | |
| 2370 | char name[MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`!]; |
| 2371 | strncpy(name, str, MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`! - 1); |
| 2372 | name[MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`! - 1] = '\0'; |
| 2373 | |
| 2374 | return CreateMatcencxx . . $ CreateMatcen(d75b4a580f3cbb10).(name, &name_changed); |
| 2375 | } |
| 2376 | |
| 2377 | void osipf_MatcenCopycxx . . $ osipf_MatcenCopy(3e454b8ccf442868).(int md_id, int ms_id) { |
| 2378 | if (md_id >= 0 && md_id < Num_matcenscxx . . $ Num_matcens. && Matcencxx . . $ Matcen.[md_id]) { |
| 2379 | if (ms_id >= 0 && ms_id < Num_matcenscxx . . $ Num_matcens. && Matcencxx . . $ Matcen.[ms_id]) { |
| 2380 | char name[MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`!]; |
| 2381 | Matcencxx . . $ Matcen.[md_id]->GetNamecxx . . $ matcen#GetName(fda57c8427c60377).(name); |
| 2382 | |
| 2383 | *Matcencxx . . $ Matcen.[md_id] =cxx . . $ matcen#`operator=`(e50cffa9d5310aee). *Matcencxx . . $ Matcen.[ms_id]; |
| 2384 | Matcencxx . . $ Matcen.[md_id]->SetNamecxx . . $ matcen#SetName(c5f7da30cbc0f4e9).(name); |
| 2385 | Matcencxx . . $ Matcen.[md_id]->Resetcxx . . $ matcen#Reset(49f6e7a06ebc5aa8).(); |
| 2386 | } |
| 2387 | } |
| 2388 | } |
| 2389 | |
| 2390 | int osipf_MatcenFindIdcxx . . $ osipf_MatcenFindId(1ef8e6ec083aabb9).(char *str) { |
| 2391 | char name[MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`!]; |
| 2392 | strncpy(name, str, MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`! - 1); |
| 2393 | name[MAX_MATCEN_NAME_LENcxx . . $ `Descent3/matcen.h:27:9`! - 1] = '\0'; |
| 2394 | |
| 2395 | return FindMatcenIndexcxx . . $ FindMatcenIndex(5c4306d8553b3696).(name); |
| 2396 | } |
| 2397 | |
| 2398 | int osipf_RayCastcxx . . $ osipf_RayCast(68387f1fc96e84a4).(int objhandle, vectorcxx . . $ vector# *p0, vectorcxx . . $ vector# *p1, int start_roomnum, float rad, int flags, ray_infocxx . . $ ray_info# *ri) { |
| 2399 | int fate; |
| 2400 | int ignore_obj_list[100]; |
| 2401 | |
| 2402 | int *ilist = hack_ilistcxx . . $ hack_ilist.; |
| 2403 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 2404 | if (!obj && objhandle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 2405 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid object passed to RayCast\n"); |
| 2406 | return 0; |
| 2407 | } |
| 2408 | |
| 2409 | fvi_infocxx . . $ fvi_info# hit_info; |
| 2410 | fvi_querycxx . . $ fvi_query# fq; |
| 2411 | |
| 2412 | fq.p0cxx . . $ fvi_query#p0. = p0; |
| 2413 | fq.p1cxx . . $ fvi_query#p1. = p1; |
| 2414 | |
| 2415 | fq.startroomcxx . . $ fvi_query#startroom. = start_roomnum; |
| 2416 | |
| 2417 | fq.radcxx . . $ fvi_query#rad. = rad; |
| 2418 | fq.flagscxx . . $ fvi_query#flags. = flags; |
| 2419 | |
| 2420 | if (obj) |
| 2421 | fq.thisobjnumcxx . . $ fvi_query#thisobjnum. = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(obj); |
| 2422 | else |
| 2423 | fq.thisobjnumcxx . . $ fvi_query#thisobjnum. = -1; |
| 2424 | |
| 2425 | if (ilist) { |
| 2426 | int num_items = 0; |
| 2427 | int count = 0; |
| 2428 | |
| 2429 | while (ilist[count] != -1) { |
| 2430 | objectcxx . . $ object# *iobj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(ilist[count]); |
| 2431 | if (iobj) { |
| 2432 | ignore_obj_list[num_items++] = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(iobj); |
| 2433 | } |
| 2434 | |
| 2435 | count++; |
| 2436 | } |
| 2437 | |
| 2438 | ignore_obj_list[num_items] = -1; |
| 2439 | fq.ignore_obj_listcxx . . $ fvi_query#ignore_obj_list. = ignore_obj_list; |
| 2440 | } else { |
| 2441 | fq.ignore_obj_listcxx . . $ fvi_query#ignore_obj_list. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2442 | } |
| 2443 | |
| 2444 | fate = fvi_FindIntersectioncxx . . $ fvi_FindIntersection(e1c4d7bd350effc8).(&fq, &hit_info); |
| 2445 | |
| 2446 | ri->hit_pointcxx . . $ ray_info#hit_point. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). hit_info.hit_pntcxx . . $ fvi_info#hit_pnt.; |
| 2447 | ri->hit_roomcxx . . $ ray_info#hit_room. = hit_info.hit_roomcxx . . $ fvi_info#hit_room.; |
| 2448 | ri->fatecxx . . $ ray_info#fate. = fate; |
| 2449 | |
| 2450 | if (fate == HIT_SPHERE_2_POLY_OBJECTcxx . . $ `lib/findintersection_external.h:52:9`! || fate == HIT_OBJECTcxx . . $ `lib/findintersection_external.h:47:9`!) { |
| 2451 | ri->hit_objectcxx . . $ ray_info#hit_object. = Objectscxx . . $ Objects.[hit_info.hit_objectcxx . . $ fvi_info#hit_object.[0]].handlecxx . . $ object#handle.; |
| 2452 | } |
| 2453 | ri->hit_subobjectcxx . . $ ray_info#hit_subobject. = hit_info.hit_subobjectcxx . . $ fvi_info#hit_subobject.[0]; |
| 2454 | |
| 2455 | ri->hit_facecxx . . $ ray_info#hit_face. = hit_info.hit_facecxx . . $ fvi_info#hit_face.[0]; |
| 2456 | ri->hit_face_pntcxx . . $ ray_info#hit_face_pnt. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). hit_info.hit_face_pntcxx . . $ fvi_info#hit_face_pnt.[0]; |
| 2457 | ri->hit_face_roomcxx . . $ ray_info#hit_face_room. = hit_info.hit_face_roomcxx . . $ fvi_info#hit_face_room.[0]; |
| 2458 | ri->hit_wallnormcxx . . $ ray_info#hit_wallnorm. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). hit_info.hit_wallnormcxx . . $ fvi_info#hit_wallnorm.[0]; |
| 2459 | |
| 2460 | return fate; |
| 2461 | } |
| 2462 | |
| 2463 | // Reads the specified number of bytes from a file into the buffer |
| 2464 | // DO NOT USE THIS TO READ STRUCTURES. This function is for byte |
| 2465 | // data, such as a string or a bitmap of 8-bit pixels. |
| 2466 | // Returns the number of bytes read. |
| 2467 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2468 | int osipf_CFReadBytescxx . . $ osipf_CFReadBytes(de6325ef3380a744).(uint8_tcxx . . $ uint8_t# *buffer, int count, CFILEcxx . . $ CFILE# *cfp) { return cf_ReadBytescxx . . $ cf_ReadBytes(de6325ef3380a744).(buffer, count, cfp); } |
| 2469 | |
| 2470 | // The following functions read numeric vales from a CFILE. All values are |
| 2471 | // stored in the file in Intel (little-endian) format. These functions |
| 2472 | // will convert to big-endian if required. |
| 2473 | // These funtions will throw an exception of if the value cannot be read, |
| 2474 | // so do not call these if you don't require the data to be present. |
| 2475 | |
| 2476 | // Read and return an integer (32 bits) |
| 2477 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2478 | int osipf_CFReadIntcxx . . $ osipf_CFReadInt(413716a422df0036).(CFILEcxx . . $ CFILE# *cfp) { return cf_ReadIntcxx . . $ cf_ReadInt(d60d6f5e30f0c96a).(cfp); } |
| 2479 | |
| 2480 | // Read and return a int16_t (16 bits) |
| 2481 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2482 | int16_t osipf_CFReadShortcxx . . $ osipf_CFReadShort(644dbbe4555be8a0).(CFILEcxx . . $ CFILE# *cfp) { return cf_ReadShortcxx . . $ cf_ReadShort(30b00389b433b379).(cfp); } |
| 2483 | |
| 2484 | // Read and return a byte (8 bits) |
| 2485 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2486 | int8_t osipf_CFReadBytecxx . . $ osipf_CFReadByte(dcbbf0b0e13758ec).(CFILEcxx . . $ CFILE# *cfp) { return cf_ReadBytecxx . . $ cf_ReadByte(dcbbf0b0e13758ec).(cfp); } |
| 2487 | |
| 2488 | // Read and return a float (32 bits) |
| 2489 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2490 | float osipf_CFReadFloatcxx . . $ osipf_CFReadFloat(9a03a00aead0d542).(CFILEcxx . . $ CFILE# *cfp) { return cf_ReadFloatcxx . . $ cf_ReadFloat(9a03a00aead0d542).(cfp); } |
| 2491 | |
| 2492 | // Read and return a double (64 bits) |
| 2493 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 2494 | double osipf_CFReadDoublecxx . . $ osipf_CFReadDouble(96e019f41f67302c).(CFILEcxx . . $ CFILE# *cfp) { return cf_ReadDoublecxx . . $ cf_ReadDouble(96e019f41f67302c).(cfp); } |
| 2495 | |
| 2496 | // Reads a string from a CFILE. If the file is type binary, this |
| 2497 | // function reads until a NULL or EOF is found. If the file is text, |
| 2498 | // the function reads until a newline or EOF is found. The string is always |
| 2499 | // written to the destination buffer null-terminated, without the newline. |
| 2500 | // Parameters: buf - where the string is written |
| 2501 | // n - the maximum string length, including the terminating 0 |
| 2502 | // cfp - the CFILE pointer |
| 2503 | // Returns the number of bytes in the string, before the terminator |
| 2504 | // Does not generate an exception on EOF |
| 2505 | int osipf_CFReadStringcxx . . $ osipf_CFReadString(38cd788e4423eff6).(char *buf, size_t n, CFILEcxx . . $ CFILE# *cfp) { return cf_ReadStringcxx . . $ cf_ReadString(38cd788e4423eff6).(buf, n, cfp); } |
| 2506 | |
| 2507 | // Writes the specified number of bytes from a file into the buffer |
| 2508 | // DO NOT USE THIS TO WRITE STRUCTURES. This function is for byte |
| 2509 | // data, such as a string or a bitmap of 8-bit pixels. |
| 2510 | // Returns the number of bytes written. |
| 2511 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2512 | int osipf_CFWriteBytescxx . . $ osipf_CFWriteBytes(b35058f74b39c3a6).(const uint8_tcxx . . $ uint8_t# *buf, int count, CFILEcxx . . $ CFILE# *cfp) { return cf_WriteBytescxx . . $ cf_WriteBytes(b35058f74b39c3a6).(buf, count, cfp); } |
| 2513 | |
| 2514 | // Writes a null-terminated string to a file. If the file is type binary, |
| 2515 | // the string is terminated in the file with a null. If the file is type |
| 2516 | // text, the string is terminated with a newline. |
| 2517 | // Parameters: buf - pointer to the string |
| 2518 | // cfp = the CFILE pointer |
| 2519 | // Returns the number of bytes written |
| 2520 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2521 | int osipf_CFWriteStringcxx . . $ osipf_CFWriteString(4b3c3ba7355144a8).(const char *buf, CFILEcxx . . $ CFILE# *cfp) { return cf_WriteStringcxx . . $ cf_WriteString(643e1411966bd56c).(cfp, buf); } |
| 2522 | |
| 2523 | // The following functions write numeric vales to a CFILE. All values are |
| 2524 | // stored to the file in Intel (little-endian) format. |
| 2525 | // All these throw an exception if there's an error on write. |
| 2526 | |
| 2527 | // Write an integer (32 bits) |
| 2528 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2529 | void osipf_CFWriteIntcxx . . $ osipf_CFWriteInt(625e12bfe0590ad7).(int i, CFILEcxx . . $ CFILE# *cfp) { cf_WriteIntcxx . . $ cf_WriteInt(966989f25543eb13).(cfp, i); } |
| 2530 | |
| 2531 | // Write a int16_t (16 bits) |
| 2532 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2533 | void osipf_CFWriteShortcxx . . $ osipf_CFWriteShort(873e641da59c3f61).(int16_t s, CFILEcxx . . $ CFILE# *cfp) { cf_WriteShortcxx . . $ cf_WriteShort(d7cf1a05aca96fe5).(cfp, s); } |
| 2534 | |
| 2535 | // Write a byte (8 bits). If the byte is a newline & the file is a text file, writes a CR/LF pair. |
| 2536 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2537 | void osipf_CFWriteBytecxx . . $ osipf_CFWriteByte(f2c2d2badece30fd).(int8_t b, CFILEcxx . . $ CFILE# *cfp) { cf_WriteBytecxx . . $ cf_WriteByte(17377ebd5835367f).(cfp, b); } |
| 2538 | |
| 2539 | // Write a float (32 bits) |
| 2540 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2541 | void osipf_CFWriteFloatcxx . . $ osipf_CFWriteFloat(5cc9ec54bbd5fbb6).(float f, CFILEcxx . . $ CFILE# *cfp) { cf_WriteFloatcxx . . $ cf_WriteFloat(c51c6cf5f6d5270c).(cfp, f); } |
| 2542 | |
| 2543 | // Write a double (64 bits) |
| 2544 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 2545 | void osipf_CFWriteDoublecxx . . $ osipf_CFWriteDouble(131af317a1f48149).(double d, CFILEcxx . . $ CFILE# *cfp) { cf_WriteDoublecxx . . $ cf_WriteDouble(a93307bf66375cef).(cfp, d); } |
| 2546 | |
| 2547 | // CONTROLLER predefs |
| 2548 | |
| 2549 | // enables or disables controls specified. |
| 2550 | void osipf_SetAllControlscxx . . $ osipf_SetAllControls(b45ddcbc8423892c).(bool enabled) { |
| 2551 | int i; |
| 2552 | |
| 2553 | for (i = 0; i < NUM_CONTROLLER_FUNCTIONScxx . . $ NUM_CONTROLLER_FUNCTIONS.; i++) { |
| 2554 | Controllercxx . . $ Controller.->enable_functioncxx . . $ gameController#enable_function(918ebd27a9ddbad3).(i, enabled); |
| 2555 | } |
| 2556 | } |
| 2557 | |
| 2558 | // enable or disable specified function |
| 2559 | void osipf_SetControlscxx . . $ osipf_SetControls(918ebd27a9ddbad3).(int fn, bool enabled) { |
| 2560 | if (Controllercxx . . $ Controller.) { |
| 2561 | Controllercxx . . $ Controller.->enable_functioncxx . . $ gameController#enable_function(918ebd27a9ddbad3).(fn, enabled); |
| 2562 | } |
| 2563 | } |
| 2564 | |
| 2565 | // display messages using a primative dialog |
| 2566 | void osipf_OpenMessageWindowcxx . . $ osipf_OpenMessageWindow(326aeb464d16410c).(const char *title, ...) { |
| 2567 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // ummm, this is a blank function, should we ever be calling it? |
| 2568 | } |
| 2569 | |
| 2570 | int osipf_ObjCreatecxx . . $ osipf_ObjCreate(fa124986c2825aef).(uint8_tcxx . . $ uint8_t# type, uint16_tcxx . . $ uint16_t# id, int roomnum, vectorcxx . . $ vector# *pos, const matrixcxx . . $ matrix# *orient, int parent_handle, |
| 2571 | vectorcxx . . $ vector# *initial_velocity) { |
| 2572 | objectcxx . . $ object# *obj; |
| 2573 | int objnum; |
| 2574 | |
| 2575 | if (id == 65535) // since it is a uint16_t, this is == -1 |
| 2576 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2577 | |
| 2578 | if (((roomnum >= 0) && (roomnum <= Highest_room_indexcxx . . $ Highest_room_index.) && (Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.)) || (ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!(roomnum))) { |
| 2579 | if (IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(type)) { |
| 2580 | // Make sure the scripts aren't creating objects that have lightmaps! |
| 2581 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(Object_info[id].lighting_info.lighting_render_type != LRT_LIGHTMAPScxx . . $ `Descent3/object.h:651:9`!); |
| 2582 | } |
| 2583 | |
| 2584 | objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(type, id, roomnum, pos, orient, parent_handle); |
| 2585 | |
| 2586 | if (objnum == -1) { |
| 2587 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2588 | } |
| 2589 | |
| 2590 | obj = &Objectscxx . . $ Objects.[objnum]; |
| 2591 | |
| 2592 | // if there was an initial velocity, set it |
| 2593 | if (initial_velocity) { |
| 2594 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj->movement_type == MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!); |
| 2595 | obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *initial_velocity; |
| 2596 | } |
| 2597 | |
| 2598 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 2599 | // ASSERT (Netgame.local_role==LR_SERVER); |
| 2600 | if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 2601 | MultiSendObjectcxx . . $ MultiSendObject(d7354c60e612ede5).(obj, 0); |
| 2602 | } |
| 2603 | } |
| 2604 | |
| 2605 | InitObjectScriptscxx . . $ InitObjectScripts(674fac047436fc5b).(obj); |
| 2606 | |
| 2607 | if (IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(obj->type)) { |
| 2608 | int ambient_sound = Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].soundscxx . . $ object_info#sounds.[GSI_AMBIENTcxx . . $ `Descent3/object_external.h:350:9`!]; |
| 2609 | if (ambient_sound != SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!) { |
| 2610 | Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(ambient_sound, SND_PRIORITY_LOWESTcxx . . $ `sndlib/ssl_lib.h:286:9`!, obj); |
| 2611 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) |
| 2612 | MultiPlay3dSoundcxx . . $ MultiPlay3dSound(f056c30c88236a5f).(ambient_sound, objnum, SND_PRIORITY_LOWcxx . . $ `sndlib/ssl_lib.h:285:9`!); |
| 2613 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) |
| 2614 | DemoWrite3DSoundcxx . . $ DemoWrite3DSound(c29d531f7e56abb1).(ambient_sound, objnum, SND_PRIORITY_LOWcxx . . $ `sndlib/ssl_lib.h:285:9`!); |
| 2615 | } |
| 2616 | } |
| 2617 | } else { |
| 2618 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2619 | } |
| 2620 | |
| 2621 | return obj->handlecxx . . $ object#handle.; |
| 2622 | } |
| 2623 | |
| 2624 | // OBJECT Properties. |
| 2625 | bool osipf_IsObjectVisiblecxx . . $ osipf_IsObjectVisible(39516aeee13ca5ab).(objectcxx . . $ object# *obj) { |
| 2626 | if (obj->renderframecxx . . $ object#renderframe. != ((FrameCountcxx . . $ FrameCount. - 1) % 65536)) { |
| 2627 | return false; |
| 2628 | } |
| 2629 | |
| 2630 | return true; |
| 2631 | } |
| 2632 | |
| 2633 | float osipf_GameTimecxx . . $ osipf_GameTime(9b8c9e39889c762c).(void) { return Gametimecxx . . $ Gametime.; } |
| 2634 | |
| 2635 | float osipf_FrameTimecxx . . $ osipf_FrameTime(9b8c9e39889c762c).(void) { return Frametimecxx . . $ Frametime.; } |
| 2636 | |
| 2637 | void osipf_ObjWBValuecxx . . $ osipf_ObjWBValue(27bdf1633c0da5e1).(int obj_handle, char wb_index, char op, char vtype, void *ptr, char g_index) { |
| 2638 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 2639 | |
| 2640 | if (!objp) { |
| 2641 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Obj_WBValue: Illegal Object Passed\n"); |
| 2642 | return; |
| 2643 | } |
| 2644 | |
| 2645 | if (objp->control_typecxx . . $ object#control_type. != CT_AIcxx . . $ `Descent3/object_external.h:217:9`! && objp->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && objp->typecxx . . $ object#type. != OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) { |
| 2646 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Obj_WBValue: Illegal Object CT Passed\n"); |
| 2647 | return; |
| 2648 | } |
| 2649 | |
| 2650 | dynamic_wb_infocxx . . $ dynamic_wb_info# *p_dwb = &objp->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index]; |
| 2651 | otype_wb_infocxx . . $ otype_wb_info# *static_wb; |
| 2652 | poly_modelcxx . . $ poly_model# *pm = &Poly_modelscxx . . $ Poly_models.[objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num.]; |
| 2653 | |
| 2654 | if (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || objp->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) { |
| 2655 | shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[objp->idcxx . . $ object#id.].ship_indexcxx . . $ player#ship_index.]; |
| 2656 | static_wb = &ship->static_wbcxx . . $ ship#static_wb.[wb_index]; |
| 2657 | } else { |
| 2658 | object_infocxx . . $ object_info# *obj_info = &Object_infocxx . . $ Object_info.[objp->idcxx . . $ object#id.]; |
| 2659 | static_wb = &obj_info->static_wbcxx . . $ object_info#static_wb.[wb_index]; |
| 2660 | } |
| 2661 | |
| 2662 | if (objp->typecxx . . $ object#type. == OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`! && (wb_index < 0 || wb_index > pm->num_wbscxx . . $ poly_model#num_wbs.)) { |
| 2663 | return; |
| 2664 | } |
| 2665 | |
| 2666 | switch (vtype) { |
| 2667 | case WBV_C_NUM_WBScxx . . $ `scripts/osiris_common.h:678:9`!: { |
| 2668 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2669 | *(char *)ptr = pm->num_wbscxx . . $ poly_model#num_wbs.; |
| 2670 | } |
| 2671 | } break; |
| 2672 | case WBV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:659:9`!: |
| 2673 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2674 | int anim_type = static_wb->flagscxx . . $ otype_wb_info#flags. & WBF_ANIM_MASKScxx . . $ `lib/robotfirestruct_external.h:30:9`!; |
| 2675 | |
| 2676 | if (anim_type == WBF_ANIM_LOCALcxx . . $ `lib/robotfirestruct_external.h:28:9`!) { |
| 2677 | *((float *)ptr) = p_dwb->wb_anim_framecxx . . $ dynamic_wb_info#wb_anim_frame.; |
| 2678 | } else { |
| 2679 | *((float *)ptr) = objp->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..anim_framecxx . . $ polyobj_info#anim_frame.; |
| 2680 | } |
| 2681 | } |
| 2682 | break; |
| 2683 | |
| 2684 | case WBV_F_LAST_FIRE_TIMEcxx . . $ `scripts/osiris_common.h:660:9`!: |
| 2685 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2686 | p_dwb->last_fire_timecxx . . $ dynamic_wb_info#last_fire_time. = *((float *)ptr); |
| 2687 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2688 | *((float *)ptr) = p_dwb->last_fire_timecxx . . $ dynamic_wb_info#last_fire_time.; |
| 2689 | } |
| 2690 | break; |
| 2691 | |
| 2692 | case WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!: |
| 2693 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2694 | p_dwb->flagscxx . . $ dynamic_wb_info#flags. = *((int *)ptr); |
| 2695 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2696 | *((int *)ptr) = p_dwb->flagscxx . . $ dynamic_wb_info#flags.; |
| 2697 | } else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) { |
| 2698 | p_dwb->flagscxx . . $ dynamic_wb_info#flags. |= *((int *)ptr); |
| 2699 | } else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) { |
| 2700 | p_dwb->flagscxx . . $ dynamic_wb_info#flags. &= ~(*((int *)ptr)); |
| 2701 | } |
| 2702 | break; |
| 2703 | |
| 2704 | case WBV_C_NUM_GUNPTScxx . . $ `scripts/osiris_common.h:664:9`!: |
| 2705 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2706 | if (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || objp->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) { |
| 2707 | *((char *)ptr) = 8; |
| 2708 | } else { |
| 2709 | *((char *)ptr) = pm->poly_wbcxx . . $ poly_model#poly_wb.[wb_index].num_gpscxx . . $ poly_wb_info#num_gps.; |
| 2710 | } |
| 2711 | } |
| 2712 | break; |
| 2713 | case WBSV_US_GUNPT_WEAPON_IDcxx . . $ `scripts/osiris_common.h:665:9`!: |
| 2714 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2715 | static_wb->gp_weapon_indexcxx . . $ otype_wb_info#gp_weapon_index.[g_index] = *((uint16_tcxx . . $ uint16_t# *)ptr); |
| 2716 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2717 | *((uint16_tcxx . . $ uint16_t# *)ptr) = static_wb->gp_weapon_indexcxx . . $ otype_wb_info#gp_weapon_index.[g_index]; |
| 2718 | } |
| 2719 | break; |
| 2720 | case WBSV_V_GUNPT_POScxx . . $ `scripts/osiris_common.h:666:9`!: |
| 2721 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2722 | if (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || objp->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) |
| 2723 | WeaponCalcGuncxx . . $ WeaponCalcGun(85e3752e9562a225).(((vectorcxx . . $ vector# *)ptr), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, objp, pm->poly_wbcxx . . $ poly_model#poly_wb.[0].gp_indexcxx . . $ poly_wb_info#gp_index.[g_index]); |
| 2724 | else |
| 2725 | WeaponCalcGuncxx . . $ WeaponCalcGun(85e3752e9562a225).(((vectorcxx . . $ vector# *)ptr), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, objp, pm->poly_wbcxx . . $ poly_model#poly_wb.[wb_index].gp_indexcxx . . $ poly_wb_info#gp_index.[g_index]); |
| 2726 | } |
| 2727 | break; |
| 2728 | |
| 2729 | case WBV_C_NUM_MASKScxx . . $ `scripts/osiris_common.h:669:9`!: |
| 2730 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2731 | static_wb->num_maskscxx . . $ otype_wb_info#num_masks. = *((char *)ptr); |
| 2732 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2733 | *((char *)ptr) = static_wb->num_maskscxx . . $ otype_wb_info#num_masks.; |
| 2734 | } |
| 2735 | break; |
| 2736 | case WBSV_C_MASKcxx . . $ `scripts/osiris_common.h:670:9`!: |
| 2737 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2738 | static_wb->gp_fire_maskscxx . . $ otype_wb_info#gp_fire_masks.[g_index] = *((char *)ptr); |
| 2739 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2740 | *((char *)ptr) = static_wb->gp_fire_maskscxx . . $ otype_wb_info#gp_fire_masks.[g_index]; |
| 2741 | } else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) { |
| 2742 | static_wb->gp_fire_maskscxx . . $ otype_wb_info#gp_fire_masks.[g_index] |= *((char *)ptr); |
| 2743 | } else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) { |
| 2744 | static_wb->gp_fire_maskscxx . . $ otype_wb_info#gp_fire_masks.[g_index] &= ~(*((char *)ptr)); |
| 2745 | } |
| 2746 | break; |
| 2747 | case WBSV_I_FIRE_SOUNDcxx . . $ `scripts/osiris_common.h:671:9`!: |
| 2748 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2749 | static_wb->fm_fire_sound_indexcxx . . $ otype_wb_info#fm_fire_sound_index.[g_index] = (*((int *)ptr)); |
| 2750 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2751 | (*((int *)ptr)) = static_wb->fm_fire_sound_indexcxx . . $ otype_wb_info#fm_fire_sound_index.[g_index]; |
| 2752 | } |
| 2753 | break; |
| 2754 | case WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!: |
| 2755 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2756 | static_wb->gp_fire_waitcxx . . $ otype_wb_info#gp_fire_wait.[g_index] = (*((float *)ptr)); |
| 2757 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2758 | (*((float *)ptr)) = static_wb->gp_fire_waitcxx . . $ otype_wb_info#gp_fire_wait.[g_index]; |
| 2759 | } |
| 2760 | break; |
| 2761 | case WBSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:673:9`!: |
| 2762 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2763 | static_wb->anim_timecxx . . $ otype_wb_info#anim_time.[g_index] = (*((float *)ptr)); |
| 2764 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2765 | (*((float *)ptr)) = static_wb->anim_timecxx . . $ otype_wb_info#anim_time.[g_index]; |
| 2766 | } |
| 2767 | break; |
| 2768 | case WBSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:674:9`!: |
| 2769 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2770 | static_wb->anim_start_framecxx . . $ otype_wb_info#anim_start_frame.[g_index] = (*((float *)ptr)); |
| 2771 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2772 | (*((float *)ptr)) = static_wb->anim_start_framecxx . . $ otype_wb_info#anim_start_frame.[g_index]; |
| 2773 | } |
| 2774 | break; |
| 2775 | case WBSV_F_ANIM_FIREcxx . . $ `scripts/osiris_common.h:675:9`!: |
| 2776 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2777 | static_wb->anim_fire_framecxx . . $ otype_wb_info#anim_fire_frame.[g_index] = (*((float *)ptr)); |
| 2778 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2779 | (*((float *)ptr)) = static_wb->anim_fire_framecxx . . $ otype_wb_info#anim_fire_frame.[g_index]; |
| 2780 | } |
| 2781 | break; |
| 2782 | case WBSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:676:9`!: |
| 2783 | if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 2784 | static_wb->anim_end_framecxx . . $ otype_wb_info#anim_end_frame.[g_index] = (*((float *)ptr)); |
| 2785 | } else if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 2786 | (*((float *)ptr)) = static_wb->anim_end_framecxx . . $ otype_wb_info#anim_end_frame.[g_index]; |
| 2787 | } |
| 2788 | break; |
| 2789 | } |
| 2790 | } |
| 2791 | |
| 2792 | // Sets/Clears mission flags |
| 2793 | // flag is which mission flag to set/clear (1-32) |
| 2794 | // value is 0 to clear, or 1 to set |
| 2795 | void osipf_MissionFlagSetcxx . . $ osipf_MissionFlagSet(9633529ce3c4ff50).(int flag, uint8_tcxx . . $ uint8_t# value) { |
| 2796 | if (flag < 1 && flag > 32) { |
| 2797 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid flag passed to osipf_MissionFlagSet(%d)\n", flag); |
| 2798 | return; |
| 2799 | } |
| 2800 | |
| 2801 | flag--; |
| 2802 | uint32_tcxx . . $ uint32_t# bit = 0x01; |
| 2803 | bit = bit << flag; |
| 2804 | |
| 2805 | if (!value) { |
| 2806 | Current_missioncxx . . $ Current_mission..game_state_flagscxx . . $ tMission#game_state_flags. &= ~bit; |
| 2807 | } else { |
| 2808 | Current_missioncxx . . $ Current_mission..game_state_flagscxx . . $ tMission#game_state_flags. |= bit; |
| 2809 | } |
| 2810 | } |
| 2811 | |
| 2812 | // Gets a mission flag |
| 2813 | // flag is what mission flag to get. Returns 1 if set, 0 if not. |
| 2814 | int osipf_MissionFlagGetcxx . . $ osipf_MissionFlagGet(7864480464b09eea).(int flag) { |
| 2815 | if (flag < 1 && flag > 32) { |
| 2816 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid flag passed to osipf_MissionFlagGet(%d)\n", flag); |
| 2817 | return 0; |
| 2818 | } |
| 2819 | |
| 2820 | flag--; |
| 2821 | uint32_tcxx . . $ uint32_t# bit = 0x01; |
| 2822 | bit = bit << flag; |
| 2823 | |
| 2824 | if (Current_missioncxx . . $ Current_mission..game_state_flagscxx . . $ tMission#game_state_flags. & bit) |
| 2825 | return 1; |
| 2826 | |
| 2827 | return 0; |
| 2828 | } |
| 2829 | |
| 2830 | void osipf_PlayerAddHudMessagecxx . . $ osipf_PlayerAddHudMessage(66835f578de1bcb3).(int handle, const char *str) { |
| 2831 | msafe_structcxx . . $ msafe_struct# mo; |
| 2832 | |
| 2833 | mo.objhandlecxx . . $ msafe_struct#objhandle. = mo.idcxx . . $ msafe_struct#id. = handle; |
| 2834 | mo.colorcxx . . $ msafe_struct#color. = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(0, 255, 0); |
| 2835 | strncpy(mo.messagecxx . . $ msafe_struct#message., str, MSAFE_MESSAGE_LENGTHcxx . . $ `scripts/osiris_common.h:1219:9`! - 1); |
| 2836 | mo.messagecxx . . $ msafe_struct#message.[MSAFE_MESSAGE_LENGTHcxx . . $ `scripts/osiris_common.h:1219:9`! - 1] = '\0'; |
| 2837 | |
| 2838 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_MISC_HUD_MESSAGEcxx . . $ `scripts/osiris_common.h:881:9`!, &mo); |
| 2839 | } |
| 2840 | |
| 2841 | void osipf_ObjGhostcxx . . $ osipf_ObjGhost(918ebd27a9ddbad3).(int handle, bool f_ghost) { |
| 2842 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 2843 | if (obj) { |
| 2844 | // BLACKPYROHACK - Chrishack for Mercenary |
| 2845 | if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) { |
| 2846 | if (obj->handlecxx . . $ object#handle. == Buddy_handlecxx . . $ Buddy_handle.[0]) { |
| 2847 | if (stricmpcxx . . $ `linux/linux_fix.h:43:9`!(Ships[Players[Player_object->id].ship_index].name, "Black Pyro") == 0) { |
| 2848 | obj->idcxx . . $ object#id. = ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!; |
| 2849 | PageInPolymodelcxx . . $ PageInPolymodel(726816c99d57134).(Object_infocxx . . $ Object_info.[ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!].render_handlecxx . . $ object_info#render_handle., Object_infocxx . . $ Object_info.[ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!].typecxx . . $ object_info#type., |
| 2850 | &Object_infocxx . . $ Object_info.[ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!].sizecxx . . $ object_info#size.); |
| 2851 | obj->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num. = Object_infocxx . . $ Object_info.[ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!].render_handlecxx . . $ object_info#render_handle.; |
| 2852 | } else { |
| 2853 | obj->idcxx . . $ object#id. = ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!; |
| 2854 | obj->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num. = Object_infocxx . . $ Object_info.[ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!].render_handlecxx . . $ object_info#render_handle.; |
| 2855 | } |
| 2856 | } |
| 2857 | } |
| 2858 | |
| 2859 | msafe_structcxx . . $ msafe_struct# mo; |
| 2860 | mo.objhandlecxx . . $ msafe_struct#objhandle. = obj->handlecxx . . $ object#handle.; |
| 2861 | |
| 2862 | if (f_ghost) |
| 2863 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_GHOSTcxx . . $ `scripts/osiris_common.h:817:9`!, &mo); |
| 2864 | else |
| 2865 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_OBJECT_UNGHOSTcxx . . $ `scripts/osiris_common.h:818:9`!, &mo); |
| 2866 | } |
| 2867 | } |
| 2868 | |
| 2869 | void osipf_ObjBurningcxx . . $ osipf_ObjBurning(3b3943b4e4191a93).(int handle, float time, float damage_per_second) { |
| 2870 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 2871 | if (obj && obj->effect_infocxx . . $ object#effect_info.) { |
| 2872 | if (time > 0.0) { |
| 2873 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!; |
| 2874 | |
| 2875 | obj->effect_infocxx . . $ object#effect_info.->damage_timecxx . . $ effect_info_s#damage_time. = time; |
| 2876 | obj->effect_infocxx . . $ object#effect_info.->damage_per_secondcxx . . $ effect_info_s#damage_per_second. = damage_per_second; |
| 2877 | |
| 2878 | obj->effect_infocxx . . $ object#effect_info.->last_damage_timecxx . . $ effect_info_s#last_damage_time. = 0; |
| 2879 | |
| 2880 | obj->effect_infocxx . . $ object#effect_info.->damage_handlecxx . . $ effect_info_s#damage_handle. = obj->handlecxx . . $ object#handle.; |
| 2881 | |
| 2882 | if (obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. == SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!) |
| 2883 | obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. = Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(SOUND_PLAYER_BURNINGcxx . . $ `Descent3/sounds.h:134:9`!, SND_PRIORITY_HIGHESTcxx . . $ `sndlib/ssl_lib.h:282:9`!, obj); |
| 2884 | } else { |
| 2885 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. &= (~EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!); |
| 2886 | obj->effect_infocxx . . $ object#effect_info.->last_damage_timecxx . . $ effect_info_s#last_damage_time. = 0; |
| 2887 | Sound_systemcxx . . $ Sound_system..StopSoundLoopingcxx . . $ hlsSystem#StopSoundLooping(d4f767463ce0a6b3).(obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle.); |
| 2888 | obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. = SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!; |
| 2889 | } |
| 2890 | } |
| 2891 | } |
| 2892 | |
| 2893 | bool osipf_ObjIsEffectcxx . . $ osipf_ObjIsEffect(cf9ef193275fa6d8).(int handle, int type_flag) { |
| 2894 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 2895 | return (obj && obj->effect_infocxx . . $ object#effect_info. && (obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & type_flag)); |
| 2896 | } |
| 2897 | |
| 2898 | void *osipf_CFopencxx . . $ osipf_CFopen(12e6862c879384a7).(const char *filename, const char *mode) { return cfopencxx . . $ cfopen(7c7b94e455f1ae56).(filenamecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., mode); } |
| 2899 | |
| 2900 | void osipf_CFclosecxx . . $ osipf_CFclose(3639e799710acb68).(CFILEcxx . . $ CFILE# *file) { cfclosecxx . . $ cfclose(3639e799710acb68).(file); } |
| 2901 | |
| 2902 | int osipf_CFtellcxx . . $ osipf_CFtell(413716a422df0036).(CFILEcxx . . $ CFILE# *file) { return cftellcxx . . $ cftell(65b457210a6528a1).(file); } |
| 2903 | |
| 2904 | uint8_tcxx . . $ uint8_t# osipf_CFeofcxx . . $ osipf_CFeof(848bd77af7750b0d).(CFILEcxx . . $ CFILE# *file) { return (cfeofcxx . . $ cfeof(413716a422df0036).(file) != 0) ? 1 : 0; } |
| 2905 | |
| 2906 | void osipf_SoundStopcxx . . $ osipf_SoundStop(918ebd27a9ddbad3).(int s_handle, bool f_immediately) { |
| 2907 | // JEFF - sorry, this can't be made multiplayer friendly |
| 2908 | /* |
| 2909 | if(f_immediately) |
| 2910 | Sound_system.StopSoundImmediate(s_handle); |
| 2911 | else |
| 2912 | Sound_system.StopSoundLooping(s_handle); |
| 2913 | */ |
| 2914 | } |
| 2915 | |
| 2916 | int osipf_SoundPlay2dcxx . . $ osipf_SoundPlay2d(1df3af30621f6c78).(int obj_handle, int s_id, float volume) { |
| 2917 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2918 | mstruct.indexcxx . . $ msafe_struct#index. = s_id; |
| 2919 | |
| 2920 | if (obj_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 2921 | mstruct.statecxx . . $ msafe_struct#state. = 1; |
| 2922 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 2923 | } else { |
| 2924 | mstruct.statecxx . . $ msafe_struct#state. = 0; |
| 2925 | } |
| 2926 | |
| 2927 | mstruct.volumecxx . . $ msafe_struct#volume. = volume; |
| 2928 | |
| 2929 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_SOUND_2Dcxx . . $ `scripts/osiris_common.h:866:9`!, &mstruct); |
| 2930 | return mstruct.sound_handlecxx . . $ msafe_struct#sound_handle.; |
| 2931 | /* |
| 2932 | //chrishack -- use handle for who hears the sound |
| 2933 | return Sound_system.Play2dSound(s_id, SND_PRIORITY_HIGHEST, volume); |
| 2934 | */ |
| 2935 | } |
| 2936 | |
| 2937 | int osipf_SoundPlay3dcxx . . $ osipf_SoundPlay3d(1df3af30621f6c78).(int obj_handle, int s_id, float volume) { |
| 2938 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2939 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = obj_handle; |
| 2940 | mstruct.indexcxx . . $ msafe_struct#index. = s_id; |
| 2941 | |
| 2942 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_SOUND_OBJECTcxx . . $ `scripts/osiris_common.h:867:9`!, &mstruct); |
| 2943 | return mstruct.sound_handlecxx . . $ msafe_struct#sound_handle.; |
| 2944 | /* |
| 2945 | object *obj = ObjGet(obj_handle); |
| 2946 | |
| 2947 | if(obj) |
| 2948 | { |
| 2949 | return Sound_system.Play3dSound(s_id, SND_PRIORITY_HIGHEST,obj, volume); |
| 2950 | } |
| 2951 | |
| 2952 | return -1; |
| 2953 | */ |
| 2954 | } |
| 2955 | |
| 2956 | int osipf_SoundFindIdcxx . . $ osipf_SoundFindId(5c4306d8553b3696).(const char *s_name) { return FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(s_name)); } |
| 2957 | |
| 2958 | bool osipf_AIIsObjFriendcxx . . $ osipf_AIIsObjFriend(cf9ef193275fa6d8).(int obj_handle, int it_handle) { |
| 2959 | objectcxx . . $ object# *me = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 2960 | objectcxx . . $ object# *it = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(it_handle); |
| 2961 | |
| 2962 | if (me && it) |
| 2963 | return AIObjFriendcxx . . $ AIObjFriend(9fa7d4d2c8b4c2db).(me, it); |
| 2964 | |
| 2965 | return false; |
| 2966 | } |
| 2967 | |
| 2968 | bool osipf_AIIsObjEnemycxx . . $ osipf_AIIsObjEnemy(cf9ef193275fa6d8).(int obj_handle, int it_handle) { |
| 2969 | objectcxx . . $ object# *me = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 2970 | objectcxx . . $ object# *it = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(it_handle); |
| 2971 | |
| 2972 | if (me && it) |
| 2973 | return AIObjEnemycxx . . $ AIObjEnemy(9fa7d4d2c8b4c2db).(me, it); |
| 2974 | |
| 2975 | return false; |
| 2976 | } |
| 2977 | |
| 2978 | void osipf_AIGoalValuecxx . . $ osipf_AIGoalValue(27bdf1633c0da5e1).(int obj_handle, char g_index, char op, char vtype, void *ptr, char index) { |
| 2979 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 2980 | if (!obj) |
| 2981 | return; |
| 2982 | |
| 2983 | ai_framecxx . . $ ai_frame# *ai_info = obj->ai_infocxx . . $ object#ai_info.; |
| 2984 | if (!ai_info) |
| 2985 | return; |
| 2986 | |
| 2987 | if (g_index < 0 || g_index >= MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`!) |
| 2988 | return; |
| 2989 | |
| 2990 | goalcxx . . $ goal# *g_ptr = &ai_info->goalscxx . . $ ai_frame#goals.[g_index]; |
| 2991 | |
| 2992 | if (!g_ptr->usedcxx . . $ goal#used. || vtype == AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!) { |
| 2993 | if (vtype == AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`! && op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 2994 | *(bool *)ptr = g_ptr->usedcxx . . $ goal#used.; |
| 2995 | |
| 2996 | return; |
| 2997 | } |
| 2998 | |
| 2999 | switch (vtype) { |
| 3000 | case AIGV_I_TYPEcxx . . $ `scripts/osiris_common.h:564:9`!: { |
| 3001 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3002 | *(int *)ptr = g_ptr->typecxx . . $ goal#type.; |
| 3003 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3004 | g_ptr->typecxx . . $ goal#type. = *(int *)ptr; |
| 3005 | } break; |
| 3006 | case AIGV_C_ACTIVATION_LEVELcxx . . $ `scripts/osiris_common.h:565:9`!: { |
| 3007 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3008 | *(char *)ptr = g_ptr->activation_levelcxx . . $ goal#activation_level.; |
| 3009 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3010 | g_ptr->activation_levelcxx . . $ goal#activation_level. = *(char *)ptr; |
| 3011 | } break; |
| 3012 | case AIGV_F_MIN_INFLUENCEcxx . . $ `scripts/osiris_common.h:566:9`!: { |
| 3013 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3014 | *(float *)ptr = g_ptr->min_influencecxx . . $ goal#min_influence.; |
| 3015 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3016 | g_ptr->min_influencecxx . . $ goal#min_influence. = *(float *)ptr; |
| 3017 | } break; |
| 3018 | case AIGV_F_MAX_INFLUENCEcxx . . $ `scripts/osiris_common.h:567:9`!: { |
| 3019 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3020 | *(float *)ptr = g_ptr->max_influencecxx . . $ goal#$anonymous_type_4#max_influence.; |
| 3021 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3022 | g_ptr->max_influencecxx . . $ goal#$anonymous_type_4#max_influence. = *(float *)ptr; |
| 3023 | } break; |
| 3024 | |
| 3025 | case AIGSV_F_INFLUENCE_DISTcxx . . $ `scripts/osiris_common.h:569:9`!: // 0 - 3 |
| 3026 | { |
| 3027 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3028 | *(float *)ptr = g_ptr->ramp_influence_distscxx . . $ goal#ramp_influence_dists.[index]; |
| 3029 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3030 | g_ptr->ramp_influence_distscxx . . $ goal#ramp_influence_dists.[index] = *(float *)ptr; |
| 3031 | } break; |
| 3032 | |
| 3033 | case AIGV_I_HANDLEcxx . . $ `scripts/osiris_common.h:571:9`!: { |
| 3034 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3035 | *(int *)ptr = g_ptr->g_infocxx . . $ goal#g_info..handlecxx . . $ goal_info#$anonymous_type_1#handle.; |
| 3036 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3037 | g_ptr->g_infocxx . . $ goal#g_info..handlecxx . . $ goal_info#$anonymous_type_1#handle. = *(int *)ptr; |
| 3038 | } break; |
| 3039 | case AIGV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:572:9`!: { |
| 3040 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3041 | *(int *)ptr = g_ptr->g_infocxx . . $ goal#g_info..roomnumcxx . . $ goal_info#$anonymous_type_1#roomnum.; |
| 3042 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3043 | g_ptr->g_infocxx . . $ goal#g_info..roomnumcxx . . $ goal_info#$anonymous_type_1#roomnum. = *(int *)ptr; |
| 3044 | } break; |
| 3045 | case AIGV_I_F_ACTIONScxx . . $ `scripts/osiris_common.h:573:9`!: { |
| 3046 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3047 | *(int *)ptr = g_ptr->g_infocxx . . $ goal#g_info..f_actionscxx . . $ goal_info#$anonymous_type_1#f_actions.; |
| 3048 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3049 | g_ptr->g_infocxx . . $ goal#g_info..f_actionscxx . . $ goal_info#$anonymous_type_1#f_actions. = *(int *)ptr; |
| 3050 | } break; |
| 3051 | case AIGV_I_IDcxx . . $ `scripts/osiris_common.h:574:9`!: { |
| 3052 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3053 | *(int *)ptr = g_ptr->g_infocxx . . $ goal#g_info..idcxx . . $ goal_info#$anonymous_type_1#id.; |
| 3054 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3055 | g_ptr->g_infocxx . . $ goal#g_info..idcxx . . $ goal_info#$anonymous_type_1#id. = *(int *)ptr; |
| 3056 | } break; |
| 3057 | case AIGV_C_SUBTYPEcxx . . $ `scripts/osiris_common.h:575:9`!: { |
| 3058 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3059 | *(char *)ptr = g_ptr->subtypecxx . . $ goal#subtype.; |
| 3060 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3061 | g_ptr->subtypecxx . . $ goal#subtype. = *(char *)ptr; |
| 3062 | } break; |
| 3063 | case AIGV_F_TIMEcxx . . $ `scripts/osiris_common.h:576:9`!: { |
| 3064 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3065 | *(float *)ptr = g_ptr->g_infocxx . . $ goal#g_info..timecxx . . $ goal_info#$anonymous_type_2#time.; |
| 3066 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3067 | g_ptr->g_infocxx . . $ goal#g_info..timecxx . . $ goal_info#$anonymous_type_2#time. = *(float *)ptr; |
| 3068 | } break; |
| 3069 | case AIGV_V_VECcxx . . $ `scripts/osiris_common.h:577:9`!: { |
| 3070 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3071 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->g_infocxx . . $ goal#g_info..veccxx . . $ goal_info#$anonymous_type_2#vec.; |
| 3072 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3073 | g_ptr->g_infocxx . . $ goal#g_info..veccxx . . $ goal_info#$anonymous_type_2#vec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3074 | } break; |
| 3075 | case AIGV_V_POScxx . . $ `scripts/osiris_common.h:578:9`!: { |
| 3076 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3077 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->g_infocxx . . $ goal#g_info..poscxx . . $ goal_info#$anonymous_type_2#pos.; |
| 3078 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3079 | g_ptr->g_infocxx . . $ goal#g_info..poscxx . . $ goal_info#$anonymous_type_2#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3080 | } break; |
| 3081 | case AIGV_F_STEER_MIN_DISTcxx . . $ `scripts/osiris_common.h:579:9`!: { |
| 3082 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3083 | *(float *)ptr = g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..min_distcxx . . $ g_steer#min_dist.; |
| 3084 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3085 | g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..min_distcxx . . $ g_steer#min_dist. = *(float *)ptr; |
| 3086 | } break; |
| 3087 | case AIGV_F_STEER_MAX_DISTcxx . . $ `scripts/osiris_common.h:580:9`!: { |
| 3088 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3089 | *(float *)ptr = g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..max_distcxx . . $ g_steer#max_dist.; |
| 3090 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3091 | g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..max_distcxx . . $ g_steer#max_dist. = *(float *)ptr; |
| 3092 | } break; |
| 3093 | case AIGV_F_STEER_MAX_STRENGTHcxx . . $ `scripts/osiris_common.h:581:9`!: { |
| 3094 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3095 | *(float *)ptr = g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..max_strengthcxx . . $ g_steer#max_strength.; |
| 3096 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3097 | g_ptr->g_infocxx . . $ goal#g_info..dist_infocxx . . $ goal_info#$anonymous_type_3#dist_info..max_strengthcxx . . $ g_steer#max_strength. = *(float *)ptr; |
| 3098 | } break; |
| 3099 | case AIGV_B_ATTACH_F_ALIGNEDcxx . . $ `scripts/osiris_common.h:582:9`!: { |
| 3100 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3101 | *(bool *)ptr = (g_ptr->g_infocxx . . $ goal#g_info..attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..flagscxx . . $ g_attach#flags. & GAF_ALIGNEDcxx . . $ `Descent3/aistruct.h:578:9`!) != 0; |
| 3102 | } break; |
| 3103 | case AIGV_B_ATTACH_F_SPHEREcxx . . $ `scripts/osiris_common.h:583:9`!: { |
| 3104 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3105 | *(bool *)ptr = (g_ptr->g_infocxx . . $ goal#g_info..attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..flagscxx . . $ g_attach#flags. & GAF_SPHEREcxx . . $ `Descent3/aistruct.h:579:9`!) != 0; |
| 3106 | } break; |
| 3107 | case AIGV_F_ATTACH_RADcxx . . $ `scripts/osiris_common.h:584:9`!: { |
| 3108 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3109 | *(float *)ptr = g_ptr->g_infocxx . . $ goal#g_info..attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..radcxx . . $ g_attach#rad.; |
| 3110 | } break; |
| 3111 | case AIGV_C_ATTACH_CHILD_APcxx . . $ `scripts/osiris_common.h:585:9`!: { |
| 3112 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3113 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..child_apcxx . . $ g_attach#child_ap.; |
| 3114 | } break; |
| 3115 | case AIGV_C_ATTACH_PARENT_APcxx . . $ `scripts/osiris_common.h:586:9`!: { |
| 3116 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3117 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..attach_infocxx . . $ goal_info#$anonymous_type_3#attach_info..parent_apcxx . . $ g_attach#parent_ap.; |
| 3118 | } break; |
| 3119 | case AIGV_I_WANDER_AVOID_HANDLEcxx . . $ `scripts/osiris_common.h:587:9`!: { |
| 3120 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3121 | *(int *)ptr = g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..avoid_handlecxx . . $ g_wander_extra#avoid_handle.; |
| 3122 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3123 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..avoid_handlecxx . . $ g_wander_extra#avoid_handle. = *(int *)ptr; |
| 3124 | } break; |
| 3125 | case AIGV_C_WANDER_MIN_ROOMScxx . . $ `scripts/osiris_common.h:588:9`!: { |
| 3126 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3127 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..min_roomscxx . . $ g_wander_extra#min_rooms.; |
| 3128 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3129 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..min_roomscxx . . $ g_wander_extra#min_rooms. = *(char *)ptr; |
| 3130 | } break; |
| 3131 | case AIGV_C_WANDER_MAX_ROOMScxx . . $ `scripts/osiris_common.h:589:9`!: { |
| 3132 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3133 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..max_roomscxx . . $ g_wander_extra#max_rooms.; |
| 3134 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3135 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..max_roomscxx . . $ g_wander_extra#max_rooms. = *(char *)ptr; |
| 3136 | } break; |
| 3137 | case AIGV_C_WANDER_FLAGScxx . . $ `scripts/osiris_common.h:590:9`!: { |
| 3138 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3139 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..flagscxx . . $ g_wander_extra#flags.; |
| 3140 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3141 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..flagscxx . . $ g_wander_extra#flags. = *(char *)ptr; |
| 3142 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3143 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..flagscxx . . $ g_wander_extra#flags. |= *(char *)ptr; |
| 3144 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3145 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..flagscxx . . $ g_wander_extra#flags. &= ~(*(char *)ptr); |
| 3146 | } break; |
| 3147 | case AIGV_C_WANDER_MINE_INDEXcxx . . $ `scripts/osiris_common.h:591:9`!: { |
| 3148 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3149 | *(char *)ptr = g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..mine_indexcxx . . $ g_wander_extra#mine_index.; |
| 3150 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3151 | g_ptr->g_infocxx . . $ goal#g_info..wander_extra_infocxx . . $ goal_info#$anonymous_type_3#wander_extra_info..mine_indexcxx . . $ g_wander_extra#mine_index. = *(char *)ptr; |
| 3152 | } break; |
| 3153 | case AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!: { |
| 3154 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3155 | *(float *)ptr = g_ptr->circle_distancecxx . . $ goal#circle_distance.; |
| 3156 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3157 | g_ptr->circle_distancecxx . . $ goal#circle_distance. = *(float *)ptr; |
| 3158 | } break; |
| 3159 | case AIGV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:593:9`!: { |
| 3160 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3161 | *(int *)ptr = g_ptr->status_regcxx . . $ goal#status_reg.; |
| 3162 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3163 | g_ptr->status_regcxx . . $ goal#status_reg. = *(int *)ptr; |
| 3164 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3165 | g_ptr->status_regcxx . . $ goal#status_reg. |= *(int *)ptr; |
| 3166 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3167 | g_ptr->status_regcxx . . $ goal#status_reg. &= ~(*(int *)ptr); |
| 3168 | } break; |
| 3169 | case AIGV_F_START_TIMEcxx . . $ `scripts/osiris_common.h:594:9`!: { |
| 3170 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3171 | *(float *)ptr = g_ptr->start_timecxx . . $ goal#start_time.; |
| 3172 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3173 | g_ptr->start_timecxx . . $ goal#start_time. = *(float *)ptr; |
| 3174 | } break; |
| 3175 | case AIGV_F_NEXT_PATH_TIMEcxx . . $ `scripts/osiris_common.h:595:9`!: { |
| 3176 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3177 | *(float *)ptr = g_ptr->next_path_timecxx . . $ goal#next_path_time.; |
| 3178 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3179 | g_ptr->next_path_timecxx . . $ goal#next_path_time. = *(float *)ptr; |
| 3180 | } break; |
| 3181 | case AIGV_F_DIST_TO_GOALcxx . . $ `scripts/osiris_common.h:596:9`!: { |
| 3182 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3183 | *(float *)ptr = g_ptr->dist_to_goalcxx . . $ goal#dist_to_goal.; |
| 3184 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3185 | g_ptr->dist_to_goalcxx . . $ goal#dist_to_goal. = *(float *)ptr; |
| 3186 | } break; |
| 3187 | case AIGV_I_SCRIPTED_DATA_PTRcxx . . $ `scripts/osiris_common.h:619:9`!: { |
| 3188 | if(op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3189 | *(void **)ptr = g_ptr->g_infocxx . . $ goal#g_info..scripted_data_ptrcxx . . $ goal_info#$anonymous_type_3#scripted_data_ptr.; |
| 3190 | else if(op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3191 | g_ptr->g_infocxx . . $ goal#g_info..scripted_data_ptrcxx . . $ goal_info#$anonymous_type_3#scripted_data_ptr. = *((void **)ptr); |
| 3192 | } break; |
| 3193 | case AIGV_V_VEC_TO_TARGETcxx . . $ `scripts/osiris_common.h:597:9`!: { |
| 3194 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3195 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->vec_to_targetcxx . . $ goal#vec_to_target.; |
| 3196 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3197 | g_ptr->vec_to_targetcxx . . $ goal#vec_to_target. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3198 | } break; |
| 3199 | case AIGV_F_NEXT_CHECK_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:598:9`!: { |
| 3200 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3201 | *(float *)ptr = g_ptr->next_check_see_target_timecxx . . $ goal#next_check_see_target_time.; |
| 3202 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3203 | g_ptr->next_check_see_target_timecxx . . $ goal#next_check_see_target_time. = *(float *)ptr; |
| 3204 | } break; |
| 3205 | case AIGV_V_LAST_SEE_TARGET_POScxx . . $ `scripts/osiris_common.h:599:9`!: { |
| 3206 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3207 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->last_see_target_poscxx . . $ goal#last_see_target_pos.; |
| 3208 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3209 | g_ptr->last_see_target_poscxx . . $ goal#last_see_target_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3210 | } break; |
| 3211 | case AIGV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:600:9`!: { |
| 3212 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3213 | *(float *)ptr = g_ptr->last_see_target_timecxx . . $ goal#last_see_target_time.; |
| 3214 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3215 | g_ptr->last_see_target_timecxx . . $ goal#last_see_target_time. = *(float *)ptr; |
| 3216 | } break; |
| 3217 | case AIGV_F_NEXT_TARGET_UPDATE_TIMEcxx . . $ `scripts/osiris_common.h:601:9`!: { |
| 3218 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3219 | *(float *)ptr = g_ptr->next_target_update_timecxx . . $ goal#next_target_update_time.; |
| 3220 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3221 | g_ptr->next_target_update_timecxx . . $ goal#next_target_update_time. = *(float *)ptr; |
| 3222 | } break; |
| 3223 | case AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!: { |
| 3224 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3225 | *(int *)ptr = g_ptr->flagscxx . . $ goal#flags.; |
| 3226 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3227 | g_ptr->flagscxx . . $ goal#flags. = *(int *)ptr; |
| 3228 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3229 | g_ptr->flagscxx . . $ goal#flags. |= *(int *)ptr; |
| 3230 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3231 | g_ptr->flagscxx . . $ goal#flags. &= ~(*(int *)ptr); |
| 3232 | } break; |
| 3233 | |
| 3234 | case AIGV_C_NUM_ENABLERScxx . . $ `scripts/osiris_common.h:606:9`!: { |
| 3235 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3236 | *(char *)ptr = g_ptr->num_enablerscxx . . $ goal#num_enablers.; |
| 3237 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3238 | g_ptr->num_enablerscxx . . $ goal#num_enablers. = *(char *)ptr; |
| 3239 | } break; |
| 3240 | case AIGV_V_ORIENT_FVECcxx . . $ `scripts/osiris_common.h:603:9`!: { |
| 3241 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3242 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->set_fveccxx . . $ goal#set_fvec.; |
| 3243 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3244 | g_ptr->set_fveccxx . . $ goal#set_fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3245 | } break; |
| 3246 | case AIGV_V_ORIENT_UVECcxx . . $ `scripts/osiris_common.h:604:9`!: { |
| 3247 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3248 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). g_ptr->set_uveccxx . . $ goal#set_uvec.; |
| 3249 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3250 | g_ptr->set_uveccxx . . $ goal#set_uvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). *(vectorcxx . . $ vector# *)ptr; |
| 3251 | } break; |
| 3252 | case AIGSV_C_ENABLER_TYPEcxx . . $ `scripts/osiris_common.h:607:9`!: { |
| 3253 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3254 | *(char *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].enabler_typecxx . . $ goal_enabler#enabler_type.; |
| 3255 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3256 | g_ptr->enablercxx . . $ goal#enabler.[index].enabler_typecxx . . $ goal_enabler#enabler_type. = *(char *)ptr; |
| 3257 | } break; |
| 3258 | case AIGSV_F_ENABLER_TIMEcxx . . $ `scripts/osiris_common.h:608:9`!: { |
| 3259 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3260 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].timecxx . . $ goal_enabler#$anonymous_type_0#time.; |
| 3261 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3262 | g_ptr->enablercxx . . $ goal#enabler.[index].timecxx . . $ goal_enabler#$anonymous_type_0#time. = *(float *)ptr; |
| 3263 | } break; |
| 3264 | case AIGSV_C_ENABLER_MTYPEcxx . . $ `scripts/osiris_common.h:609:9`!: { |
| 3265 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3266 | *(char *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].movement_typecxx . . $ goal_enabler#$anonymous_type_0#movement_type.; |
| 3267 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3268 | g_ptr->enablercxx . . $ goal#enabler.[index].movement_typecxx . . $ goal_enabler#$anonymous_type_0#movement_type. = *(char *)ptr; |
| 3269 | } break; |
| 3270 | case AIGSV_F_ENABLER_FLOAT_VALUEcxx . . $ `scripts/osiris_common.h:610:9`!: { |
| 3271 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3272 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].float_valuecxx . . $ goal_enabler#$anonymous_type_0#float_value.; |
| 3273 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3274 | g_ptr->enablercxx . . $ goal#enabler.[index].float_valuecxx . . $ goal_enabler#$anonymous_type_0#float_value. = *(float *)ptr; |
| 3275 | } break; |
| 3276 | case AIGSV_I_ENABLER_FLAGScxx . . $ `scripts/osiris_common.h:611:9`!: { |
| 3277 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3278 | *(int *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].flagscxx . . $ goal_enabler#$anonymous_type_0#flags.; |
| 3279 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3280 | g_ptr->enablercxx . . $ goal#enabler.[index].flagscxx . . $ goal_enabler#$anonymous_type_0#flags. = *(int *)ptr; |
| 3281 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3282 | g_ptr->enablercxx . . $ goal#enabler.[index].flagscxx . . $ goal_enabler#$anonymous_type_0#flags. |= *(int *)ptr; |
| 3283 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3284 | g_ptr->enablercxx . . $ goal#enabler.[index].flagscxx . . $ goal_enabler#$anonymous_type_0#flags. &= ~(*(int *)ptr); |
| 3285 | } break; |
| 3286 | case AIGSV_F_ENABLER_DISTcxx . . $ `scripts/osiris_common.h:612:9`!: { |
| 3287 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3288 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].distcxx . . $ goal_enabler#$anonymous_type_0#dist.; |
| 3289 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3290 | g_ptr->enablercxx . . $ goal#enabler.[index].distcxx . . $ goal_enabler#$anonymous_type_0#dist. = *(float *)ptr; |
| 3291 | } break; |
| 3292 | case AIGSV_F_ENABLER_PERCENTcxx . . $ `scripts/osiris_common.h:613:9`!: { |
| 3293 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3294 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].percent_enablecxx . . $ goal_enabler#percent_enable.; |
| 3295 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3296 | g_ptr->enablercxx . . $ goal#enabler.[index].percent_enablecxx . . $ goal_enabler#percent_enable. = *(float *)ptr; |
| 3297 | } break; |
| 3298 | case AIGSV_F_ENABLER_CHECK_INTERVALcxx . . $ `scripts/osiris_common.h:614:9`!: { |
| 3299 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3300 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].check_intervalcxx . . $ goal_enabler#check_interval.; |
| 3301 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3302 | g_ptr->enablercxx . . $ goal#enabler.[index].check_intervalcxx . . $ goal_enabler#check_interval. = *(float *)ptr; |
| 3303 | } break; |
| 3304 | case AIGSV_F_ENABLER_LAST_CHECK_TIMEcxx . . $ `scripts/osiris_common.h:615:9`!: { |
| 3305 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3306 | *(float *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].last_check_timecxx . . $ goal_enabler#last_check_time.; |
| 3307 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3308 | g_ptr->enablercxx . . $ goal#enabler.[index].last_check_timecxx . . $ goal_enabler#last_check_time. = *(float *)ptr; |
| 3309 | } break; |
| 3310 | case AIGSV_C_ENABLER_NEXT_ENABLER_OPcxx . . $ `scripts/osiris_common.h:616:9`!: { |
| 3311 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3312 | *(char *)ptr = g_ptr->enablercxx . . $ goal#enabler.[index].bool_next_enabler_opcxx . . $ goal_enabler#bool_next_enabler_op.; |
| 3313 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) |
| 3314 | g_ptr->enablercxx . . $ goal#enabler.[index].bool_next_enabler_opcxx . . $ goal_enabler#bool_next_enabler_op. = *(char *)ptr; |
| 3315 | } break; |
| 3316 | } |
| 3317 | } |
| 3318 | |
| 3319 | int osipf_AIGetNearbyObjscxx . . $ osipf_AIGetNearbyObjs(9d0c65cbff229ccc).(vectorcxx . . $ vector# *pos, int init_roomnum, float rad, int *object_handle_list, int max_elements, |
| 3320 | bool f_lightmap_only, bool f_only_players_and_ais, bool f_include_non_collide_objects, |
| 3321 | bool f_stop_at_closed_doors) { |
| 3322 | int16_t *s_list; |
| 3323 | int num_close; |
| 3324 | int i; |
| 3325 | int count = 0; |
| 3326 | |
| 3327 | s_list = (int16_t *)mem_malloccxx . . $ `mem/mem.h:79:9`!(sizeof(int16_t) * max_elements); |
| 3328 | |
| 3329 | num_close = fvi_QuickDistObjectListcxx . . $ fvi_QuickDistObjectList(85643dfbd17d1ac8).(pos, init_roomnum, rad, s_list, max_elements, f_lightmap_only, |
| 3330 | f_only_players_and_ais, f_include_non_collide_objects, f_stop_at_closed_doors); |
| 3331 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(num_close <= max_elements); |
| 3332 | for (i = 0; i < num_close; i++) { |
| 3333 | if (!(Objectscxx . . $ Objects.[s_list[i]].flagscxx . . $ object#flags. & OF_DEADcxx . . $ `Descent3/object_external.h:270:9`!) && Objectscxx . . $ Objects.[s_list[i]].render_typecxx . . $ object#render_type. != RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!) { |
| 3334 | object_handle_list[count++] = Objectscxx . . $ Objects.[s_list[i]].handlecxx . . $ object#handle.; |
| 3335 | } |
| 3336 | } |
| 3337 | |
| 3338 | mem_freecxx . . $ `mem/mem.h:80:9`!(s_list); |
| 3339 | |
| 3340 | return count; |
| 3341 | } |
| 3342 | |
| 3343 | char osipf_AIGetCurGoalIndexcxx . . $ osipf_AIGetCurGoalIndex(266ca1ce69549011).(int obj_handle) { |
| 3344 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(obj_handle); |
| 3345 | |
| 3346 | if (obj && obj->ai_infocxx . . $ object#ai_info.) { |
| 3347 | goalcxx . . $ goal# *cur_goal = GoalGetCurrentGoalcxx . . $ GoalGetCurrentGoal(6a99c6e9427d0d95).(obj); |
| 3348 | if (cur_goal) { |
| 3349 | return (cur_goal - obj->ai_infocxx . . $ object#ai_info.->goalscxx . . $ ai_frame#goals.); |
| 3350 | } |
| 3351 | } |
| 3352 | |
| 3353 | return -1; |
| 3354 | } |
| 3355 | |
| 3356 | int osipf_FindSoundNamecxx . . $ osipf_FindSoundName(5c4306d8553b3696).(const char *name) { return FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name)); } |
| 3357 | |
| 3358 | int osipf_FindRoomNamecxx . . $ osipf_FindRoomName(5c4306d8553b3696).(const char *name) { |
| 3359 | for (int i = 0; i <= Highest_room_indexcxx . . $ Highest_room_index.; i++) { |
| 3360 | if (Roomscxx . . $ Rooms.[i].usedcxx . . $ room#used. && Roomscxx . . $ Rooms.[i].namecxx . . $ room#name.) { |
| 3361 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(name, Rooms[i].name)) |
| 3362 | return i; |
| 3363 | } |
| 3364 | } |
| 3365 | return -1; |
| 3366 | } |
| 3367 | |
| 3368 | int osipf_FindTriggerNamecxx . . $ osipf_FindTriggerName(5c4306d8553b3696).(const char *name) { |
| 3369 | for (int i = 0; i < Num_triggerscxx . . $ Num_triggers.; i++) { |
| 3370 | if (Triggerscxx . . $ Triggers.[i].namecxx . . $ trigger#name.) { |
| 3371 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(name, Triggers[i].name)) |
| 3372 | return i; |
| 3373 | } |
| 3374 | } |
| 3375 | return -1; |
| 3376 | } |
| 3377 | |
| 3378 | int osipf_FindObjectNamecxx . . $ osipf_FindObjectName(5c4306d8553b3696).(const char *name) { |
| 3379 | for (int i = 0; i < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!; i++) { |
| 3380 | if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`! && Objectscxx . . $ Objects.[i].namecxx . . $ object#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) { |
| 3381 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(name, Objects[i].name)) |
| 3382 | return Objectscxx . . $ Objects.[i].handlecxx . . $ object#handle.; |
| 3383 | } |
| 3384 | } |
| 3385 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 3386 | } |
| 3387 | |
| 3388 | int osipf_GetTriggerRoomcxx . . $ osipf_GetTriggerRoom(7864480464b09eea).(int trigger_id) { |
| 3389 | if (trigger_id < 0 || trigger_id >= Num_triggerscxx . . $ Num_triggers.) |
| 3390 | return -1; |
| 3391 | |
| 3392 | return Triggerscxx . . $ Triggers.[trigger_id].roomnumcxx . . $ trigger#roomnum.; |
| 3393 | } |
| 3394 | |
| 3395 | int osipf_GetTriggerFacecxx . . $ osipf_GetTriggerFace(7864480464b09eea).(int trigger_id) { |
| 3396 | if (trigger_id < 0 || trigger_id >= Num_triggerscxx . . $ Num_triggers.) |
| 3397 | return -1; |
| 3398 | |
| 3399 | return Triggerscxx . . $ Triggers.[trigger_id].facenumcxx . . $ trigger#facenum.; |
| 3400 | } |
| 3401 | |
| 3402 | int osipf_FindDoorNamecxx . . $ osipf_FindDoorName(5c4306d8553b3696).(const char *name) { |
| 3403 | for (int i = 0; i <= MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!; i++) { |
| 3404 | if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`! && Objectscxx . . $ Objects.[i].namecxx . . $ object#name. && !stricmpcxx . . $ `linux/linux_fix.h:43:9`!(Objects[i].name, name)) { |
| 3405 | return Objectscxx . . $ Objects.[i].handlecxx . . $ object#handle.; |
| 3406 | } |
| 3407 | } |
| 3408 | return OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 3409 | } |
| 3410 | |
| 3411 | int osipf_FindTextureNamecxx . . $ osipf_FindTextureName(5c4306d8553b3696).(const char *name) { return FindTextureNamecxx . . $ FindTextureName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name)); } |
| 3412 | |
| 3413 | int osipf_FindMatcenNamecxx . . $ osipf_FindMatcenName(5c4306d8553b3696).(const char *name) { return FindMatcenIndexcxx . . $ FindMatcenIndex(5c4306d8553b3696).(name); } |
| 3414 | |
| 3415 | int osipf_FindPathNamecxx . . $ osipf_FindPathName(5c4306d8553b3696).(const char *name) { return FindGamePathNamecxx . . $ FindGamePathName(5c4306d8553b3696).(name); } |
| 3416 | |
| 3417 | int osipf_FindLevelGoalNamecxx . . $ osipf_FindLevelGoalName(5c4306d8553b3696).(const char *name) { return Level_goalscxx . . $ Level_goals..GoalFindIdcxx . . $ levelgoals#GoalFindId(5c4306d8553b3696).(name); } |
| 3418 | |
| 3419 | void osipf_CreateRandomSparkscxx . . $ osipf_CreateRandomSparks(3e6b82e54d72ee3b).(int num_sparks, vectorcxx . . $ vector# *pos, int roomnum, int which_index, float force_scalar) { |
| 3420 | CreateRandomSparkscxx . . $ CreateRandomSparks(3e6b82e54d72ee3b).(num_sparks, pos, roomnum, which_index, force_scalar); |
| 3421 | } |
| 3422 | |
| 3423 | // disable/enable ship |
| 3424 | void osipf_EnableShipcxx . . $ osipf_EnableShip(1728feb5c2b5da8a).(char *ship_name, bool enable) { |
| 3425 | msafe_structcxx . . $ msafe_struct# ms; |
| 3426 | strcpy(ms.namecxx . . $ msafe_struct#name., ship_name); |
| 3427 | ms.statecxx . . $ msafe_struct#state. = enable; |
| 3428 | msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(MSAFE_MISC_ENABLE_SHIPcxx . . $ `scripts/osiris_common.h:888:9`!, &ms); |
| 3429 | } |
| 3430 | |
| 3431 | // is ship enabled |
| 3432 | bool osipf_IsShipEnabledcxx . . $ osipf_IsShipEnabled(c6b7e35ff6de5671).(char *ship_name) { |
| 3433 | msafe_structcxx . . $ msafe_struct# ms; |
| 3434 | strcpy(ms.namecxx . . $ msafe_struct#name., ship_name); |
| 3435 | msafe_GetValuecxx . . $ msafe_GetValue(a41cef1a93aeae18).(MSAFE_MISC_ENABLE_SHIPcxx . . $ `scripts/osiris_common.h:888:9`!, &ms); |
| 3436 | return (bool)(ms.statecxx . . $ msafe_struct#state. != 0); |
| 3437 | } |
| 3438 | |
| 3439 | // turns the given player into AI mode or back to regular control mode |
| 3440 | void osipf_SetPlayerControlModecxx . . $ osipf_SetPlayerControlMode(918ebd27a9ddbad3).(int pnum, bool set_to_ai) { |
| 3441 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(pnum >= 0 && pnum < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!); |
| 3442 | if (pnum < 0 || pnum >= MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) |
| 3443 | return; |
| 3444 | |
| 3445 | if (set_to_ai) { |
| 3446 | if (pnum != Player_numcxx . . $ Player_num.) |
| 3447 | return; // only change it for ourselves |
| 3448 | |
| 3449 | PlayerSetControlToAIcxx . . $ PlayerSetControlToAI(43c79ee2f1b9aefe).(pnum); |
| 3450 | } else { |
| 3451 | ResetPlayerControlTypecxx . . $ ResetPlayerControlType(d4f767463ce0a6b3).(pnum); |
| 3452 | } |
| 3453 | } |
| 3454 | |
| 3455 | // gets information about a path point |
| 3456 | // pass NULL for parameters not needed. |
| 3457 | // pathid: path number |
| 3458 | // point: which path point |
| 3459 | // returns true if operation was successful |
| 3460 | bool osipf_PathGetInformationcxx . . $ osipf_PathGetInformation(356189173f7b556f).(int pathid, int point, vectorcxx . . $ vector# *pos, int *room, matrixcxx . . $ matrix# *orient) { |
| 3461 | if (pathid < 0 || pathid >= MAX_GAME_PATHScxx . . $ `Descent3/gamepath.h:51:9`!) |
| 3462 | return false; |
| 3463 | |
| 3464 | if (!GamePathscxx . . $ GamePaths.[pathid].usedcxx . . $ game_path#used.) |
| 3465 | return false; |
| 3466 | |
| 3467 | if (point < 0 || point >= GamePathscxx . . $ GamePaths.[pathid].num_nodescxx . . $ game_path#num_nodes.) |
| 3468 | return false; |
| 3469 | |
| 3470 | if (pos) { |
| 3471 | pos->xcxx . . $ vector#x. = GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].poscxx . . $ node#pos..xcxx . . $ vector#x.; |
| 3472 | pos->ycxx . . $ vector#y. = GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].poscxx . . $ node#pos..ycxx . . $ vector#y.; |
| 3473 | pos->zcxx . . $ vector#z. = GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].poscxx . . $ node#pos..zcxx . . $ vector#z.; |
| 3474 | } |
| 3475 | |
| 3476 | if (room) { |
| 3477 | *room = GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].roomnumcxx . . $ node#roomnum.; |
| 3478 | } |
| 3479 | |
| 3480 | if (orient) { |
| 3481 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(orient, &GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].fveccxx . . $ node#fvec., &GamePathscxx . . $ GamePaths.[pathid].pathnodescxx . . $ game_path#pathnodes.[point].uveccxx . . $ node#uvec., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3482 | } |
| 3483 | |
| 3484 | return true; |
| 3485 | } |
| 3486 | |
| 3487 | void osipf_LGoalValuecxx . . $ osipf_LGoalValue(295e93bc75a1dcc5).(char op, char vtype, void *ptr, int g_index, int i_index) { |
| 3488 | switch (vtype) { |
| 3489 | case LGV_I_STATUScxx . . $ `scripts/osiris_common.h:710:9`!: { |
| 3490 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3491 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, (int *)ptr); |
| 3492 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3493 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, (int *)ptr); |
| 3494 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3495 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, (int *)ptr); |
| 3496 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3497 | int status; |
| 3498 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, &status); |
| 3499 | |
| 3500 | int diff_flags = (*(int *)ptr) ^ status; |
| 3501 | int clear_flags = status & diff_flags; |
| 3502 | int set_flags = (~(status)) & diff_flags; |
| 3503 | |
| 3504 | if (clear_flags) |
| 3505 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, &clear_flags); |
| 3506 | if (set_flags) |
| 3507 | Level_goalscxx . . $ Level_goals..LGStatuscxx . . $ levelgoals#LGStatus(a986cf6c14500712).(LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &set_flags); |
| 3508 | } |
| 3509 | } break; |
| 3510 | case LGV_I_NUM_ACTIVE_PRIMARIEScxx . . $ `scripts/osiris_common.h:712:9`!: { |
| 3511 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3512 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GetNumActivePrimaryGoalscxx . . $ levelgoals#GetNumActivePrimaryGoals(b126dc7c1de90089).(); |
| 3513 | } break; |
| 3514 | case LGSV_I_ACTIVE_PRIMARY_GOALcxx . . $ `scripts/osiris_common.h:713:9`!: { |
| 3515 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3516 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GetActivePrimaryGoalcxx . . $ levelgoals#GetActivePrimaryGoal(7864480464b09eea).(g_index); |
| 3517 | } break; |
| 3518 | case LGV_I_NUM_ACTIVE_SECONDARIEScxx . . $ `scripts/osiris_common.h:715:9`!: { |
| 3519 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3520 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GetNumActiveSecondaryGoalscxx . . $ levelgoals#GetNumActiveSecondaryGoals(b126dc7c1de90089).(); |
| 3521 | } break; |
| 3522 | case LGSV_I_ACTIVE_SECONDARY_GOALcxx . . $ `scripts/osiris_common.h:716:9`!: { |
| 3523 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3524 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GetActiveSecondaryGoalcxx . . $ levelgoals#GetActiveSecondaryGoal(7864480464b09eea).(g_index); |
| 3525 | } break; |
| 3526 | case LGV_I_NUM_GOALScxx . . $ `scripts/osiris_common.h:718:9`!: { |
| 3527 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3528 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GetNumGoalscxx . . $ levelgoals#GetNumGoals(b126dc7c1de90089).(); |
| 3529 | } break; |
| 3530 | case LGSV_PC_GOAL_NAMEcxx . . $ `scripts/osiris_common.h:719:9`!: { |
| 3531 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3532 | Level_goalscxx . . $ Level_goals..GoalGetNamecxx . . $ levelgoals#GoalGetName(6836bd73a290bb97).(g_index, (char *)ptr, 256); // chrishack - major demo hack |
| 3533 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3534 | Level_goalscxx . . $ Level_goals..GoalSetNamecxx . . $ levelgoals#GoalSetName(ceb9eed3194142b2).(g_index, (char *)ptr); |
| 3535 | } |
| 3536 | } break; |
| 3537 | case LGSV_PC_LOCATION_NAMEcxx . . $ `scripts/osiris_common.h:720:9`!: { |
| 3538 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3539 | Level_goalscxx . . $ Level_goals..GoalGetItemNamecxx . . $ levelgoals#GoalGetItemName(6836bd73a290bb97).(g_index, (char *)ptr, 256); // chrishack - major demo hack |
| 3540 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3541 | Level_goalscxx . . $ Level_goals..GoalSetItemNamecxx . . $ levelgoals#GoalSetItemName(ceb9eed3194142b2).(g_index, (char *)ptr); |
| 3542 | } |
| 3543 | } break; |
| 3544 | case LGSV_PC_DESCRIPTIONcxx . . $ `scripts/osiris_common.h:721:9`!: { |
| 3545 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3546 | Level_goalscxx . . $ Level_goals..GoalGetDesccxx . . $ levelgoals#GoalGetDesc(6836bd73a290bb97).(g_index, (char *)ptr, 256); // chrishack - major demo hack |
| 3547 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3548 | Level_goalscxx . . $ Level_goals..GoalSetDesccxx . . $ levelgoals#GoalSetDesc(ceb9eed3194142b2).(g_index, (char *)ptr); |
| 3549 | } |
| 3550 | } break; |
| 3551 | case LGSV_PC_COMPLETION_MESSAGEcxx . . $ `scripts/osiris_common.h:722:9`!: { |
| 3552 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3553 | Level_goalscxx . . $ Level_goals..GoalGetCompletionMessagecxx . . $ levelgoals#GoalGetCompletionMessage(6836bd73a290bb97).(g_index, (char *)ptr, 256); |
| 3554 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3555 | Level_goalscxx . . $ Level_goals..GoalSetCompletionMessagecxx . . $ levelgoals#GoalSetCompletionMessage(ceb9eed3194142b2).(g_index, (char *)ptr); |
| 3556 | } |
| 3557 | } break; |
| 3558 | case LGSV_I_PRIORITYcxx . . $ `scripts/osiris_common.h:723:9`!: { |
| 3559 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3560 | Level_goalscxx . . $ Level_goals..GoalPrioritycxx . . $ levelgoals#GoalPriority(f3551096b2e9a55d).(g_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, (int *)&ptr); |
| 3561 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3562 | Level_goalscxx . . $ Level_goals..GoalPrioritycxx . . $ levelgoals#GoalPriority(f3551096b2e9a55d).(g_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, (int *)&ptr); |
| 3563 | } |
| 3564 | } break; |
| 3565 | case LGSV_C_GOAL_LISTcxx . . $ `scripts/osiris_common.h:724:9`!: { |
| 3566 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3567 | Level_goalscxx . . $ Level_goals..GoalGoalListcxx . . $ levelgoals#GoalGoalList(5a6a60347df10d71).(g_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, (char *)ptr); |
| 3568 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3569 | Level_goalscxx . . $ Level_goals..GoalGoalListcxx . . $ levelgoals#GoalGoalList(5a6a60347df10d71).(g_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, (char *)ptr); |
| 3570 | } |
| 3571 | } break; |
| 3572 | case LGSV_I_STATUScxx . . $ `scripts/osiris_common.h:725:9`!: { |
| 3573 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) |
| 3574 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, (int *)ptr); |
| 3575 | else if (op == VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!) |
| 3576 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, (int *)ptr); |
| 3577 | else if (op == VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!) |
| 3578 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, (int *)ptr); |
| 3579 | else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3580 | int status; |
| 3581 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, &status); |
| 3582 | |
| 3583 | int diff_flags = (*(int *)ptr) ^ status; |
| 3584 | int clear_flags = status & diff_flags; |
| 3585 | int set_flags = (~(status)) & diff_flags; |
| 3586 | |
| 3587 | if (clear_flags) |
| 3588 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, &clear_flags); |
| 3589 | if (set_flags) |
| 3590 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(g_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &set_flags); |
| 3591 | } |
| 3592 | } break; |
| 3593 | case LGSV_I_NUM_ITEMScxx . . $ `scripts/osiris_common.h:727:9`!: { |
| 3594 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3595 | *((int *)ptr) = Level_goalscxx . . $ Level_goals..GoalGetNumItemscxx . . $ levelgoals#GoalGetNumItems(7864480464b09eea).(g_index); |
| 3596 | } |
| 3597 | } break; |
| 3598 | case LGSSV_C_ITEM_TYPEcxx . . $ `scripts/osiris_common.h:728:9`!: { |
| 3599 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3600 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, (char *)ptr, 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`!); |
| 3601 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3602 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, (char *)ptr, 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`!); |
| 3603 | } |
| 3604 | } break; |
| 3605 | case LGSSV_I_ITEM_HANDLEcxx . . $ `scripts/osiris_common.h:729:9`!: { |
| 3606 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3607 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3608 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3609 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, (int *)ptr, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 3610 | } |
| 3611 | } break; |
| 3612 | case LGSSV_B_ITEM_DONEcxx . . $ `scripts/osiris_common.h:730:9`!: { |
| 3613 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3614 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, 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`!, (bool *)ptr); |
| 3615 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3616 | Level_goalscxx . . $ Level_goals..GoalItemInfocxx . . $ levelgoals#GoalItemInfo(af0847b9747ce646).(g_index, i_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, 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`!, (bool *)ptr); |
| 3617 | } |
| 3618 | } break; |
| 3619 | } |
| 3620 | } |
| 3621 | |
| 3622 | void osipf_ObjKillcxx . . $ osipf_ObjKill(89f431b7be850b82).(int handle, int killer_handle, float damage, int flags, float min_time, float max_time) { |
| 3623 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 3624 | objectcxx . . $ object# *killer = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(killer_handle); |
| 3625 | |
| 3626 | if (obj == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 3627 | return; |
| 3628 | |
| 3629 | if (obj->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || obj->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`! || obj->typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) { |
| 3630 | if (obj->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 3631 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 3632 | } |
| 3633 | |
| 3634 | KillPlayercxx . . $ KillPlayer(3a7735745f872cae).(obj, killer, damage, -1); |
| 3635 | } else if (IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(obj->type) || (obj->typecxx . . $ object#type. == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!)) { |
| 3636 | |
| 3637 | if (IS_GUIDEBOTcxx . . $ `Descent3/objinfo.h:363:9`!(obj)) // Don't allow killing of the guidebot |
| 3638 | return; |
| 3639 | |
| 3640 | if (flags == -1) // no flags, so use default death |
| 3641 | KillObjectcxx . . $ KillObject(bdb088234d4582fb).(obj, killer, damage); |
| 3642 | else { |
| 3643 | float delay_time = min_time + (max_time - min_time) * ps_randcxx . . $ ps_rand(b126dc7c1de90089).() / D3_RAND_MAXcxx . . $ `misc/psrand.h:41:9`!; |
| 3644 | KillObjectcxx . . $ KillObject(8f52e4200539b78).(obj, killer, damage, flags, delay_time); |
| 3645 | } |
| 3646 | } |
| 3647 | } |
| 3648 | |
| 3649 | bool osipf_AIIsDestReachablecxx . . $ osipf_AIIsDestReachable(cf9ef193275fa6d8).(int handle, int room) { |
| 3650 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 3651 | |
| 3652 | if (!obj) |
| 3653 | return false; |
| 3654 | |
| 3655 | return AIFindAltPathcxx . . $ AIFindAltPath(4c063a45e14c3cfe).(obj, obj->roomnumcxx . . $ object#roomnum., room); |
| 3656 | } |
| 3657 | |
| 3658 | bool osipf_AIIsObjReachablecxx . . $ osipf_AIIsObjReachable(cf9ef193275fa6d8).(int handle, int target_handle) { |
| 3659 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 3660 | objectcxx . . $ object# *target = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(target_handle); |
| 3661 | |
| 3662 | if (!obj) |
| 3663 | return false; |
| 3664 | |
| 3665 | if (!target) |
| 3666 | return false; |
| 3667 | |
| 3668 | return AIFindAltPathcxx . . $ AIFindAltPath(4c063a45e14c3cfe).(obj, obj->roomnumcxx . . $ object#roomnum., target->roomnumcxx . . $ object#roomnum.); |
| 3669 | } |
| 3670 | |
| 3671 | char osipf_GameGetDiffLevelcxx . . $ osipf_GameGetDiffLevel(6e9c618e4dd2eafc).(void) { return DIFF_LEVELcxx . . $ `Descent3/difficulty.h:29:9`!; } |
| 3672 | |
| 3673 | int osipf_GetLanguageSettingcxx . . $ osipf_GetLanguageSetting(b126dc7c1de90089).(void) { |
| 3674 | /* |
| 3675 | 0:LANGUAGE_ENGLISH |
| 3676 | 1:LANGUAGE_GERMAN |
| 3677 | 2:LANGUAGE_SPANISH |
| 3678 | 3:LANGUAGE_ITALIAN |
| 3679 | 4:LANGUAGE_FRENCH |
| 3680 | */ |
| 3681 | return Localization_GetLanguagecxx . . $ Localization_GetLanguage(b126dc7c1de90089).(); |
| 3682 | } |
| 3683 | |
| 3684 | // Sets/Gets information about a path. |
| 3685 | // If you change is PV_ALL (or any of it's individual components), pass in a pointer to an |
| 3686 | // osiris_path_node_info struct. For the others, you must pass in an appropriate pointer |
| 3687 | // (i.e. an int* for PV_I_NUMNODES). You can only set PV_ALL components. |
| 3688 | // for PV_I_NUMNODES, path_id MUST be specified, node_id is ignored |
| 3689 | // for PV_I_NUMPATHS, path_id and node_id are ignored |
| 3690 | // for PV_CS_NAME, path_id MUST be specified, node_id is ignored |
| 3691 | // for PV_ALL components, path_id and node_id MUST be valid. |
| 3692 | void osipf_PathValuecxx . . $ osipf_PathValue(e7f90a50b01f5f20).(int path_id, int node_id, char op, int changes, void *ptr) { |
| 3693 | if (changes & PV_I_NUMPATHScxx . . $ `scripts/osiris_common.h:1341:9`!) { |
| 3694 | *((int *)ptr) = Num_game_pathscxx . . $ Num_game_paths.; |
| 3695 | return; |
| 3696 | } |
| 3697 | |
| 3698 | if (path_id < 0 || path_id >= Num_game_pathscxx . . $ Num_game_paths.) { |
| 3699 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid Path\n"); |
| 3700 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 3701 | return; |
| 3702 | } |
| 3703 | |
| 3704 | game_pathcxx . . $ game_path# *cpath = &GamePathscxx . . $ GamePaths.[path_id]; |
| 3705 | |
| 3706 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(cpath->used); |
| 3707 | if (!cpath->usedcxx . . $ game_path#used.) |
| 3708 | return; |
| 3709 | |
| 3710 | if (op == VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!) { |
| 3711 | if (changes & PV_ALLcxx . . $ `scripts/osiris_common.h:1338:9`!) { |
| 3712 | if (node_id < 0 || node_id >= cpath->num_nodescxx . . $ game_path#num_nodes.) { |
| 3713 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid node on path\n"); |
| 3714 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 3715 | return; |
| 3716 | } |
| 3717 | |
| 3718 | nodecxx . . $ node# *cnode = &cpath->pathnodescxx . . $ game_path#pathnodes.[node_id]; |
| 3719 | osiris_path_node_infocxx . . $ osiris_path_node_info# *pni = (osiris_path_node_infocxx . . $ osiris_path_node_info# *)ptr; |
| 3720 | |
| 3721 | if (changes & PV_POScxx . . $ `scripts/osiris_common.h:1333:9`!) { |
| 3722 | pni->poscxx . . $ osiris_path_node_info#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). cnode->poscxx . . $ node#pos.; |
| 3723 | } |
| 3724 | if (changes & PV_ROOMNUMcxx . . $ `scripts/osiris_common.h:1334:9`!) { |
| 3725 | pni->roomnumcxx . . $ osiris_path_node_info#roomnum. = cnode->roomnumcxx . . $ node#roomnum.; |
| 3726 | } |
| 3727 | if (changes & PV_FLAGScxx . . $ `scripts/osiris_common.h:1335:9`!) { |
| 3728 | pni->flagscxx . . $ osiris_path_node_info#flags. = cnode->flagscxx . . $ node#flags.; |
| 3729 | } |
| 3730 | if (changes & PV_FVECcxx . . $ `scripts/osiris_common.h:1336:9`!) { |
| 3731 | pni->fveccxx . . $ osiris_path_node_info#fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). cnode->fveccxx . . $ node#fvec.; |
| 3732 | } |
| 3733 | if (changes & PV_UVECcxx . . $ `scripts/osiris_common.h:1337:9`!) { |
| 3734 | pni->uveccxx . . $ osiris_path_node_info#uvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). cnode->uveccxx . . $ node#uvec.; |
| 3735 | } |
| 3736 | |
| 3737 | changes &= ~PV_ALLcxx . . $ `scripts/osiris_common.h:1338:9`!; |
| 3738 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(changes == 0); // no other changes allowed!!!! |
| 3739 | return; |
| 3740 | } |
| 3741 | |
| 3742 | if (changes == PV_I_NUMNODEScxx . . $ `scripts/osiris_common.h:1339:9`!) { |
| 3743 | *((int *)ptr) = cpath->num_nodescxx . . $ game_path#num_nodes.; |
| 3744 | return; |
| 3745 | } |
| 3746 | |
| 3747 | if (changes == PV_CS_NAMEcxx . . $ `scripts/osiris_common.h:1340:9`!) { |
| 3748 | strcpy((char *)ptr, cpath->namecxx . . $ game_path#name.); |
| 3749 | return; |
| 3750 | } |
| 3751 | |
| 3752 | } else if (op == VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!) { |
| 3753 | if (changes & PV_ALLcxx . . $ `scripts/osiris_common.h:1338:9`!) { |
| 3754 | if (node_id < 0 || node_id >= cpath->num_nodescxx . . $ game_path#num_nodes.) { |
| 3755 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid node on path\n"); |
| 3756 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 3757 | return; |
| 3758 | } |
| 3759 | |
| 3760 | nodecxx . . $ node# *cnode = &cpath->pathnodescxx . . $ game_path#pathnodes.[node_id]; |
| 3761 | osiris_path_node_infocxx . . $ osiris_path_node_info# *pni = (osiris_path_node_infocxx . . $ osiris_path_node_info# *)ptr; |
| 3762 | |
| 3763 | if (changes & PV_POScxx . . $ `scripts/osiris_common.h:1333:9`!) { |
| 3764 | cnode->poscxx . . $ node#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). pni->poscxx . . $ osiris_path_node_info#pos.; |
| 3765 | } |
| 3766 | if (changes & PV_ROOMNUMcxx . . $ `scripts/osiris_common.h:1334:9`!) { |
| 3767 | cnode->roomnumcxx . . $ node#roomnum. = pni->roomnumcxx . . $ osiris_path_node_info#roomnum.; |
| 3768 | } |
| 3769 | if (changes & PV_FLAGScxx . . $ `scripts/osiris_common.h:1335:9`!) { |
| 3770 | cnode->flagscxx . . $ node#flags. = pni->flagscxx . . $ osiris_path_node_info#flags.; |
| 3771 | } |
| 3772 | if (changes & PV_FVECcxx . . $ `scripts/osiris_common.h:1336:9`!) { |
| 3773 | cnode->fveccxx . . $ node#fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). pni->fveccxx . . $ osiris_path_node_info#fvec.; |
| 3774 | } |
| 3775 | if (changes & PV_UVECcxx . . $ `scripts/osiris_common.h:1337:9`!) { |
| 3776 | cnode->uveccxx . . $ node#uvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). pni->uveccxx . . $ osiris_path_node_info#uvec.; |
| 3777 | } |
| 3778 | |
| 3779 | changes &= ~PV_ALLcxx . . $ `scripts/osiris_common.h:1338:9`!; |
| 3780 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(changes == 0); // no other changes allowed!!!! |
| 3781 | return; |
| 3782 | } |
| 3783 | |
| 3784 | } else { |
| 3785 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 3786 | } |
| 3787 | } |