A description of the HIK animation format for RealLive
------------------------------------------------------

A HIK file is an animation format that can be thought of as a nested set of
collections. The basic format of the HIK file is a list of key value pairs,
where the key is a five digit integer. The first digit describes which level
off the hierarchy we're describing:

1: Top level information
2: Per layer information
3: Per ????? information (always only 1 entry so far...)
4: Per frame information

The key 10000 is special and I believe is treated like file magic. Otherwise,
20000, 30000 and 40000 describe the number of entries at their level.

I suspect that the keys ?0001 are deliminators between records and that their
value is always 1. (Hence why there is no 10001 record in any HIK file I've
examined).

Top level layer information
---------------------------

10000 : 10000
      > Suspect to be file magic.
10100 : <int> (always 1 so far)
10101 : <int> (always 0 so far)
10102 : <int> (always 0 so far)
10103 : <int> <int>
      > Size of the HIK layer, probably.

Per layer information
---------------------

20000 : <int>
      > Number of layers 
20001 : 1
      > Start of new layer. (Value probably doesn't matter; no visible
      > differences when I tried "0" or "2" during a previous experiment with
      > Planetarian).
20100 : <size of string including NULL> <NULL terminated character string>
20101 : <int> <int>
      > Appears to be an offset from the top left corner of the screen to where
      > this record's image starts. This doesn't affect the clip area.

21000 : <int>
      > Most likely a boolean to control the next couple of options. Always
      > false in Planetarian's HIK files. When I disable 21200 and enable these
      > options, the planetarian background scrolls diagonally and repeats. Is
      > this an option for backgrounds?
21001 : <int> <int> <int> <int> ; 640x480 (size of source or dest?)
21002 : <int> <int> <int> <int> <int>
21003 : <int>

21100 : <int>
      > Most likely a boolean to control 21101. Always false in Planetarian's
      > HIK files.
21101 : <int> <int> <int> <int> ; 640x480 (size of source or dest?)

21200 : <int>
      > 1 if we use the scrolling stuff from 21201 and 21202. (Maybe 21203?)
21201 : <int> <int> <int> <int>
      > Think this is the important part. The first int pair is the (x, y)
      > starting coordinate for the top left of the image (perhaps offset by
      > 20101) and the second pair is the ending (x, y).
21202 : <int> <int>
      > The first int is definitly time to xscroll. Second is time to yscroll?
21203 : <int>

21301 : <int>
      > 1 if we should use the clip area. Note how this is backwards from how
      > things usually are. Maybe I'm wrong here?
21300 : <int> <int> <int> <int>
      > Defines the output clip area.

Per ????? information (always only 1 entry so far...)
-----------------------------------------------------

30000 : <int>
      > Number of ????? in the ??????
30001 : <int>
      > Start of a new ?????

30100 : <int>
      > 1 if we should perform some sort of multiframe animation.  This is used
      > in ALMA's EV0703.hik to change between its five frames. When set to 0
      > in that file, it only displays the first image.
30101 : <int>
30102 : <int>
      > Not sure; this doesn't appear to be the time a frame should be on
      > screen; changing it to 1000 doesn't increase frame length.

Per frame information
---------------------

40000 : <int>
      > Number of frames
40101 : 31 <int>s.
      > No idea at all. Probably the start of a new frame.
40102 : <int>
      > Image Opacity in the range 0-255.
40103 : <int> <int>              ; 0 0
      > Some sort of offset; Weirdness happens when setting this to something
      > other than [0, 0]
40100 : <size of string including NULL> <NULL terminated character string>
      : <int> <int>
      > Source g00 image. No idea what the two ints are.
