View Single Post
  #2  
Old 12-07-2011, 08:16 AM
PixelEngineer
Sarnak
 
Join Date: May 2011
Posts: 96
Default

Went back and looked over the newer azone source (thought I had the latest), my apologies. This is how the fragment is handled.

Just the beginning:
Code:
FRAG_CONSTRUCTOR(Data30) {
  struct_Data30 *data;
  uint32 ref;
  Texture *tex;

  data = (struct_Data30 *) buf;

  buf += sizeof(struct_Data30);

  if(!data->flags)
    buf += 8;

  ref = uint32(buf);
Looks like a struct is made and the data is copied into it. Then we move past the size of the struct.

Code:
struct struct_Data30 {
  uint32 flags, params1, params2;
  float params3[2];
} typedef struct_Data30;
Then it looks like if the flags are 0, which I think means the texture is completely transparent, we move past the datapair which appears to be 8 bytes and then we can read in the reference.

I will try this tomorrow. I am also working on an updated version of the WLD documentation which I will release with the source of the client.
Reply With Quote