| 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 | |
| 19 | #ifndef SPECIAL_FACE_H |
| 20 | #define SPECIAL_FACE_Hcxx . . $ `Descent3/special_face.h:20:9`! |
| 21 | |
| 22 | #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/ |
| 23 | #include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/ |
| 24 | #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/ |
| 25 | |
| 26 | #define BAD_SPECIAL_FACE_INDEXcxx . . $ `Descent3/special_face.h:26:9`! -1 |
| 27 | #define MAX_SPECIAL_FACEScxx . . $ `Descent3/special_face.h:27:9`! 13000 // made large enough for Josh's Mercenary level 3 |
| 28 | |
| 29 | // What this special face is used for: |
| 30 | #define SFT_SPECULARcxx . . $ `Descent3/special_face.h:30:9`! 1 |
| 31 | |
| 32 | struct specular_instancecxx . . $ specular_instance# { |
| 33 | vectorcxx . . $ vector# bright_centercxx . . $ specular_instance#bright_center.; |
| 34 | uint16_tcxx . . $ uint16_t# bright_colorcxx . . $ specular_instance#bright_color.; |
| 35 | }; |
| 36 | |
| 37 | #define SFF_SPEC_OBJECTcxx . . $ `Descent3/special_face.h:37:9`! 1 |
| 38 | #define SFF_SPEC_SMOOTHcxx . . $ `Descent3/special_face.h:38:9`! 2 |
| 39 | |
| 40 | struct special_facecxx . . $ special_face# { |
| 41 | uint8_tcxx . . $ uint8_t# typecxx . . $ special_face#type.; // See types (above) |
| 42 | uint8_tcxx . . $ uint8_t# numcxx . . $ special_face#num.; // Number of instances |
| 43 | uint8_tcxx . . $ uint8_t# usedcxx . . $ special_face#used.; |
| 44 | uint8_tcxx . . $ uint8_t# flagscxx . . $ special_face#flags.; |
| 45 | |
| 46 | specular_instancecxx . . $ specular_instance# *spec_instancecxx . . $ special_face#spec_instance.; |
| 47 | |
| 48 | vectorcxx . . $ vector# *vertnormscxx . . $ special_face#vertnorms.; |
| 49 | |
| 50 | }; |
| 51 | |
| 52 | extern special_facecxx . . $ special_face# SpecialFacescxx . . $ SpecialFaces.[]; |
| 53 | extern int Num_of_special_facescxx . . $ Num_of_special_faces.; |
| 54 | |
| 55 | // Sets all the special faces to unused |
| 56 | void InitSpecialFacescxx . . $ InitSpecialFaces(49f6e7a06ebc5aa8).(); |
| 57 | |
| 58 | // Returns an index into the special faces array |
| 59 | int AllocSpecialFacecxx . . $ AllocSpecialFace(728d02a8a18fc883).(int type, int num, bool vertnorms = false, int num_vertnorms = 0); |
| 60 | |
| 61 | // Given a handle, frees the special face |
| 62 | void FreeSpecialFacecxx . . $ FreeSpecialFace(d4f767463ce0a6b3).(int handle); |
| 63 | |
| 64 | #endif |