| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifdef __OSIRIS_IMPORT_H_ |
| 20 |
#define OSIRISEXTERN extern |
| 21 |
#else |
| 22 |
#define OSIRISEXTERN |
| 23 |
#endif |
| 24 |
|
| 25 |
#include "osiris_common.h" |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
typedef void (*mprintf_fp)(int n, const char *format, ...); |
| 32 |
OSIRISEXTERN mprintf_fp mprintf; |
| 33 |
|
| 34 |
|
| 35 |
typedef void (*MSafe_CallFunction_fp)(int type, msafe_struct *mstruct); |
| 36 |
OSIRISEXTERN MSafe_CallFunction_fp MSafe_CallFunction; |
| 37 |
|
| 38 |
|
| 39 |
typedef void (*MSafe_GetValue_fp)(int type, msafe_struct *mstruct); |
| 40 |
OSIRISEXTERN MSafe_GetValue_fp MSafe_GetValue; |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
typedef bool (*Obj_CallEvent_fp)(int objnum, int event, tOSIRISEventInfo *ei); |
| 46 |
OSIRISEXTERN Obj_CallEvent_fp Obj_CallEvent; |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
typedef bool (*Trgr_CallEvent_fp)(int trignum, int event, tOSIRISEventInfo *ei); |
| 52 |
OSIRISEXTERN Trgr_CallEvent_fp Trgr_CallEvent; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
typedef void (*Sound_TouchFile_fp)(char *sound_name); |
| 57 |
OSIRISEXTERN Sound_TouchFile_fp Sound_TouchFile; |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
typedef int (*Obj_FindID_fp)(const char *object_name); |
| 62 |
OSIRISEXTERN Obj_FindID_fp Obj_FindID; |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
typedef int (*Obj_FindType_fp)(const char *object_name); |
| 67 |
OSIRISEXTERN Obj_FindType_fp Obj_FindType; |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
typedef int (*Wpn_FindID_fp)(const char *weapon_name); |
| 72 |
OSIRISEXTERN Wpn_FindID_fp Wpn_FindID; |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
typedef float (*Obj_GetTimeLived_fp)(int objhandle); |
| 77 |
OSIRISEXTERN Obj_GetTimeLived_fp Obj_GetTimeLived; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
typedef void (*Obj_GetGunPos_fp)(int objhandle, int gun_number, vector *gun_pnt, vector *gun_normal = NULL); |
| 82 |
OSIRISEXTERN Obj_GetGunPos_fp Obj_GetGunPos; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
typedef void (*Obj_GetGroundPos_fp)(int objhandle, int ground_number, vector *ground_pnt, vector *ground_normal = NULL); |
| 87 |
OSIRISEXTERN Obj_GetGroundPos_fp Obj_GetGroundPos; |
| 88 |
|
| 89 |
|
| 90 |
typedef void (*Room_Value_fp)(int roomnum, char op, char vhandle, void *ptr, int index = 0); |
| 91 |
OSIRISEXTERN Room_Value_fp Room_Value; |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
typedef uint8_t (*Room_IsValid_fp)(int roomnum); |
| 96 |
OSIRISEXTERN Room_IsValid_fp Room_IsValid; |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
typedef int (*Obj_GetAttachParent_fp)(int childhandle); |
| 101 |
OSIRISEXTERN Obj_GetAttachParent_fp Obj_GetAttachParent; |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
typedef int (*Obj_GetNumAttachSlots_fp)(int objhandle); |
| 106 |
OSIRISEXTERN Obj_GetNumAttachSlots_fp Obj_GetNumAttachSlots; |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
typedef int (*Obj_GetAttachChildHandle_fp)(int objhandle, char attachpoint); |
| 111 |
OSIRISEXTERN Obj_GetAttachChildHandle_fp Obj_GetAttachChildHandle; |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
typedef int (*Obj_AttachObjectAP_fp)(int parenthandle, char parent_ap, int childhandle, char child_ap, |
| 116 |
uint8_t f_use_aligned); |
| 117 |
OSIRISEXTERN Obj_AttachObjectAP_fp Obj_AttachObjectAP; |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
typedef int (*Obj_AttachObjectRad_fp)(int parenthandle, char parent_ap, int childhandle, float percent_rad); |
| 122 |
OSIRISEXTERN Obj_AttachObjectRad_fp Obj_AttachObjectRad; |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
typedef void (*Obj_UnattachFromParent_fp)(int objhandle); |
| 127 |
OSIRISEXTERN Obj_UnattachFromParent_fp Obj_UnattachFromParent; |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
typedef void (*Obj_UnattachChild_fp)(int objhandle, char parent_ap); |
| 132 |
OSIRISEXTERN Obj_UnattachChild_fp Obj_UnattachChild; |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
typedef void (*Obj_UnattachChildren_fp)(int objhandle); |
| 137 |
OSIRISEXTERN Obj_UnattachChildren_fp Obj_UnattachChildren; |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
typedef int (*FVI_RayCast_fp)(int objhandle, vector *p0, vector *p1, int start_roomnum, float rad, int flags, |
| 142 |
ray_info *ri); |
| 143 |
OSIRISEXTERN FVI_RayCast_fp FVI_RayCast; |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
typedef int (*AI_GetPathID_fp)(char *string); |
| 148 |
OSIRISEXTERN AI_GetPathID_fp AI_GetPathID; |
| 149 |
|
| 150 |
|
| 151 |
typedef int (*AI_GoalFollowPathSimple_fp)(int objhandle, int path_id, int guid, int flags, int slot = 3); |
| 152 |
OSIRISEXTERN AI_GoalFollowPathSimple_fp AI_GoalFollowPathSimple; |
| 153 |
|
| 154 |
|
| 155 |
typedef int (*AI_PowerSwitch_fp)(int objhandle, uint8_t f_power_on); |
| 156 |
OSIRISEXTERN AI_PowerSwitch_fp AI_PowerSwitch; |
| 157 |
|
| 158 |
|
| 159 |
typedef void (*AI_Value_fp)(int objhandle, char op, char vtype, void *ptr); |
| 160 |
OSIRISEXTERN AI_Value_fp AI_Value; |
| 161 |
|
| 162 |
|
| 163 |
typedef void (*Obj_Value_fp)(int objhandle, char op, char vtype, void *ptr, int index = 0); |
| 164 |
OSIRISEXTERN Obj_Value_fp Obj_Value; |
| 165 |
|
| 166 |
|
| 167 |
typedef void (*Matcen_Value_fp)(int matcen_handle, char op, char vtype, void *ptr, int prod_index = 0); |
| 168 |
OSIRISEXTERN Matcen_Value_fp Matcen_Value; |
| 169 |
|
| 170 |
|
| 171 |
typedef uint8_t (*AI_TurnTowardsVectors_fp)(int objhandle, vector *fvec, vector *uvec); |
| 172 |
OSIRISEXTERN AI_TurnTowardsVectors_fp AI_TurnTowardsVectors; |
| 173 |
|
| 174 |
|
| 175 |
typedef void (*AI_SetType_fp)(int objhandle, int type); |
| 176 |
OSIRISEXTERN AI_SetType_fp AI_SetType; |
| 177 |
|
| 178 |
|
| 179 |
typedef vector (*AI_FindHidePos_fp)(int hideobjhandle, int viewobjhandle, float time, int *hide_room); |
| 180 |
OSIRISEXTERN AI_FindHidePos_fp AI_FindHidePos; |
| 181 |
|
| 182 |
|
| 183 |
typedef int (*AI_GoalAddEnabler_fp)(int objhandle, int goal_index, int enabler_type, float percent, float interval, |
| 184 |
void *ptr); |
| 185 |
OSIRISEXTERN AI_GoalAddEnabler_fp AI_GoalAddEnabler; |
| 186 |
|
| 187 |
|
| 188 |
typedef float (*AI_AddGoal_fp)(int objhandle, int goal_type, int level, float influence, int guid, int flags, ...); |
| 189 |
OSIRISEXTERN AI_AddGoal_fp AI_AddGoal; |
| 190 |
|
| 191 |
|
| 192 |
typedef void (*AI_ClearGoal_fp)(int objhandle, int goal_index); |
| 193 |
OSIRISEXTERN AI_ClearGoal_fp AI_ClearGoal; |
| 194 |
|
| 195 |
|
| 196 |
typedef int (*AI_FindObjOfType_fp)(int objhandle, int type, int id, bool f_ignore_init_room, |
| 197 |
int parent_handle = OBJECT_HANDLE_NONE); |
| 198 |
OSIRISEXTERN AI_FindObjOfType_fp AI_FindObjOfType; |
| 199 |
|
| 200 |
|
| 201 |
typedef vector (*AI_GetRoomPathPoint_fp)(int roomnum); |
| 202 |
OSIRISEXTERN AI_GetRoomPathPoint_fp AI_GetRoomPathPoint; |
| 203 |
|
| 204 |
|
| 205 |
typedef int (*AI_FindEnergyCenter_fp)(int objhandle); |
| 206 |
OSIRISEXTERN AI_FindEnergyCenter_fp AI_FindEnergyCenter; |
| 207 |
|
| 208 |
|
| 209 |
typedef float (*AI_GetDistToObj_fp)(int objhandle, int otherobjhandle); |
| 210 |
OSIRISEXTERN AI_GetDistToObj_fp AI_GetDistToObj; |
| 211 |
|
| 212 |
|
| 213 |
typedef int (*AI_SetGoalFlags_fp)(int objhandle, int goal_handle, int flags, uint8_t f_enable); |
| 214 |
OSIRISEXTERN AI_SetGoalFlags_fp AI_SetGoalFlags; |
| 215 |
|
| 216 |
|
| 217 |
typedef void (*AI_SetGoalCircleDist_fp)(int objhandle, int goal_handle, float dist); |
| 218 |
OSIRISEXTERN AI_SetGoalCircleDist_fp AI_SetGoalCircleDist; |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
typedef int (*File_ReadBytes_fp)(uint8_t *buffer, int count, void *fileptr); |
| 227 |
OSIRISEXTERN File_ReadBytes_fp File_ReadBytes; |
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
typedef int (*File_ReadInt_fp)(void *fileptr); |
| 239 |
OSIRISEXTERN File_ReadInt_fp File_ReadInt; |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
typedef int16_t (*File_ReadShort_fp)(void *fileptr); |
| 245 |
OSIRISEXTERN File_ReadShort_fp File_ReadShort; |
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
typedef int8_t (*File_ReadByte_fp)(void *fileptr); |
| 251 |
OSIRISEXTERN File_ReadByte_fp File_ReadByte; |
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
typedef float (*File_ReadFloat_fp)(void *fileptr); |
| 257 |
OSIRISEXTERN File_ReadFloat_fp File_ReadFloat; |
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
typedef double (*File_ReadDouble_fp)(void *fileptr); |
| 263 |
OSIRISEXTERN File_ReadDouble_fp File_ReadDouble; |
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
typedef int (*File_ReadString_fp)(char *buf, size_t n, void *fileptr); |
| 276 |
OSIRISEXTERN File_ReadString_fp File_ReadString; |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
typedef int (*File_WriteBytes_fp)(const uint8_t *buf, int count, void *fileptr); |
| 285 |
OSIRISEXTERN File_WriteBytes_fp File_WriteBytes; |
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
typedef int (*File_WriteString_fp)(const char *buf, void *fileptr); |
| 296 |
OSIRISEXTERN File_WriteString_fp File_WriteString; |
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
typedef void (*File_WriteInt_fp)(int i, void *fileptr); |
| 306 |
OSIRISEXTERN File_WriteInt_fp File_WriteInt; |
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
typedef void (*File_WriteShort_fp)(int16_t s, void *fileptr); |
| 312 |
OSIRISEXTERN File_WriteShort_fp File_WriteShort; |
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
typedef void (*File_WriteByte_fp)(int8_t b, void *fileptr); |
| 318 |
OSIRISEXTERN File_WriteByte_fp File_WriteByte; |
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
typedef void (*File_WriteFloat_fp)(float f, void *fileptr); |
| 324 |
OSIRISEXTERN File_WriteFloat_fp File_WriteFloat; |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
typedef void (*File_WriteDouble_fp)(double d, void *fileptr); |
| 330 |
OSIRISEXTERN File_WriteDouble_fp File_WriteDouble; |
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
typedef void *(*Scrpt_MemAlloc_fp)(tOSIRISMEMCHUNK *mem_info); |
| 336 |
OSIRISEXTERN Scrpt_MemAlloc_fp Scrpt_MemAlloc; |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
typedef void (*Scrpt_MemFree_fp)(void *memory_ptr); |
| 341 |
OSIRISEXTERN Scrpt_MemFree_fp Scrpt_MemFree; |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
typedef void (*Scrpt_CancelTimer_fp)(int timer_id); |
| 346 |
OSIRISEXTERN Scrpt_CancelTimer_fp Scrpt_CancelTimer; |
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
typedef int (*Scrpt_CreateTimer_fp)(tOSIRISTIMER *timer_info); |
| 352 |
OSIRISEXTERN Scrpt_CreateTimer_fp Scrpt_CreateTimer; |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
typedef void (*MSafe_DoPowerup_fp)(msafe_struct *mstruct); |
| 357 |
OSIRISEXTERN MSafe_DoPowerup_fp MSafe_DoPowerup; |
| 358 |
|
| 359 |
|
| 360 |
typedef int (*Obj_Create_fp)(uint8_t type, uint16_t id, int roomnum, vector *pos, const matrix *orient = NULL, |
| 361 |
int parent_handle = OBJECT_HANDLE_NONE, vector *initial_velocity = NULL); |
| 362 |
OSIRISEXTERN Obj_Create_fp Obj_Create; |
| 363 |
|
| 364 |
|
| 365 |
typedef float (*Game_GetTime_fp)(void); |
| 366 |
OSIRISEXTERN Game_GetTime_fp Game_GetTime; |
| 367 |
|
| 368 |
|
| 369 |
typedef float (*Game_GetFrameTime_fp)(void); |
| 370 |
OSIRISEXTERN Game_GetFrameTime_fp Game_GetFrameTime; |
| 371 |
|
| 372 |
|
| 373 |
typedef void (*Obj_WBValue_fp)(int obj_handle, char wb_index, char op, char vtype, void *ptr, char g_index = 0); |
| 374 |
OSIRISEXTERN Obj_WBValue_fp Obj_WBValue; |
| 375 |
|
| 376 |
|
| 377 |
typedef uint8_t (*Scrpt_TimerExists_fp)(int handle); |
| 378 |
OSIRISEXTERN Scrpt_TimerExists_fp Scrpt_TimerExists; |
| 379 |
|
| 380 |
typedef void (*Matcen_Reset_fp)(int handle); |
| 381 |
OSIRISEXTERN Matcen_Reset_fp Matcen_Reset; |
| 382 |
|
| 383 |
typedef void (*Matcen_Copy_fp)(int dhandle, int shandle); |
| 384 |
OSIRISEXTERN Matcen_Copy_fp Matcen_Copy; |
| 385 |
|
| 386 |
typedef int (*Matcen_Create_fp)(char *name); |
| 387 |
OSIRISEXTERN Matcen_Create_fp Matcen_Create; |
| 388 |
|
| 389 |
typedef int (*Matcen_FindID_fp)(char *str); |
| 390 |
OSIRISEXTERN Matcen_FindID_fp Matcen_FindID; |
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
typedef void (*Msn_FlagSet_fp)(int flag, uint8_t value); |
| 396 |
OSIRISEXTERN Msn_FlagSet_fp Msn_FlagSet; |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
typedef int (*Msn_FlagGet_fp)(int flag); |
| 401 |
OSIRISEXTERN Msn_FlagGet_fp Msn_FlagGet; |
| 402 |
|
| 403 |
typedef void (*Player_Value_fp)(int obj_handle, char op, char vhandle, void *ptr, int index = 0); |
| 404 |
OSIRISEXTERN Player_Value_fp Player_Value; |
| 405 |
|
| 406 |
typedef void (*Obj_SetCustomAnim_fp)(int handle, float start, float end, float time, char flags, int sound_handle = -1, |
| 407 |
char next_anim_type = -1); |
| 408 |
OSIRISEXTERN Obj_SetCustomAnim_fp Obj_SetCustomAnim; |
| 409 |
|
| 410 |
typedef void (*Player_AddHudMessage_fp)(int handle, const char *str); |
| 411 |
OSIRISEXTERN Player_AddHudMessage_fp Player_AddHudMessage; |
| 412 |
|
| 413 |
typedef void (*Obj_Ghost_fp)(int handle, bool f_ghost); |
| 414 |
OSIRISEXTERN Obj_Ghost_fp Obj_Ghost; |
| 415 |
|
| 416 |
typedef void (*Obj_Burning_fp)(int handle, float time, float damage_per_second = 1.0f); |
| 417 |
OSIRISEXTERN Obj_Burning_fp Obj_Burning; |
| 418 |
|
| 419 |
typedef bool (*Obj_IsEffect_fp)(int handle, int type_flag); |
| 420 |
OSIRISEXTERN Obj_IsEffect_fp Obj_IsEffect; |
| 421 |
|
| 422 |
|
| 423 |
typedef void *(*File_Open_fp)(const char *filename, const char *mode); |
| 424 |
OSIRISEXTERN File_Open_fp File_Open; |
| 425 |
|
| 426 |
|
| 427 |
typedef void (*File_Close_fp)(void *fileptr); |
| 428 |
OSIRISEXTERN File_Close_fp File_Close; |
| 429 |
|
| 430 |
|
| 431 |
typedef int (*File_Tell_fp)(void *fileptr); |
| 432 |
OSIRISEXTERN File_Tell_fp File_Tell; |
| 433 |
|
| 434 |
|
| 435 |
typedef uint8_t (*File_eof_fp)(void *fileptr); |
| 436 |
OSIRISEXTERN File_eof_fp File_eof; |
| 437 |
|
| 438 |
typedef void (*Sound_Stop_fp)(int s_handle, bool f_immediately = false); |
| 439 |
OSIRISEXTERN Sound_Stop_fp Sound_Stop; |
| 440 |
|
| 441 |
typedef int (*Sound_Play2d_fp)(int obj_handle, int s_id, float volume = 1.0f); |
| 442 |
OSIRISEXTERN Sound_Play2d_fp Sound_Play2d; |
| 443 |
|
| 444 |
typedef int (*Sound_Play3d_fp)(int obj_handle, int s_id, float volume = 1.0f); |
| 445 |
OSIRISEXTERN Sound_Play3d_fp Sound_Play3d; |
| 446 |
|
| 447 |
typedef int (*Sound_FindId_fp)(const char *s_name); |
| 448 |
OSIRISEXTERN Sound_FindId_fp Sound_FindId; |
| 449 |
|
| 450 |
typedef bool (*AI_IsObjFriend_fp)(int obj_handle, int it_handle); |
| 451 |
OSIRISEXTERN AI_IsObjFriend_fp AI_IsObjFriend; |
| 452 |
|
| 453 |
typedef bool (*AI_IsObjEnemy_fp)(int obj_handle, int it_handle); |
| 454 |
OSIRISEXTERN AI_IsObjEnemy_fp AI_IsObjEnemy; |
| 455 |
|
| 456 |
typedef bool (*AI_GoalValue_fp)(int obj_handle, char g_index, char op, char vtype, void *ptr, char index = 0); |
| 457 |
OSIRISEXTERN AI_GoalValue_fp AI_GoalValue; |
| 458 |
|
| 459 |
typedef int (*AI_GetNearbyObjs_fp)(vector *pos, int init_roomnum, float rad, int *object_handle_list, int max_elements, |
| 460 |
bool f_lightmap_only, bool f_only_players_and_ais = true, |
| 461 |
bool f_include_non_collide_objects = false, bool f_stop_at_closed_doors = true); |
| 462 |
OSIRISEXTERN AI_GetNearbyObjs_fp AI_GetNearbyObjs; |
| 463 |
|
| 464 |
typedef char (*AI_GetCurGoalIndex_fp)(int obj_handle); |
| 465 |
OSIRISEXTERN AI_GetCurGoalIndex_fp AI_GetCurGoalIndex; |
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
typedef OMMSHANDLE (*OMMS_Malloc_fp)(size_t amount_of_memory, uint32_t unique_identifier, char *script_identifier); |
| 474 |
OSIRISEXTERN OMMS_Malloc_fp OMMS_Malloc; |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
typedef void *(*OMMS_Attach_fp)(OMMSHANDLE handle); |
| 480 |
OSIRISEXTERN OMMS_Attach_fp OMMS_Attach; |
| 481 |
|
| 482 |
|
| 483 |
typedef void (*OMMS_Detach_fp)(OMMSHANDLE handle); |
| 484 |
OSIRISEXTERN OMMS_Detach_fp OMMS_Detach; |
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
typedef void (*OMMS_Free_fp)(OMMSHANDLE handle); |
| 497 |
OSIRISEXTERN OMMS_Free_fp OMMS_Free; |
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
typedef OMMSHANDLE (*OMMS_Find_fp)(uint32_t unique_identifier, char *script_identifier); |
| 504 |
OSIRISEXTERN OMMS_Find_fp OMMS_Find; |
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
typedef char (*OMMS_GetInfo_fp)(OMMSHANDLE handle, uint32_t *mem_size, uint32_t *uid, uint16_t *reference_count, |
| 510 |
uint8_t *has_free_been_called); |
| 511 |
OSIRISEXTERN OMMS_GetInfo_fp OMMS_GetInfo; |
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
typedef bool (*Cine_Start_fp)(tGameCinematic *info, const char *text_string); |
| 516 |
OSIRISEXTERN Cine_Start_fp Cine_Start; |
| 517 |
|
| 518 |
|
| 519 |
typedef void (*Cine_Stop_fp)(void); |
| 520 |
OSIRISEXTERN Cine_Stop_fp Cine_Stop; |
| 521 |
|
| 522 |
|
| 523 |
typedef int (*Scrpt_FindSoundName_fp)(const char *name); |
| 524 |
OSIRISEXTERN Scrpt_FindSoundName_fp Scrpt_FindSoundName; |
| 525 |
|
| 526 |
typedef int (*Scrpt_FindRoomName_fp)(const char *name); |
| 527 |
OSIRISEXTERN Scrpt_FindRoomName_fp Scrpt_FindRoomName; |
| 528 |
|
| 529 |
typedef int (*Scrpt_FindTriggerName_fp)(const char *name); |
| 530 |
OSIRISEXTERN Scrpt_FindTriggerName_fp Scrpt_FindTriggerName; |
| 531 |
|
| 532 |
typedef int (*Scrpt_FindObjectName_fp)(const char *name); |
| 533 |
OSIRISEXTERN Scrpt_FindObjectName_fp Scrpt_FindObjectName; |
| 534 |
|
| 535 |
typedef int (*Scrpt_GetTriggerRoom_fp)(int trigger_id); |
| 536 |
OSIRISEXTERN Scrpt_GetTriggerRoom_fp Scrpt_GetTriggerRoom; |
| 537 |
|
| 538 |
typedef int (*Scrpt_GetTriggerFace_fp)(int trigger_id); |
| 539 |
OSIRISEXTERN Scrpt_GetTriggerFace_fp Scrpt_GetTriggerFace; |
| 540 |
|
| 541 |
typedef int (*Scrpt_FindDoorName_fp)(const char *name); |
| 542 |
OSIRISEXTERN Scrpt_FindDoorName_fp Scrpt_FindDoorName; |
| 543 |
|
| 544 |
typedef int (*Scrpt_FindTextureName_fp)(const char *name); |
| 545 |
OSIRISEXTERN Scrpt_FindTextureName_fp Scrpt_FindTextureName; |
| 546 |
|
| 547 |
typedef void (*Game_CreateRandomSparks_fp)(int num_sparks, vector *pos, int roomnum, int which_index = -1, |
| 548 |
float force_scalar = 1.0f); |
| 549 |
OSIRISEXTERN Game_CreateRandomSparks_fp Game_CreateRandomSparks; |
| 550 |
|
| 551 |
|
| 552 |
typedef void (*Scrpt_CancelTimerID_fp)(int id); |
| 553 |
OSIRISEXTERN Scrpt_CancelTimerID_fp Scrpt_CancelTimerID; |
| 554 |
|
| 555 |
|
| 556 |
typedef void (*Game_EnableShip_fp)(const char *ship_name, bool enable); |
| 557 |
OSIRISEXTERN Game_EnableShip_fp Game_EnableShip; |
| 558 |
|
| 559 |
|
| 560 |
typedef bool (*Game_IsShipEnabled_fp)(const char *ship_name); |
| 561 |
OSIRISEXTERN Game_IsShipEnabled_fp Game_IsShipEnabled; |
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
typedef bool (*Path_GetInformation_fp)(int pathid, int point, vector *pos = NULL, int *room = NULL, |
| 569 |
matrix *orient = NULL); |
| 570 |
OSIRISEXTERN Path_GetInformation_fp Path_GetInformation; |
| 571 |
|
| 572 |
|
| 573 |
typedef void (*Cine_StartCanned_fp)(tCannedCinematicInfo *info); |
| 574 |
OSIRISEXTERN Cine_StartCanned_fp Cine_StartCanned; |
| 575 |
|
| 576 |
typedef int (*Scrpt_FindMatcenName_fp)(char *name); |
| 577 |
OSIRISEXTERN Scrpt_FindMatcenName_fp Scrpt_FindMatcenName; |
| 578 |
|
| 579 |
typedef int (*Scrpt_FindPathName_fp)(char *name); |
| 580 |
OSIRISEXTERN Scrpt_FindPathName_fp Scrpt_FindPathName; |
| 581 |
|
| 582 |
typedef int (*Scrpt_FindLevelGoalName_fp)(char *name); |
| 583 |
OSIRISEXTERN Scrpt_FindLevelGoalName_fp Scrpt_FindLevelGoalName; |
| 584 |
|
| 585 |
typedef void (*LGoal_Value_fp)(char op, char vtype, void *ptr, int g_index = -1, int i_index = -1); |
| 586 |
OSIRISEXTERN LGoal_Value_fp LGoal_Value; |
| 587 |
|
| 588 |
typedef int (*Obj_MakeListOfType_fp)(int objhandle, int type, int id, bool f_ignore_init_room, int parent_handle, |
| 589 |
int max_recorded, int *handles); |
| 590 |
OSIRISEXTERN Obj_MakeListOfType_fp Obj_MakeListOfType; |
| 591 |
|
| 592 |
typedef void (*Obj_Kill_fp)(int handle, int killer_handle, float damage, int flags, float min_time, float max_time); |
| 593 |
OSIRISEXTERN Obj_Kill_fp Obj_Kill; |
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
typedef bool (*AI_IsDestReachable_fp)(int handle, int room); |
| 599 |
OSIRISEXTERN AI_IsDestReachable_fp AI_IsDestReachable; |
| 600 |
|
| 601 |
typedef bool (*AI_IsObjReachable_fp)(int handle, int target); |
| 602 |
OSIRISEXTERN AI_IsObjReachable_fp AI_IsObjReachable; |
| 603 |
|
| 604 |
typedef char (*Game_GetDiffLevel_fp)(void); |
| 605 |
OSIRISEXTERN Game_GetDiffLevel_fp Game_GetDiffLevel; |
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
typedef int (*Game_GetLanguage_fp)(void); |
| 615 |
OSIRISEXTERN Game_GetLanguage_fp Game_GetLanguage; |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
typedef void (*Path_Value_fp)(int path_id, int node_id, char op, int changes, void *ptr); |
| 626 |
OSIRISEXTERN Path_Value_fp Path_Value; |
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
void osicommon_Initialize(tOSIRISModuleInit *mi); |
| 633 |
#ifndef __OSIRIS_IMPORT_H_ |
| 634 |
void osicommon_Initialize(tOSIRISModuleInit *mi) { |
| 635 |
int i = 0; |
| 636 |
mprintf = (mprintf_fp)mi->fp[i++]; |
| 637 |
MSafe_CallFunction = (MSafe_CallFunction_fp)mi->fp[i++]; |
| 638 |
MSafe_GetValue = (MSafe_GetValue_fp)mi->fp[i++]; |
| 639 |
Obj_CallEvent = (Obj_CallEvent_fp)mi->fp[i++]; |
| 640 |
Trgr_CallEvent = (Trgr_CallEvent_fp)mi->fp[i++]; |
| 641 |
Sound_TouchFile = (Sound_TouchFile_fp)mi->fp[i++]; |
| 642 |
Obj_FindID = (Obj_FindID_fp)mi->fp[i++]; |
| 643 |
Wpn_FindID = (Wpn_FindID_fp)mi->fp[i++]; |
| 644 |
Obj_GetTimeLived = (Obj_GetTimeLived_fp)mi->fp[i++]; |
| 645 |
Obj_GetGunPos = (Obj_GetGunPos_fp)mi->fp[i++]; |
| 646 |
Room_Value = (Room_Value_fp)mi->fp[i++]; |
| 647 |
Room_IsValid = (Room_IsValid_fp)mi->fp[i++]; |
| 648 |
Obj_GetAttachParent = (Obj_GetAttachParent_fp)mi->fp[i++]; |
| 649 |
Obj_GetNumAttachSlots = (Obj_GetNumAttachSlots_fp)mi->fp[i++]; |
| 650 |
Obj_GetAttachChildHandle = (Obj_GetAttachChildHandle_fp)mi->fp[i++]; |
| 651 |
Obj_AttachObjectAP = (Obj_AttachObjectAP_fp)mi->fp[i++]; |
| 652 |
Obj_AttachObjectRad = (Obj_AttachObjectRad_fp)mi->fp[i++]; |
| 653 |
Obj_UnattachFromParent = (Obj_UnattachFromParent_fp)mi->fp[i++]; |
| 654 |
Obj_UnattachChild = (Obj_UnattachChild_fp)mi->fp[i++]; |
| 655 |
Obj_UnattachChildren = (Obj_UnattachChildren_fp)mi->fp[i++]; |
| 656 |
FVI_RayCast = (FVI_RayCast_fp)mi->fp[i++]; |
| 657 |
AI_GetPathID = (AI_GetPathID_fp)mi->fp[i++]; |
| 658 |
AI_GoalFollowPathSimple = (AI_GoalFollowPathSimple_fp)mi->fp[i++]; |
| 659 |
AI_PowerSwitch = (AI_PowerSwitch_fp)mi->fp[i++]; |
| 660 |
AI_TurnTowardsVectors = (AI_TurnTowardsVectors_fp)mi->fp[i++]; |
| 661 |
AI_SetType = (AI_SetType_fp)mi->fp[i++]; |
| 662 |
AI_FindHidePos = (AI_FindHidePos_fp)mi->fp[i++]; |
| 663 |
AI_GoalAddEnabler = (AI_GoalAddEnabler_fp)mi->fp[i++]; |
| 664 |
AI_AddGoal = (AI_AddGoal_fp)mi->fp[i++]; |
| 665 |
AI_ClearGoal = (AI_ClearGoal_fp)mi->fp[i++]; |
| 666 |
AI_Value = (AI_Value_fp)mi->fp[i++]; |
| 667 |
AI_FindObjOfType = (AI_FindObjOfType_fp)mi->fp[i++]; |
| 668 |
AI_GetRoomPathPoint = (AI_GetRoomPathPoint_fp)mi->fp[i++]; |
| 669 |
AI_FindEnergyCenter = (AI_FindEnergyCenter_fp)mi->fp[i++]; |
| 670 |
AI_GetDistToObj = (AI_GetDistToObj_fp)mi->fp[i++]; |
| 671 |
AI_SetGoalFlags = (AI_SetGoalFlags_fp)mi->fp[i++]; |
| 672 |
AI_SetGoalCircleDist = (AI_SetGoalCircleDist_fp)mi->fp[i++]; |
| 673 |
File_ReadBytes = (File_ReadBytes_fp)mi->fp[i++]; |
| 674 |
File_ReadInt = (File_ReadInt_fp)mi->fp[i++]; |
| 675 |
File_ReadShort = (File_ReadShort_fp)mi->fp[i++]; |
| 676 |
File_ReadByte = (File_ReadByte_fp)mi->fp[i++]; |
| 677 |
File_ReadFloat = (File_ReadFloat_fp)mi->fp[i++]; |
| 678 |
File_ReadDouble = (File_ReadDouble_fp)mi->fp[i++]; |
| 679 |
File_ReadString = (File_ReadString_fp)mi->fp[i++]; |
| 680 |
File_WriteBytes = (File_WriteBytes_fp)mi->fp[i++]; |
| 681 |
File_WriteString = (File_WriteString_fp)mi->fp[i++]; |
| 682 |
File_WriteInt = (File_WriteInt_fp)mi->fp[i++]; |
| 683 |
File_WriteShort = (File_WriteShort_fp)mi->fp[i++]; |
| 684 |
File_WriteByte = (File_WriteByte_fp)mi->fp[i++]; |
| 685 |
File_WriteFloat = (File_WriteFloat_fp)mi->fp[i++]; |
| 686 |
File_WriteDouble = (File_WriteDouble_fp)mi->fp[i++]; |
| 687 |
Scrpt_MemAlloc = (Scrpt_MemAlloc_fp)mi->fp[i++]; |
| 688 |
Scrpt_MemFree = (Scrpt_MemFree_fp)mi->fp[i++]; |
| 689 |
Scrpt_CancelTimer = (Scrpt_CancelTimer_fp)mi->fp[i++]; |
| 690 |
Scrpt_CreateTimer = (Scrpt_CreateTimer_fp)mi->fp[i++]; |
| 691 |
MSafe_DoPowerup = (MSafe_DoPowerup_fp)mi->fp[i++]; |
| 692 |
Obj_Create = (Obj_Create_fp)mi->fp[i++]; |
| 693 |
Game_GetTime = (Game_GetTime_fp)mi->fp[i++]; |
| 694 |
Game_GetFrameTime = (Game_GetFrameTime_fp)mi->fp[i++]; |
| 695 |
Obj_WBValue = (Obj_WBValue_fp)mi->fp[i++]; |
| 696 |
Scrpt_TimerExists = (Scrpt_TimerExists_fp)mi->fp[i++]; |
| 697 |
Obj_Value = (Obj_Value_fp)mi->fp[i++]; |
| 698 |
Matcen_Value = (Matcen_Value_fp)mi->fp[i++]; |
| 699 |
Matcen_Reset = (Matcen_Reset_fp)mi->fp[i++]; |
| 700 |
Matcen_Copy = (Matcen_Copy_fp)mi->fp[i++]; |
| 701 |
Matcen_Create = (Matcen_Create_fp)mi->fp[i++]; |
| 702 |
Matcen_FindID = (Matcen_FindID_fp)mi->fp[i++]; |
| 703 |
Msn_FlagSet = (Msn_FlagSet_fp)mi->fp[i++]; |
| 704 |
Msn_FlagGet = (Msn_FlagGet_fp)mi->fp[i++]; |
| 705 |
Player_Value = (Player_Value_fp)mi->fp[i++]; |
| 706 |
Obj_SetCustomAnim = (Obj_SetCustomAnim_fp)mi->fp[i++]; |
| 707 |
Player_AddHudMessage = (Player_AddHudMessage_fp)mi->fp[i++]; |
| 708 |
Obj_Ghost = (Obj_Ghost_fp)mi->fp[i++]; |
| 709 |
Obj_Burning = (Obj_Burning_fp)mi->fp[i++]; |
| 710 |
Obj_IsEffect = (Obj_IsEffect_fp)mi->fp[i++]; |
| 711 |
File_Open = (File_Open_fp)mi->fp[i++]; |
| 712 |
File_Close = (File_Close_fp)mi->fp[i++]; |
| 713 |
File_Tell = (File_Tell_fp)mi->fp[i++]; |
| 714 |
File_eof = (File_eof_fp)mi->fp[i++]; |
| 715 |
Sound_Stop = (Sound_Stop_fp)mi->fp[i++]; |
| 716 |
Sound_Play2d = (Sound_Play2d_fp)mi->fp[i++]; |
| 717 |
Sound_Play3d = (Sound_Play3d_fp)mi->fp[i++]; |
| 718 |
Sound_FindId = (Sound_FindId_fp)mi->fp[i++]; |
| 719 |
AI_IsObjFriend = (AI_IsObjFriend_fp)mi->fp[i++]; |
| 720 |
AI_IsObjEnemy = (AI_IsObjEnemy_fp)mi->fp[i++]; |
| 721 |
AI_GoalValue = (AI_GoalValue_fp)mi->fp[i++]; |
| 722 |
AI_GetNearbyObjs = (AI_GetNearbyObjs_fp)mi->fp[i++]; |
| 723 |
AI_GetCurGoalIndex = (AI_GetCurGoalIndex_fp)mi->fp[i++]; |
| 724 |
OMMS_Malloc = (OMMS_Malloc_fp)mi->fp[i++]; |
| 725 |
OMMS_Attach = (OMMS_Attach_fp)mi->fp[i++]; |
| 726 |
OMMS_Detach = (OMMS_Detach_fp)mi->fp[i++]; |
| 727 |
OMMS_Free = (OMMS_Free_fp)mi->fp[i++]; |
| 728 |
OMMS_Find = (OMMS_Find_fp)mi->fp[i++]; |
| 729 |
OMMS_GetInfo = (OMMS_GetInfo_fp)mi->fp[i++]; |
| 730 |
Cine_Start = (Cine_Start_fp)mi->fp[i++]; |
| 731 |
Cine_Stop = (Cine_Stop_fp)mi->fp[i++]; |
| 732 |
Scrpt_FindSoundName = (Scrpt_FindSoundName_fp)mi->fp[i++]; |
| 733 |
Scrpt_FindRoomName = (Scrpt_FindRoomName_fp)mi->fp[i++]; |
| 734 |
Scrpt_FindTriggerName = (Scrpt_FindTriggerName_fp)mi->fp[i++]; |
| 735 |
Scrpt_FindObjectName = (Scrpt_FindObjectName_fp)mi->fp[i++]; |
| 736 |
Scrpt_GetTriggerRoom = (Scrpt_GetTriggerRoom_fp)mi->fp[i++]; |
| 737 |
Scrpt_GetTriggerFace = (Scrpt_GetTriggerFace_fp)mi->fp[i++]; |
| 738 |
Scrpt_FindDoorName = (Scrpt_FindDoorName_fp)mi->fp[i++]; |
| 739 |
Scrpt_FindTextureName = (Scrpt_FindTextureName_fp)mi->fp[i++]; |
| 740 |
Game_CreateRandomSparks = (Game_CreateRandomSparks_fp)mi->fp[i++]; |
| 741 |
Scrpt_CancelTimerID = (Scrpt_CancelTimerID_fp)mi->fp[i++]; |
| 742 |
Obj_GetGroundPos = (Obj_GetGroundPos_fp)mi->fp[i++]; |
| 743 |
Game_EnableShip = (Game_EnableShip_fp)mi->fp[i++]; |
| 744 |
Game_IsShipEnabled = (Game_IsShipEnabled_fp)mi->fp[i++]; |
| 745 |
Path_GetInformation = (Path_GetInformation_fp)mi->fp[i++]; |
| 746 |
Cine_StartCanned = (Cine_StartCanned_fp)mi->fp[i++]; |
| 747 |
Scrpt_FindMatcenName = (Scrpt_FindMatcenName_fp)mi->fp[i++]; |
| 748 |
Scrpt_FindPathName = (Scrpt_FindPathName_fp)mi->fp[i++]; |
| 749 |
Scrpt_FindLevelGoalName = (Scrpt_FindLevelGoalName_fp)mi->fp[i++]; |
| 750 |
Obj_FindType = (Obj_FindType_fp)mi->fp[i++]; |
| 751 |
LGoal_Value = (LGoal_Value_fp)mi->fp[i++]; |
| 752 |
Obj_MakeListOfType = (Obj_MakeListOfType_fp)mi->fp[i++]; |
| 753 |
Obj_Kill = (Obj_Kill_fp)mi->fp[i++]; |
| 754 |
|
| 755 |
AI_IsDestReachable = (AI_IsDestReachable_fp)mi->fp[i++]; |
| 756 |
AI_IsObjReachable = (AI_IsObjReachable_fp)mi->fp[i++]; |
| 757 |
Game_GetDiffLevel = (Game_GetDiffLevel_fp)mi->fp[i++]; |
| 758 |
Game_GetLanguage = (Game_GetLanguage_fp)mi->fp[i++]; |
| 759 |
Path_Value = (Path_Value_fp)mi->fp[i++]; |
| 760 |
} |
| 761 |
#endif |
| 762 |
|
| 763 |
#ifndef __OSIRIS_IMPORT_H_ |
| 764 |
#define __OSIRIS_IMPORT_H_ |
| 765 |
#endif |