HSF Opcode Definition
TKE_Dictionary
Opcode
ASCII | D |
Hexadecimal | 44 |
Decimal | 68 |
Operands
Byte format [Word pause_count], [(pause_count)xLong pause_offsets] Long count, (count)x{ Long index, Byte presence, (number of bits set in presence)xLong item_offset, [Byte item_options], [Point bounds_min, Point bounds_max] } [Long first_pause_offset] Long dictionary_offset
format | indicates type of dictionary, currently supported values are 0, 1, and 2. |
pause_count | number of entries in pause offset table, present if format is 2. |
pause_offsets | file offsets of all recorded pause opcodes, present if format is 2. |
count | number of index-value sets |
index | index associated with an object and the corresponding offsets |
presence | bitmask indicating which variations of an object have recorded offsets, low bit represents the full objects, successive bits for increasingly reduced detail versions. |
item_offset | file offset for a specific variation of an object, one per bit in presence |
item_options | flags indicating any additional enties for this item, present if format is 1 or greater. |
bounds_min | minimum corner of the bounding volume of this item, present if the low bit set in item_options |
bounds_max | maximum corner of the bounding volume of this item, present if the low bit set in item_options |
first_pause_offset | file offset of a single recorded pause (0 if none recorded), present if format is 1 |
dictionary_offset | file offset of the start of the dictionary |
Notes
A dictionary is a lookup table, providing the file offsets to specified items and their variations.
An application might, for instance, only read the first part of an appropriated created HSF file to get the basic layout and coarse representations of the scene (low level of detail representations). It could then use the dictionary to locate and read specific items to "sweeten" them on demand.
The dictionary will commonly be placed at the end of the file, so that by stepping back from the end the location of the dictionary can be found. A TKE_Dictionary_Locater may be used instead at the end of the file if it is useful to place the dictionary itself elsewhere in the file.
top_level:3