Aw object data zone

From ActiveWiki
Jump to: navigation, search

Minimum requirements
Added in version 4.1
SDKbuild 53



Defines the data structure in AW_OBJECT_DATA of a zone object.


(This is preliminary documentation and is subject to change)

typedef struct aw_object_data_zone {
  aw_type_vector        size;           // BBox, MUST be first item in struct!
  unsigned char         version;        // structure version (set by SDK)
  unsigned char         shape;
  char                  priority;
  float                 gravity;
  float                 friction;
  unsigned short        flags;          // boolean flags
  unsigned long         color;          // COLORREF
  unsigned short        fog_min;
  unsigned short        fog_max;
  unsigned short        footstep_len;   // length of 1st string in str_data
  unsigned short        ambient_len;    // length of 2nd string in str_data
  unsigned char         camera_len;     // length of 3rd string in str_data
  unsigned char         target_cur_len; // length of 4th string in str_data
  unsigned char         voip_rights_len;// length of 5th string in str_data
  unsigned char         name_len;       // length of 6th string in str_data
  char                  reserved[9];    // Bytes reserverd for future use
  // note: increase the strucure's total size
  // by the length of the strings
  // when allocating memory for this structure!
  // (str_data is the reference to the first byte)
  char                  str_data[1];
} aw_object_data_zone;

The total length of the data is calculated as:

len = sizeof (aw_object_data_zone) + zone->footstep_len
    + zone->ambient_len + zone->camera_len + zone->target_cur_len
    + zone->voip_rights_len + zone->name_len;

See also