Class: Doom::Map::Linedef

Inherits:
Struct
  • Object
show all
Defined in:
lib/doom/map/data.rb

Constant Summary collapse

FLAGS =
{
  BLOCKING: 0x0001,
  BLOCKMONSTERS: 0x0002,
  TWOSIDED: 0x0004,
  DONTPEGTOP: 0x0008,
  DONTPEGBOTTOM: 0x0010,
  SECRET: 0x0020,
  SOUNDBLOCK: 0x0040,
  DONTDRAW: 0x0080,
  MAPPED: 0x0100
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



9
10
11
# File 'lib/doom/map/data.rb', line 9

def flags
  @flags
end

#sidedef_leftObject

Returns the value of attribute sidedef_left

Returns:

  • (Object)

    the current value of sidedef_left



9
10
11
# File 'lib/doom/map/data.rb', line 9

def sidedef_left
  @sidedef_left
end

#sidedef_rightObject

Returns the value of attribute sidedef_right

Returns:

  • (Object)

    the current value of sidedef_right



9
10
11
# File 'lib/doom/map/data.rb', line 9

def sidedef_right
  @sidedef_right
end

#specialObject

Returns the value of attribute special

Returns:

  • (Object)

    the current value of special



9
10
11
# File 'lib/doom/map/data.rb', line 9

def special
  @special
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



9
10
11
# File 'lib/doom/map/data.rb', line 9

def tag
  @tag
end

#v1Object

Returns the value of attribute v1

Returns:

  • (Object)

    the current value of v1



9
10
11
# File 'lib/doom/map/data.rb', line 9

def v1
  @v1
end

#v2Object

Returns the value of attribute v2

Returns:

  • (Object)

    the current value of v2



9
10
11
# File 'lib/doom/map/data.rb', line 9

def v2
  @v2
end

Instance Method Details

#lower_unpegged?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/doom/map/data.rb', line 30

def lower_unpegged?
  (flags & FLAGS[:DONTPEGBOTTOM]) != 0
end

#two_sided?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/doom/map/data.rb', line 22

def two_sided?
  (flags & FLAGS[:TWOSIDED]) != 0
end

#upper_unpegged?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/doom/map/data.rb', line 26

def upper_unpegged?
  (flags & FLAGS[:DONTPEGTOP]) != 0
end