| 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/soar_helpers.h $ |
| 21 | * $Revision: 4 $ |
| 22 | * $Date: 4/16/99 12:33a $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * Header for soar_helpers.cpp |
| 26 | * |
| 27 | * $Log: /DescentIII/main/soar_helpers.h $ |
| 28 | * |
| 29 | * 4 4/16/99 12:33a Matt |
| 30 | * Disable Soar on non-Windows systems. |
| 31 | * |
| 32 | */ |
| 33 | |
| 34 | #ifndef SOAR_HELPERS_H_ |
| 35 | #define SOAR_HELPERS_H_ |
| 36 | |
| 37 | #include "soar.h" |
| 38 | |
| 39 | #ifdef SOAR_ENABLED |
| 40 | |
| 41 | #include "object.h" |
| 42 | #include "vecmat.h" |
| 43 | #include "controls.h" |
| 44 | #include "weapon.h" |
| 45 | #include "room.h" |
| 46 | #include "terrain.h" |
| 47 | #include "player.h" |
| 48 | |
| 49 | // Functions passed to Soar in this order |
| 50 | |
| 51 | bool DSGetHighestObjIndex(int &n); |
| 52 | bool DSGetObjSize(int n, float *size); |
| 53 | bool DSGetObjMass(int n, float *mass); |
| 54 | bool DSGetObjShields(int n, float *shields); |
| 55 | bool DSGetObjPos(int n, vector *pos); |
| 56 | bool DSGetObjOrient(int n, matrix *m); |
| 57 | bool DSGetObjVelocity(int n, vector *vel); |
| 58 | bool DSGetObjRotVelocity(int n, vector *rotvel); |
| 59 | bool DSGetObjRoomNum(int n, int *roomnum); |
| 60 | bool DSGetObjType(int n, int *type); |
| 61 | bool DSGetObjId(int n, int *id); |
| 62 | bool DSGetNextObjIndex(int n, int *next); |
| 63 | bool DSGetPrevObjIndex(int n, int *prev); |
| 64 | bool DSSetControllerInfo(int n, game_controls *controls); |
| 65 | bool DSGetFirstRoomObject(int n, int *first); |
| 66 | bool DSPauseGame(void); |
| 67 | bool DSResumeGame(void); |
| 68 | bool DSGetObjAABB(int n, vector *min_xyz, vector *max_xyz); |
| 69 | bool DSSelectCurrentWeapon(int n); |
| 70 | bool DSGetCurrentPrimary(int *n); |
| 71 | bool DSGetCurrentSecondary(int *n); |
| 72 | bool DSGetAvailableWeapons(int *flags); |
| 73 | bool DSGetNumRoomPortals(int n, int *num_portals); |
| 74 | bool DSGetRoomPortalConnectRoom(int n, int p, int *connect_room); |
| 75 | bool DSIsObjDestroyable(int n, bool *f_is_destroyable); |
| 76 | bool DSIsDoorOpenable(int n, int *is_openable); |
| 77 | bool DSGetDoorStatus(int n, int *status); |
| 78 | |
| 79 | // Not externalized to Soar |
| 80 | void DSSoarInit(); |
| 81 | void DSSoarEnd(); |
| 82 | |
| 83 | #else // ifdef SOAR_ENABLED |
| 84 | |
| 85 | #define DSSoarInit() \ |
| 86 | do { \ |
| 87 | } while (0) |
| 88 | #define DSSoarEnd() \ |
| 89 | do { \ |
| 90 | } while (0) |
| 91 | |
| 92 | #endif // ifdef SOAR_ENABLED |
| 93 | |
| 94 | #endif |