A lot is taken from Jonathan Daniel's great analysis of SWOS tactics files. I
recommend reading it first, since I will not repeat it here, except for the
basics.


Tactics file has 370 bytes, structured as follows:

offset  length  description
------  ------  -----------
   0       9    tactic name, 8 characters and null terminated
   9      35    player 1 positions:
                high nibble x quadrant, low nibble y quadrant
  44      35    player 2 positions
     ...
 289      35    player 9 positions
 324      35    player 10 positions
 359      10    some table, unknown purpose, doesn't seem to be used
 369       1    index of a tactic that is applied when ball is out of play
                this tactic is also used when displaying lineup in menus

The pitch is divided into 35 quadrants, 5 rows and 7 columns. Those are
quadrants to track the ball position. Position 0 corresponds to lower right
quadrant of the pitch, and position 34 corresponds to top left. Player positions
in the tactics file are quadrants where player will be heading if the ball is in
certain quadrant. For players, pitch is divided into 240 positions, 16 rows x 15
columns. X quadrants increase from right to left, y from bottom to top. Note
that goalkeeper doesn't count, as he has a special movement logic.

Tactics are always applied as if upper goal is ours, and we're attacking towards
bottom goal. For 2nd player indices are reversed when indexing the positions.

For every tactic SWOS dynamically generates an array of 11 player positions in
the tactic. Positions are initialized by "defensiveness" of the player - sum
of distance factor of the player and his own goal for each position (this
distance factor is calculated as maximum of distance from middle by x, and
distance from own goal by y). Array of those sums is sorted by defensiveness and
this is the order in which tactic positions are filled.

Default positions, and positions for USER A,B,C,D,E,F tactics:
DEFAULT  : 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11
5-4-1    : 1,  2,  3,  4,  7,  5,  6,  8, 10,  9, 11
4-5-1    : 1,  2,  3,  4,  5,  6,  7,  8, 10,  9, 11
5-3-2    : 1,  2,  3,  4,  7,  5,  6,  8,  9, 10, 11
3-5-2    : 1,  2,  3,  5,  6,  4,  7,  8,  9, 10, 11
4-3-3    : 1,  2,  3,  4,  5,  6,  7,  9,  8, 10, 11
4-2-4    : 1,  2,  3,  4,  5,  7,  8,  6, 10, 11,  9
3-4-3    : 1,  2,  3,  5,  6,  4,  7,  9,  8, 10, 11
SWEEP    : 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11
5-2-3    : 1,  2,  3,  4,  7,  5,  8, 10,  6, 11,  9
ATACK    : 1,  2,  3,  5,  4,  7,  6,  8, 10, 11,  9
DEFEND   : 1,  6,  2,  3,  4,  5,  9,  7,  8, 10, 11


Variables

pl1Tactics, pl2Tactics - contain tactics index of each team
They might be interchanged depending which team is playing top.
