Aw object data zone

From ActiveWiki
Revision as of 08:31, 13 June 2009 by Macavity (talk | contribs) (Cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 53


aw_object_data_zone

Description

Defines the data structure in AW_OBJECT_DATA of a zone object.

Notes

(This is preliminary documentation and is subject to change)

// AW_OBJECT_TYPE_ZONE
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