Blood .SEQ/.QAV tiles id number fixer v1.0
(c) -=CHE@TER=- 2017
http://ctpax-cheater.losthost.org/

This tool allows to shift Blood .SEQ and .QAV tile id numbers.
It's useful since Blood Alpha tools QAVEDIT and SEQEDIT can create
new files but didn't work with the tile numbers larger than 4095.
Shifting .SEQ file tile numbers almost useless since SEQFRAME.nTile
limited with 12 bits ((1 << 12) == 4096) and you can't increase it
further without breaking .SEQ file format. It's here because someone
asks me for this tool but didn't research enough on file formats, so
I did it myself but it was a bit too late... Anyway, maybe someone
create .SEQ version 0x0400 format where SEQFRAME.nTile will be 29 bit
integer without that restriction (hint: there are 17 unused bits at the
end of SEQFRAME structure).
And the .QAV format limited to 6143 since it's a max tile buffer size in
the latest Blood executable file. And its still limited to 4095 on Blood
version 1.00 and maybe some other before 1.21.
If you wonder here some info for 256 tile .ART files:
- 4096 / 256 = 16 .ART files (TILES000.ART ... TILES015.ART)
- 6144 / 256 = 24 .ART files (TILES000.ART ... TILES023.ART)

How to use this tool:
1) Create animation in the QAVEDIT inside range of 0..4095 tiles
  (for that you may need temporary replace one of the game
  TILES000.ART ... TILES015.ART tile files with your own
  TILES016.ART ... TILES023.ART mod files).
2) Shift tiles to new numbers like this (example):

seqavfix filename.seq +256

3) And you're done.

Note that if your animation uses some tiles which you don't want to be
shifted (like tiles from original game) you can exclude them:

seqavfix filename.seq +256 100

Tiles with numbers less than 100 will not be shifted.
You can also limit maximum number:

seqavfix filename.seq +256 100 3000

This command means that all tile numbers will be shifted by +256 if their
number more or equal to 100 and if after shift they are didn't overflow 3000.
Also you can use -256 (substruct) or just 256 (number without sign) -
this will replace all the tiles with 256. Run tool without any arguments
to see the usage help.
Note that any tiles with number 0 or less will be ignored by game
(and this tool too) because that's how unused frames marked.
