4b825dc642cb6eb9a060e54bf8d69288fbee4904ebd360ec63ec976c05699f3180e866b3f69e5472
 
 
1
typedef enum light_state
 
 
2
{
 
 
3
    Light_State_Standard,
 
 
4
    Light_State_Broken,    
 
 
5
    Light_State_StrobeUp,
 
 
6
    Light_State_StrobeDown,
 
 
7
    Light_State_StrobeUpDelay,
 
 
8
    Light_State_StrobeDownDelay,
 
 
9
    Light_State_Flicker
 
 
10
 
 
 
11
} LIGHT_STATE;
 
 
12
 
 
 
13
typedef enum light_on_off_state
 
 
14
{
 
 
15
    Light_OnOff_Off,
 
 
16
    Light_OnOff_On,
 
 
17
    Light_OnOff_FadeOff,
 
 
18
    Light_OnOff_FadeOn,
 
 
19
    Light_OnOff_Flicker
 
 
20
 
 
 
21
} LIGHT_ON_OFF_STATE;
 
 
22
 
 
 
23
typedef enum light_type
 
 
24
{
 
 
25
    Light_Type_Standard,
 
 
26
    Light_Type_Strobe,
 
 
27
    Light_Type_Flicker
 
 
28
 
 
 
29
} LIGHT_TYPE;
 
 
30
 
 
 
31
typedef enum light_on_off_type
 
 
32
{
 
 
33
    Light_OnOff_Type_Standard,
 
 
34
    Light_OnOff_Type_Fade,
 
 
35
    Light_OnOff_Type_Flicker
 
 
36
 
 
 
37
} LIGHT_ON_OFF_TYPE;
 
 
38
 
 
 
39
typedef struct placed_light_behav_block
 
 
40
{
 
 
41
    AVP_BEHAVIOUR_TYPE bhvr_type;
 
 
42
 
 
 
43
    TXACTRLBLK *inan_tac;//for lights with anims on them
 
 
44
 
 
 
45
    LIGHTBLOCK* light;
 
 
46
 
 
 
47
    LIGHT_STATE state;
 
 
48
    LIGHT_ON_OFF_STATE on_off_state;
 
 
49
    int sequence;    //texture animation sequence
 
 
50
 
 
 
51
    int colour_red;  //colour for fade up state
 
 
52
    int colour_green;
 
 
53
    int colour_blue;
 
 
54
    int colour_diff_red;  //difference from up colour to down colour
 
 
55
    int colour_diff_green;
 
 
56
    int colour_diff_blue;
 
 
57
 
 
 
58
    int fade_up_time;
 
 
59
    int fade_down_time;
 
 
60
    int up_time;
 
 
61
    int down_time;
 
 
62
 
 
 
63
    int timer;
 
 
64
    int on_off_timer;
 
 
65
    int flicker_timer;
 
 
66
 
 
 
67
    LIGHT_TYPE type;
 
 
68
    LIGHT_ON_OFF_TYPE on_off_type;
 
 
69
 
 
 
70
    int destruct_target_request;
 
 
71
    char destruct_target_ID[SB_NAME_LENGTH];
 
 
72
    STRATEGYBLOCK* destruct_target_sbptr;
 
 
73
 
 
 
74
    VECTORCH corona_location;
 
 
75
 
 
 
76
    int startingHealth; //for network games
 
 
77
    int startingArmour;
 
 
78
 
 
 
79
    unsigned int has_broken_sequence:1; //is there a third texture sequence 
 
 
80
    unsigned int has_corona:1;
 
 
81
    unsigned int swap_colour_and_brightness_alterations:1;
 
 
82
 
 
 
83
} PLACED_LIGHT_BEHAV_BLOCK;
 
 
84
 
 
 
85
typedef struct toolsdata_placed_light
 
 
86
{
 
 
87
    struct vectorch position;
 
 
88
    struct euler orientation;
 
 
89
    char nameID[SB_NAME_LENGTH];
 
 
90
 
 
 
91
    int mass; // Kilos??
 
 
92
    int integrity; // 0-20 (>20 = indestructable)
 
 
93
 
 
 
94
    LIGHTBLOCK* light;
 
 
95
 
 
 
96
    unsigned int static_light:1;
 
 
97
 
 
 
98
    int sequence;
 
 
99
    int colour_red;
 
 
100
    int colour_green;
 
 
101
    int colour_blue;
 
 
102
    int colour_diff_red;
 
 
103
    int colour_diff_green;
 
 
104
    int colour_diff_blue;
 
 
105
 
 
 
106
    int fade_up_time;
 
 
107
    int fade_down_time;
 
 
108
    int up_time;
 
 
109
    int down_time;
 
 
110
 
 
 
111
    int timer;
 
 
112
 
 
 
113
    LIGHT_STATE state;
 
 
114
    LIGHT_ON_OFF_STATE on_off_state;
 
 
115
    LIGHT_TYPE type;
 
 
116
    LIGHT_ON_OFF_TYPE on_off_type;
 
 
117
 
 
 
118
    int destruct_target_request;
 
 
119
    char destruct_target_ID[SB_NAME_LENGTH];
 
 
120
    unsigned int swap_colour_and_brightness_alterations:1;
 
 
121
 
 
 
122
} TOOLS_DATA_PLACEDLIGHT;
 
 
123
 
 
 
124
void InitPlacedLight(void* bhdata,STRATEGYBLOCK *sbPtr);
 
 
125
void PlacedLightBehaviour(STRATEGYBLOCK *sbPtr);
 
 
126
 
 
 
127
void MakePlacedLightNear(STRATEGYBLOCK *sbPtr);
 
 
128
 
 
 
129
void PlacedLightIsDamaged(STRATEGYBLOCK *sbPtr, const DAMAGE_PROFILE *damage, int multiple);
 
 
130
 
 
 
131
void SendRequestToPlacedLight(STRATEGYBLOCK* sbptr, int state,int extended_data);
 
 
132
 
 
 
133
void RespawnLight(STRATEGYBLOCK *sbPtr);
 
 
134
void KillLightForRespawn(STRATEGYBLOCK *sbPtr);