| 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.h $ |
| 21 | * $Revision: 47 $ |
| 22 | * $Date: 5/05/99 4:56p $ |
| 23 | * $Author: Chris $ |
| 24 | * |
| 25 | * Header file for osiris predefined functions |
| 26 | * |
| 27 | * $Log: /DescentIII/main/osiris_predefs.h $ |
| 28 | * |
| 29 | * 47 5/05/99 4:56p Chris |
| 30 | * Added the RType powerup for the GB |
| 31 | * |
| 32 | * 46 4/29/99 7:15p Jeff |
| 33 | * added initial velocity parameter to Obj_Create |
| 34 | * |
| 35 | * 45 4/24/99 2:19a Chris |
| 36 | * Added another parameter to FollowPathSimple |
| 37 | * |
| 38 | * 44 4/24/99 12:09a Jeff |
| 39 | * added path value functions |
| 40 | * |
| 41 | * 43 4/20/99 8:56p Chris |
| 42 | * Fixed problem with robots not being able to open locked doors that a |
| 43 | * player has the key for. |
| 44 | * |
| 45 | * 42 4/14/99 3:57a Jeff |
| 46 | * fixed case mismatch in #includes |
| 47 | * |
| 48 | * 41 4/02/99 10:18a Chris |
| 49 | * We can now mess with the Object_info anim stuff |
| 50 | * |
| 51 | * 40 3/17/99 11:47a Jeff |
| 52 | * exported function to get what language we are using |
| 53 | * |
| 54 | * 39 3/03/99 3:01a Chris |
| 55 | * Exported the difficulty stuff to OSIRIS |
| 56 | * |
| 57 | * 38 3/03/99 12:11a Chris |
| 58 | * one more AI path check function |
| 59 | * |
| 60 | * 37 3/03/99 12:07a Chris |
| 61 | * Added the two new OSIRIS predefs for AI path finding |
| 62 | * |
| 63 | * 36 3/01/99 7:20p Chris |
| 64 | * Fixed dist problems with finding nearby objects |
| 65 | * |
| 66 | * 35 2/28/99 11:30p Chris |
| 67 | * FindObjOfType and OSIRIS controllable deaths |
| 68 | * |
| 69 | * 34 2/22/99 8:22p Chris |
| 70 | * |
| 71 | * 33 2/22/99 8:17p Chris |
| 72 | * Added the LGoal_Value() function to OSIRIS |
| 73 | * |
| 74 | * 32 2/21/99 5:51p Chris |
| 75 | * FIxed a bug with OBJV_C_TYPE (It should have been OBJV_I_TYPE). Added |
| 76 | * Obj_FindType() |
| 77 | * |
| 78 | * 31 2/18/99 4:28p Jeff |
| 79 | * added lookup functions for matcen, paths, level goals |
| 80 | * |
| 81 | * 30 2/11/99 2:56a Jeff |
| 82 | * improvements to introcam |
| 83 | * |
| 84 | * 29 2/10/99 1:47p Matt |
| 85 | * Changed object handle symbolic constants |
| 86 | * |
| 87 | * 28 2/08/99 3:06a Jeff |
| 88 | * created a function to switch a player between ai and flying control |
| 89 | * types (not exported to osiris...instead used in multisafe) |
| 90 | * |
| 91 | * 26 2/03/99 12:43a Chris |
| 92 | * Added Obj_GetGroundPos |
| 93 | * |
| 94 | * 25 1/29/99 5:10p Chris |
| 95 | * Added an optional parent handle check for FindObjOfType |
| 96 | * |
| 97 | * 24 1/25/99 8:38a Chris |
| 98 | * The the GUID to AI_FollowPathSimple |
| 99 | * |
| 100 | * 23 1/25/99 7:43a Chris |
| 101 | * Added the GUID (Goal Unique Id) and added the ability for weapon |
| 102 | * batteries to always fire exactly forward. |
| 103 | * |
| 104 | * 22 1/24/99 8:17p Chris |
| 105 | * Updated AI and OSIRIS. Externalized fireball constants for spew and |
| 106 | * sparks. Added CreateRandomSparks to OSIRIS, renamed a bunch of AI |
| 107 | * Notify names to use underscores. Fixed a memory access leak in the |
| 108 | * matcen effect code. |
| 109 | * |
| 110 | * 21 1/22/99 4:47p Jeff |
| 111 | * |
| 112 | * 20 1/20/99 4:16p Jeff |
| 113 | * added ai notify child events and predefs to get ids of sound, room, |
| 114 | * trigger, object names |
| 115 | * |
| 116 | * 19 1/20/99 1:01a Chris |
| 117 | * Improved AI and OSIRIS intergration |
| 118 | * |
| 119 | * 18 1/15/99 5:59p Chris |
| 120 | * |
| 121 | * 17 1/13/99 5:20p Jeff |
| 122 | * added 4 new file operation predefs |
| 123 | * |
| 124 | * 16 1/13/99 3:25a Chris |
| 125 | * Added Obj_Burning and Obj_IsEffect to OSIRIS |
| 126 | * |
| 127 | * 15 1/13/99 2:29a Chris |
| 128 | * Massive AI, OSIRIS update |
| 129 | * |
| 130 | * 14 1/11/99 2:14p Chris |
| 131 | * Massive work on OSIRIS and AI |
| 132 | * |
| 133 | * 13 1/05/99 12:24p Chris |
| 134 | * More OSIRIS improvements |
| 135 | * |
| 136 | * 12 1/04/99 6:43p Jeff |
| 137 | * added support to get/set mission flag values |
| 138 | * |
| 139 | * 11 1/04/99 12:42p Chris |
| 140 | * Updated OSIRIS with "xxxx_external.h" files and Obj_Value, and |
| 141 | * Matcen_XXX functions |
| 142 | * |
| 143 | * 10 12/30/98 3:46p Chris |
| 144 | * Incremental AI changes |
| 145 | * |
| 146 | * 9 12/23/98 12:10p Chris |
| 147 | * Added Gametime and Frametime to OSIRIS |
| 148 | * |
| 149 | * 8 12/22/98 4:52p Chris |
| 150 | * Added another defualt parameter to Objcreate |
| 151 | * |
| 152 | * 7 12/22/98 4:51p Chris |
| 153 | * Added a ObjCreate predefined function |
| 154 | * |
| 155 | * 6 12/22/98 2:46p Chris |
| 156 | * Added the AIValue predefined function |
| 157 | * |
| 158 | * 5 12/21/98 5:30p Samir |
| 159 | * predef for determining if object is being rendered. |
| 160 | * |
| 161 | * 4 12/17/98 6:42p Samir |
| 162 | * added functions to manipulate player controls |
| 163 | * |
| 164 | * 3 12/17/98 5:43p Jeff |
| 165 | * created timer system for osiris and save restore events |
| 166 | * |
| 167 | * 2 12/16/98 10:14p Jeff |
| 168 | * created osiris predefined function file |
| 169 | * |
| 170 | * $NoKeywords: $ |
| 171 | */ |
| 172 | |
| 173 | #ifndef __OSIRIS_PREDEF_H_ |
| 174 | #define __OSIRIS_PREDEF_H_cxx . . $ `Descent3/osiris_predefs.h:174:9`! |
| 175 | |
| 176 | #include "osiris_dll.h"cxx . . $ `<file>/Descent3/osiris_dll.h`/ |
| 177 | #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/ |
| 178 | |
| 179 | // osipf_CallObjectEvent |
| 180 | // Sends an event to an object. Returns true if the default action should |
| 181 | // continue to process. |
| 182 | bool osipf_CallObjectEventcxx . . $ osipf_CallObjectEvent(a44368be0f65be02).(int objnum, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *ei); |
| 183 | |
| 184 | // osipf_CallTriggerEvent |
| 185 | // Sends an event to a trigger. Returns true if the default action should |
| 186 | // continue to process. |
| 187 | bool osipf_CallTriggerEventcxx . . $ osipf_CallTriggerEvent(a44368be0f65be02).(int trignum, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *ei); |
| 188 | |
| 189 | // Touches a sound file so it loads into memory |
| 190 | void osipf_SoundTouchcxx . . $ osipf_SoundTouch(fda57c8427c60377).(char *str); |
| 191 | |
| 192 | // searches for an object id given it's name |
| 193 | int osipf_ObjectFindIDcxx . . $ osipf_ObjectFindID(5c4306d8553b3696).(const char *name); |
| 194 | |
| 195 | int osipf_ObjectFindTypecxx . . $ osipf_ObjectFindType(5c4306d8553b3696).(const char *name); |
| 196 | |
| 197 | // searches through the weapons for a name and returns the id |
| 198 | int osipf_WeaponFindIDcxx . . $ osipf_WeaponFindID(5c4306d8553b3696).(const char *name); |
| 199 | |
| 200 | // returns how long an object has lived |
| 201 | float osipf_ObjectGetTimeLivedcxx . . $ osipf_ObjectGetTimeLived(5cde91ea12d43f46).(int objhandle); |
| 202 | |
| 203 | void osipf_GetGunPoscxx . . $ osipf_GetGunPos(acebd7a68d406969).(int objhandle, int gun_number, vectorcxx . . $ vector# *gun_pnt, vectorcxx . . $ vector# *gun_normal = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 204 | |
| 205 | // Returns room values (Index is optional and not always used) |
| 206 | void osipf_RoomValuecxx . . $ osipf_RoomValue(504a19c195c7574e).(int roomnum, char op, char vhandle, void *ptr, int index = 0); |
| 207 | uint8_tcxx . . $ uint8_t# osipf_IsRoomValidcxx . . $ osipf_IsRoomValid(bc0fba5608a0bfe7).(int roomnum); |
| 208 | |
| 209 | // Returns player only values (Index is optional and not always used) |
| 210 | void osipf_PlayerValuecxx . . $ osipf_PlayerValue(504a19c195c7574e).(int obj_handle, char op, char vhandle, void *ptr, int index = 0); |
| 211 | void osipf_ObjectCustomAnimcxx . . $ osipf_ObjectCustomAnim(d2ce4cea4bbae452).(int handle, float start, float end, float time, char flags, int sound_handle = -1, |
| 212 | char next_anim_type = -1); |
| 213 | |
| 214 | int osipf_GetAttachParentcxx . . $ osipf_GetAttachParent(7864480464b09eea).(int childhandle); |
| 215 | int osipf_GetNumAttachSlotscxx . . $ osipf_GetNumAttachSlots(7864480464b09eea).(int objhandle); |
| 216 | int osipf_GetAttachChildHandlecxx . . $ osipf_GetAttachChildHandle(f1fc93eb4bb86021).(int objhandle, char attachpoint); |
| 217 | int osipf_AttachObjectAPcxx . . $ osipf_AttachObjectAP(f0a0b4f1b22bb461).(int parenthandle, char parent_ap, int childhandle, char child_ap, uint8_tcxx . . $ uint8_t# f_use_aligned); |
| 218 | int osipf_AttachObjectRadcxx . . $ osipf_AttachObjectRad(f8f331ec1480dc64).(int parenthandle, char parent_ap, int childhandle, float percent_rad); |
| 219 | void osipf_UnattachFromParentcxx . . $ osipf_UnattachFromParent(d4f767463ce0a6b3).(int objhandle); |
| 220 | void osipf_UnattachChildcxx . . $ osipf_UnattachChild(5016a63d0a5aceb0).(int objhandle, char parent_ap); |
| 221 | void osipf_UnattachChildrencxx . . $ osipf_UnattachChildren(d4f767463ce0a6b3).(int objhandle); |
| 222 | |
| 223 | 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); |
| 224 | |
| 225 | // searches through GamePath index and returns index of path matching name |
| 226 | // returns -1 if not found |
| 227 | int osipf_AIGetPathIDcxx . . $ osipf_AIGetPathID(1ef8e6ec083aabb9).(char *string); |
| 228 | vectorcxx . . $ vector# osipf_AIFindHidePoscxx . . $ osipf_AIFindHidePos(380bcd033903a44f).(int hideobjhandle, int viewobjhandle, float time, int *hide_room); |
| 229 | int osipf_AIFindObjOfTypecxx . . $ osipf_AIFindObjOfType(7a8817038ab5ca8a).(int objhandle, int type, int id, bool f_ignore_init_room, |
| 230 | int parent_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 231 | vectorcxx . . $ vector# osipf_AIGetRoomPathPointcxx . . $ osipf_AIGetRoomPathPoint(e9e56017a0d09194).(int roomnum); |
| 232 | int osipf_AIFindEnergyCentercxx . . $ osipf_AIFindEnergyCenter(7864480464b09eea).(int objhandle); |
| 233 | float osipf_AIGetDistToObjcxx . . $ osipf_AIGetDistToObj(ac70f22789a9917c).(int objhandle, int otherobjhandle); |
| 234 | |
| 235 | void osipf_AISetTypecxx . . $ osipf_AISetType(3e454b8ccf442868).(int objhandle, int type); |
| 236 | int osipf_AIPowerSwitchcxx . . $ osipf_AIPowerSwitch(e01ba461194aa403).(int objhandle, uint8_tcxx . . $ uint8_t# f_power_on); |
| 237 | |
| 238 | int osipf_AIGoalAddcxx . . $ osipf_AIGoalAdd(b390d4eb1785c68).(int objhandle, int goal_type, int level, float influence, int guid, int flags, ...); |
| 239 | int osipf_AIGoalAddEnablercxx . . $ osipf_AIGoalAddEnabler(7005af0289a2b79f).(int objhandle, int goal_index, int enabler_type, float percent, float interval, void *ptr); |
| 240 | void osipf_AIGoalClearcxx . . $ osipf_AIGoalClear(3e454b8ccf442868).(int objhandle, int goal_index); |
| 241 | int osipf_AIGoalFollowPathSimplecxx . . $ osipf_AIGoalFollowPathSimple(ea6ae529d4ec1c7a).(int objhandle, int path_id, int guid, int flags, int slot = 3); |
| 242 | void osipf_AISetGoalCircleDistcxx . . $ osipf_AISetGoalCircleDist(c2f439e40e2f19ed).(int objhandle, int goal_handle, float dist); |
| 243 | int osipf_AISetGoalFlagscxx . . $ osipf_AISetGoalFlags(e2d1abf64f7ceb5).(int objhandle, int goal_handle, int flags, uint8_tcxx . . $ uint8_t# f_enable); |
| 244 | |
| 245 | uint8_tcxx . . $ uint8_t# osipf_AITurnTowardsVectorscxx . . $ osipf_AITurnTowardsVectors(afcf2412f024945b).(int objhandle, vectorcxx . . $ vector# *fvec, vectorcxx . . $ vector# *uvec); |
| 246 | uint8_tcxx . . $ uint8_t# osipf_AIMoveTowardsPositioncxx . . $ osipf_AIMoveTowardsPosition(7e91a611609e93c7).(int objhandle, vectorcxx . . $ vector# *pos, int *roomnum, float scalar, bool f_bline, |
| 247 | bool f_bline_if_vis); |
| 248 | uint8_tcxx . . $ uint8_t# osipf_AIMoveTowardsDircxx . . $ osipf_AIMoveTowardsDir(37af70661711246f).(int objhandle, vectorcxx . . $ vector# *dir, float scalar); |
| 249 | |
| 250 | void osipf_AIValuecxx . . $ osipf_AIValue(a441d934cb70081d).(int objhandle, char op, char vtype, void *ptr); |
| 251 | |
| 252 | // Reads the specified number of bytes from a file into the buffer |
| 253 | // DO NOT USE THIS TO READ STRUCTURES. This function is for byte |
| 254 | // data, such as a string or a bitmap of 8-bit pixels. |
| 255 | // Returns the number of bytes read. |
| 256 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 257 | int osipf_CFReadBytescxx . . $ osipf_CFReadBytes(de6325ef3380a744).(uint8_tcxx . . $ uint8_t# *buffer, int count, CFILEcxx . . $ CFILE# *cfp); |
| 258 | |
| 259 | // The following functions read numeric vales from a CFILE. All values are |
| 260 | // stored in the file in Intel (little-endian) format. These functions |
| 261 | // will convert to big-endian if required. |
| 262 | // These funtions will throw an exception of if the value cannot be read, |
| 263 | // so do not call these if you don't require the data to be present. |
| 264 | |
| 265 | // Read and return an integer (32 bits) |
| 266 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 267 | int osipf_CFReadIntcxx . . $ osipf_CFReadInt(413716a422df0036).(CFILEcxx . . $ CFILE# *cfp); |
| 268 | |
| 269 | // Read and return a int16_t (16 bits) |
| 270 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 271 | int16_t osipf_CFReadShortcxx . . $ osipf_CFReadShort(644dbbe4555be8a0).(CFILEcxx . . $ CFILE# *cfp); |
| 272 | |
| 273 | // Read and return a byte (8 bits) |
| 274 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 275 | int8_t osipf_CFReadBytecxx . . $ osipf_CFReadByte(dcbbf0b0e13758ec).(CFILEcxx . . $ CFILE# *cfp); |
| 276 | |
| 277 | // Read and return a float (32 bits) |
| 278 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 279 | float osipf_CFReadFloatcxx . . $ osipf_CFReadFloat(9a03a00aead0d542).(CFILEcxx . . $ CFILE# *cfp); |
| 280 | |
| 281 | // Read and return a double (64 bits) |
| 282 | // Throws an exception of type (cfile_error *) if the OS returns an error on read |
| 283 | double osipf_CFReadDoublecxx . . $ osipf_CFReadDouble(96e019f41f67302c).(CFILEcxx . . $ CFILE# *cfp); |
| 284 | |
| 285 | // Reads a string from a CFILE. If the file is type binary, this |
| 286 | // function reads until a NULL or EOF is found. If the file is text, |
| 287 | // the function reads until a newline or EOF is found. The string is always |
| 288 | // written to the destination buffer null-terminated, without the newline. |
| 289 | // Parameters: buf - where the string is written |
| 290 | // n - the maximum string length, including the terminating 0 |
| 291 | // cfp - the CFILE pointer |
| 292 | // Returns the number of bytes in the string, before the terminator |
| 293 | // Does not generate an exception on EOF |
| 294 | int osipf_CFReadStringcxx . . $ osipf_CFReadString(38cd788e4423eff6).(char *buf, size_t n, CFILEcxx . . $ CFILE# *cfp); |
| 295 | |
| 296 | // Writes the specified number of bytes from a file into the buffer |
| 297 | // DO NOT USE THIS TO WRITE STRUCTURES. This function is for byte |
| 298 | // data, such as a string or a bitmap of 8-bit pixels. |
| 299 | // Returns the number of bytes written. |
| 300 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 301 | int osipf_CFWriteBytescxx . . $ osipf_CFWriteBytes(b35058f74b39c3a6).(const uint8_tcxx . . $ uint8_t# *buf, int count, CFILEcxx . . $ CFILE# *cfp); |
| 302 | |
| 303 | // Writes a null-terminated string to a file. If the file is type binary, |
| 304 | // the string is terminated in the file with a null. If the file is type |
| 305 | // text, the string is terminated with a newline. |
| 306 | // Parameters: buf - pointer to the string |
| 307 | // cfp = the CFILE pointer |
| 308 | // Returns the number of bytes written |
| 309 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 310 | int osipf_CFWriteStringcxx . . $ osipf_CFWriteString(4b3c3ba7355144a8).(const char *buf, CFILEcxx . . $ CFILE# *cfp); |
| 311 | |
| 312 | // The following functions write numeric vales to a CFILE. All values are |
| 313 | // stored to the file in Intel (little-endian) format. |
| 314 | // All these throw an exception if there's an error on write. |
| 315 | |
| 316 | // Write an integer (32 bits) |
| 317 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 318 | void osipf_CFWriteIntcxx . . $ osipf_CFWriteInt(625e12bfe0590ad7).(int i, CFILEcxx . . $ CFILE# *cfp); |
| 319 | |
| 320 | // Write a int16_t (16 bits) |
| 321 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 322 | void osipf_CFWriteShortcxx . . $ osipf_CFWriteShort(873e641da59c3f61).(int16_t s, CFILEcxx . . $ CFILE# *cfp); |
| 323 | |
| 324 | // Write a byte (8 bits). If the byte is a newline & the file is a text file, writes a CR/LF pair. |
| 325 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 326 | void osipf_CFWriteBytecxx . . $ osipf_CFWriteByte(f2c2d2badece30fd).(int8_t b, CFILEcxx . . $ CFILE# *cfp); |
| 327 | |
| 328 | // Write a float (32 bits) |
| 329 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 330 | void osipf_CFWriteFloatcxx . . $ osipf_CFWriteFloat(5cc9ec54bbd5fbb6).(float f, CFILEcxx . . $ CFILE# *cfp); |
| 331 | |
| 332 | // Write a double (64 bits) |
| 333 | // Throws an exception of type (cfile_error *) if the OS returns an error on write |
| 334 | void osipf_CFWriteDoublecxx . . $ osipf_CFWriteDouble(131af317a1f48149).(double d, CFILEcxx . . $ CFILE# *cfp); |
| 335 | |
| 336 | // CONTROLLER predefs |
| 337 | // enables or disables controls specified. |
| 338 | void osipf_SetAllControlscxx . . $ osipf_SetAllControls(b45ddcbc8423892c).(bool enabled); |
| 339 | |
| 340 | // enable or disable specified function |
| 341 | void osipf_SetControlscxx . . $ osipf_SetControls(918ebd27a9ddbad3).(int fn, bool enabled); |
| 342 | |
| 343 | // Creates an object |
| 344 | 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 = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 345 | int parent_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, vectorcxx . . $ vector# *velocity = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 346 | |
| 347 | // OBJECT Properties. |
| 348 | // is an object visible? (rendered current frame) |
| 349 | bool osipf_IsObjectVisiblecxx . . $ osipf_IsObjectVisible(39516aeee13ca5ab).(objectcxx . . $ object# *obj); |
| 350 | |
| 351 | float osipf_GameTimecxx . . $ osipf_GameTime(9b8c9e39889c762c).(void); |
| 352 | float osipf_FrameTimecxx . . $ osipf_FrameTime(9b8c9e39889c762c).(void); |
| 353 | void osipf_ObjWBValuecxx . . $ osipf_ObjWBValue(27bdf1633c0da5e1).(int obj_handle, char wb_index, char op, char vtype, void *ptr, char g_index = 0); |
| 354 | |
| 355 | void osipf_ObjectValuecxx . . $ osipf_ObjectValue(504a19c195c7574e).(int handle, char op, char vtype, void *ptr, int index = 0); |
| 356 | void osipf_MatcenValuecxx . . $ osipf_MatcenValue(504a19c195c7574e).(int handle, char op, char vtype, void *ptr, int index = 0); |
| 357 | |
| 358 | void osipf_MatcenResetcxx . . $ osipf_MatcenReset(d4f767463ce0a6b3).(int handle); |
| 359 | void osipf_MatcenCopycxx . . $ osipf_MatcenCopy(3e454b8ccf442868).(int dhandle, int shandle); |
| 360 | int osipf_MatcenCreatecxx . . $ osipf_MatcenCreate(1ef8e6ec083aabb9).(char *name); |
| 361 | int osipf_MatcenFindIdcxx . . $ osipf_MatcenFindId(1ef8e6ec083aabb9).(char *str); |
| 362 | |
| 363 | // Sets/Clears mission flags |
| 364 | // flag is which mission flag to set/clear (1-32) |
| 365 | // value is 0 to clear, or 1 to set |
| 366 | void osipf_MissionFlagSetcxx . . $ osipf_MissionFlagSet(9633529ce3c4ff50).(int flag, uint8_tcxx . . $ uint8_t# value); |
| 367 | |
| 368 | // Gets a mission flag |
| 369 | // flag is what mission flag to get. Returns 1 if set, 0 if not. |
| 370 | int osipf_MissionFlagGetcxx . . $ osipf_MissionFlagGet(7864480464b09eea).(int flag); |
| 371 | |
| 372 | void osipf_PlayerAddHudMessagecxx . . $ osipf_PlayerAddHudMessage(66835f578de1bcb3).(int handle, const char *str); |
| 373 | void osipf_ObjGhostcxx . . $ osipf_ObjGhost(918ebd27a9ddbad3).(int handle, bool f_ghost); |
| 374 | void osipf_ObjBurningcxx . . $ osipf_ObjBurning(3b3943b4e4191a93).(int handle, float time, float damage_per_second); |
| 375 | bool osipf_ObjIsEffectcxx . . $ osipf_ObjIsEffect(cf9ef193275fa6d8).(int handle, int type_flag); |
| 376 | |
| 377 | // opens a cfile for reading/writing (works just like fopen()) |
| 378 | void *osipf_CFopencxx . . $ osipf_CFopen(12e6862c879384a7).(const char *filename, const char *mode); |
| 379 | |
| 380 | // closes a cfile (like fclose()) |
| 381 | void osipf_CFclosecxx . . $ osipf_CFclose(3639e799710acb68).(CFILEcxx . . $ CFILE# *file); |
| 382 | |
| 383 | // returns the current position of the file (like ftell()) |
| 384 | int osipf_CFtellcxx . . $ osipf_CFtell(413716a422df0036).(CFILEcxx . . $ CFILE# *file); |
| 385 | |
| 386 | // returns 1 if the file is at the EOF, else 0 (like feof()) |
| 387 | uint8_tcxx . . $ uint8_t# osipf_CFeofcxx . . $ osipf_CFeof(848bd77af7750b0d).(CFILEcxx . . $ CFILE# *file); |
| 388 | |
| 389 | void osipf_SoundStopcxx . . $ osipf_SoundStop(918ebd27a9ddbad3).(int s_handle, bool f_immediately = false); |
| 390 | int osipf_SoundPlay2dcxx . . $ osipf_SoundPlay2d(1df3af30621f6c78).(int obj_handle, int s_id, float volume = 1.0f); |
| 391 | int osipf_SoundPlay3dcxx . . $ osipf_SoundPlay3d(1df3af30621f6c78).(int obj_handle, int s_id, float volume = 1.0f); |
| 392 | int osipf_SoundFindIdcxx . . $ osipf_SoundFindId(5c4306d8553b3696).(const char *s_name); |
| 393 | |
| 394 | bool osipf_AIIsObjFriendcxx . . $ osipf_AIIsObjFriend(cf9ef193275fa6d8).(int obj_handle, int it_handle); |
| 395 | bool osipf_AIIsObjEnemycxx . . $ osipf_AIIsObjEnemy(cf9ef193275fa6d8).(int obj_handle, int it_handle); |
| 396 | void osipf_AIGoalValuecxx . . $ osipf_AIGoalValue(27bdf1633c0da5e1).(int obj_handle, char g_index, char op, char vtype, void *ptr, char index = 0); |
| 397 | int osipf_AIGetNearbyObjscxx . . $ osipf_AIGetNearbyObjs(9d0c65cbff229ccc).(vectorcxx . . $ vector# *pos, int init_roomnum, float rad, int *object_handle_list, int max_elements, |
| 398 | bool f_lightmap_only, bool f_only_players_and_ais = true, |
| 399 | bool f_include_non_collide_objects = false, bool f_stop_at_closed_doors = true); |
| 400 | char osipf_AIGetCurGoalIndexcxx . . $ osipf_AIGetCurGoalIndex(266ca1ce69549011).(int obj_handle); |
| 401 | |
| 402 | int osipf_FindSoundNamecxx . . $ osipf_FindSoundName(5c4306d8553b3696).(const char *name); |
| 403 | int osipf_FindRoomNamecxx . . $ osipf_FindRoomName(5c4306d8553b3696).(const char *name); |
| 404 | int osipf_FindTriggerNamecxx . . $ osipf_FindTriggerName(5c4306d8553b3696).(const char *name); |
| 405 | int osipf_FindObjectNamecxx . . $ osipf_FindObjectName(5c4306d8553b3696).(const char *name); |
| 406 | int osipf_GetTriggerRoomcxx . . $ osipf_GetTriggerRoom(7864480464b09eea).(int trigger_id); |
| 407 | int osipf_GetTriggerFacecxx . . $ osipf_GetTriggerFace(7864480464b09eea).(int trigger_id); |
| 408 | int osipf_FindDoorNamecxx . . $ osipf_FindDoorName(5c4306d8553b3696).(const char *name); |
| 409 | int osipf_FindTextureNamecxx . . $ osipf_FindTextureName(5c4306d8553b3696).(const char *name); |
| 410 | int osipf_FindMatcenNamecxx . . $ osipf_FindMatcenName(5c4306d8553b3696).(const char *name); |
| 411 | int osipf_FindPathNamecxx . . $ osipf_FindPathName(5c4306d8553b3696).(const char *name); |
| 412 | int osipf_FindLevelGoalNamecxx . . $ osipf_FindLevelGoalName(5c4306d8553b3696).(const char *name); |
| 413 | |
| 414 | void osipf_CreateRandomSparkscxx . . $ osipf_CreateRandomSparks(3e6b82e54d72ee3b).(int num_sparks, vectorcxx . . $ vector# *pos, int roomnum, int which_index, float force_scalar); |
| 415 | |
| 416 | void osipf_GetGroundPoscxx . . $ osipf_GetGroundPos(acebd7a68d406969).(int objhandle, int ground_number, vectorcxx . . $ vector# *ground_pnt, vectorcxx . . $ vector# *ground_normal); |
| 417 | |
| 418 | // disable/enable ship |
| 419 | void osipf_EnableShipcxx . . $ osipf_EnableShip(1728feb5c2b5da8a).(char *ship_name, bool enable); |
| 420 | // is ship enabled |
| 421 | bool osipf_IsShipEnabledcxx . . $ osipf_IsShipEnabled(c6b7e35ff6de5671).(char *ship_name); |
| 422 | |
| 423 | // turns the given player into AI mode or back to regular control mode |
| 424 | void osipf_SetPlayerControlModecxx . . $ osipf_SetPlayerControlMode(918ebd27a9ddbad3).(int pnum, bool set_to_ai); |
| 425 | |
| 426 | // gets information about a path point |
| 427 | // pass NULL for parameters not needed. |
| 428 | // pathid: path number |
| 429 | // point: which path point |
| 430 | // returns true if operation was successful |
| 431 | bool osipf_PathGetInformationcxx . . $ osipf_PathGetInformation(356189173f7b556f).(int pathid, int point, vectorcxx . . $ vector# *pos, int *room, matrixcxx . . $ matrix# *orient); |
| 432 | |
| 433 | void osipf_LGoalValuecxx . . $ osipf_LGoalValue(295e93bc75a1dcc5).(char op, char vtype, void *ptr, int g_index = -1, int i_index = -1); |
| 434 | int osipf_ObjMakeListOfTypecxx . . $ osipf_ObjMakeListOfType(1d4c0abf60f4d13a).(int objhandle, int type, int id, bool f_ignore_init_room, int parent_handle, |
| 435 | int max_recorded, int *handles); |
| 436 | |
| 437 | void osipf_ObjKillcxx . . $ osipf_ObjKill(89f431b7be850b82).(int handle, int killer_handle, float damage, int flags, float min_time, float max_time); |
| 438 | bool osipf_AIIsDestReachablecxx . . $ osipf_AIIsDestReachable(cf9ef193275fa6d8).(int handle, int room); |
| 439 | bool osipf_AIIsObjReachablecxx . . $ osipf_AIIsObjReachable(cf9ef193275fa6d8).(int handle, int target); |
| 440 | char osipf_GameGetDiffLevelcxx . . $ osipf_GameGetDiffLevel(6e9c618e4dd2eafc).(void); |
| 441 | int osipf_GetLanguageSettingcxx . . $ osipf_GetLanguageSetting(b126dc7c1de90089).(void); |
| 442 | |
| 443 | // Sets/Gets information about a path. |
| 444 | // If you change is PV_ALL (or any of it's individual components), pass in a pointer to an |
| 445 | // osiris_path_node_info struct. For the others, you must pass in an appropriate pointer |
| 446 | // (i.e. an int* for PV_I_NUMNODES). You can only set PV_ALL components. |
| 447 | // for PV_I_NUMNODES, path_id MUST be specified, node_id is ignored |
| 448 | // for PV_I_NUMPATHS, path_id and node_id are ignored |
| 449 | // for PV_CS_NAME, path_id MUST be specified, node_id is ignored |
| 450 | // for PV_ALL components, path_id and node_id MUST be valid. |
| 451 | void osipf_PathValuecxx . . $ osipf_PathValue(e7f90a50b01f5f20).(int path_id, int node_id, char op, int changes, void *ptr); |
| 452 | |
| 453 | #endif |