| 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/viseffect_external.h $ |
| 21 | * $Revision: 6 $ |
| 22 | * $Date: 3/21/00 9:58a $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * <insert description of file here> |
| 26 | * |
| 27 | * $Log: /DescentIII/main/viseffect_external.h $ |
| 28 | * |
| 29 | * 6 3/21/00 9:58a Matt |
| 30 | * Changed to Mac-only the code that sets a variable number of vis effects |
| 31 | * based on texture quality. |
| 32 | * |
| 33 | * 5 3/20/00 2:27p Matt |
| 34 | * Merge of Duane's post-1.3 changes. |
| 35 | * Moved max_vis_effects (the variable, not the constant) from viseffect.h |
| 36 | * to viseffect_external.h. |
| 37 | * |
| 38 | * 4 10/21/99 9:30p Jeff |
| 39 | * B.A. Macintosh code merge |
| 40 | * |
| 41 | * 3 5/02/99 1:37a Jason |
| 42 | * added moving object lighting viseffects |
| 43 | * |
| 44 | * 2 4/30/99 7:37p Jeff |
| 45 | * created viseffect_external.h |
| 46 | * |
| 47 | * $NoKeywords: $ |
| 48 | */ |
| 49 | |
| 50 | #ifndef __VISEFFECT_EXTERNAL_H_ |
| 51 | #define __VISEFFECT_EXTERNAL_H_ |
| 52 | |
| 53 | #include "pstypes.h" |
| 54 | #include "pserror.h" |
| 55 | #include "vecmat.h" |
| 56 | |
| 57 | #define MAX_VIS_EFFECTS 5000 |
| 58 | |
| 59 | // types |
| 60 | #define VIS_NONE 0 |
| 61 | #define VIS_FIREBALL 1 |
| 62 | |
| 63 | // Flags |
| 64 | #define VF_USES_LIFELEFT 1 |
| 65 | #define VF_WINDSHIELD_EFFECT 2 |
| 66 | #define VF_DEAD 4 |
| 67 | #define VF_PLANAR 8 |
| 68 | #define VF_REVERSE 16 |
| 69 | #define VF_EXPAND 32 |
| 70 | #define VF_ATTACHED 64 |
| 71 | #define VF_NO_Z_ADJUST 128 |
| 72 | #define VF_LINK_TO_VIEWER 256 // Always link into the room that the viewer is in |
| 73 | |
| 74 | extern uint16_t max_vis_effects; |
| 75 | |
| 76 | struct object; |
| 77 | |
| 78 | struct vis_attach_info { |
| 79 | int obj_handle; |
| 80 | int dest_objhandle; |
| 81 | |
| 82 | uint16_t modelnum; |
| 83 | uint16_t vertnum; |
| 84 | uint16_t end_vertnum; |
| 85 | |
| 86 | uint8_t subnum, subnum2; |
| 87 | }; |
| 88 | |
| 89 | struct axis_billboard_info { |
| 90 | uint8_t width; |
| 91 | uint8_t height; |
| 92 | uint8_t texture; |
| 93 | }; |
| 94 | |
| 95 | struct vis_effect { |
| 96 | vector pos; |
| 97 | vector end_pos; |
| 98 | vector velocity; |
| 99 | float mass; |
| 100 | float drag; |
| 101 | float size; |
| 102 | float lifeleft; |
| 103 | float lifetime; |
| 104 | float creation_time; |
| 105 | |
| 106 | int roomnum; |
| 107 | |
| 108 | int phys_flags; |
| 109 | |
| 110 | int16_t custom_handle; |
| 111 | uint16_t lighting_color; |
| 112 | |
| 113 | uint16_t flags; |
| 114 | |
| 115 | int16_t next; |
| 116 | int16_t prev; |
| 117 | |
| 118 | vis_attach_info attach_info; |
| 119 | axis_billboard_info billboard_info; |
| 120 | |
| 121 | uint8_t movement_type; |
| 122 | uint8_t type, id; |
| 123 | }; |
| 124 | |
| 125 | #endif |