Hey oasiz.
Wow, this is golden information! Thanks a lot for being so supportive!
I think I just got it. I've created a simple .map with 1 sector and 4 walls, then ran this bit of code (C#):
var sectorSize = 40;
var wallSize = 32;
var spriteSize = 44;
var fileStream = File.OpenRead(map); // map is the path to the .map file
var binaryReader = new BinaryReader(fileStream);
var header = binaryReader.ReadBytes(20);
var sectorCount = binaryReader.ReadBytes(2)[0]; // 1
var sectors = binaryReader.ReadBytes(sectorCount * sectorSize);
var wallCount = binaryReader.ReadBytes(2)[0]; // 4
var walls = binaryReader.ReadBytes(wallCount * wallSize);
var spriteCount = binaryReader.ReadBytes(2)[0]; // 0
var sprites = binaryReader.ReadBytes(spriteCount * spriteSize);
The counter values seems to be correct, I just don't understand what the second byte is.
Ran the same code with a bigger map (mapster says it has 603 sectors, 3876 walls and 1531 sprites), got:
sectorCount[0] // 91
sectorCount[1] // 2
What does it mean? Am I reading it the wrong way?