1 #ifndef _included_decal_h_ /* Is this your first time? */ 2 #define _included_decal_h_ 1 3 4 #include "d3_func.h" 5 #include "vision.h" 6 7 enum DECAL_ID 8 { 9 DECAL_FMV=0, 10 DECAL_SCORCHED, 11 DECAL_BULLETHOLE, 12 DECAL_PREDATOR_BLOOD, 13 DECAL_ALIEN_BLOOD, 14 DECAL_HUMAN_BLOOD, 15 DECAL_ANDROID_BLOOD, 16 17 DECAL_LASERTARGET, 18 DECAL_SHAFTOFLIGHT, 19 DECAL_SHAFTOFLIGHT_OUTER, 20 21 MAX_NO_OF_DECAL_IDS 22 }; 23 24 typedef struct 25 { 26 enum DECAL_ID DecalID; 27 VECTORCH Vertices[4]; 28 VECTORCH Direction[4]; 29 VECTORCH Centre; 30 int ModuleIndex; 31 32 int CurrentSize; 33 int TargetSize; 34 int UOffset; 35 36 } DECAL; 37 38 typedef struct 39 { 40 enum DECAL_ID DecalID; 41 VECTORCH Vertices[4]; 42 int ModuleIndex; 43 int UOffset; 44 45 } FIXED_DECAL; 46 47 48 typedef struct 49 { 50 enum DECAL_ID DecalID; 51 VECTORCH Vertices[4]; 52 VECTORCH Centre; 53 } OBJECT_DECAL; 54 55 typedef struct 56 { 57 int StartU; 58 int StartV; 59 int EndU; 60 int EndV; 61 62 int MinSize; 63 int MaxSize; 64 int GrowthRate; 65 66 int MaxSubclassNumber; 67 int UOffsetForSubclass; 68 69 enum TRANSLUCENCY_TYPE TranslucencyType; 70 71 unsigned char Alpha; 72 unsigned char RedScale[NUMBER_OF_VISION_MODES]; 73 unsigned char GreenScale[NUMBER_OF_VISION_MODES]; 74 unsigned char BlueScale[NUMBER_OF_VISION_MODES]; 75 76 unsigned char IsLit:1; 77 unsigned char CanCombine:1; 78 79 } DECAL_DESC; 80 81 82 typedef struct 83 { 84 VECTORCH Position[3]; 85 VECTORCH Normal[3]; 86 VECTORCH LightSource; 87 char DotIsOnPlayer; 88 // DPID TargetID; 89 int TargetID; 90 91 int ShouldBeDrawn; 92 93 } THREE_LASER_DOT_DESC; 94 95 extern void InitialiseDecalSystem(void); 96 extern void MakeDecal(enum DECAL_ID decalID, VECTORCH *normalPtr, VECTORCH *positionPtr, int moduleIndex); 97 extern void AddDecal(enum DECAL_ID decalID, VECTORCH *normalPtr, VECTORCH *positionPtr, int moduleIndex); 98 extern void HandleDecalSystem(void); 99 100 struct section_data; // hmodel.h 101 extern void AddDecalToHModel(VECTORCH *normalPtr, VECTORCH *positionPtr, struct section_data *sectionPtr); 102 void ScanHModelForDecals(DISPLAYBLOCK *objectPtr, struct section_data *sectionDataPtr); 103 104 extern FIXED_DECAL* AllocateFixedDecal(void); 105 extern void RemoveFixedDecal(void); 106 extern void RemoveAllFixedDecals(void); 107 108 109 extern DECAL_DESC DecalDescription[]; 110 extern THREE_LASER_DOT_DESC PredatorLaserTarget; 111 112 113 extern FIXED_DECAL FixedDecalStorage[]; 114 extern int NumFixedDecals; 115 extern int CurrentFixedDecalIndex; 116 117 #define MAX_NO_OF_DECALS_PER_HIERARCHICAL_SECTION 16 118 #endif 119