Inheritance diagram for Doomwad::Blockmap:

BLOCKMAP map resource.
BLOCKMAP helps to optimize collision detection calculations. It divides the level into 128 pixel squares, and records which Linedefs are in each block. Then, when the engine needs to detect if two objects collide, it consults the BLOCKMAP to see if it should perform the calculation. This way, the engine does not need to calculate every Thing and Linedef against each other every gametic, an O(2n) operation.
Header:
16 bit x-coordinate of grid origin.
16 bit y-coordinate of grid origin.
16 bit number of columns.
16 bit number of rows.
Offsets:
16 bit offset to block n.
Repeat (rows*columns) times.
Blocklists:
16 bit 0x0000.
16 bits for each Linedef in the block.
16 bit 0xFFFF.
Definition at line 90 of file blockmap.hpp.
Public Member Functions | |
| Blockmap (const Lump &) throw () | |
| Construct from a Lump. | |
| Blockmap (void) throw () | |
| Default constructor. | |
| virtual bool | setFromLump (const Lump &lump) throw () |
| Convert a Lump to this entry. | |
| virtual Lump | toLump (void) const throw () |
| Convert this entry to a Lump. | |
| virtual std::string | toString (void) const throw () |
| Convert this entry to a std::string. | |
| virtual | ~Blockmap (void) throw () |
| Destructor. | |
Static Public Attributes | |
| static const std::string | NAME = "BLOCKMAP" |
| Name of a Blockmap entry. | |
|
|
Construct from a Lump. Constructs a Blockmap object given raw Lump data.
Definition at line 64 of file blockmap.cpp. References setFromLump(). |
|
|
Convert a Lump to this entry. Lumps should not know about specific data structures. Those structures know about Lumps, including how to convert from them. Setting from a Lump involves parsing that Lump's contents to see if they are valid. If they are, then this object will contain what you expect it to. If not, it will return false and the atomic operation will not succeed.
Implements Doomwad::WadEntry. Definition at line 78 of file blockmap.cpp. Referenced by Blockmap(). |
|
|
Convert this entry to a Lump. Each subclass must be able to convert itself to a Lump for storage in a Wad.
Implements Doomwad::WadEntry. Definition at line 85 of file blockmap.cpp. References NAME. |
|
|
Convert this entry to a std::string. The exact implementation varies by the exact concrete class, but the idea is to convert the entry into a summary to be displayed to the user. Please note that converting to a string may lose information. This is not serialization in the purest sense of the word, this is merely a quick and dirty user-readable summary of the entry. True serialization is achieved by converting a Lump object and using its stream I/O functions to read and write.
Implements Doomwad::WadEntry. Definition at line 93 of file blockmap.cpp. |
1.4.0