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

Doomwad::HexenLinedef Class Reference

Inheritance diagram for Doomwad::HexenLinedef:

Doomwad::Linedef Doomwad::WadEntryElement List of all members.

Detailed Description

Represents a single Linedef in a HexenMap.

See also:
HexenLinedefs Linedef
Linedefs are defined by two vertices and can have 0-2 sidedefs.

Fields: 2 bytes: starting Vertex.
2 bytes: ending Vertex.
2 bytes: flags (e.g. impassible).
2 bytes: sidedef1 reference (right side).
2 bytes: sidedef2 reference (left side).
1 byte: type (e.g. door, switch).
5 bytes: 5 arguments, 1 byte each.

Definition at line 182 of file linedefs.hpp.

Public Member Functions

virtual size_t getLength (void) const throw ()
 Get the length of an element.
 HexenLinedef (uint16=0xFFFF, uint16=0xFFFF, uint16=IMPASSIBLE, uint16=NOSIDEDEF, uint16=NOSIDEDEF, uint8=0, int8=0, int8=0, int8=0, int8=0, int8=0) throw ()
 HexenLinedef constructor.
virtual bool read (const Lump &lump, Lump::size_type i) throw ()
 Read this element from a Lump.
virtual std::string toString (void) const throw ()
 Convert this element to a string.
virtual bool write (Lump &lump, Lump::size_type i) const throw ()
 Write this element into a Lump.
virtual ~HexenLinedef (void) throw ()
 Linedef destructor.

Public Attributes

int8 arg1
 Argument 1.
int8 arg2
 Argument 2.
int8 arg3
 Argument 3.
int8 arg4
 Argument 4.
int8 arg5
 Argument 5.
uint16 end
 Ending Vertex.
uint16 flags
 Flags, for example, impassible, blocks sound, lower unpegged.
uint16 sidedef1
 Sidedef number 1, inside/right. -1/0xFFFF for none.
uint16 sidedef2
 Sidedef number 2, outside/left. -1/0xFFFF for none.
uint16 start
 Starting Vertex.
uint8 type
 Type, for example, door, switch. Zero for normal.

Static Public Attributes

static const uint16 ACTIVE_MONSTER = 0x0800
 Activated when crossed by monster.
static const uint16 ACTIVE_MULTIPLE = 0x0200
 Can be activated more than once.
static const uint16 ACTIVE_PLAYER = 0x0400
 Activated when used by player.
static const uint16 ACTIVE_PLAYER_BUMP = 0x1000
 Activated when bumped by player.
static const uint16 ACTIVE_PLAYER_MONSTERS = 0x2000
 Activated by players and monsters.
static const uint16 ACTIVE_PLAYER_PASSTHROUGH = 0x1000
 Activated when used by player, with passthrough.
static const uint16 ACTIVE_PROJECTILE_HIT = 0x0C00
 Activated when hit by projectile.
static const uint16 ACTIVE_PROJECTILE_PASSTHROUGH = 0x1400
 Activated when crossed by projectile.
static const uint16 BLOCKS_EVERYTHING = 0x8000
 Blocks everything, including gunshots and projectiles.
static const size_t LENGTH = 0x00000010
 Length of a single record.
static const uint16 ZDOOM_UNKNOWN = 0x4000
 Unknown.


Constructor & Destructor Documentation

HexenLinedef::HexenLinedef uint16  _start = 0xFFFF,
uint16  _end = 0xFFFF,
uint16  _flags = IMPASSIBLE,
uint16  _sidedef1 = NOSIDEDEF,
uint16  _sidedef2 = NOSIDEDEF,
uint8  _type = 0,
int8  _arg1 = 0,
int8  _arg2 = 0,
int8  _arg3 = 0,
int8  _arg4 = 0,
int8  _arg5 = 0
throw ()
 

HexenLinedef constructor.

Constructs a HexenLinedef from optional integers.

Parameters:
_start Starting Vertex (origin).
_end Ending Vertex.
_flags Flags. Use class constants.
_sidedef1 First sidedef (right).
_sidedef2 Second sidedef (left).
_type Optional special type (e.g. door trigger).
_arg1 Argument 1.
_arg2 Argument 2.
_arg3 Argument 3.
_arg4 Argument 4.
_arg5 Argument 5.

Definition at line 175 of file linedefs.cpp.

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

Linedef destructor.

Destroys a Linedef object.

Definition at line 184 of file linedefs.cpp.


Member Function Documentation

size_t HexenLinedef::getLength void   )  const throw () [virtual]
 

Get the length of an element.

Each element record type has a length. Some are fixed, in which case this function returns that length. Some records are variable-length, in which case this function returns zero.

Returns:
Length of the record.

Reimplemented from Doomwad::Linedef.

Definition at line 188 of file linedefs.cpp.

References LENGTH.

bool HexenLinedef::read const Lump lump,
Lump::size_type  i
throw () [virtual]
 

Read this element from a Lump.

Read one element from a Lump at the specified index.

Parameters:
lump Reference to the target Lump.
i Index into the Lump's buffer.
Returns:
True if successful, false if not.

Reimplemented from Doomwad::Linedef.

Definition at line 216 of file linedefs.cpp.

Referenced by Doomwad::HexenLinedefs::setFromLump().

std::string HexenLinedef::toString void   )  const throw () [virtual]
 

Convert this element to a string.

The format of the string will vary from class to class, but every subclass must be able to format itself as a string. IMPORTANT: this string representation is not guaranteed to preserve all data. Reading back in is not supported. This function's goal is to make the object's state user-readable, not machine-readable.

Returns:
std::string object containing object state.

Reimplemented from Doomwad::Linedef.

Definition at line 239 of file linedefs.cpp.

References arg1, arg2, arg3, arg4, arg5, end, flags, sidedef1, sidedef2, start, and type.

bool HexenLinedef::write Lump lump,
Lump::size_type  i
const throw () [virtual]
 

Write this element into a Lump.

Write one element into a Lump at the specified index.

Parameters:
lump Reference to the target Lump.
i Index into the Lump's buffer.
Returns:
True if successful, false if not.

Reimplemented from Doomwad::Linedef.

Definition at line 193 of file linedefs.cpp.


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