to be specific, the chunk when veiwed raw (like with a hex editor) is now
(4 bytes) ID //the chunk name, GLOW
(4 bytes) int /size //the size of the rest of the chunk
(4 bytes) int /number of light groupes //how many light groupes are in this model
[for each light groupe]
(4 bytes) int /displacement time //amount of time that this groupe will be displaced from 0
(4 bytes) int /on time //how long this groupe will be on
(4 bytes) int /off time //how long this groupe will be off
(4 bytes) int /object parent //the subobject number that will be asosiated with this groupe, used for linking to destroyable subobject and rotating submodel-not implemented
(4 bytes) int /LOD //how far away will this glow be visable
(4 bytes) int /type //what rendering type, so I can make normal glows and ones that render like a beam<-something I rescently added and isn't in the format listed in this topic
(4 bytes) int /number of points //number of points int this groupe
(4 bytes) int /str length //number of charicters in the preperty string
(str length bytes) char /properties// the properties string, ie "$glow_texture=$thrusterglow01"
[for each point]
{vector} /pos //the position of the glow point
(4 bytes) float /x
(4 bytes) float /y
(4 bytes) float /z
{vector} /normal //the direction the glow point is pointing
(4 bytes) float /x
(4 bytes) float /y
(4 bytes) float /z
(4 bytes) float /radius/ the radius of the glow point
]next point[
]next groupe[
so the structure is (chunk header (ID and size) +) 1 int + (the groupe structure wich is 7 ints, 1 string (an int and as many chars as that int says), + (the points structure wich is 2 vectors (3 floats each) and a float) * number of points in the groupe)* number of groupes
struct HullLightPoint
{
vector point;
vector norm;
float radius;
};
struct HullLights
{
int disp_time;
int on_time;
int off_time;
int obj_parent;
int LOD;
int type;
int num_Lights;
string properties;
HullLightPoint* lights;
HullLights() : disp_time(0), on_time(0), off_time(0), obj_parent(0), LOD(0), num_Lights(0), lights(0), type(0) {}
};
struct GLOW
{
int num_glows_arrays;
HullLights *lights;
};