SEEMAP.DAT

From UFOpaedia
Revision as of 16:35, 20 July 2011 by Daiky (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.

Daiky 20/07/2011 : the first two bits actually are not redundant the are used to show the west and north doors, these "type of walls" are the only exception. It make sense because otherwise you would never find a door in a west or north wall when it all would remain invisible.

See Also