A.A Format

A Arensus Crossword Construction document THCC consist of several parts which have a strict ordering.

THCC = GENERATOR VERSION CODEPAGE WIDTH HEIGHT ENCRYPTION LETTERS {FIELD} TITLE AUTHOR LICENCE DESCRIPTION DEFINITIONS

GENERATOR = String 0 (The name of  Software used to generate this file. Usually it is Arensus Crossword Puzzles Compiler)

VERSION = String 0 (The version number of  the generator)

DESCRIPTION = String 0 (An arbitrary description of this puzzle. The description is a 0-terminated character-string)

WIDTH = 2 byte

HEIGHT = 2 byte

LETTERS = String (The String contains WIDTH*HEIGHT characters. It can be encrypted where the length should not be prolonged. Maybe i should have reserved a flag to indicate encryption.)

FIELD = PRIMARY SECONDARY [PIPE PIPE] [4BYTE] [4BYTE] ARROW [ARROW]]

PRIMARY = byte (There are WIDTH*HEIGHT PRIMARY)
0 = UNDEFINED
1 = LETTER
2 = BLOCK
3 = CLUE1
4 = CLUE2
5 = RESERVED

SECONDARY = byte (There are WIDTH*HEIGHT SECONDARY, each follows one PRIMARY)
Bit 1 = BAR_HORIZONTAL (bottom bar of cell)
Bit 2 = BAR_VERTICAL (right bar of cell)
Bit 3 = CLUE_LETER (Letter which is the first letter of a word. The cell contains clues as well)
Bit 4 = SOLUTION_LETTER (Letter which is part of solution-word)
Bit 5 = PIPE_A (means pipe A is on)
Bit 6 = PIPE_B (means pipe B is on)
Bit 7 and 8 is not used yet.

Depending on PRIMARY and SECONDARY there follows different numbers of bytes.

4BYTE = 4byte

If PRIMARY is LETTER and SECONDARY has bit PIPE_A or PIPE_B on
then the two following two bytes are
PIPE = byte
0 = UNDEFINED
1 = AB
2 = AD
3 = BA
4 = BC
5 = CB
6 = CD
7 = DA
8 = DC
9 = XLD1
10 = XLD2
11 = XLD3
12 = XLD4
13 = XRD1
14 = XRD2
15 = XRD3
16 = XRD4
17 = XLU1
18 = XLU2
19 = XLU3
20 = XLU4
21 = XRU1
22 = XRU2
23 = XRU3
24 = XRU4

If PRIMARY is LETTER and SECONDARY has bit CLUE_LETTER on then next 4BYTE is the number of this clue-field.


If PRIMARY is LETTER and SECONDARY has bit SOLUTION_LETTER then next 4BYTE is the number of solution-letter.

If PRIMARY is CLUE1 then next ARROW defines the type of arrow for that clue.

If PRIMARY is CLUE2 then  next two ARROWs defines the arrows of the two clues.

ARROW = byte
0 = UNDEFINED
1 = A1
2 = A2
3 = A3
4 = B1
5 = B2
6 = B3
7 = C1
8 = C2
9 = C3
10 = D1
11 = D2
12 = D3
13 = X1
14 = X2
15 = X3
16 = X4
17 = X5
18 = X6
19 = X7
20 = X8

TITLE = String 0
AUTHOR = String 0
DEFINITIONS = {String 0}