com.robrohan.ruin.doom
Class BlockList

java.lang.Object
  |
  +--com.robrohan.ruin.doom.BlockList
All Implemented Interfaces:
java.io.Serializable

public class BlockList
extends java.lang.Object
implements java.io.Serializable

A Block map (collision detection) is broken into cells, in each cell is a list of its contents (specifically the lines that run though it and the things that are in it - @2002.10.27). This is a cell entry if you will it has the contents of a cell.

See Also:
Serialized Form

Field Summary
 int[] linedefs
           
static int MAXLINES
          the maximium number of lines in this block these are confined to this block so this should be more than enough.
static int MAXTHINGS
           
 int[] things
           
 
Constructor Summary
BlockList()
          Creates a new instance of BlockList
 
Method Summary
 void addLineDef(int linedefID)
          add a linedef
 void addLineList(int[] linedefIDs)
          add a list of linedefs
 int[] getAllLineDefs()
          returns all linedef Ids for this Block List
 int getLineDef(int position)
          get a line def
static void main(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAXLINES

public static final int MAXLINES
the maximium number of lines in this block these are confined to this block so this should be more than enough. Edit for performance. remember this is in a 128x128 section of the map

See Also:
Constant Field Values

MAXTHINGS

public static final int MAXTHINGS
See Also:
Constant Field Values

linedefs

public int[] linedefs

things

public int[] things
Constructor Detail

BlockList

public BlockList()
Creates a new instance of BlockList

Method Detail

addLineList

public void addLineList(int[] linedefIDs)
add a list of linedefs


addLineDef

public void addLineDef(int linedefID)
add a linedef


getAllLineDefs

public int[] getAllLineDefs()
returns all linedef Ids for this Block List


getLineDef

public int getLineDef(int position)
get a line def


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)