SEEMAP.DAT

From UFOpaedia
Revision as of 09:06, 22 June 2008 by Bomb Bloke (talk | contribs)
Jump to navigation Jump to search

This file is only used by tactical saves and has a length of wglob[2] times wglob[3] times wglob[4] bytes. It details which areas of the map have been explored.

Each tile is detailed using three bits of an entire byte. The offset for any given byte is X Map Length * (Map Level * Y Map Length + X) + Y.

  • Bit 1 (1): Has the west wall been seen?
  • Bit 2 (2): Has the north wall been seen?
  • Bit 3 (4): Has the ground/contents been seen?

When the respective SEEMAP offset for a given tile has bit 3 active you can see all elements (walls, contents, etc) on the screen, otherwise nothing will be visible at all.

For example, if a tile has a northern wall in it and a soldier standing further north looks at it, he'll see the wall (and bit 2 will flip to on) but the wall will still remain invisible on screen because he can't see past it into the rest of the tile.

On the other hand, if he was standing to the south, he'd be able to see everything in the tile and so all three bits would flag and everything becomes visible.

That is to say, the first two bits are redundant. They're set and then ignored.

Not really sure why the programmers bothered with this, I guess they changed their mind on how the fog of war display would work at some point but didn't bother to simplify the backend to match.

See Also