Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Doomwad::Map Class Reference

List of all members.

Detailed Description

Represents a level the user plays.

See also:
Blockmap GLMap HexenMap Linedefs Nodes Reject Sectors Segs Sidedefs

Ssectors Things Vertexes

A Map is a collection of Wad entries that represent a single map or level that the user plays on in the game. It contains a bunch of entries in the following order:

Map Entries:
MAPxy or ExMy zero-length header
THINGS
LINEDEFS
SIDEDEFS
VERTEXES
SEGS
SSECTORS
NODES
SECTORS
REJECT
BlOCKMAP

Additionally, there are several OpenGL node structures that may follow, if the map author built GL nodes:

OpenGL Map Entries:
GL_ExMy or GL_MAPxy marker
GL_VERT
GL_SEGS
GL_SSECT
GL_NODES

Together, they define a single map. Unfortunately, the OO paradigm breaks down a little when dealing with maps. There are too many cross-references between map structures to allow proper nesting and referencing, so each structure is dumb. All it knows are a bunch of integers and strings. These reference other map structures and graphics by name only. The Map class holds logic to piece them together and handle cross-referencing properly.

I really wish there were a better way to do this, but id built Doom a long time ago and did not use object-orientation at all.

Definition at line 142 of file map.hpp.

Public Member Functions

 Map (Wad::const_iterator) throw ()
 Constructor.
 Map (const std::string &=DEFAULT_MAP_NAME, bool=false) throw ()
 "Default" Constructor.
virtual ~Map (void) throw ()
 Destructor.

Public Attributes

Blockmap blockmap
 BLOCKMAP
GLMap gl
 OpenGL resources.
bool glEnabled
 Use OpenGL resources for I/O operations?
Linedefs linedefs
 LINEDEFS
std::string name
 Name used when reading and writing to/from disk.
Nodes nodes
 NODES
Reject reject
 REJECT
Sectors sectors
 SECTORS
Segs segs
 SEGS
Sidedefs sidedefs
 SIDEDEFS
Ssectors ssectors
 SSECTORS
Things things
 THINGS
Vertexes vertexes
 VERTEXES

Static Public Attributes

static const std::string DEFAULT_MAP_NAME = "MAP01"
 Name of the default Map as it appears in a Wad.


Constructor & Destructor Documentation

Map::Map const std::string &  newName = DEFAULT_MAP_NAME,
bool  useGL = false
throw ()
 

"Default" Constructor.

Has default values for its parameters.

Parameters:
newName Name of the map, e.g. "MAP01".
useGL Enable OpenGL resources?

Definition at line 54 of file map.cpp.

Map::Map Wad::const_iterator  source  )  throw ()
 

Constructor.

Constructs from an iterator to a Lump in a Wad. Takes that Lump's name, and reads the Lumps following it as its data. Automatically determines if it needs to enable OpenGL.

Parameters:
source Iterator to a map marker in a Wad.

Definition at line 70 of file map.cpp.

Map::~Map void   )  throw () [virtual]
 

Destructor.

Destroys a Map object.

Definition at line 82 of file map.cpp.


Generated on Fri Jun 10 19:38:52 2005 for libdoomwad by  doxygen 1.4.0